Project

General

Profile

Actions

Feature #34340

closed

Make archived projects visually distinguishable in nested projects lists

Added by Go MAEDA almost 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
UI
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
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.


Files

edit-tracker-form.png (89.5 KB) edit-tracker-form.png Go MAEDA, 2020-11-30 06:28
edit-tracker-form-archived-project-greyed-out.png (98.3 KB) edit-tracker-form-archived-project-greyed-out.png Yuichi HARADA, 2020-12-11 01:59
34340.patch (2.22 KB) 34340.patch Yuichi HARADA, 2020-12-11 02:18
34340-v2.patch (2.14 KB) 34340-v2.patch Go MAEDA, 2020-12-20 08:45

Related issues

Related to Redmine - Feature #6938: Update Edit Tracker ViewNew2010-11-18

Actions
Actions #1

Updated by Yuichi HARADA almost 4 years 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 {
Actions #2

Updated by Yuichi HARADA almost 4 years ago

I forgot to attach the patch.

Actions #3

Updated by Go MAEDA almost 4 years ago

  • Target version set to Candidate for next major release
Actions #4

Updated by Go MAEDA almost 4 years ago

I have slightly changed the patch.

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

Updated by Go MAEDA almost 4 years ago

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

Setting the target version to 4.2.0.

Actions #6

Updated by Go MAEDA almost 4 years 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.

Actions #7

Updated by Go MAEDA almost 4 years 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
Actions #8

Updated by Go MAEDA almost 4 years ago

Actions

Also available in: Atom PDF