From 0c31799517df95dbac9162586331594ef5ba1d8b Mon Sep 17 00:00:00 2001 From: Marius Balteanu Date: Mon, 26 Feb 2024 21:14:47 +0000 Subject: [PATCH] Subprojects checkbox should be shown in Activity and Roadmap sidebars only if the project has visible descendants (#39995). Patch by Holger Just (@hjust) and Marius BALTEANU (@marius.balteanu). git-svn-id: https://svn.redmine.org/redmine/trunk@22739 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/activities/index.html.erb | 2 +- app/views/versions/_sidebar.html.erb | 2 +- test/functional/activities_controller_test.rb | 28 +++++++++++++++++++ test/functional/versions_controller_test.rb | 16 +++++++++++ 4 files changed, 46 insertions(+), 2 deletions(-) diff --git a/app/views/activities/index.html.erb b/app/views/activities/index.html.erb index cb0bef9dc..e5176d859 100644 --- a/app/views/activities/index.html.erb +++ b/app/views/activities/index.html.erb @@ -50,7 +50,7 @@ <% end %> -<% if @project && @project.descendants.active.any? %> +<% if @project && @project.descendants.visible.any? %> <%= hidden_field_tag 'with_subprojects', 0, :id => nil %>

<% end %> diff --git a/app/views/versions/_sidebar.html.erb b/app/views/versions/_sidebar.html.erb index aecb7d131..809b60ded 100644 --- a/app/views/versions/_sidebar.html.erb +++ b/app/views/versions/_sidebar.html.erb @@ -20,7 +20,7 @@ <%= check_box_tag "completed", 1, params[:completed] %> <%= l(:label_show_completed_versions) %> - <% if @project.descendants.active.any? %> + <% if @project.descendants.visible.any? %>
  • <%= hidden_field_tag 'with_subprojects', 0, :id => nil %>