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
iv
gitlab-ce
Commits
de9886be
Commit
de9886be
authored
Oct 21, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restyle dashboard snippets visibility level tabs.
parent
d37cf642
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
31 deletions
+19
-31
app/assets/stylesheets/framework/buttons.scss
app/assets/stylesheets/framework/buttons.scss
+11
-0
app/assets/stylesheets/framework/mixins.scss
app/assets/stylesheets/framework/mixins.scss
+0
-1
app/helpers/tab_helper.rb
app/helpers/tab_helper.rb
+0
-18
app/views/dashboard/snippets/index.html.haml
app/views/dashboard/snippets/index.html.haml
+8
-12
No files found.
app/assets/stylesheets/framework/buttons.scss
View file @
de9886be
...
@@ -162,10 +162,21 @@
...
@@ -162,10 +162,21 @@
border-color
:
#e7e9ed
;
border-color
:
#e7e9ed
;
width
:
140px
;
width
:
140px
;
.badge
{
font-weight
:
normal
;
background-color
:
#eee
;
color
:
#78a
;
}
&
.active
{
&
.active
{
border-color
:
$gl-info
;
border-color
:
$gl-info
;
background
:
$gl-info
;
background
:
$gl-info
;
color
:
#fff
;
color
:
#fff
;
.badge
{
color
:
$gl-info
;
background-color
:
white
;
}
}
}
}
}
}
}
app/assets/stylesheets/framework/mixins.scss
View file @
de9886be
...
@@ -147,7 +147,6 @@
...
@@ -147,7 +147,6 @@
.badge
{
.badge
{
font-weight
:
normal
;
font-weight
:
normal
;
background-color
:
#fff
;
background-color
:
#eee
;
background-color
:
#eee
;
color
:
#78a
;
color
:
#78a
;
}
}
...
...
app/helpers/tab_helper.rb
View file @
de9886be
...
@@ -110,22 +110,4 @@ module TabHelper
...
@@ -110,22 +110,4 @@ module TabHelper
'active'
'active'
end
end
end
end
# Use nav_tab for save controller/action but different params
def
nav_tab
(
key
,
value
,
&
block
)
o
=
{}
o
[
:class
]
=
""
if
value
.
nil?
o
[
:class
]
<<
" active"
if
params
[
key
].
blank?
else
o
[
:class
]
<<
" active"
if
params
[
key
]
==
value
end
if
block_given?
content_tag
(
:li
,
capture
(
&
block
),
o
)
else
content_tag
(
:li
,
nil
,
o
)
end
end
end
end
app/views/dashboard/snippets/index.html.haml
View file @
de9886be
...
@@ -9,27 +9,23 @@
...
@@ -9,27 +9,23 @@
=
icon
(
'plus'
)
=
icon
(
'plus'
)
New Snippet
New Snippet
.oneline
.btn-group.btn-group-next.event-filter
Share code pastes with others out of git repository
=
link_to
dashboard_snippets_path
,
class:
"btn btn-default
#{
"active"
unless
params
[
:scope
]
}
"
do
%ul
.center-top-menu.no-top.no-bottom.snippet-scope-menu
=
nav_tab
:scope
,
nil
do
=
link_to
dashboard_snippets_path
do
All
All
%span
.badge
%span
.badge
=
current_user
.
snippets
.
count
=
current_user
.
snippets
.
count
=
nav_tab
:scope
,
'are_private'
do
=
link_to
dashboard_snippets_path
(
scope:
'are_private'
)
do
=
link_to
dashboard_snippets_path
(
scope:
'are_private'
)
,
class:
"btn btn-default
#{
"active"
if
params
[
:scope
]
==
"are_private"
}
"
do
Private
Private
%span
.badge
%span
.badge
=
current_user
.
snippets
.
are_private
.
count
=
current_user
.
snippets
.
are_private
.
count
=
nav_tab
:scope
,
'are_internal'
do
=
link_to
dashboard_snippets_path
(
scope:
'are_internal'
)
do
=
link_to
dashboard_snippets_path
(
scope:
'are_internal'
)
,
class:
"btn btn-default
#{
"active"
if
params
[
:scope
]
==
"are_internal"
}
"
do
Internal
Internal
%span
.badge
%span
.badge
=
current_user
.
snippets
.
are_internal
.
count
=
current_user
.
snippets
.
are_internal
.
count
=
nav_tab
:scope
,
'are_public'
do
=
link_to
dashboard_snippets_path
(
scope:
'are_public'
)
do
=
link_to
dashboard_snippets_path
(
scope:
'are_public'
)
,
class:
"btn btn-default
#{
"active"
if
params
[
:scope
]
==
"are_public"
}
"
do
Public
Public
%span
.badge
%span
.badge
=
current_user
.
snippets
.
are_public
.
count
=
current_user
.
snippets
.
are_public
.
count
...
...
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