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
Kazuhiko Shiozaki
gitlab-ce
Commits
031ae775
Commit
031ae775
authored
Jul 03, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactored navigation
parent
51f174b9
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
152 additions
and
72 deletions
+152
-72
app/assets/images/ajax_loader.gif
app/assets/images/ajax_loader.gif
+0
-0
app/assets/stylesheets/header.scss
app/assets/stylesheets/header.scss
+6
-4
app/assets/stylesheets/nav.scss
app/assets/stylesheets/nav.scss
+30
-26
app/assets/stylesheets/themes/ui_modern.scss
app/assets/stylesheets/themes/ui_modern.scss
+4
-2
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+37
-0
app/views/layouts/_app_menu.html.haml
app/views/layouts/_app_menu.html.haml
+19
-11
app/views/layouts/_project_menu.html.haml
app/views/layouts/_project_menu.html.haml
+27
-16
app/views/layouts/admin.html.haml
app/views/layouts/admin.html.haml
+11
-6
app/views/layouts/profile.html.haml
app/views/layouts/profile.html.haml
+18
-7
No files found.
app/assets/images/ajax_loader.gif
View replaced file @
51f174b9
View file @
031ae775
7.37 KB
|
W:
|
H:
7.74 KB
|
W:
|
H:
2-up
Swipe
Onion skin
app/assets/stylesheets/header.scss
View file @
031ae775
...
@@ -74,7 +74,7 @@ header {
...
@@ -74,7 +74,7 @@ header {
font-size
:
24px
;
font-size
:
24px
;
line-height
:
36px
;
line-height
:
36px
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#567
;
color
:
$style_color
;
text-shadow
:
0
1px
1px
#FFF
;
text-shadow
:
0
1px
1px
#FFF
;
}
}
...
@@ -82,7 +82,9 @@ header {
...
@@ -82,7 +82,9 @@ header {
float
:
right
;
float
:
right
;
margin-right
:
10px
;
margin-right
:
10px
;
.btn
{
.btn
{
margin-left
:
8px
;
margin-left
:
7px
;
background
:
#F1F1F1
;
border
:
1px
solid
#CCC
;
}
}
}
}
...
@@ -96,8 +98,8 @@ header {
...
@@ -96,8 +98,8 @@ header {
float
:
right
;
float
:
right
;
margin-right
:
55px
;
margin-right
:
55px
;
.search-input
{
.search-input
{
width
:
130px
;
@extend
.span2
;
background-image
:
url("icon-search.png")
;
background-image
:
url("icon-search.png")
;
background-repeat
:
no-repeat
;
background-repeat
:
no-repeat
;
background-position
:
10px
;
background-position
:
10px
;
...
...
app/assets/stylesheets/nav.scss
View file @
031ae775
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* Main Menu of Application
* Main Menu of Application
*
*
*/
*/
nav
.main_menu
{
ul
.main_menu
{
border-radius
:
4px
;
border-radius
:
4px
;
margin
:
auto
;
margin
:
auto
;
margin
:
30px
0
;
margin
:
30px
0
;
...
@@ -13,9 +13,7 @@ nav.main_menu {
...
@@ -13,9 +13,7 @@ nav.main_menu {
background-image
:
-webkit-linear-gradient
(
#eee
6
.6%
,
#dfdfdf
);
background-image
:
-webkit-linear-gradient
(
#eee
6
.6%
,
#dfdfdf
);
background-image
:
-moz-linear-gradient
(
#eee
6
.6%
,
#dfdfdf
);
background-image
:
-moz-linear-gradient
(
#eee
6
.6%
,
#dfdfdf
);
background-image
:
-o-linear-gradient
(
#eee
6
.6%
,
#dfdfdf
);
background-image
:
-o-linear-gradient
(
#eee
6
.6%
,
#dfdfdf
);
display
:table
;
position
:relative
;
table-layout
:fixed
;
width
:
100%
;
@include
shade
;
@include
shade
;
.count
{
.count
{
position
:
relative
;
position
:
relative
;
...
@@ -39,10 +37,14 @@ nav.main_menu {
...
@@ -39,10 +37,14 @@ nav.main_menu {
text-shadow
:none
;
text-shadow
:none
;
color
:
$style_color
;
color
:
$style_color
;
}
}
a
{
li
{
display
:table-cell
;
list-style-type
:
none
;
text-align
:center
;
margin
:
0
;
font-weight
:bold
;
display
:
table-cell
;
width
:
1%
;
border-right
:
1px
solid
#DDD
;
border-left
:
1px
solid
#EEE
;
&
:first-child
{
&
:first-child
{
-webkit-border-top-left-radius
:
4px
;
-webkit-border-top-left-radius
:
4px
;
-webkit-border-bottom-left-radius
:
4px
;
-webkit-border-bottom-left-radius
:
4px
;
...
@@ -52,22 +54,7 @@ nav.main_menu {
...
@@ -52,22 +54,7 @@ nav.main_menu {
border-bottom-left-radius
:
4px
;
border-bottom-left-radius
:
4px
;
border-left
:
0
;
border-left
:
0
;
}
}
padding
:
9px
2px
;
color
:
$style_color
;
position
:
relative
;
margin
:
0
;
text-shadow
:
0
1px
1px
white
;
border-right
:
1px
solid
#DDD
;
border-left
:
1px
solid
#EEE
;
&
.home
{
background
:
url(home_icon.PNG)
no-repeat
center
center
;
text-indent
:
-9999px
;
img
{
position
:relative
;
top
:
4px
;
}
}
&
.current
{
&
.current
{
background-color
:
#D5D5D5
;
background-color
:
#D5D5D5
;
border-bottom
:
1px
solid
#567
;
border-bottom
:
1px
solid
#567
;
...
@@ -80,11 +67,28 @@ nav.main_menu {
...
@@ -80,11 +67,28 @@ nav.main_menu {
}
}
}
}
&
.wide
{
&
.home
{
width
:
185px
;
a
{
@media
(
min-width
:
1080px
)
and
(
max-width
:
1200px
)
{
width
:
160px
;
}
background
:
url(home_icon.PNG)
no-repeat
center
center
;
text-indent
:
-9999px
;
min-width
:
20px
;
img
{
position
:relative
;
top
:
4px
;
}
}
}
}
}
}
a
{
display
:
block
;
text-align
:
center
;
font-weight
:bold
;
height
:
35px
;
line-height
:
36px
;
color
:
$style_color
;
text-shadow
:
0
1px
1px
white
;
}
}
}
/*
/*
* End of Main Menu
* End of Main Menu
...
...
app/assets/stylesheets/themes/ui_modern.scss
View file @
031ae775
...
@@ -9,19 +9,21 @@
...
@@ -9,19 +9,21 @@
*
*
*/
*/
.ui_modern
{
.ui_modern
{
nav
.main_menu
{
ul
.main_menu
{
background
:none
;
background
:none
;
box-shadow
:none
;
box-shadow
:none
;
@include
border-radius
(
0px
);
@include
border-radius
(
0px
);
border
:none
;
border
:none
;
border-bottom
:
2px
solid
#456
;
border-bottom
:
2px
solid
#456
;
a
{
li
{
border
:none
;
border
:none
;
&
.current
{
&
.current
{
border-bottom
:
2px
solid
#f90
;
border-bottom
:
2px
solid
#f90
;
background-color
:
#fff
;
background-color
:
#fff
;
position
:relative
;
top
:
1px
;
}
}
}
}
}
}
...
...
app/helpers/application_helper.rb
View file @
031ae775
...
@@ -96,4 +96,41 @@ module ApplicationHelper
...
@@ -96,4 +96,41 @@ module ApplicationHelper
event
.
project
&&
event
.
project
&&
event
.
project
.
merge_requests_enabled
event
.
project
.
merge_requests_enabled
end
end
def
tab_class
(
tab_key
)
active
=
case
tab_key
# Project Area
when
:wall
;
wall_tab?
when
:wiki
;
controller
.
controller_name
==
"wikis"
when
:issues
;
issues_tab?
when
:network
;
current_page?
(
:controller
=>
"projects"
,
:action
=>
"graph"
,
:id
=>
@project
)
when
:merge_requests
;
controller
.
controller_name
==
"merge_requests"
# Dashboard Area
when
:help
;
controller
.
controller_name
==
"help"
when
:search
;
current_page?
(
search_path
)
when
:dash_issues
;
current_page?
(
dashboard_issues_path
)
when
:dash_mr
;
current_page?
(
dashboard_merge_requests_path
)
when
:root
;
current_page?
(
dashboard_path
)
||
current_page?
(
root_path
)
# Profile Area
when
:profile
;
current_page?
(
:controller
=>
"profile"
,
:action
=>
:show
)
when
:password
;
current_page?
(
:controller
=>
"profile"
,
:action
=>
:password
)
when
:token
;
current_page?
(
:controller
=>
"profile"
,
:action
=>
:token
)
when
:design
;
current_page?
(
:controller
=>
"profile"
,
:action
=>
:design
)
when
:ssh_keys
;
controller
.
controller_name
==
"keys"
# Admin Area
when
:admin_root
;
controller
.
controller_name
==
"dashboard"
when
:admin_users
;
controller
.
controller_name
==
'users'
when
:admin_projects
;
controller
.
controller_name
==
"projects"
when
:admin_emails
;
controller
.
controller_name
==
'mailer'
when
:admin_resque
;
controller
.
controller_name
==
'resque'
else
false
end
active
?
"current"
:
nil
end
end
end
app/views/layouts/_app_menu.html.haml
View file @
031ae775
%nav
.main_menu
%ul
.main_menu
=
link_to
"Home"
,
root_path
,
:class
=>
"home
#{
"current"
if
current_page?
(
dashboard_path
)
||
current_page?
(
root_path
)
}
"
,
:title
=>
"Home"
%li
.home
{
:class
=>
tab_class
(
:root
)}
=
link_to
dashboard_issues_path
,
:class
=>
"
#{
"current"
if
current_page?
(
dashboard_issues_path
)
}
"
,
:id
=>
"issues_slide"
do
=
link_to
"Home"
,
root_path
,
:title
=>
"Home"
Issues
%span
.count
=
current_user
.
assigned_issues
.
opened
.
count
%li
{
:class
=>
tab_class
(
:dash_issues
)}
=
link_to
dashboard_merge_requests_path
,
:class
=>
"
#{
"current"
if
current_page?
(
dashboard_merge_requests_path
)
}
"
,
:id
=>
"merge_requests_slide"
do
=
link_to
dashboard_issues_path
do
Requests
Issues
%span
.count
=
current_user
.
cared_merge_requests
.
count
%span
.count
=
current_user
.
assigned_issues
.
opened
.
count
=
link_to
search_path
,
:class
=>
"
#{
"current"
if
current_page?
(
search_path
)
}
"
do
Search
%li
{
:class
=>
tab_class
(
:dash_mr
)}
=
link_to
"Help"
,
help_path
,
:class
=>
"
#{
"current"
if
controller
.
controller_name
==
"help"
}
"
=
link_to
dashboard_merge_requests_path
do
Merge Requests
%span
.count
=
current_user
.
cared_merge_requests
.
count
%li
{
:class
=>
tab_class
(
:search
)}
=
link_to
"Search"
,
search_path
%li
{
:class
=>
tab_class
(
:help
)}
=
link_to
"Help"
,
help_path
app/views/layouts/_project_menu.html.haml
View file @
031ae775
%nav
.main_menu
%ul
.main_menu
=
link_to
@project
.
code
,
project_path
(
@project
),
:class
=>
"home
#{
project_tab_class
}
"
,
:title
=>
"Project"
%li
.home
{
:class
=>
project_tab_class
}
=
link_to
@project
.
code
,
project_path
(
@project
),
:title
=>
"Project"
-
if
@project
.
repo_exists?
-
if
@project
.
repo_exists?
-
if
can?
current_user
,
:download_code
,
@project
-
if
can?
current_user
,
:download_code
,
@project
=
link_to
tree_project_ref_path
(
@project
,
@project
.
root_ref
),
:class
=>
tree_tab_class
do
%li
{
:class
=>
tree_tab_class
}
Files
=
link_to
tree_project_ref_path
(
@project
,
@project
.
root_ref
)
do
=
link_to
"Commits"
,
project_commits_path
(
@project
),
:class
=>
commit_tab_class
Files
%li
{
:class
=>
commit_tab_class
}
=
link_to
"Commits"
,
project_commits_path
(
@project
)
%li
{
:class
=>
tab_class
(
:network
)}
=
link_to
"Network"
,
graph_project_path
(
@project
)
=
link_to
"Network"
,
graph_project_path
(
@project
),
:class
=>
current_page?
(
:controller
=>
"projects"
,
:action
=>
"graph"
,
:id
=>
@project
)
?
"current"
:
nil
-
if
@project
.
issues_enabled
-
if
@project
.
issues_enabled
=
link_to
project_issues_filter_path
(
@project
),
:class
=>
issues_tab?
?
"current"
:
nil
do
%li
{
:class
=>
tab_class
(
:issues
)}
Issues
=
link_to
project_issues_filter_path
(
@project
)
do
%span
.count
=
@project
.
issues
.
opened
.
count
Issues
%span
.count
=
@project
.
issues
.
opened
.
count
-
if
@project
.
merge_requests_enabled
-
if
@project
.
merge_requests_enabled
=
link_to
project_merge_requests_path
(
@project
),
:class
=>
(
controller
.
controller_name
==
"merge_requests"
)
?
"current wide"
:
"wide"
do
%li
{
:class
=>
tab_class
(
:merge_requests
)}
Merge Requests
=
link_to
project_merge_requests_path
(
@project
)
do
%span
.count
=
@project
.
merge_requests
.
opened
.
count
Merge Requests
%span
.count
=
@project
.
merge_requests
.
opened
.
count
-
if
@project
.
wall_enabled
-
if
@project
.
wall_enabled
=
link_to
wall_project_path
(
@project
),
:class
=>
wall_tab?
?
"current"
:
nil
do
%li
{
:class
=>
tab_class
(
:wall
)}
Wall
=
link_to
wall_project_path
(
@project
)
do
Wall
-
if
@project
.
wiki_enabled
-
if
@project
.
wiki_enabled
=
link_to
project_wiki_path
(
@project
,
:index
),
:class
=>
(
controller
.
controller_name
==
"wikis"
)
?
"current"
:
nil
do
%li
{
:class
=>
tab_class
(
:wiki
)}
Wiki
=
link_to
project_wiki_path
(
@project
,
:index
)
do
Wiki
app/views/layouts/admin.html.haml
View file @
031ae775
...
@@ -5,11 +5,16 @@
...
@@ -5,11 +5,16 @@
=
render
"layouts/flash"
=
render
"layouts/flash"
=
render
"layouts/head_panel"
,
:title
=>
"Admin area"
=
render
"layouts/head_panel"
,
:title
=>
"Admin area"
.container
.container
%nav
.main_menu
%ul
.main_menu
=
link_to
"Stats"
,
admin_root_path
,
:class
=>
"home
#{
'current'
if
controller
.
controller_name
==
"dashboard"
}
"
%li
.home
{
:class
=>
tab_class
(
:admin_root
)}
=
link_to
"Projects"
,
admin_projects_path
,
:class
=>
(
'current'
if
controller
.
controller_name
==
"projects"
)
=
link_to
"Stats"
,
admin_root_path
=
link_to
"Users"
,
admin_users_path
,
:class
=>
(
'current'
if
controller
.
controller_name
==
'users'
)
%li
{
:class
=>
tab_class
(
:admin_projects
)}
=
link_to
"Emails"
,
admin_emails_path
,
:class
=>
(
'current'
if
controller
.
controller_name
==
'mailer'
)
=
link_to
"Projects"
,
admin_projects_path
=
link_to
"Resque"
,
admin_resque_path
,
:class
=>
(
'current'
if
controller
.
controller_name
==
'resque'
)
%li
{
:class
=>
tab_class
(
:admin_users
)}
=
link_to
"Users"
,
admin_users_path
%li
{
:class
=>
tab_class
(
:admin_emails
)}
=
link_to
"Emails"
,
admin_emails_path
%li
{
:class
=>
tab_class
(
:admin_resque
)}
=
link_to
"Resque"
,
admin_resque_path
.content
=
yield
.content
=
yield
app/views/layouts/profile.html.haml
View file @
031ae775
...
@@ -5,12 +5,23 @@
...
@@ -5,12 +5,23 @@
=
render
"layouts/flash"
=
render
"layouts/flash"
=
render
"layouts/head_panel"
,
:title
=>
"Profile"
=
render
"layouts/head_panel"
,
:title
=>
"Profile"
.container
.container
%nav
.main_menu
%ul
.main_menu
=
link_to
"Profile"
,
profile_path
,
:class
=>
"home
#{
current_page?
(
:controller
=>
"profile"
,
:action
=>
:show
)
?
"current"
:
nil
}
"
%li
.home
{
:class
=>
tab_class
(
:profile
)}
=
link_to
"Password"
,
profile_password_path
,
:class
=>
current_page?
(
:controller
=>
"profile"
,
:action
=>
:password
)
?
"current"
:
nil
=
link_to
"Profile"
,
profile_path
=
link_to
"Token"
,
profile_token_path
,
:class
=>
current_page?
(
:controller
=>
"profile"
,
:action
=>
:token
)
?
"current"
:
nil
=
link_to
"Design"
,
profile_design_path
,
:class
=>
current_page?
(
:controller
=>
"profile"
,
:action
=>
:design
)
?
"current"
:
nil
%li
{
:class
=>
tab_class
(
:password
)}
=
link_to
keys_path
,
:class
=>
controller
.
controller_name
==
"keys"
?
"current"
:
nil
do
=
link_to
"Password"
,
profile_password_path
SSH Keys
%li
{
:class
=>
tab_class
(
:token
)}
=
link_to
"Token"
,
profile_token_path
%li
{
:class
=>
tab_class
(
:design
)}
=
link_to
"Design"
,
profile_design_path
%li
{
:class
=>
tab_class
(
:ssh_keys
)}
=
link_to
keys_path
do
SSH Keys
%span
.count
=
current_user
.
keys
.
count
.content
.content
=
yield
=
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