Feature #34340

Make archived projects visually distinguishable in nested projects lists

Added by Go MAEDA about 1 month ago. Updated 23 days ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:UI
Target version:4.2.0
Resolution:Fixed

Description

All projects are displayed in the tracker edit form but you cannot identify archived projects.

When you create a new tracker, you generally do not need to enable the tracker in an archived project. So, it is convenient if archived project names are greyed out.

edit-tracker-form.png (89.5 KB) Go MAEDA, 2020-11-30 06:28

edit-tracker-form-archived-project-greyed-out.png (98.3 KB) Yuichi HARADA, 2020-12-11 01:59

34340.patch Magnifier (2.22 KB) Yuichi HARADA, 2020-12-11 02:18

34340-v2.patch Magnifier (2.14 KB) Go MAEDA, 2020-12-20 08:45


Related issues

Related to Redmine - Feature #6938: Update Edit Tracker View New 2010-11-18

Associated revisions

Revision 20699
Added by Go MAEDA 23 days ago

Make archived projects visually distinguishable in nested projects lists (#34340).

Patch by Yuichi HARADA.

History

#1 Updated by Yuichi HARADA about 1 month ago

I fixed the archived project name to be grayed out.

I attached a patch.

diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 38cd405ae..83a9e5acf 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -409,7 +409,7 @@ module ApplicationHelper
           end
         end
         classes = (ancestors.empty? ? 'root' : 'child')
-        s << "<li class='#{classes}'><div class='#{classes}'>" 
+        s << "<li class='#{classes}'><div class='#{classes}#{' archived' if project.archived?}'>" 
         s << h(block_given? ? capture(project, &block) : project.name)
         s << "</div>\n" 
         ancestors << project
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index 70911e4f6..126993048 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -660,6 +660,7 @@ ul.projects {margin:0; padding-left:1em;}
 ul.projects ul {padding-left:1.6em;}
 ul.projects.root {margin:0; padding:0;}
 ul.projects li.root, ul.projects li.child {list-style-type:none;}
+ul.projects li.root div.archived, ul.projects li.child div.archived {color: #aaa;}
 ul.projects div.description li {list-style-type:initial;}

 #projects-index {

#2 Updated by Yuichi HARADA about 1 month ago

I forgot to attach the patch.

#3 Updated by Go MAEDA about 1 month ago

  • Target version set to Candidate for next major release

#4 Updated by Go MAEDA about 1 month ago

I have slightly changed the patch.

  • Add "archived" class also for the surrounding "li" element
  • Change the test name

#5 Updated by Go MAEDA 27 days ago

  • Target version changed from Candidate for next major release to 4.2.0

Setting the target version to 4.2.0.

#6 Updated by Go MAEDA 23 days ago

  • Subject changed from Make archived projects visually distinguishable in tracker edit form to Make archived projects visually distinguishable in netsted proojects list of admin pages
  • Category changed from Administration to UI
  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch. Thank you.

#7 Updated by Go MAEDA 23 days ago

  • Subject changed from Make archived projects visually distinguishable in netsted proojects list of admin pages to Make archived projects visually distinguishable in nested projects lists

#8 Updated by Go MAEDA 23 days ago

Also available in: Atom PDF