BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
6328f26c
Commit
6328f26c
authored
Dec 08, 2016
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show full path in header UI for nested groups/projects
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
0764c2ea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
groups_helper.rb
app/helpers/groups_helper.rb
+9
-2
projects_helper.rb
app/helpers/projects_helper.rb
+2
-2
No files found.
app/helpers/groups_helper.rb
View file @
6328f26c
...
@@ -12,11 +12,18 @@ module GroupsHelper
...
@@ -12,11 +12,18 @@ module GroupsHelper
end
end
def
group_title
(
group
,
name
=
nil
,
url
=
nil
)
def
group_title
(
group
,
name
=
nil
,
url
=
nil
)
full_title
=
link_to
(
simple_sanitize
(
group
.
name
),
group_path
(
group
))
full_title
=
''
group
.
parents
.
each
do
|
parent
|
full_title
+=
link_to
(
simple_sanitize
(
parent
.
name
),
group_path
(
parent
))
full_title
+=
' / '
.
html_safe
end
full_title
+=
link_to
(
simple_sanitize
(
group
.
name
),
group_path
(
group
))
full_title
+=
' · '
.
html_safe
+
link_to
(
simple_sanitize
(
name
),
url
)
if
name
full_title
+=
' · '
.
html_safe
+
link_to
(
simple_sanitize
(
name
),
url
)
if
name
content_tag
:span
do
content_tag
:span
do
full_title
full_title
.
html_safe
end
end
end
end
...
...
app/helpers/projects_helper.rb
View file @
6328f26c
...
@@ -52,7 +52,7 @@ module ProjectsHelper
...
@@ -52,7 +52,7 @@ module ProjectsHelper
def
project_title
(
project
)
def
project_title
(
project
)
namespace_link
=
namespace_link
=
if
project
.
group
if
project
.
group
link_to
(
simple_sanitize
(
project
.
group
.
name
),
group_path
(
project
.
group
)
)
group_title
(
project
.
group
)
else
else
owner
=
project
.
namespace
.
owner
owner
=
project
.
namespace
.
owner
link_to
(
simple_sanitize
(
owner
.
name
),
user_path
(
owner
))
link_to
(
simple_sanitize
(
owner
.
name
),
user_path
(
owner
))
...
@@ -390,7 +390,7 @@ module ProjectsHelper
...
@@ -390,7 +390,7 @@ module ProjectsHelper
"success"
"success"
end
end
end
end
def
readme_cache_key
def
readme_cache_key
sha
=
@project
.
commit
.
try
(
:sha
)
||
'nil'
sha
=
@project
.
commit
.
try
(
:sha
)
||
'nil'
[
@project
.
path_with_namespace
,
sha
,
"readme"
].
join
(
'-'
)
[
@project
.
path_with_namespace
,
sha
,
"readme"
].
join
(
'-'
)
...
...
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