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
Léo-Paul Géneau
gitlab-ce
Commits
dbc96f05
Commit
dbc96f05
authored
Apr 01, 2016
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor left navigation sidebar to use 2 levels
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
18dd525d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
109 additions
and
109 deletions
+109
-109
app/assets/stylesheets/framework/gitlab-theme.scss
app/assets/stylesheets/framework/gitlab-theme.scss
+1
-0
app/assets/stylesheets/framework/sidebar.scss
app/assets/stylesheets/framework/sidebar.scss
+1
-1
app/views/layouts/_page.html.haml
app/views/layouts/_page.html.haml
+9
-5
app/views/layouts/nav/_dashboard.html.haml
app/views/layouts/nav/_dashboard.html.haml
+0
-1
app/views/layouts/nav/_project.html.haml
app/views/layouts/nav/_project.html.haml
+98
-102
No files found.
app/assets/stylesheets/framework/gitlab-theme.scss
View file @
dbc96f05
...
...
@@ -37,6 +37,7 @@
background
:
$color-darker
;
.sidebar-user
{
border-top
:
1px
solid
$color
;
background
:
$color-darker
;
color
:
$color-light
;
...
...
app/assets/stylesheets/framework/sidebar.scss
View file @
dbc96f05
...
...
@@ -312,7 +312,6 @@
.page-sidebar-expanded
{
.complex-sidebar
{
margin-bottom
:
100px
;
display
:
inline-block
;
.nav-sidebar
{
...
...
@@ -337,6 +336,7 @@
}
.nav-secondary
{
padding-bottom
:
100px
;
border-left
:
1px
solid
rgba
(
255
,
255
,
255
,
0
.1
);
float
:
left
;
width
:
168px
;
...
...
app/views/layouts/_page.html.haml
View file @
dbc96f05
...
...
@@ -8,12 +8,16 @@
.gitlab-text-container
%h3
GitLab
-
if
defined?
(
sidebar
)
&&
sidebar
=
render
"layouts/nav/
#{
sidebar
}
"
-
elsif
current_user
=
render
'layouts/nav/dashboard'
-
primary_sidebar
=
current_user
?
'dashboard'
:
'explore'
-
if
defined?
(
sidebar
)
&&
sidebar
&&
sidebar
!=
primary_sidebar
.complex-sidebar
.nav-primary
=
render
"layouts/nav/
#{
primary_sidebar
}
"
.nav-secondary
=
render
"layouts/nav/
#{
sidebar
}
"
-
else
=
render
'layouts/nav/explore'
=
render
"layouts/nav/
#{
primary_sidebar
}
"
.collapse-nav
=
render
partial:
'layouts/collapse_button'
...
...
app/views/layouts/nav/_dashboard.html.haml
View file @
dbc96f05
...
...
@@ -48,7 +48,6 @@
%span
Help
%li
.separate-item
=
nav_link
(
controller: :profile
)
do
=
link_to
profile_path
,
title:
'Profile Settings'
,
data:
{
placement:
'bottom'
}
do
=
icon
(
'user fw'
)
...
...
app/views/layouts/nav/_project.html.haml
View file @
dbc96f05
.complex-sidebar
.nav-primary
=
render
'layouts/nav/dashboard'
.nav-secondary
%ul
.nav.nav-sidebar
=
nav_link
(
path:
'projects#show'
,
html_options:
{
class:
'home'
})
do
=
link_to
project_path
(
@project
),
title:
'Project'
,
class:
'shortcuts-project'
do
=
icon
(
'bookmark fw'
)
%span
Project
=
nav_link
(
path:
'projects#activity'
)
do
=
link_to
activity_project_path
(
@project
),
title:
'Activity'
,
class:
'shortcuts-project-activity'
do
=
icon
(
'dashboard fw'
)
%span
Activity
-
if
project_nav_tab?
:files
=
nav_link
(
controller:
%w(tree blob blame edit_tree new_tree find_file)
)
do
=
link_to
project_files_path
(
@project
),
title:
'Files'
,
class:
'shortcuts-tree'
do
=
icon
(
'files-o fw'
)
%span
Files
%ul
.nav.nav-sidebar
=
nav_link
(
path:
'projects#show'
,
html_options:
{
class:
'home'
})
do
=
link_to
project_path
(
@project
),
title:
'Project'
,
class:
'shortcuts-project'
do
=
icon
(
'bookmark fw'
)
%span
Project
=
nav_link
(
path:
'projects#activity'
)
do
=
link_to
activity_project_path
(
@project
),
title:
'Activity'
,
class:
'shortcuts-project-activity'
do
=
icon
(
'dashboard fw'
)
%span
Activity
-
if
project_nav_tab?
:files
=
nav_link
(
controller:
%w(tree blob blame edit_tree new_tree find_file)
)
do
=
link_to
project_files_path
(
@project
),
title:
'Files'
,
class:
'shortcuts-tree'
do
=
icon
(
'files-o fw'
)
%span
Files
-
if
project_nav_tab?
:commits
=
nav_link
(
controller:
%w(commit commits compare repositories tags branches releases network)
)
do
=
link_to
project_commits_path
(
@project
),
title:
'Commits'
,
class:
'shortcuts-commits'
do
=
icon
(
'history fw'
)
%span
Commits
-
if
project_nav_tab?
:commits
=
nav_link
(
controller:
%w(commit commits compare repositories tags branches releases network)
)
do
=
link_to
project_commits_path
(
@project
),
title:
'Commits'
,
class:
'shortcuts-commits'
do
=
icon
(
'history fw'
)
%span
Commits
-
if
project_nav_tab?
:builds
=
nav_link
(
controller:
%w(builds)
)
do
=
link_to
project_builds_path
(
@project
),
title:
'Builds'
,
class:
'shortcuts-builds'
do
=
icon
(
'cubes fw'
)
%span
Builds
%span
.count.builds_counter
=
number_with_delimiter
(
@project
.
builds
.
running_or_pending
.
count
(
:all
))
-
if
project_nav_tab?
:builds
=
nav_link
(
controller:
%w(builds)
)
do
=
link_to
project_builds_path
(
@project
),
title:
'Builds'
,
class:
'shortcuts-builds'
do
=
icon
(
'cubes fw'
)
%span
Builds
%span
.count.builds_counter
=
number_with_delimiter
(
@project
.
builds
.
running_or_pending
.
count
(
:all
))
-
if
project_nav_tab?
:graphs
=
nav_link
(
controller:
%w(graphs)
)
do
=
link_to
namespace_project_graph_path
(
@project
.
namespace
,
@project
,
current_ref
),
title:
'Graphs'
,
class:
'shortcuts-graphs'
do
=
icon
(
'area-chart fw'
)
%span
Graphs
-
if
project_nav_tab?
:graphs
=
nav_link
(
controller:
%w(graphs)
)
do
=
link_to
namespace_project_graph_path
(
@project
.
namespace
,
@project
,
current_ref
),
title:
'Graphs'
,
class:
'shortcuts-graphs'
do
=
icon
(
'area-chart fw'
)
%span
Graphs
-
if
project_nav_tab?
:milestones
=
nav_link
(
controller: :milestones
)
do
=
link_to
namespace_project_milestones_path
(
@project
.
namespace
,
@project
),
title:
'Milestones'
do
=
icon
(
'clock-o fw'
)
%span
Milestones
-
if
project_nav_tab?
:milestones
=
nav_link
(
controller: :milestones
)
do
=
link_to
namespace_project_milestones_path
(
@project
.
namespace
,
@project
),
title:
'Milestones'
do
=
icon
(
'clock-o fw'
)
%span
Milestones
-
if
project_nav_tab?
:issues
=
nav_link
(
controller: :issues
)
do
=
link_to
url_for_project_issues
(
@project
,
only_path:
true
),
title:
'Issues'
,
class:
'shortcuts-issues'
do
=
icon
(
'exclamation-circle fw'
)
%span
Issues
-
if
@project
.
default_issues_tracker?
%span
.count.issue_counter
=
number_with_delimiter
(
@project
.
issues
.
visible_to_user
(
current_user
).
opened
.
count
)
-
if
project_nav_tab?
:issues
=
nav_link
(
controller: :issues
)
do
=
link_to
url_for_project_issues
(
@project
,
only_path:
true
),
title:
'Issues'
,
class:
'shortcuts-issues'
do
=
icon
(
'exclamation-circle fw'
)
%span
Issues
-
if
@project
.
default_issues_tracker?
%span
.count.issue_counter
=
number_with_delimiter
(
@project
.
issues
.
visible_to_user
(
current_user
).
opened
.
count
)
-
if
project_nav_tab?
:merge_requests
=
nav_link
(
controller: :merge_requests
)
do
=
link_to
namespace_project_merge_requests_path
(
@project
.
namespace
,
@project
),
title:
'Merge Requests'
,
class:
'shortcuts-merge_requests'
do
=
icon
(
'tasks fw'
)
%span
Merge Requests
%span
.count.merge_counter
=
number_with_delimiter
(
@project
.
merge_requests
.
opened
.
count
)
-
if
project_nav_tab?
:merge_requests
=
nav_link
(
controller: :merge_requests
)
do
=
link_to
namespace_project_merge_requests_path
(
@project
.
namespace
,
@project
),
title:
'Merge Requests'
,
class:
'shortcuts-merge_requests'
do
=
icon
(
'tasks fw'
)
%span
Merge Requests
%span
.count.merge_counter
=
number_with_delimiter
(
@project
.
merge_requests
.
opened
.
count
)
-
if
project_nav_tab?
:settings
=
nav_link
(
controller:
[
:project_members
,
:teams
])
do
=
link_to
namespace_project_project_members_path
(
@project
.
namespace
,
@project
),
title:
'Members'
,
class:
'team-tab tab'
do
=
icon
(
'users fw'
)
%span
Members
-
if
project_nav_tab?
:settings
=
nav_link
(
controller:
[
:project_members
,
:teams
])
do
=
link_to
namespace_project_project_members_path
(
@project
.
namespace
,
@project
),
title:
'Members'
,
class:
'team-tab tab'
do
=
icon
(
'users fw'
)
%span
Members
-
if
project_nav_tab?
:labels
=
nav_link
(
controller: :labels
)
do
=
link_to
namespace_project_labels_path
(
@project
.
namespace
,
@project
),
title:
'Labels'
do
=
icon
(
'tags fw'
)
%span
Labels
-
if
project_nav_tab?
:labels
=
nav_link
(
controller: :labels
)
do
=
link_to
namespace_project_labels_path
(
@project
.
namespace
,
@project
),
title:
'Labels'
do
=
icon
(
'tags fw'
)
%span
Labels
-
if
project_nav_tab?
:wiki
=
nav_link
(
controller: :wikis
)
do
=
link_to
get_project_wiki_path
(
@project
),
title:
'Wiki'
,
class:
'shortcuts-wiki'
do
=
icon
(
'book fw'
)
%span
Wiki
-
if
project_nav_tab?
:wiki
=
nav_link
(
controller: :wikis
)
do
=
link_to
get_project_wiki_path
(
@project
),
title:
'Wiki'
,
class:
'shortcuts-wiki'
do
=
icon
(
'book fw'
)
%span
Wiki
-
if
project_nav_tab?
:forks
=
nav_link
(
controller: :forks
,
action: :index
)
do
=
link_to
namespace_project_forks_path
(
@project
.
namespace
,
@project
),
title:
'Forks'
do
=
icon
(
'code-fork fw'
)
%span
Forks
-
if
project_nav_tab?
:forks
=
nav_link
(
controller: :forks
,
action: :index
)
do
=
link_to
namespace_project_forks_path
(
@project
.
namespace
,
@project
),
title:
'Forks'
do
=
icon
(
'code-fork fw'
)
%span
Forks
-
if
project_nav_tab?
:snippets
=
nav_link
(
controller: :snippets
)
do
=
link_to
namespace_project_snippets_path
(
@project
.
namespace
,
@project
),
title:
'Snippets'
,
class:
'shortcuts-snippets'
do
=
icon
(
'clipboard fw'
)
%span
Snippets
-
if
project_nav_tab?
:snippets
=
nav_link
(
controller: :snippets
)
do
=
link_to
namespace_project_snippets_path
(
@project
.
namespace
,
@project
),
title:
'Snippets'
,
class:
'shortcuts-snippets'
do
=
icon
(
'clipboard fw'
)
%span
Snippets
-
if
project_nav_tab?
:settings
=
nav_link
(
html_options:
{
class:
"
#{
project_tab_class
}
separate-item
"
})
do
=
link_to
edit_project_path
(
@project
),
title:
'Settings'
do
=
icon
(
'cogs fw'
)
%span
Settings
-
if
project_nav_tab?
:settings
=
nav_link
(
html_options:
{
class:
"
#{
project_tab_class
}
"
})
do
=
link_to
edit_project_path
(
@project
),
title:
'Settings'
do
=
icon
(
'cogs fw'
)
%span
Settings
-# Global shortcut to network page for compatibility
-
if
project_nav_tab?
:network
%li
.hidden
=
link_to
namespace_project_network_path
(
@project
.
namespace
,
@project
,
current_ref
),
title:
'Network'
,
class:
'shortcuts-network'
do
Network
-# Global shortcut to network page for compatibility
-
if
project_nav_tab?
:network
%li
.hidden
=
link_to
namespace_project_network_path
(
@project
.
namespace
,
@project
,
current_ref
),
title:
'Network'
,
class:
'shortcuts-network'
do
Network
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