]> source.dussan.org Git - redmine.git/commitdiff
Merged r19469 from trunk to 4.1-stable (#32896).
authorGo MAEDA <maeda@farend.jp>
Tue, 28 Jan 2020 01:17:57 +0000 (01:17 +0000)
committerGo MAEDA <maeda@farend.jp>
Tue, 28 Jan 2020 01:17:57 +0000 (01:17 +0000)
git-svn-id: http://svn.redmine.org/redmine/branches/4.1-stable@19470 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/projects/_list.html.erb
public/stylesheets/application.css
test/functional/projects_controller_test.rb

index 8d8c0d9c12f073a7d1bf463fb46217d35258e3a4..3c90921ec33c2f889508cf9a7b786c95388d61e9 100644 (file)
@@ -1,3 +1,4 @@
+<%= render_query_totals(@query) %>
 <div class="autoscroll">
 <table class="list projects odd-even <%= @query.css_classes %>">
 <thead>
index cac1d3fd445205bd1ce7a9a0846ae5188fa11acc..dcada0e46eb5dea103611d6ca3a6134cfeb0bfd5 100644 (file)
@@ -405,7 +405,8 @@ div.table-list.boards .table-list-cell.name {width: 30%;}
 .query-totals {text-align:right;}
 .query-totals>span:not(:first-child) {margin-left:0.6em;}
 .query-totals .value {font-weight:bold;}
-body.controller-issues .query-totals {margin-top:-2.3em;}
+.query-totals {margin-top:-2.3em;}
+body.controller-timelog .query-totals {margin-top:initial;}
 
 td.center {text-align:center;}
 
index b09af65bbfad20f711154014e428887b8769e1fc..975e3bb6ad75c18d520bf1850869aec3607f724c 100644 (file)
@@ -232,6 +232,24 @@ class ProjectsControllerTest < Redmine::ControllerTest
     )
   end
 
+  def test_index_with_int_custom_field_total
+    @request.session[:user_id] = 1
+
+    field = ProjectCustomField.generate!(:field_format => 'int')
+    CustomValue.create!(:customized => Project.find(1), :custom_field => field, :value => '2')
+    CustomValue.create!(:customized => Project.find(2), :custom_field => field, :value => '7')
+    get(
+      :index,
+      :params => {
+        :display_type => 'list',
+        :t => ["cf_#{field.id}"]
+      }
+    )
+    assert_response :success
+    assert_select '.query-totals'
+    assert_select ".total-for-cf-#{field.id} span.value", :text => '9'
+  end
+
   def test_autocomplete_js
     get :autocomplete, :params => {
         :format => 'js',