mirror of
https://github.com/redmine/redmine.git
synced 2025-11-09 06:46:01 +01:00
Fix broken project list layout for projects scheduled for deletion (#41217).
Patch by Liane Hampe (user:liane_hampe). git-svn-id: https://svn.redmine.org/redmine/trunk@23026 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -41,14 +41,22 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
<tr id="project-<%= entry.id %>" class="<%= cycle('odd', 'even') %> hascontextmenu <%= entry.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
|
<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? %>
|
<% if @admin_list %>
|
||||||
<td class="checkbox hide-when-print"><%= check_box_tag("ids[]", entry.id, false, :id => nil) %></td>
|
<% 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 %>
|
<% end %>
|
||||||
<% @query.inline_columns.each do |column| %>
|
<% @query.inline_columns.each do |column| %>
|
||||||
<%= content_tag('td', column_content(column, entry), :class => column.css_classes) %>
|
<%= content_tag('td', column_content(column, entry), :class => column.css_classes) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if @admin_list && !entry.scheduled_for_deletion? %>
|
<% if @admin_list %>
|
||||||
<td class="buttons"><%= link_to_context_menu %></td>
|
<% if !entry.scheduled_for_deletion? %>
|
||||||
|
<td class="buttons"><%= link_to_context_menu %></td>
|
||||||
|
<% else %>
|
||||||
|
<td class="buttons"></td>
|
||||||
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tr>
|
</tr>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|||||||
@@ -52,4 +52,22 @@ class ProjectsTest < Redmine::IntegrationTest
|
|||||||
assert_response :not_found
|
assert_response :not_found
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_list_layout_when_show_projects_scheduled_for_deletion
|
||||||
|
project = Project.find(1)
|
||||||
|
project.update_attribute :status, Project::STATUS_SCHEDULED_FOR_DELETION
|
||||||
|
|
||||||
|
log_user('admin', 'admin')
|
||||||
|
|
||||||
|
get '/admin/projects', :params => { :f => ['status'], :v => { 'status' => ['10'] } }
|
||||||
|
assert_response :success
|
||||||
|
|
||||||
|
assert_select '#project-1' do
|
||||||
|
assert_select 'td.checkbox.hide-when-print'
|
||||||
|
assert_select 'td.name'
|
||||||
|
assert_select 'td.identifier'
|
||||||
|
assert_select 'td.short_description'
|
||||||
|
assert_select 'td.buttons', text: ''
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user