Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@17865 e93f8b46-1217-0410-a6f0-8f06a7374b81tags/4.1.0
self.sortable = custom_field.order_statement || false | self.sortable = custom_field.order_statement || false | ||||
self.groupable = custom_field.group_statement || false | self.groupable = custom_field.group_statement || false | ||||
self.totalable = options.key?(:totalable) ? !!options[:totalable] : custom_field.totalable? | self.totalable = options.key?(:totalable) ? !!options[:totalable] : custom_field.totalable? | ||||
@inline = true | |||||
@inline = custom_field.full_width_layout? ? false : true | |||||
@cf = custom_field | @cf = custom_field | ||||
end | end | ||||
<% query.block_columns.each do |column| | <% query.block_columns.each do |column| | ||||
if (text = column_content(column, issue)) && text.present? -%> | if (text = column_content(column, issue)) && text.present? -%> | ||||
<tr class="<%= current_cycle %>"> | <tr class="<%= current_cycle %>"> | ||||
<td colspan="<%= query.inline_columns.size + 2 %>" class="<%= column.css_classes %>"> | |||||
<td colspan="<%= query.inline_columns.size + 2 %>" class="<%= column.css_classes %> block_column"> | |||||
<% if query.block_columns.count > 1 %> | <% if query.block_columns.count > 1 %> | ||||
<span><%= column.caption %></span> | <span><%= column.caption %></span> | ||||
<% end %> | <% end %> |
tr.issue td.relations { text-align: left; } | tr.issue td.relations { text-align: left; } | ||||
tr.issue td.done_ratio table.progress { margin-left:auto; margin-right: auto;} | tr.issue td.done_ratio table.progress { margin-left:auto; margin-right: auto;} | ||||
tr.issue td.relations span {white-space: nowrap;} | tr.issue td.relations span {white-space: nowrap;} | ||||
table.issues td.description, table.issues td.last_notes {color:#777; font-size:90%; padding:4px 4px 4px 24px; text-align:left; white-space:normal;} | |||||
table.issues td.description pre, table.issues td.last_notes pre {white-space:normal;} | |||||
table.issues td.block_column {color:#777; font-size:90%; padding:4px 4px 4px 24px; text-align:left; white-space:normal;} | |||||
table.issues td.block_column pre {white-space:normal;} | |||||
tr.issue.idnt td.subject {background: url(../images/arrow_right.png) no-repeat 2px 50%;} | tr.issue.idnt td.subject {background: url(../images/arrow_right.png) no-repeat 2px 50%;} | ||||
tr.issue.idnt-1 td.subject {padding-left: 24px; background-position: 8px 50%;} | tr.issue.idnt-1 td.subject {padding-left: 24px; background-position: 8px 50%;} |
assert_select 'td.description[colspan="4"] span', :text => 'Description' | assert_select 'td.description[colspan="4"] span', :text => 'Description' | ||||
end | end | ||||
def test_index_with_full_width_layout_custom_field_column_should_show_column_as_block_column | |||||
field = IssueCustomField.create!(:name => 'Long text', :field_format => 'text', :full_width_layout => '1', | |||||
:tracker_ids => [1], :is_for_all => true) | |||||
issue = Issue.find(1) | |||||
issue.custom_field_values = {field.id => 'This is a long text'} | |||||
issue.save! | |||||
get :index, :params => { | |||||
:set_filter => 1, | |||||
:c => ['subject', 'description', "cf_#{field.id}"] | |||||
} | |||||
assert_response :success | |||||
assert_select 'td.description[colspan="4"] span', :text => 'Description' | |||||
assert_select "td.cf_#{field.id} span", :text => 'Long text' | |||||
end | |||||
def test_index_with_parent_column | def test_index_with_parent_column | ||||
Issue.delete_all | Issue.delete_all | ||||
parent = Issue.generate! | parent = Issue.generate! |