From 253083f76604a4aa02d90df43901a56c4229f376 Mon Sep 17 00:00:00 2001 From: Jens Ulferts Date: Tue, 5 Dec 2017 11:11:05 +0100 Subject: [PATCH] use breadcrumb for hierarchy styling and rely solely on css --- .../stylesheets/content/_projects_list.sass | 20 ++++++++++--------- app/helpers/projects_helper.rb | 10 ++++------ app/views/projects/index.html.erb | 3 ++- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/app/assets/stylesheets/content/_projects_list.sass b/app/assets/stylesheets/content/_projects_list.sass index b19dc36706..1a1f06ccaa 100644 --- a/app/assets/stylesheets/content/_projects_list.sass +++ b/app/assets/stylesheets/content/_projects_list.sass @@ -74,6 +74,17 @@ form.project-filters margin-top: 1rem margin-bottom: 1rem +.projects-table--hierarchy-icon + display: none + + &:before + @include icon-font-common + @include icon-mixin-arrow-right5 + @extend .icon-small + + tr.idnt & + display: initial + #project-table tr.basics &.-expanded @@ -82,15 +93,6 @@ form.project-filters display: inline .expand display: none - &.child - td.name - &.archived, - a - &:before - @include icon-font-common - @include icon-mixin-arrow-right2 - font-size: 0.6875rem - padding-right: 0.5rem td.format-text min-width: 160px td.format-user diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 2fed0e940d..62ec3744b2 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -222,14 +222,12 @@ module ProjectsHelper end end - def project_css_classes(project, options = {}) + def project_css_classes(project) s = 'project' - if !options[:ignore_hierarchy] - s << ' root' if project.root? - s << ' child' if project.child? - s << (project.leaf? ? ' leaf' : ' parent') - end + s << ' root' if project.root? + s << ' child' if project.child? + s << (project.leaf? ? ' leaf' : ' parent') s end diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb index 6cb67a4216..2a9889591a 100644 --- a/app/views/projects/index.html.erb +++ b/app/views/projects/index.html.erb @@ -91,9 +91,10 @@ See doc/COPYRIGHT.rdoc for more details. <% projects_with_levels_order_sensitive(@projects) do |project, level| %> - <%= params[:expand] == 'all' && project.short_description.present? ? '-no-highlighting -expanded' : '' %>"> + <%= params[:expand] == 'all' && project.short_description.present? ? '-no-highlighting -expanded' : '' %>"> + <% if project.archived? %> <%= t('project.archive.archived') %> <% end %>