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
Jérome Perrin
gitlab-ce
Commits
e51411ec
Commit
e51411ec
authored
Nov 13, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct head titles for project pages
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
02448fce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
1 deletion
+35
-1
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+34
-0
app/views/layouts/projects.html.haml
app/views/layouts/projects.html.haml
+1
-1
No files found.
app/helpers/projects_helper.rb
View file @
e51411ec
...
...
@@ -143,4 +143,38 @@ module ProjectsHelper
# to calculate repo size - just show 'Unknown'
'unknown'
end
def
project_head_title
title
=
@project
.
name_with_namespace
title
=
if
current_controller?
(
:tree
)
"
#{
@project
.
path
}
\/
#{
@path
}
at
#{
@ref
}
- "
+
title
elsif
current_controller?
(
:issues
)
if
current_action?
(
:show
)
"Issue #
#{
@issue
.
iid
}
- "
+
title
else
"Issues - "
+
title
end
elsif
current_controller?
(
:blob
)
"
#{
@project
.
path
}
\/
#{
@blob
.
path
}
at
#{
@ref
}
- "
+
title
elsif
current_controller?
(
:commits
)
"Commits - "
+
title
elsif
current_controller?
(
:merge_requests
)
if
current_action?
(
:show
)
"Merge request #
#{
@merge_request
.
iid
}
- "
+
title
else
"Merge requests - "
+
title
end
elsif
current_controller?
(
:wikis
)
"Wiki - "
+
title
elsif
current_controller?
(
:network
)
"Network graph - "
+
title
elsif
current_controller?
(
:graphs
)
"Graphs - "
+
title
else
title
end
title
end
end
app/views/layouts/projects.html.haml
View file @
e51411ec
!!! 5
%html
{
lang:
"en"
}
=
render
"layouts/head"
,
title:
@project
.
name_with_namespac
e
=
render
"layouts/head"
,
title:
project_head_titl
e
%body
{
class:
"#{app_theme} project"
,
:'data-page'
=>
body_data_page
,
:'data-project-id'
=>
@project
.
id
}
=
render
"layouts/broadcast"
=
render
"layouts/head_panel"
,
title:
project_title
(
@project
)
...
...
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