Defect #32896 » 0001-Fix-totals-not-displayed-in-projects-list-view.patch
app/views/projects/_list.html.erb | ||
---|---|---|
1 |
<%= render_query_totals(@query) %> |
|
1 | 2 |
<div class="autoscroll"> |
2 | 3 |
<table class="list projects odd-even <%= @query.css_classes %>"> |
3 | 4 |
<thead> |
public/stylesheets/application.css | ||
---|---|---|
405 | 405 |
.query-totals {text-align:right;} |
406 | 406 |
.query-totals>span:not(:first-child) {margin-left:0.6em;} |
407 | 407 |
.query-totals .value {font-weight:bold;} |
408 |
body.controller-issues .query-totals {margin-top:-2.3em;} |
|
408 |
.query-totals {margin-top:-2.3em;} |
|
409 |
body.controller-timelog .query-totals {margin-top:initial;} |
|
409 | 410 | |
410 | 411 |
td.center {text-align:center;} |
411 | 412 |
test/functional/projects_controller_test.rb | ||
---|---|---|
230 | 230 |
) |
231 | 231 |
end |
232 | 232 | |
233 |
def test_index_with_int_custom_field_total |
|
234 |
@request.session[:user_id] = 1 |
|
235 | ||
236 |
field = ProjectCustomField.generate!(:field_format => 'int') |
|
237 |
CustomValue.create!(:customized => Project.find(1), :custom_field => field, :value => '2') |
|
238 |
CustomValue.create!(:customized => Project.find(2), :custom_field => field, :value => '7') |
|
239 |
get( |
|
240 |
:index, |
|
241 |
:params => { |
|
242 |
:display_type => 'list', |
|
243 |
:t => ["cf_#{field.id}"] |
|
244 |
} |
|
245 |
) |
|
246 |
assert_response :success |
|
247 |
assert_select '.query-totals' |
|
248 |
assert_select ".total-for-cf-#{field.id} span.value", :text => '9' |
|
249 |
end |
|
250 | ||
233 | 251 |
def test_autocomplete_js |
234 | 252 |
get( |
235 | 253 |
:autocomplete, |