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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
dae629e5
Commit
dae629e5
authored
Aug 17, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix some inconsistencies with the breadcrumbs
parent
a10cc220
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
50 additions
and
29 deletions
+50
-29
app/assets/javascripts/breadcrumb.js
app/assets/javascripts/breadcrumb.js
+3
-2
app/assets/stylesheets/new_nav.scss
app/assets/stylesheets/new_nav.scss
+2
-5
app/helpers/groups_helper.rb
app/helpers/groups_helper.rb
+1
-1
app/helpers/issuables_helper.rb
app/helpers/issuables_helper.rb
+14
-5
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+1
-1
app/views/layouts/nav/_breadcrumbs.html.haml
app/views/layouts/nav/_breadcrumbs.html.haml
+2
-3
app/views/projects/commit/show.html.haml
app/views/projects/commit/show.html.haml
+2
-1
app/views/projects/environments/show.html.haml
app/views/projects/environments/show.html.haml
+2
-1
app/views/projects/issues/show.html.haml
app/views/projects/issues/show.html.haml
+2
-1
app/views/projects/jobs/show.html.haml
app/views/projects/jobs/show.html.haml
+2
-1
app/views/projects/merge_requests/show.html.haml
app/views/projects/merge_requests/show.html.haml
+2
-1
app/views/projects/milestones/show.html.haml
app/views/projects/milestones/show.html.haml
+2
-1
app/views/projects/pipelines/show.html.haml
app/views/projects/pipelines/show.html.haml
+2
-1
app/views/projects/snippets/show.html.haml
app/views/projects/snippets/show.html.haml
+2
-1
app/views/projects/tags/show.html.haml
app/views/projects/tags/show.html.haml
+2
-1
app/views/shared/snippets/_header.html.haml
app/views/shared/snippets/_header.html.haml
+7
-3
app/views/snippets/show.html.haml
app/views/snippets/show.html.haml
+2
-0
No files found.
app/assets/javascripts/breadcrumb.js
View file @
dae629e5
...
@@ -14,7 +14,8 @@ export default () => {
...
@@ -14,7 +14,8 @@ export default () => {
topLevelLinks
.
forEach
(
el
=>
addTooltipToEl
(
el
));
topLevelLinks
.
forEach
(
el
=>
addTooltipToEl
(
el
));
$expander
.
closest
(
'
.dropdown
'
)
$expander
.
closest
(
'
.dropdown
'
)
.
on
(
'
show.bs.dropdown hide.bs.dropdown
'
,
()
=>
{
.
on
(
'
show.bs.dropdown hide.bs.dropdown
'
,
(
e
)
=>
{
$expander
.
toggleClass
(
'
open
'
);
$
(
'
.js-breadcrumbs-collapsed-expander
'
,
e
.
currentTarget
).
toggleClass
(
'
open
'
)
.
tooltip
(
'
hide
'
);
});
});
};
};
app/assets/stylesheets/new_nav.scss
View file @
dae629e5
...
@@ -330,6 +330,7 @@ header.navbar-gitlab-new {
...
@@ -330,6 +330,7 @@ header.navbar-gitlab-new {
.breadcrumbs-list
{
.breadcrumbs-list
{
display
:
flex
;
display
:
flex
;
flex-wrap
:
wrap
;
margin-bottom
:
0
;
margin-bottom
:
0
;
>
li
{
>
li
{
...
@@ -338,11 +339,7 @@ header.navbar-gitlab-new {
...
@@ -338,11 +339,7 @@ header.navbar-gitlab-new {
position
:
relative
;
position
:
relative
;
&
:not
(
:last-child
)
{
&
:not
(
:last-child
)
{
margin-right
:
10px
;
margin-right
:
20px
;
}
&
:not
(
:first-child
)
{
margin-left
:
10px
;
}
}
>
a
{
>
a
{
...
...
app/helpers/groups_helper.rb
View file @
dae629e5
...
@@ -22,7 +22,7 @@ module GroupsHelper
...
@@ -22,7 +22,7 @@ module GroupsHelper
full_title
+=
if
show_new_nav?
full_title
+=
if
show_new_nav?
breadcrumb_list_item
group_title_link
(
parent
,
hidable:
false
)
breadcrumb_list_item
group_title_link
(
parent
,
hidable:
false
)
else
else
group_title_link
(
parent
,
hidable:
true
)
"
#{
group_title_link
(
parent
,
hidable:
true
)
}
<span class='hidable'> / </span>"
.
html_safe
end
end
end
end
end
end
...
...
app/helpers/issuables_helper.rb
View file @
dae629e5
...
@@ -126,12 +126,21 @@ module IssuablesHelper
...
@@ -126,12 +126,21 @@ module IssuablesHelper
end
end
def
issuable_meta
(
issuable
,
project
,
text
)
def
issuable_meta
(
issuable
,
project
,
text
)
output
=
content_tag
(
:strong
,
class:
"identifier"
)
do
output
=
""
concat
(
"
#{
text
}
"
)
concat
(
to_url_reference
(
issuable
))
unless
show_new_nav?
output
<<
content_tag
(
:strong
,
class:
"identifier"
)
do
concat
(
"
#{
text
}
"
)
concat
(
to_url_reference
(
issuable
))
end
end
end
output
<<
" opened
#{
time_ago_with_tooltip
(
issuable
.
created_at
)
}
by "
.
html_safe
opened_text
=
if
show_new_nav?
"Opened"
else
" opened"
end
output
<<
"
#{
opened_text
}
#{
time_ago_with_tooltip
(
issuable
.
created_at
)
}
by "
.
html_safe
output
<<
content_tag
(
:strong
)
do
output
<<
content_tag
(
:strong
)
do
author_output
=
link_to_member
(
project
,
issuable
.
author
,
size:
24
,
mobile_classes:
"hidden-xs"
,
tooltip:
true
)
author_output
=
link_to_member
(
project
,
issuable
.
author
,
size:
24
,
mobile_classes:
"hidden-xs"
,
tooltip:
true
)
author_output
<<
link_to_member
(
project
,
issuable
.
author
,
size:
24
,
by_username:
true
,
avatar:
false
,
mobile_classes:
"hidden-sm hidden-md hidden-lg"
)
author_output
<<
link_to_member
(
project
,
issuable
.
author
,
size:
24
,
by_username:
true
,
avatar:
false
,
mobile_classes:
"hidden-sm hidden-md hidden-lg"
)
...
@@ -141,7 +150,7 @@ module IssuablesHelper
...
@@ -141,7 +150,7 @@ module IssuablesHelper
output
<<
content_tag
(
:span
,
(
issuable
.
task_status
if
issuable
.
tasks?
),
id:
"task_status"
,
class:
"hidden-xs hidden-sm"
)
output
<<
content_tag
(
:span
,
(
issuable
.
task_status
if
issuable
.
tasks?
),
id:
"task_status"
,
class:
"hidden-xs hidden-sm"
)
output
<<
content_tag
(
:span
,
(
issuable
.
task_status_short
if
issuable
.
tasks?
),
id:
"task_status_short"
,
class:
"hidden-md hidden-lg"
)
output
<<
content_tag
(
:span
,
(
issuable
.
task_status_short
if
issuable
.
tasks?
),
id:
"task_status_short"
,
class:
"hidden-md hidden-lg"
)
output
output
.
html_safe
end
end
def
issuable_todo
(
issuable
)
def
issuable_todo
(
issuable
)
...
...
app/helpers/projects_helper.rb
View file @
dae629e5
...
@@ -81,7 +81,7 @@ module ProjectsHelper
...
@@ -81,7 +81,7 @@ module ProjectsHelper
end
end
end
end
"
#{
namespace_link
}
#{
project_link
}
"
.
html_safe
"
#{
namespace_link
}
#{
(
'/'
unless
show_new_nav?
)
}
#{
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 @
dae629e5
-
breadcrumb_link
=
breadcrumb_title_link
-
hide_top_links
=
@hide_top_links
||
false
-
hide_top_links
=
@hide_top_links
||
false
%nav
.breadcrumbs
{
role:
"navigation"
}
%nav
.breadcrumbs
{
role:
"navigation"
,
class:
[
container_class
,
@content_class
]
}
.breadcrumbs-container
{
class:
[
container_class
,
@content_class
]
}
.breadcrumbs-container
-
if
defined?
(
@new_sidebar
)
-
if
defined?
(
@new_sidebar
)
=
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
...
...
app/views/projects/commit/show.html.haml
View file @
dae629e5
-
@no_container
=
true
-
@no_container
=
true
-
breadcrumb_title
"Commit
#{
@commit
.
short_id
}
"
-
add_to_breadcrumbs
"Commit"
,
project_commits_path
(
@project
)
-
breadcrumb_title
@commit
.
short_id
-
container_class
=
!
fluid_layout
&&
diff_view
==
:inline
?
'container-limited'
:
''
-
container_class
=
!
fluid_layout
&&
diff_view
==
:inline
?
'container-limited'
:
''
-
limited_container_width
=
fluid_layout
?
''
:
'limit-container-width'
-
limited_container_width
=
fluid_layout
?
''
:
'limit-container-width'
-
@content_class
=
limited_container_width
-
@content_class
=
limited_container_width
...
...
app/views/projects/environments/show.html.haml
View file @
dae629e5
-
@no_container
=
true
-
@no_container
=
true
-
breadcrumb_title
"Enviroment '
#{
@environment
.
name
}
'"
-
add_to_breadcrumbs
"Environments"
,
project_environments_path
(
@project
)
-
breadcrumb_title
@environment
.
name
-
page_title
"Environments"
-
page_title
"Environments"
=
render
"projects/pipelines/head"
=
render
"projects/pipelines/head"
...
...
app/views/projects/issues/show.html.haml
View file @
dae629e5
-
@content_class
=
"limit-container-width"
unless
fluid_layout
-
@content_class
=
"limit-container-width"
unless
fluid_layout
-
breadcrumb_title
"Issues
#{
@issue
.
to_reference
}
"
-
add_to_breadcrumbs
"Issues"
,
project_issues_path
(
@project
)
-
breadcrumb_title
@issue
.
to_reference
-
page_title
"
#{
@issue
.
title
}
(
#{
@issue
.
to_reference
}
)"
,
"Issues"
-
page_title
"
#{
@issue
.
title
}
(
#{
@issue
.
to_reference
}
)"
,
"Issues"
-
page_description
@issue
.
description
-
page_description
@issue
.
description
-
page_card_attributes
@issue
.
card_attributes
-
page_card_attributes
@issue
.
card_attributes
...
...
app/views/projects/jobs/show.html.haml
View file @
dae629e5
-
@no_container
=
true
-
@no_container
=
true
-
breadcrumb_title
"Jobs #
#{
@build
.
id
}
"
-
add_to_breadcrumbs
"Jobs"
,
project_jobs_path
(
@project
)
-
breadcrumb_title
"#
#{
@build
.
id
}
"
-
page_title
"
#{
@build
.
name
}
(#
#{
@build
.
id
}
)"
,
"Jobs"
-
page_title
"
#{
@build
.
name
}
(#
#{
@build
.
id
}
)"
,
"Jobs"
=
render
"projects/pipelines/head"
=
render
"projects/pipelines/head"
...
...
app/views/projects/merge_requests/show.html.haml
View file @
dae629e5
-
@content_class
=
"limit-container-width"
unless
fluid_layout
-
@content_class
=
"limit-container-width"
unless
fluid_layout
-
breadcrumb_title
"Merge Requests
#{
@merge_request
.
to_reference
}
"
-
add_to_breadcrumbs
"Merge Requests"
,
project_merge_requests_path
(
@project
)
-
breadcrumb_title
@merge_request
.
to_reference
-
page_title
"
#{
@merge_request
.
title
}
(
#{
@merge_request
.
to_reference
}
)"
,
"Merge Requests"
-
page_title
"
#{
@merge_request
.
title
}
(
#{
@merge_request
.
to_reference
}
)"
,
"Merge Requests"
-
page_description
@merge_request
.
description
-
page_description
@merge_request
.
description
-
page_card_attributes
@merge_request
.
card_attributes
-
page_card_attributes
@merge_request
.
card_attributes
...
...
app/views/projects/milestones/show.html.haml
View file @
dae629e5
-
@no_container
=
true
-
@no_container
=
true
-
breadcrumb_title
"Milestone
#{
@milestone
.
title
}
"
-
add_to_breadcrumbs
"Milestones"
,
project_milestones_path
(
@project
)
-
breadcrumb_title
@milestone
.
title
-
page_title
@milestone
.
title
,
"Milestones"
-
page_title
@milestone
.
title
,
"Milestones"
-
page_description
@milestone
.
description
-
page_description
@milestone
.
description
=
render
"shared/mr_head"
=
render
"shared/mr_head"
...
...
app/views/projects/pipelines/show.html.haml
View file @
dae629e5
-
@no_container
=
true
-
@no_container
=
true
-
breadcrumb_title
"Pipelines #
#{
@pipeline
.
id
}
"
-
add_to_breadcrumbs
"Pipelines"
,
project_pipelines_path
(
@project
)
-
breadcrumb_title
"#
#{
@pipeline
.
id
}
"
-
page_title
"Pipeline"
-
page_title
"Pipeline"
=
render
"projects/pipelines/head"
=
render
"projects/pipelines/head"
...
...
app/views/projects/snippets/show.html.haml
View file @
dae629e5
-
@content_class
=
"limit-container-width limited-inner-width-container"
unless
fluid_layout
-
@content_class
=
"limit-container-width limited-inner-width-container"
unless
fluid_layout
-
breadcrumb_title
"Snippet
#{
@snippet
.
to_reference
}
"
-
add_to_breadcrumbs
"Snippets"
,
dashboard_snippets_path
-
breadcrumb_title
@snippet
.
to_reference
-
page_title
"
#{
@snippet
.
title
}
(
#{
@snippet
.
to_reference
}
)"
,
"Snippets"
-
page_title
"
#{
@snippet
.
title
}
(
#{
@snippet
.
to_reference
}
)"
,
"Snippets"
=
render
'shared/snippets/header'
=
render
'shared/snippets/header'
...
...
app/views/projects/tags/show.html.haml
View file @
dae629e5
-
@no_container
=
true
-
@no_container
=
true
-
breadcrumb_title
"Tags
#{
@tag
.
name
}
"
-
add_to_breadcrumbs
"Tags"
,
project_tags_path
(
@project
)
-
breadcrumb_title
@tag
.
name
-
page_title
@tag
.
name
,
"Tags"
-
page_title
@tag
.
name
,
"Tags"
=
render
"projects/commits/head"
=
render
"projects/commits/head"
...
...
app/views/shared/snippets/_header.html.haml
View file @
dae629e5
...
@@ -3,10 +3,14 @@
...
@@ -3,10 +3,14 @@
%span
.sr-only
%span
.sr-only
=
visibility_level_label
(
@snippet
.
visibility_level
)
=
visibility_level_label
(
@snippet
.
visibility_level
)
=
visibility_level_icon
(
@snippet
.
visibility_level
,
fw:
false
)
=
visibility_level_icon
(
@snippet
.
visibility_level
,
fw:
false
)
%strong
.item-title
-
unless
show_new_nav?
Snippet
#{
@snippet
.
to_reference
}
%strong
.item-title
Snippet
#{
@snippet
.
to_reference
}
%span
.creator
%span
.creator
authored
-
if
show_new_nav?
Authored
-
else
authored
=
time_ago_with_tooltip
(
@snippet
.
created_at
,
placement:
'bottom'
,
html_class:
'snippet_updated_ago'
)
=
time_ago_with_tooltip
(
@snippet
.
created_at
,
placement:
'bottom'
,
html_class:
'snippet_updated_ago'
)
by
#{
link_to_member
(
@project
,
@snippet
.
author
,
size:
24
,
author_class:
"author item-title"
,
avatar_class:
"hidden-xs"
)
}
by
#{
link_to_member
(
@project
,
@snippet
.
author
,
size:
24
,
author_class:
"author item-title"
,
avatar_class:
"hidden-xs"
)
}
...
...
app/views/snippets/show.html.haml
View file @
dae629e5
-
@hide_top_links
=
true
-
@hide_top_links
=
true
-
@content_class
=
"limit-container-width limited-inner-width-container"
unless
fluid_layout
-
@content_class
=
"limit-container-width limited-inner-width-container"
unless
fluid_layout
-
add_to_breadcrumbs
"Snippets"
,
dashboard_snippets_path
-
breadcrumb_title
@snippet
.
to_reference
-
page_title
"
#{
@snippet
.
title
}
(
#{
@snippet
.
to_reference
}
)"
,
"Snippets"
-
page_title
"
#{
@snippet
.
title
}
(
#{
@snippet
.
to_reference
}
)"
,
"Snippets"
=
render
'shared/snippets/header'
=
render
'shared/snippets/header'
...
...
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