summaryrefslogtreecommitdiffstats
path: root/app/views/timelog/_list.html.erb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-07-13 19:02:48 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-07-13 19:02:48 +0000
commit793cb1676450a5b3e723a452893c10be1cb0f1bd (patch)
tree6c3922b5fed76ae41617b5ff9e215f985b0c4f9d /app/views/timelog/_list.html.erb
parentabf3fe9c83d8e0e832d4e4d211eafbeb27ea72b1 (diff)
downloadredmine-793cb1676450a5b3e723a452893c10be1cb0f1bd.tar.gz
redmine-793cb1676450a5b3e723a452893c10be1cb0f1bd.zip
Make time entries groupable (#16843).
git-svn-id: http://svn.redmine.org/redmine/trunk@15649 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/timelog/_list.html.erb')
-rw-r--r--app/views/timelog/_list.html.erb24
1 files changed, 23 insertions, 1 deletions
diff --git a/app/views/timelog/_list.html.erb b/app/views/timelog/_list.html.erb
index 71fe41a68..3a854ccef 100644
--- a/app/views/timelog/_list.html.erb
+++ b/app/views/timelog/_list.html.erb
@@ -15,7 +15,22 @@
</tr>
</thead>
<tbody>
-<% entries.each do |entry| -%>
+<% grouped_query_results(entries, @query, @entry_count_by_group) do |entry, group_name, group_count, group_totals| -%>
+ <% if group_name %>
+ <% reset_cycle %>
+ <tr class="group open">
+ <td colspan="<%= @query.inline_columns.size + 2 %>">
+ <span class="expander" onclick="toggleRowGroup(this);">&nbsp;</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 class="time-entry <%= cycle("odd", "even") %> hascontextmenu">
<td class="checkbox hide-when-print"><%= check_box_tag("ids[]", entry.id, false, :id => nil) %></td>
<%= raw @query.inline_columns.map {|column| "<td class=\"#{column.css_classes}\">#{column_content(column, entry)}</td>"}.join %>
@@ -32,6 +47,13 @@
<% end -%>
</td>
</tr>
+ <% @query.block_columns.each do |column|
+ if (text = column_content(column, issue)) && text.present? -%>
+ <tr class="<%= current_cycle %>">
+ <td colspan="<%= @query.inline_columns.size + 1 %>" class="<%= column.css_classes %>"><%= text %></td>
+ </tr>
+ <% end -%>
+ <% end -%>
<% end -%>
</tbody>
</table>