use breadcrumb for hierarchy styling and rely solely on css

pull/5981/head
Jens Ulferts 7 years ago
parent a8b2067f23
commit 253083f766
No known key found for this signature in database
GPG Key ID: 3CAA4B1182CF5308
  1. 20
      app/assets/stylesheets/content/_projects_list.sass
  2. 10
      app/helpers/projects_helper.rb
  3. 3
      app/views/projects/index.html.erb

@ -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

@ -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

@ -91,9 +91,10 @@ See doc/COPYRIGHT.rdoc for more details.
</thead>
<tbody>
<% projects_with_levels_order_sensitive(@projects) do |project, level| %>
<tr class="basics context-menu--reveal <%= project_css_classes(project, ignore_hierarchy: level == 0) %> <%= level > 0 ? "idnt idnt-#{level}" : nil %> <%= params[:expand] == 'all' && project.short_description.present? ? '-no-highlighting -expanded' : '' %>">
<tr class="basics context-menu--reveal <%= project_css_classes(project) %> <%= level > 0 ? "idnt idnt-#{level}" : nil %> <%= params[:expand] == 'all' && project.short_description.present? ? '-no-highlighting -expanded' : '' %>">
<td></td>
<td class="name project--hierarchy <%= project.archived? ? 'archived' : '' %>">
<i class="projects-table--hierarchy-icon"></i>
<% if project.archived? %>
<span class="archived-label"><%= t('project.archive.archived') %></span>
<% end %>

Loading…
Cancel
Save