Bug #2391 » fixes-project-list-when-scheduled-for-deletion.patch
app/views/projects/_list.html.erb | ||
---|---|---|
</tr>
|
||
<% end %>
|
||
<tr id="project-<%= entry.id %>" class="<%= cycle('odd', 'even') %> hascontextmenu <%= entry.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
|
||
<% if @admin_list && !entry.scheduled_for_deletion? %>
|
||
<td class="checkbox hide-when-print"><%= check_box_tag("ids[]", entry.id, false, :id => nil) %></td>
|
||
<% if @admin_list %>
|
||
<% if !entry.scheduled_for_deletion? %>
|
||
<td class="checkbox hide-when-print"><%= check_box_tag("ids[]", entry.id, false, :id => nil) %></td>
|
||
<% else %>
|
||
<td class="checkbox hide-when-print"></td>
|
||
<% end %>
|
||
<% end %>
|
||
<% @query.inline_columns.each do |column| %>
|
||
<%= content_tag('td', column_content(column, entry), :class => column.css_classes) %>
|
||
<% end %>
|
||
<% if @admin_list && !entry.scheduled_for_deletion? %>
|
||
<td class="buttons"><%= link_to_context_menu %></td>
|
||
<% if @admin_list %>
|
||
<% if !entry.scheduled_for_deletion? %>
|
||
<td class="buttons"><%= link_to_context_menu %></td>
|
||
<% else %>
|
||
<td></td>
|
||
<% end %>
|
||
<% end %>
|
||
</tr>
|
||
<% end -%>
|
test/integration/projects_test.rb | ||
---|---|---|
assert_response 404
|
||
end
|
||
end
|
||
def test_list_layout_when_show_projects_scheduled_for_deletion
|
||
project = Project.find(1)
|
||
project.status = 10
|
||
project.save!
|
||
log_user("admin", "admin")
|
||
get '/admin/projects', :params => { :f => ['status'], :v =>{ 'status' => ['10'] } }
|
||
assert_response :success
|
||
assert_select '#project-1' do
|
||
assert_select 'td', 5
|
||
assert_select 'td.checkbox.hide-when-print'
|
||
assert_select 'td.name'
|
||
assert_select 'td.identifier'
|
||
assert_select 'td.short_description'
|
||
end
|
||
end
|
||
end
|
- « Previous
- 1
- 2
- 3
- Next »