diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2019-10-19 11:42:20 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2019-10-19 11:42:20 +0000 |
commit | 45f039187df03e8925cb0d08ccc1838c9ea2d5c2 (patch) | |
tree | 3bbb8958c71b24e65123c0e8f29d6f15726424d5 /app/views/projects | |
parent | ecd9d9ba2f43f2f5a88c1d34d34d07dae40dfe4e (diff) | |
download | redmine-45f039187df03e8925cb0d08ccc1838c9ea2d5c2.tar.gz redmine-45f039187df03e8925cb0d08ccc1838c9ea2d5c2.zip |
Option to switch between table list and board list (#29482).
Patch by Marius BALTEANU.
git-svn-id: http://svn.redmine.org/redmine/trunk@18765 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/projects')
-rw-r--r-- | app/views/projects/_board.html.erb | 3 | ||||
-rw-r--r-- | app/views/projects/_list.html.erb | 35 | ||||
-rw-r--r-- | app/views/projects/index.html.erb | 7 |
3 files changed, 41 insertions, 4 deletions
diff --git a/app/views/projects/_board.html.erb b/app/views/projects/_board.html.erb new file mode 100644 index 000000000..7d63a533d --- /dev/null +++ b/app/views/projects/_board.html.erb @@ -0,0 +1,3 @@ +<div id="projects-index"> + <%= render_project_hierarchy(@entries) %> +</div> diff --git a/app/views/projects/_list.html.erb b/app/views/projects/_list.html.erb new file mode 100644 index 000000000..8a1efc204 --- /dev/null +++ b/app/views/projects/_list.html.erb @@ -0,0 +1,35 @@ +<div class="autoscroll"> +<table class="list projects odd-even <%= @query.css_classes %>"> +<thead> + <tr> + <% @query.inline_columns.each do |column| %> + <%= column_header(@query, column) %> + <% end %> + </tr> +</thead> +<tbody> +<% grouped_project_list(entries, @query) do |entry, level, group_name, group_count, group_totals| -%> + <% if group_name %> + <% reset_cycle %> + <tr class="group open"> + <td colspan="<%= @query.inline_columns.size %>"> + <span class="expander" onclick="toggleRowGroup(this);"> </span> + <span class="name"><%= group_name %></span> + <% if group_count %> + <span class="count"><%= group_count %></span> + <% end %> + <span class="totals"><%= group_totals %></span> + <%= link_to_function("#{l(:button_collapse_all)}/#{l(:button_expand_all)}", + "toggleAllRowGroups(this)", :class => 'toggle-all') %> + </td> + </tr> + <% end %> + <tr id="project-<%= entry.id %>" class="<%= cycle('odd', 'even') %> <%= entry.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>"> + <% @query.inline_columns.each do |column| %> + <%= content_tag('td', column_content(column, entry), :class => column.css_classes) %> + <% end %> + </tr> +<% end -%> +</tbody> +</table> +</div> diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb index 3c2543b43..067c9bdee 100644 --- a/app/views/projects/index.html.erb +++ b/app/views/projects/index.html.erb @@ -11,12 +11,11 @@ <% end %> <% if @query.valid? %> - <% if @projects.empty? %> + <% if @entries.empty? %> <p class="nodata"><%= l(:label_no_data) %></p> <% else %> - <div id="projects-index"> - <%= render_project_hierarchy(@projects) %> - </div> + <%= render :partial => @query.display_type, :locals => { :entries => @entries }%> + <span class="pagination"><%= pagination_links_full @entry_pages, @entry_count %></span> <% end %> <% end %> |