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
68bb459b
Commit
68bb459b
authored
Dec 07, 2016
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move project new snippet button into snippet scope navigation header
parent
54a1193d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
27 deletions
+31
-27
app/views/projects/snippets/index.html.haml
app/views/projects/snippets/index.html.haml
+31
-27
No files found.
app/views/projects/snippets/index.html.haml
View file @
68bb459b
-
page_title
"Snippets"
-
page_title
"Snippets"
-
if
current_user
-
if
current_user
.nav-links.snippet-scope-menu
.top-area
%li
{
class:
(
"active"
unless
params
[
:scope
])
}
.nav-links.snippet-scope-menu
=
link_to
namespace_project_snippets_path
(
@project
.
namespace
,
@project
)
do
%li
{
class:
(
"active"
unless
params
[
:scope
])
}
All
=
link_to
namespace_project_snippets_path
(
@project
.
namespace
,
@project
)
do
%span
.badge
All
=
@project
.
snippets
.
count
%span
.badge
=
@project
.
snippets
.
count
-
if
@project
.
team
.
member?
(
current_user
)
||
current_user
.
admin?
%li
{
class:
(
"active"
if
params
[
:scope
]
==
"are_private"
)
}
=
link_to
namespace_project_snippets_path
(
@project
.
namespace
,
@project
,
scope:
'are_private'
)
do
Private
%span
.badge
=
@project
.
snippets
.
are_private
.
count
-
if
@project
.
team
.
member?
(
current_user
)
||
current_user
.
admin?
%li
{
class:
(
"active"
if
params
[
:scope
]
==
"are_internal"
)
}
%li
{
class:
(
"active"
if
params
[
:scope
]
==
"are_private"
)
}
=
link_to
namespace_project_snippets_path
(
@project
.
namespace
,
@project
,
scope:
'are_internal'
)
do
=
link_to
namespace_project_snippets_path
(
@project
.
namespace
,
@project
,
scope:
'are_private'
)
do
Internal
Private
%span
.badge
%span
.badge
=
@project
.
snippets
.
are_
private
.
count
=
@project
.
snippets
.
are_
internal
.
count
%li
{
class:
(
"active"
if
params
[
:scope
]
==
"are_internal
"
)
}
%li
{
class:
(
"active"
if
params
[
:scope
]
==
"are_public
"
)
}
=
link_to
namespace_project_snippets_path
(
@project
.
namespace
,
@project
,
scope:
'are_internal
'
)
do
=
link_to
namespace_project_snippets_path
(
@project
.
namespace
,
@project
,
scope:
'are_public
'
)
do
Internal
Public
%span
.badge
%span
.badge
=
@project
.
snippets
.
are_internal
.
count
=
@project
.
snippets
.
are_public
.
count
%li
{
class:
(
"active"
if
params
[
:scope
]
==
"are_public"
)
}
.nav-controls.hidden-xs
=
link_to
namespace_project_snippets_path
(
@project
.
namespace
,
@project
,
scope:
'are_public'
)
do
-
if
can?
(
current_user
,
:create_project_snippet
,
@project
)
Public
=
link_to
new_namespace_project_snippet_path
(
@project
.
namespace
,
@project
),
class:
"btn btn-new"
,
title:
"New snippet"
do
%span
.badge
New snippet
=
@project
.
snippets
.
are_public
.
count
.sub-header-block
-
if
can?
(
current_user
,
:create_project_snippet
,
@project
)
-
if
can?
(
current_user
,
:create_project_snippet
,
@project
)
.visible-xs
=
link_to
new_namespace_project_snippet_path
(
@project
.
namespace
,
@project
),
class:
"btn btn-new btn-wide-on-sm pull-right"
,
title:
"New snippet"
do
=
link_to
new_namespace_project_snippet_path
(
@project
.
namespace
,
@project
),
class:
"btn btn-new btn-block"
,
title:
"New snippet"
do
New snippet
New snippet
.oneline
Share code pastes with others out of git repository
=
render
'snippets/snippets'
=
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