Feature #30977 ยป add-css-class-to-project-cf.patch
app/views/projects/show.html.erb | ||
---|---|---|
30 | 30 |
<li><span class="label"><%=l(:field_homepage)%>:</span> <%= link_to_if uri_with_safe_scheme?(@project.homepage), @project.homepage, @project.homepage %></li> |
31 | 31 |
<% end %> |
32 | 32 |
<% render_custom_field_values(@project) do |custom_field, formatted| %> |
33 |
<li><span class="label"><%= custom_field.name %>:</span> <%= formatted %></li> |
|
33 |
<li class="cf_<%= custom_field.id %>"><span class="label"><%= custom_field.name %>:</span> <%= formatted %></li>
|
|
34 | 34 |
<% end %> |
35 | 35 |
</ul> |
36 | 36 |
<% end %> |
test/functional/projects_controller_test.rb | ||
---|---|---|
477 | 477 |
} |
478 | 478 |
assert_response :success |
479 | 479 | |
480 |
assert_select 'li', :text => /Development status/ |
|
480 |
assert_select 'li[class=?]', 'cf_3', :text => /Development status/
|
|
481 | 481 |
end |
482 | 482 | |
483 | 483 |
def test_show_should_not_display_hidden_custom_fields |