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
b65d3e11
Commit
b65d3e11
authored
Dec 07, 2016
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move new snippet button to main snippet navigation block
parent
6b20ad36
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
48 deletions
+42
-48
app/views/dashboard/_snippets_head.html.haml
app/views/dashboard/_snippets_head.html.haml
+13
-7
app/views/dashboard/snippets/index.html.haml
app/views/dashboard/snippets/index.html.haml
+29
-33
app/views/explore/snippets/index.html.haml
app/views/explore/snippets/index.html.haml
+0
-8
No files found.
app/views/dashboard/_snippets_head.html.haml
View file @
b65d3e11
%ul
.nav-links
=
nav_link
(
page:
dashboard_snippets_path
,
html_options:
{
class:
'home'
})
do
=
link_to
dashboard_snippets_path
,
title:
'Your snippets'
,
data:
{
placement:
'right'
}
do
Your Snippets
=
nav_link
(
page:
explore_snippets_path
)
do
=
link_to
explore_snippets_path
,
title:
'Explore snippets'
,
data:
{
placement:
'right'
}
do
Explore Snippets
.top-area
%ul
.nav-links
=
nav_link
(
page:
dashboard_snippets_path
,
html_options:
{
class:
'home'
})
do
=
link_to
dashboard_snippets_path
,
title:
'Your snippets'
,
data:
{
placement:
'right'
}
do
Your Snippets
=
nav_link
(
page:
explore_snippets_path
)
do
=
link_to
explore_snippets_path
,
title:
'Explore snippets'
,
data:
{
placement:
'right'
}
do
Explore Snippets
-
if
current_user
.nav-controls.hidden-xs
=
link_to
new_snippet_path
,
class:
"btn btn-new"
,
title:
"New snippet"
do
New snippet
app/views/dashboard/snippets/index.html.haml
View file @
b65d3e11
...
...
@@ -3,38 +3,34 @@
=
render
'dashboard/snippets_head'
.nav-block
.controls.hidden-xs
=
link_to
new_snippet_path
,
class:
"btn btn-new"
,
title:
"New snippet"
do
New snippet
.nav-links.snippet-scope-menu
%li
{
class:
(
"active"
unless
params
[
:scope
])
}
=
link_to
dashboard_snippets_path
do
All
%span
.badge
=
current_user
.
snippets
.
count
%li
{
class:
(
"active"
if
params
[
:scope
]
==
"are_private"
)
}
=
link_to
dashboard_snippets_path
(
scope:
'are_private'
)
do
Private
%span
.badge
=
current_user
.
snippets
.
are_private
.
count
%li
{
class:
(
"active"
if
params
[
:scope
]
==
"are_internal"
)
}
=
link_to
dashboard_snippets_path
(
scope:
'are_internal'
)
do
Internal
%span
.badge
=
current_user
.
snippets
.
are_internal
.
count
%li
{
class:
(
"active"
if
params
[
:scope
]
==
"are_public"
)
}
=
link_to
dashboard_snippets_path
(
scope:
'are_public'
)
do
Public
%span
.badge
=
current_user
.
snippets
.
are_public
.
count
.visible-xs
=
link_to
new_snippet_path
,
class:
"btn btn-new btn-block"
,
title:
"New snippet"
do
New snippet
.nav-links.snippet-scope-menu
%li
{
class:
(
"active"
unless
params
[
:scope
])
}
=
link_to
dashboard_snippets_path
do
All
%span
.badge
=
current_user
.
snippets
.
count
%li
{
class:
(
"active"
if
params
[
:scope
]
==
"are_private"
)
}
=
link_to
dashboard_snippets_path
(
scope:
'are_private'
)
do
Private
%span
.badge
=
current_user
.
snippets
.
are_private
.
count
%li
{
class:
(
"active"
if
params
[
:scope
]
==
"are_internal"
)
}
=
link_to
dashboard_snippets_path
(
scope:
'are_internal'
)
do
Internal
%span
.badge
=
current_user
.
snippets
.
are_internal
.
count
%li
{
class:
(
"active"
if
params
[
:scope
]
==
"are_public"
)
}
=
link_to
dashboard_snippets_path
(
scope:
'are_public'
)
do
Public
%span
.badge
=
current_user
.
snippets
.
are_public
.
count
.visible-xs
=
link_to
new_snippet_path
,
class:
"btn btn-new btn-block"
,
title:
"New snippet"
do
New snippet
=
render
'snippets/snippets'
app/views/explore/snippets/index.html.haml
View file @
b65d3e11
...
...
@@ -6,12 +6,4 @@
-
else
=
render
'explore/head'
.row-content-block
-
if
current_user
=
link_to
new_snippet_path
,
class:
"btn btn-new btn-wide-on-sm pull-right"
,
title:
"New snippet"
do
New snippet
.oneline
Public snippets created by you and other users are listed here
=
render
'snippets/snippets'
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