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