summaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-10-04 19:42:37 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-10-04 19:42:37 +0000
commit446f70f584320aa8da62b72a7116dce298eca07e (patch)
tree046ec4a3108ccd6af6ec4d70594923610408a329 /app/views
parent35a059a756144384888fcc576a72d20b2417e009 (diff)
downloadredmine-446f70f584320aa8da62b72a7116dce298eca07e.tar.gz
redmine-446f70f584320aa8da62b72a7116dce298eca07e.zip
Adds options to display totals on the issue list (#1561).
Works for estimated hours, spent hours and any numeric custom field. git-svn-id: http://svn.redmine.org/redmine/trunk@14642 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views')
-rw-r--r--app/views/issues/index.html.erb5
-rw-r--r--app/views/queries/_form.html.erb3
-rw-r--r--app/views/settings/_issues.html.erb5
3 files changed, 13 insertions, 0 deletions
diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb
index 55bfc5647..f08f76d65 100644
--- a/app/views/issues/index.html.erb
+++ b/app/views/issues/index.html.erb
@@ -39,6 +39,10 @@
<td><%= l(:button_show) %></td>
<td><%= available_block_columns_tags(@query) %></td>
</tr>
+ <tr>
+ <td><%= l(:label_total_plural) %></td>
+ <td><%= available_totalable_columns_tags(@query) %></td>
+ </tr>
</table>
</div>
</fieldset>
@@ -60,6 +64,7 @@
<% if @issues.empty? %>
<p class="nodata"><%= l(:label_no_data) %></p>
<% else %>
+<%= render_query_totals(@query) %>
<%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query} %>
<p class="pagination"><%= pagination_links_full @issue_pages, @issue_count %></p>
<% end %>
diff --git a/app/views/queries/_form.html.erb b/app/views/queries/_form.html.erb
index 753eaedab..d995777c5 100644
--- a/app/views/queries/_form.html.erb
+++ b/app/views/queries/_form.html.erb
@@ -33,6 +33,9 @@
<p><label><%= l(:button_show) %></label>
<%= available_block_columns_tags(@query) %></p>
+
+<p><label><%= l(:label_total_plural) %></label>
+<%= available_totalable_columns_tags(@query) %></p>
</fieldset>
<% else %>
<fieldset><legend><%= l(:label_options) %></legend>
diff --git a/app/views/settings/_issues.html.erb b/app/views/settings/_issues.html.erb
index b3533bbd1..f29a6d4ec 100644
--- a/app/views/settings/_issues.html.erb
+++ b/app/views/settings/_issues.html.erb
@@ -38,6 +38,11 @@
<%= render_query_columns_selection(
IssueQuery.new(:column_names => Setting.issue_list_default_columns),
:name => 'settings[issue_list_default_columns]') %>
+
+ <p><%= setting_multiselect :issue_list_default_totals,
+ IssueQuery.new(:totalable_names => Setting.issue_list_default_totals).available_totalable_columns.map {|c| [c.caption, c.name.to_s]},
+ :inline => true,
+ :label => :label_total_plural %></p>
</fieldset>
<%= submit_tag l(:button_save) %>