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
8cadeb67
Commit
8cadeb67
authored
Apr 01, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nav views refactoring
parent
19ab03f4
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
216 additions
and
203 deletions
+216
-203
app/assets/stylesheets/sections/nav.scss
app/assets/stylesheets/sections/nav.scss
+54
-58
app/views/layouts/admin.html.haml
app/views/layouts/admin.html.haml
+3
-19
app/views/layouts/application.html.haml
app/views/layouts/application.html.haml
+3
-20
app/views/layouts/group.html.haml
app/views/layouts/group.html.haml
+3
-20
app/views/layouts/nav/_admin.html.haml
app/views/layouts/nav/_admin.html.haml
+19
-0
app/views/layouts/nav/_dashboard.html.haml
app/views/layouts/nav/_dashboard.html.haml
+20
-0
app/views/layouts/nav/_group.html.haml
app/views/layouts/nav/_group.html.haml
+20
-0
app/views/layouts/nav/_profile.html.haml
app/views/layouts/nav/_profile.html.haml
+17
-0
app/views/layouts/nav/_project.html.haml
app/views/layouts/nav/_project.html.haml
+43
-0
app/views/layouts/nav/_team.html.haml
app/views/layouts/nav/_team.html.haml
+25
-0
app/views/layouts/profile.html.haml
app/views/layouts/profile.html.haml
+3
-17
app/views/layouts/project_resource.html.haml
app/views/layouts/project_resource.html.haml
+3
-44
app/views/layouts/user_team.html.haml
app/views/layouts/user_team.html.haml
+3
-25
No files found.
app/assets/stylesheets/sections/nav.scss
View file @
8cadeb67
/*
.main-nav
{
* Main Menu of Application
*
*/
ul
.main_menu
{
margin
:
auto
;
margin
:
30px
0
;
margin
:
30px
0
;
margin-top
:
10px
;
margin-top
:
10px
;
height
:
38px
;
border-bottom
:
1px
solid
#E1E1E1
;
ul
{
margin
:
auto
;
height
:
39px
;
position
:
relative
;
position
:
relative
;
top
:
3px
;
overflow
:
hidden
;
overflow
:
hidden
;
.count
{
.count
{
position
:
relative
;
position
:
relative
;
...
@@ -32,11 +32,11 @@ ul.main_menu {
...
@@ -32,11 +32,11 @@ ul.main_menu {
margin
:
0
;
margin
:
0
;
display
:
table-cell
;
display
:
table-cell
;
width
:
1%
;
width
:
1%
;
border-bottom
:
2px
solid
#EEE
;
&
.active
{
&
.active
{
border-bottom
:
2px
solid
#474D5
7
;
border-bottom
:
3px
solid
#77
7
;
a
{
a
{
color
:
$style_color
;
color
:
$style_color
;
font-weight
:
bolder
;
}
}
}
}
...
@@ -55,14 +55,10 @@ ul.main_menu {
...
@@ -55,14 +55,10 @@ ul.main_menu {
text-align
:
center
;
text-align
:
center
;
font-weight
:
normal
;
font-weight
:
normal
;
height
:
36px
;
height
:
36px
;
line-height
:
36
px
;
line-height
:
34
px
;
color
:
#777
;
color
:
#777
;
text-shadow
:
0
1px
1px
white
;
text-shadow
:
0
1px
1px
white
;
padding
:
0
10px
;
padding
:
0
10px
;
}
}
}
}
}
/*
* End of Main Menu
*
*/
app/views/layouts/admin.html.haml
View file @
8cadeb67
...
@@ -4,24 +4,8 @@
...
@@ -4,24 +4,8 @@
%body
{
class:
"#{app_theme} admin"
}
%body
{
class:
"#{app_theme} admin"
}
=
render
"layouts/head_panel"
,
title:
"Admin area"
=
render
"layouts/head_panel"
,
title:
"Admin area"
=
render
"layouts/flash"
=
render
"layouts/flash"
.container
%nav
.main-nav
%ul
.main_menu
.container
=
render
'layouts/nav/admin'
=
nav_link
(
controller: :dashboard
,
html_options:
{
class:
'home'
})
do
=
link_to
admin_root_path
,
title:
"Stats"
do
%i
.icon-home
=
nav_link
(
controller: :projects
)
do
=
link_to
"Projects"
,
admin_projects_path
=
nav_link
(
controller: :teams
)
do
=
link_to
"Teams"
,
admin_teams_path
=
nav_link
(
controller: :groups
)
do
=
link_to
"Groups"
,
admin_groups_path
=
nav_link
(
controller: :users
)
do
=
link_to
"Users"
,
admin_users_path
=
nav_link
(
controller: :logs
)
do
=
link_to
"Logs"
,
admin_logs_path
=
nav_link
(
controller: :hooks
)
do
=
link_to
"Hooks"
,
admin_hooks_path
=
nav_link
(
controller: :resque
)
do
=
link_to
"Background Jobs"
,
admin_resque_path
.container
.content
=
yield
.content
=
yield
app/views/layouts/application.html.haml
View file @
8cadeb67
...
@@ -4,25 +4,8 @@
...
@@ -4,25 +4,8 @@
%body
{
class:
"#{app_theme} application"
}
%body
{
class:
"#{app_theme} application"
}
=
render
"layouts/head_panel"
,
title:
"Dashboard"
=
render
"layouts/head_panel"
,
title:
"Dashboard"
=
render
"layouts/flash"
=
render
"layouts/flash"
.container
%nav
.main-nav
%ul
.main_menu
.container
=
render
'layouts/nav/dashboard'
=
nav_link
(
path:
'dashboard#show'
,
html_options:
{
class:
'home'
})
do
=
link_to
root_path
,
title:
"Home"
do
%i
.icon-home
=
nav_link
(
path:
'dashboard#projects'
)
do
=
link_to
projects_dashboard_path
do
Projects
=
nav_link
(
path:
'dashboard#issues'
)
do
=
link_to
issues_dashboard_path
do
Issues
%span
.count
=
current_user
.
assigned_issues
.
opened
.
count
=
nav_link
(
path:
'dashboard#merge_requests'
)
do
=
link_to
merge_requests_dashboard_path
do
Merge Requests
%span
.count
=
current_user
.
cared_merge_requests
.
opened
.
count
=
nav_link
(
path:
'search#show'
)
do
=
link_to
"Search"
,
search_path
=
nav_link
(
controller: :help
)
do
=
link_to
"Help"
,
help_path
.container
.content
=
yield
.content
=
yield
app/views/layouts/group.html.haml
View file @
8cadeb67
...
@@ -4,25 +4,8 @@
...
@@ -4,25 +4,8 @@
%body
{
class:
"#{app_theme} application"
}
%body
{
class:
"#{app_theme} application"
}
=
render
"layouts/head_panel"
,
title:
"group:
#{
@group
.
name
}
"
=
render
"layouts/head_panel"
,
title:
"group:
#{
@group
.
name
}
"
=
render
"layouts/flash"
=
render
"layouts/flash"
.container
%nav
.main-nav
%ul
.main_menu
.container
=
render
'layouts/nav/group'
=
nav_link
(
path:
'groups#show'
,
html_options:
{
class:
'home'
})
do
=
link_to
group_path
(
@group
),
title:
"Home"
do
%i
.icon-home
=
nav_link
(
path:
'groups#issues'
)
do
=
link_to
issues_group_path
(
@group
)
do
Issues
%span
.count
=
current_user
.
assigned_issues
.
opened
.
of_group
(
@group
).
count
=
nav_link
(
path:
'groups#merge_requests'
)
do
=
link_to
merge_requests_group_path
(
@group
)
do
Merge Requests
%span
.count
=
current_user
.
cared_merge_requests
.
opened
.
of_group
(
@group
).
count
=
nav_link
(
path:
'groups#people'
)
do
=
link_to
"People"
,
people_group_path
(
@group
)
-
if
can?
(
current_user
,
:manage_group
,
@group
)
=
nav_link
(
path:
'groups#edit'
)
do
=
link_to
edit_group_path
(
@group
),
class:
"tab "
do
Settings
.container
.content
=
yield
.content
=
yield
app/views/layouts/nav/_admin.html.haml
0 → 100644
View file @
8cadeb67
%ul
=
nav_link
(
controller: :dashboard
,
html_options:
{
class:
'home'
})
do
=
link_to
admin_root_path
,
title:
"Stats"
do
%i
.icon-home
=
nav_link
(
controller: :projects
)
do
=
link_to
"Projects"
,
admin_projects_path
=
nav_link
(
controller: :teams
)
do
=
link_to
"Teams"
,
admin_teams_path
=
nav_link
(
controller: :groups
)
do
=
link_to
"Groups"
,
admin_groups_path
=
nav_link
(
controller: :users
)
do
=
link_to
"Users"
,
admin_users_path
=
nav_link
(
controller: :logs
)
do
=
link_to
"Logs"
,
admin_logs_path
=
nav_link
(
controller: :hooks
)
do
=
link_to
"Hooks"
,
admin_hooks_path
=
nav_link
(
controller: :resque
)
do
=
link_to
"Background Jobs"
,
admin_resque_path
app/views/layouts/nav/_dashboard.html.haml
0 → 100644
View file @
8cadeb67
%ul
=
nav_link
(
path:
'dashboard#show'
,
html_options:
{
class:
'home'
})
do
=
link_to
root_path
,
title:
"Home"
do
%i
.icon-home
=
nav_link
(
path:
'dashboard#projects'
)
do
=
link_to
projects_dashboard_path
do
Projects
=
nav_link
(
path:
'dashboard#issues'
)
do
=
link_to
issues_dashboard_path
do
Issues
%span
.count
=
current_user
.
assigned_issues
.
opened
.
count
=
nav_link
(
path:
'dashboard#merge_requests'
)
do
=
link_to
merge_requests_dashboard_path
do
Merge Requests
%span
.count
=
current_user
.
cared_merge_requests
.
opened
.
count
=
nav_link
(
path:
'search#show'
)
do
=
link_to
"Search"
,
search_path
=
nav_link
(
controller: :help
)
do
=
link_to
"Help"
,
help_path
app/views/layouts/nav/_group.html.haml
0 → 100644
View file @
8cadeb67
%ul
=
nav_link
(
path:
'groups#show'
,
html_options:
{
class:
'home'
})
do
=
link_to
group_path
(
@group
),
title:
"Home"
do
%i
.icon-home
=
nav_link
(
path:
'groups#issues'
)
do
=
link_to
issues_group_path
(
@group
)
do
Issues
%span
.count
=
current_user
.
assigned_issues
.
opened
.
of_group
(
@group
).
count
=
nav_link
(
path:
'groups#merge_requests'
)
do
=
link_to
merge_requests_group_path
(
@group
)
do
Merge Requests
%span
.count
=
current_user
.
cared_merge_requests
.
opened
.
of_group
(
@group
).
count
=
nav_link
(
path:
'groups#people'
)
do
=
link_to
"People"
,
people_group_path
(
@group
)
-
if
can?
(
current_user
,
:manage_group
,
@group
)
=
nav_link
(
path:
'groups#edit'
)
do
=
link_to
edit_group_path
(
@group
),
class:
"tab "
do
Settings
app/views/layouts/nav/_profile.html.haml
0 → 100644
View file @
8cadeb67
%ul
=
nav_link
(
path:
'profiles#show'
,
html_options:
{
class:
'home'
})
do
=
link_to
profile_path
,
title:
"Profile"
do
%i
.icon-home
=
nav_link
(
path:
'profiles#account'
)
do
=
link_to
"Account"
,
account_profile_path
=
nav_link
(
controller: :notifications
)
do
=
link_to
"Notifications"
,
profile_notifications_path
=
nav_link
(
controller: :keys
)
do
=
link_to
keys_path
do
SSH Keys
%span
.count
=
current_user
.
keys
.
count
=
nav_link
(
path:
'profiles#design'
)
do
=
link_to
"Design"
,
design_profile_path
=
nav_link
(
path:
'profiles#history'
)
do
=
link_to
"History"
,
history_profile_path
app/views/layouts/nav/_project.html.haml
0 → 100644
View file @
8cadeb67
%ul
=
nav_link
(
path:
'projects#show'
,
html_options:
{
class:
"home"
})
do
=
link_to
project_path
(
@project
),
title:
"Project"
do
%i
.icon-home
-
unless
@project
.
empty_repo?
-
if
can?
current_user
,
:download_code
,
@project
=
nav_link
(
controller:
%w(tree blob blame)
)
do
=
link_to
'Files'
,
project_tree_path
(
@project
,
@ref
||
@repository
.
root_ref
)
=
nav_link
(
controller:
%w(commit commits compare repositories protected_branches)
)
do
=
link_to
"Commits"
,
project_commits_path
(
@project
,
@ref
||
@repository
.
root_ref
)
=
nav_link
(
controller:
%w(graph)
)
do
=
link_to
"Network"
,
project_graph_path
(
@project
,
@ref
||
@repository
.
root_ref
)
-
if
@project
.
issues_enabled
=
nav_link
(
controller:
%w(issues milestones labels)
)
do
=
link_to
url_for_project_issues
do
Issues
-
if
@project
.
used_default_issues_tracker?
%span
.count.issue_counter
=
@project
.
issues
.
opened
.
count
-
if
@project
.
repo_exists?
&&
@project
.
merge_requests_enabled
=
nav_link
(
controller: :merge_requests
)
do
=
link_to
project_merge_requests_path
(
@project
)
do
Merge Requests
%span
.count.merge_counter
=
@project
.
merge_requests
.
opened
.
count
-
if
@project
.
wiki_enabled
=
nav_link
(
controller: :wikis
)
do
=
link_to
'Wiki'
,
project_wiki_path
(
@project
,
:home
)
-
if
@project
.
wall_enabled
=
nav_link
(
controller: :walls
)
do
=
link_to
'Wall'
,
project_wall_path
(
@project
)
-
if
@project
.
snippets_enabled
=
nav_link
(
controller: :snippets
)
do
=
link_to
'Snippets'
,
project_snippets_path
(
@project
)
-
if
can?
current_user
,
:admin_project
,
@project
=
nav_link
(
html_options:
{
class:
"
#{
project_tab_class
}
"
})
do
=
link_to
edit_project_path
(
@project
),
class:
"stat-tab tab "
do
Settings
app/views/layouts/nav/_team.html.haml
0 → 100644
View file @
8cadeb67
%ul
=
nav_link
(
path:
'teams#show'
,
html_options:
{
class:
'home'
})
do
=
link_to
team_path
(
@team
),
title:
"Home"
do
%i
.icon-home
=
nav_link
(
path:
'teams#issues'
)
do
=
link_to
issues_team_path
(
@team
)
do
Issues
%span
.count
=
Issue
.
opened
.
of_user_team
(
@team
).
count
=
nav_link
(
path:
'teams#merge_requests'
)
do
=
link_to
merge_requests_team_path
(
@team
)
do
Merge Requests
%span
.count
=
MergeRequest
.
opened
.
of_user_team
(
@team
).
count
=
nav_link
(
controller:
[
:members
])
do
=
link_to
team_members_path
(
@team
),
class:
"team-tab tab"
do
Members
%span
.count
=
@team
.
members
.
count
-
if
can?
current_user
,
:admin_user_team
,
@team
=
nav_link
(
path:
'teams#edit'
)
do
=
link_to
edit_team_path
(
@team
),
class:
"stat-tab tab "
do
Settings
app/views/layouts/profile.html.haml
View file @
8cadeb67
...
@@ -4,22 +4,8 @@
...
@@ -4,22 +4,8 @@
%body
{
class:
"#{app_theme} profile"
}
%body
{
class:
"#{app_theme} profile"
}
=
render
"layouts/head_panel"
,
title:
"Profile"
=
render
"layouts/head_panel"
,
title:
"Profile"
=
render
"layouts/flash"
=
render
"layouts/flash"
.container
%nav
.main-nav
%ul
.main_menu
.container
=
render
'layouts/nav/profile'
=
nav_link
(
path:
'profiles#show'
,
html_options:
{
class:
'home'
})
do
=
link_to
profile_path
,
title:
"Profile"
do
%i
.icon-home
=
nav_link
(
path:
'profiles#account'
)
do
=
link_to
"Account"
,
account_profile_path
=
nav_link
(
controller: :notifications
)
do
=
link_to
"Notifications"
,
profile_notifications_path
=
nav_link
(
controller: :keys
)
do
=
link_to
keys_path
do
SSH Keys
%span
.count
=
current_user
.
keys
.
count
=
nav_link
(
path:
'profiles#design'
)
do
=
link_to
"Design"
,
design_profile_path
=
nav_link
(
path:
'profiles#history'
)
do
=
link_to
"History"
,
history_profile_path
.container
.content
=
yield
.content
=
yield
app/views/layouts/project_resource.html.haml
View file @
8cadeb67
...
@@ -7,49 +7,8 @@
...
@@ -7,49 +7,8 @@
-
if
can?
(
current_user
,
:download_code
,
@project
)
-
if
can?
(
current_user
,
:download_code
,
@project
)
=
render
'shared/no_ssh'
=
render
'shared/no_ssh'
.container
%nav
.main-nav
%ul
.main_menu
.container
=
render
'layouts/nav/project'
=
nav_link
(
path:
'projects#show'
,
html_options:
{
class:
"home"
})
do
=
link_to
project_path
(
@project
),
title:
"Project"
do
%i
.icon-home
-
unless
@project
.
empty_repo?
-
if
can?
current_user
,
:download_code
,
@project
=
nav_link
(
controller:
%w(tree blob blame)
)
do
=
link_to
'Files'
,
project_tree_path
(
@project
,
@ref
||
@repository
.
root_ref
)
=
nav_link
(
controller:
%w(commit commits compare repositories protected_branches)
)
do
=
link_to
"Commits"
,
project_commits_path
(
@project
,
@ref
||
@repository
.
root_ref
)
=
nav_link
(
controller:
%w(graph)
)
do
=
link_to
"Network"
,
project_graph_path
(
@project
,
@ref
||
@repository
.
root_ref
)
-
if
@project
.
issues_enabled
=
nav_link
(
controller:
%w(issues milestones labels)
)
do
=
link_to
url_for_project_issues
do
Issues
-
if
@project
.
used_default_issues_tracker?
%span
.count.issue_counter
=
@project
.
issues
.
opened
.
count
-
if
@project
.
repo_exists?
&&
@project
.
merge_requests_enabled
=
nav_link
(
controller: :merge_requests
)
do
=
link_to
project_merge_requests_path
(
@project
)
do
Merge Requests
%span
.count.merge_counter
=
@project
.
merge_requests
.
opened
.
count
-
if
@project
.
wiki_enabled
=
nav_link
(
controller: :wikis
)
do
=
link_to
'Wiki'
,
project_wiki_path
(
@project
,
:home
)
-
if
@project
.
wall_enabled
=
nav_link
(
controller: :walls
)
do
=
link_to
'Wall'
,
project_wall_path
(
@project
)
-
if
@project
.
snippets_enabled
=
nav_link
(
controller: :snippets
)
do
=
link_to
'Snippets'
,
project_snippets_path
(
@project
)
-
if
can?
current_user
,
:admin_project
,
@project
=
nav_link
(
html_options:
{
class:
"
#{
project_tab_class
}
"
})
do
=
link_to
edit_project_path
(
@project
),
class:
"stat-tab tab "
do
Settings
.container
.content
=
yield
.content
=
yield
app/views/layouts/user_team.html.haml
View file @
8cadeb67
...
@@ -4,30 +4,8 @@
...
@@ -4,30 +4,8 @@
%body
{
class:
"#{app_theme} application"
}
%body
{
class:
"#{app_theme} application"
}
=
render
"layouts/head_panel"
,
title:
"team:
#{
@team
.
name
}
"
=
render
"layouts/head_panel"
,
title:
"team:
#{
@team
.
name
}
"
=
render
"layouts/flash"
=
render
"layouts/flash"
.container
%nav
.main-nav
%ul
.main_menu
.container
=
render
'layouts/nav/team'
=
nav_link
(
path:
'teams#show'
,
html_options:
{
class:
'home'
})
do
=
link_to
team_path
(
@team
),
title:
"Home"
do
%i
.icon-home
=
nav_link
(
path:
'teams#issues'
)
do
=
link_to
issues_team_path
(
@team
)
do
Issues
%span
.count
=
Issue
.
opened
.
of_user_team
(
@team
).
count
=
nav_link
(
path:
'teams#merge_requests'
)
do
=
link_to
merge_requests_team_path
(
@team
)
do
Merge Requests
%span
.count
=
MergeRequest
.
opened
.
of_user_team
(
@team
).
count
=
nav_link
(
controller:
[
:members
])
do
=
link_to
team_members_path
(
@team
),
class:
"team-tab tab"
do
Members
%span
.count
=
@team
.
members
.
count
-
if
can?
current_user
,
:admin_user_team
,
@team
=
nav_link
(
path:
'teams#edit'
)
do
=
link_to
edit_team_path
(
@team
),
class:
"stat-tab tab "
do
Settings
.container
.content
=
yield
.content
=
yield
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