Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
52252e70
Commit
52252e70
authored
Aug 16, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improvements to breadcrumbs
Closes #35269
parent
63812b2f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
39 deletions
+29
-39
app/assets/stylesheets/new_nav.scss
app/assets/stylesheets/new_nav.scss
+16
-26
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+8
-3
app/views/layouts/nav/_breadcrumbs.html.haml
app/views/layouts/nav/_breadcrumbs.html.haml
+5
-10
No files found.
app/assets/stylesheets/new_nav.scss
View file @
52252e70
...
@@ -402,6 +402,20 @@ header.navbar-gitlab-new {
...
@@ -402,6 +402,20 @@ header.navbar-gitlab-new {
}
}
}
}
.breadcrumbs-list
{
display
:
flex
;
margin-bottom
:
0
;
>
li
{
display
:
flex
;
align-items
:
center
;
}
a
{
color
:
$gl-text-color
;
}
}
.breadcrumbs-extra
{
.breadcrumbs-extra
{
display
:
flex
;
display
:
flex
;
flex
:
0
0
auto
;
flex
:
0
0
auto
;
...
@@ -409,34 +423,10 @@ header.navbar-gitlab-new {
...
@@ -409,34 +423,10 @@ header.navbar-gitlab-new {
}
}
.breadcrumbs-sub-title
{
.breadcrumbs-sub-title
{
margin
:
2px
0
;
margin
:
0
;
font-size
:
16px
;
font-size
:
$gl-font-size
;
font-weight
:
normal
;
font-weight
:
normal
;
line-height
:
1
;
line-height
:
1
;
ul
{
margin
:
0
;
}
li
{
display
:
inline-block
;
&
:not
(
:last-child
)
{
&
:
:
after
{
content
:
"/"
;
margin
:
0
2px
0
5px
;
color
:
rgba
(
$black
,
.65
);
}
}
&
:last-child
a
{
font-weight
:
600
;
}
}
a
{
color
:
$gl-text-color
;
}
}
}
.top-area
{
.top-area
{
...
...
app/helpers/projects_helper.rb
View file @
52252e70
...
@@ -58,7 +58,7 @@ module ProjectsHelper
...
@@ -58,7 +58,7 @@ module ProjectsHelper
link_to
(
simple_sanitize
(
owner
.
name
),
user_path
(
owner
))
link_to
(
simple_sanitize
(
owner
.
name
),
user_path
(
owner
))
end
end
project_link
=
link_to
project_path
(
project
),
{
class:
"project-item-select-holder"
}
do
project_link
=
link_to
project_path
(
project
),
{
class:
(
"project-item-select-holder"
unless
show_new_nav?
)
}
do
output
=
output
=
if
show_new_nav?
if
show_new_nav?
project_icon
(
project
,
alt:
project
.
name
,
class:
'avatar-tile'
,
width:
16
,
height:
16
)
project_icon
(
project
,
alt:
project
.
name
,
class:
'avatar-tile'
,
width:
16
,
height:
16
)
...
@@ -70,13 +70,18 @@ module ProjectsHelper
...
@@ -70,13 +70,18 @@ module ProjectsHelper
output
.
html_safe
output
.
html_safe
end
end
if
current_user
if
show_new_nav?
namespace_link
=
content_tag
"li"
,
namespace_link
project_link
=
content_tag
"li"
,
project_link
end
if
current_user
&&
!
show_new_nav?
project_link
<<
button_tag
(
type:
'button'
,
class:
'dropdown-toggle-caret js-projects-dropdown-toggle'
,
aria:
{
label:
'Toggle switch project dropdown'
},
data:
{
target:
'.js-dropdown-menu-projects'
,
toggle:
'dropdown'
,
order_by:
'last_activity_at'
})
do
project_link
<<
button_tag
(
type:
'button'
,
class:
'dropdown-toggle-caret js-projects-dropdown-toggle'
,
aria:
{
label:
'Toggle switch project dropdown'
},
data:
{
target:
'.js-dropdown-menu-projects'
,
toggle:
'dropdown'
,
order_by:
'last_activity_at'
})
do
icon
(
"chevron-down"
)
icon
(
"chevron-down"
)
end
end
end
end
"
#{
namespace_link
}
/
#{
project_link
}
"
.
html_safe
"
#{
namespace_link
}
#{
project_link
}
"
.
html_safe
end
end
def
remove_project_message
(
project
)
def
remove_project_message
(
project
)
...
...
app/views/layouts/nav/_breadcrumbs.html.haml
View file @
52252e70
...
@@ -7,21 +7,16 @@
...
@@ -7,21 +7,16 @@
=
button_tag
class:
'toggle-mobile-nav'
,
type:
'button'
do
=
button_tag
class:
'toggle-mobile-nav'
,
type:
'button'
do
%span
.sr-only
Open sidebar
%span
.sr-only
Open sidebar
=
icon
(
'bars'
)
=
icon
(
'bars'
)
.breadcrumbs-links.js-title-container
.breadcrumbs-links.js-title-container
-
unless
hide_top_links
%ul
.list-unstyled.breadcrumbs-list
.title
=
link_to
"GitLab"
,
root_path
\/
-
if
content_for?
(
:header_title_before
)
-
if
content_for?
(
:header_title_before
)
=
yield
:header_title_before
%li
=
yield
:header_title_before
\/
=
header_title
=
header_title
%h2
.breadcrumbs-sub-title
%ul
.list-unstyled
-
if
@breadcrumbs_extra_links
-
if
@breadcrumbs_extra_links
-
@breadcrumbs_extra_links
.
each
do
|
extra
|
-
@breadcrumbs_extra_links
.
each
do
|
extra
|
%li
=
link_to
extra
[
:text
],
extra
[
:link
]
%li
=
link_to
extra
[
:text
],
extra
[
:link
]
%li
=
link_to
@breadcrumb_title
,
breadcrumb_link
%li
%h2
.breadcrumbs-sub-title
=
link_to
@breadcrumb_title
,
breadcrumb_link
-
if
content_for?
(
:breadcrumbs_extra
)
-
if
content_for?
(
:breadcrumbs_extra
)
.breadcrumbs-extra.hidden-xs
=
yield
:breadcrumbs_extra
.breadcrumbs-extra.hidden-xs
=
yield
:breadcrumbs_extra
=
yield
:header_content
=
yield
:header_content
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment