[#369] small navbar fixes
This commit is contained in:
parent
fda65fc7a6
commit
1c54e3d0c4
|
@ -23,7 +23,7 @@ $mini-avatar-height: 30px;
|
|||
}
|
||||
}
|
||||
}
|
||||
.navbar-form {
|
||||
.navbar-form, .navbar-toggle {
|
||||
margin-top: (($top-menu-height - $input-height-base) / 2);
|
||||
margin-bottom: (($top-menu-height - $input-height-base) / 2);
|
||||
}
|
||||
|
@ -141,4 +141,8 @@ table tbody {
|
|||
|
||||
.submenu {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
ul.nav.navbar-nav.left-border {
|
||||
border-left: 1px solid #dcdcdc;
|
||||
}
|
|
@ -82,4 +82,10 @@ module ProjectsHelper
|
|||
def participant_path(participant)
|
||||
participant.kind_of?(User) ? user_path(participant) : group_path(participant)
|
||||
end
|
||||
|
||||
def fa_visibility_icon(project)
|
||||
return nil unless project
|
||||
image, color = project.public? ? ['unlock-alt', 'text-success fa-fw'] : ['lock', 'text-danger fa-fw']
|
||||
fa_icon(image, class: color)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -11,8 +11,7 @@
|
|||
- current_user.projects.order(updated_at: :desc).limit(5).each do |project|
|
||||
%li
|
||||
= link_to project_path(project) do
|
||||
- image, color = project.public? ? ['unlock-alt', 'text-success fa-fw'] : ['lock', 'text-danger fa-fw']
|
||||
= fa_icon(image, class: color)
|
||||
= fa_visibility_icon project
|
||||
= project.name_with_owner
|
||||
%li
|
||||
= link_to t('layout.activity_feed.all_my_projects'), projects_path
|
||||
|
|
|
@ -3,8 +3,11 @@
|
|||
.container-fluid
|
||||
.navbar-header
|
||||
%ul.nav.navbar-nav
|
||||
- if @build_list
|
||||
%li= link_to @build_list.project.name, @build_list.project
|
||||
- if @build_list && @build_list.project
|
||||
%li
|
||||
= link_to project_path(@build_list.project) do
|
||||
= fa_visibility_icon @build_list.project
|
||||
= @build_list.project.name_with_owner
|
||||
- else
|
||||
%li{ class: ('active' if controller_name == 'build_lists') }
|
||||
= link_to t('layout.projects.list_header'), build_lists_path
|
||||
|
|
Loading…
Reference in New Issue