From 6b736fe5331e5fdff9cde07d915f26137bccef75 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Sat, 7 Sep 2024 04:10:21 +0000 Subject: [PATCH] Merged r23026 from trunk to 5.1-stable (#41217). git-svn-id: https://svn.redmine.org/redmine/branches/5.1-stable@23031 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/projects/_list.html.erb | 16 ++++++++++++---- test/integration/projects_test.rb | 18 ++++++++++++++++++ 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/app/views/projects/_list.html.erb b/app/views/projects/_list.html.erb index 03c5ce059..f5eae37a6 100644 --- a/app/views/projects/_list.html.erb +++ b/app/views/projects/_list.html.erb @@ -41,14 +41,22 @@ <% end %> "> - <% if @admin_list && !entry.scheduled_for_deletion? %> - <%= check_box_tag("ids[]", entry.id, false, :id => nil) %> + <% if @admin_list %> + <% if !entry.scheduled_for_deletion? %> + <%= check_box_tag("ids[]", entry.id, false, :id => nil) %> + <% else %> + + <% 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? %> - <%= link_to_context_menu %> + <% if @admin_list %> + <% if !entry.scheduled_for_deletion? %> + <%= link_to_context_menu %> + <% else %> + + <% end %> <% end %> <% end -%> diff --git a/test/integration/projects_test.rb b/test/integration/projects_test.rb index 4e4367371..bd93bd696 100644 --- a/test/integration/projects_test.rb +++ b/test/integration/projects_test.rb @@ -52,4 +52,22 @@ class ProjectsTest < Redmine::IntegrationTest assert_response 404 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 -- 2.39.5