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
Tatuya Kamada
gitlab-ce
Commits
47d5d5f5
Commit
47d5d5f5
authored
Dec 27, 2011
by
Valeriy Sizov
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #203 from mlitwiniuk/top_nav_fix
Hide admin menu for non-admins
parents
676fa16c
36b7b5f2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
app/assets/stylesheets/style.scss
app/assets/stylesheets/style.scss
+4
-1
app/views/layouts/_head_panel.html.erb
app/views/layouts/_head_panel.html.erb
+8
-6
No files found.
app/assets/stylesheets/style.scss
View file @
47d5d5f5
...
@@ -359,6 +359,9 @@ header nav{border-radius: 4px; box-shadow: 0 1px 2px black; width: 294px; margin
...
@@ -359,6 +359,9 @@ header nav{border-radius: 4px; box-shadow: 0 1px 2px black; width: 294px; margin
margin-top
:
2px
;
margin-top
:
2px
;
height
:
30px
height
:
30px
}
}
header
nav
.shorter_nav
{
width
:
207px
;
}
header
nav
a
{
padding
:
8px
12px
8px
34px
;
display
:
inline-block
;
color
:
#D6DADF
;
border-right
:
1px
solid
#31363E
;
position
:
relative
;
box-shadow
:
1px
0
0
rgba
(
255
,
255
,
255
,.
1
);
margin
:
0
}
header
nav
a
{
padding
:
8px
12px
8px
34px
;
display
:
inline-block
;
color
:
#D6DADF
;
border-right
:
1px
solid
#31363E
;
position
:
relative
;
box-shadow
:
1px
0
0
rgba
(
255
,
255
,
255
,.
1
);
margin
:
0
}
header
nav
a
span
{
width
:
20px
;
height
:
20px
;
display
:
inline-block
;
background
:
red
;
position
:
absolute
;
left
:
8px
;
top
:
6px
;}
header
nav
a
span
{
width
:
20px
;
height
:
20px
;
display
:
inline-block
;
background
:
red
;
position
:
absolute
;
left
:
8px
;
top
:
6px
;}
header
nav
a
:last-child
{
border
:
0
;
box-shadow
:
none
}
header
nav
a
:last-child
{
border
:
0
;
box-shadow
:
none
}
...
@@ -382,7 +385,7 @@ header nav a.dashboard {
...
@@ -382,7 +385,7 @@ header nav a.dashboard {
border-bottom-left-radius
:
4px
;
border-bottom-left-radius
:
4px
;
}
}
header
nav
a
.
admin
{
header
nav
a
.
last_elem
{
-webkit-border-top-right-radius
:
4px
;
-webkit-border-top-right-radius
:
4px
;
-webkit-border-bottom-right-radius
:
4px
;
-webkit-border-bottom-right-radius
:
4px
;
-moz-border-radius-topright
:
4px
;
-moz-border-radius-topright
:
4px
;
...
...
app/views/layouts/_head_panel.html.erb
View file @
47d5d5f5
...
@@ -21,16 +21,18 @@
...
@@ -21,16 +21,18 @@
<%=
text_field_tag
"search"
,
nil
,
:placeholder
=>
"Search"
,
:class
=>
"search-input"
%>
<%=
text_field_tag
"search"
,
nil
,
:placeholder
=>
"Search"
,
:class
=>
"search-input"
%>
</div>
</div>
<!-- .login-top -->
<!-- .login-top -->
<nav>
<nav
class=
"
<%=
'shorter_nav'
unless
current_user
.
is_admin?
%>
"
>
<%=
link_to
dashboard_path
,
:class
=>
current_page?
(
root_path
)
?
"current dashboard"
:
"
dashboard"
do
%>
<%=
link_to
dashboard_path
,
:class
=>
"
#{
'current'
if
current_page?
(
root_path
)
}
dashboard"
do
%>
<span></span>
Dashboard
<span></span>
Dashboard
<%
end
%>
<%
end
%>
<%=
link_to
projects_path
,
:class
=>
current_page?
(
projects_path
)
?
"current project"
:
"project
"
do
%>
<%=
link_to
projects_path
,
:class
=>
"
#{
'current'
if
current_page?
(
projects_path
)
}
project
#{
'last_elem'
unless
current_user
.
is_admin?
}
"
do
%>
<span></span>
Projects
<span></span>
Projects
<%
end
%>
<%
end
%>
<%=
link_to
((
current_user
.
is_admin?
?
admin_root_path
:
"#"
),
:class
=>
(
admin_namespace?
?
"current admin"
:
"admin"
))
do
%>
<%
if
current_user
.
is_admin?
%>
<span></span>
Admin
<%=
link_to
((
current_user
.
is_admin?
?
admin_root_path
:
"#"
),
:class
=>
"
#{
'current'
if
admin_namespace?
}
admin last_elem"
)
do
%>
<%
end
%>
<span></span>
Admin
<%
end
%>
<%
end
%>
</nav>
</nav>
</header>
</header>
...
...
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