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
77f30af0
Commit
77f30af0
authored
Jun 06, 2016
by
Sean McGivern
Committed by
Alfredo Sumaran
Jun 06, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tidy up Ruby style in templates
parent
b0ec4b9c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
app/views/projects/labels/index.html.haml
app/views/projects/labels/index.html.haml
+4
-5
app/views/shared/_label_row.html.haml
app/views/shared/_label_row.html.haml
+1
-1
No files found.
app/views/projects/labels/index.html.haml
View file @
77f30af0
...
@@ -13,9 +13,8 @@
...
@@ -13,9 +13,8 @@
.labels
.labels
-
if
can?
(
current_user
,
:admin_label
,
@project
)
-
if
can?
(
current_user
,
:admin_label
,
@project
)
-# Only show it in the first page
-# Only show it in the first page
-
if
(
params
[
:page
].
present?
and
params
[
:page
]
!=
'1'
)
or
@project
.
labels
.
blank?
or
(
params
[
:page
]
==
nil
and
@project
.
labels
.
blank?
)
-
hide
=
@project
.
labels
.
empty?
||
(
params
[
:page
].
present?
&&
params
[
:page
]
!=
'1'
)
-
hide_class
=
'hide'
.prioritized-labels
{
class:
(
'hide'
if
hide
)
}
.prioritized-labels
{
class:
hide_class
}
%h5
Prioritized Labels
%h5
Prioritized Labels
%ul
.content-list.manage-labels-list.js-prioritized-labels
{
"data-url"
=>
set_priorities_namespace_project_labels_path
(
@project
.
namespace
,
@project
)
}
%ul
.content-list.manage-labels-list.js-prioritized-labels
{
"data-url"
=>
set_priorities_namespace_project_labels_path
(
@project
.
namespace
,
@project
)
}
-
if
@prioritized_labels
.
present?
-
if
@prioritized_labels
.
present?
...
@@ -24,14 +23,14 @@
...
@@ -24,14 +23,14 @@
%p
.empty-message
No prioritized labels yet
%p
.empty-message
No prioritized labels yet
.other-labels
.other-labels
-
if
can?
(
current_user
,
:admin_label
,
@project
)
-
if
can?
(
current_user
,
:admin_label
,
@project
)
%h5
{
class:
hide_class
}
Other Labels
%h5
{
class:
(
'hide'
if
hide
}
Other Labels
-
if
@labels
.
present?
-
if
@labels
.
present?
%ul
.content-list.manage-labels-list.js-other-labels
%ul
.content-list.manage-labels-list.js-other-labels
=
render
@labels
=
render
@labels
=
paginate
@labels
,
theme:
'gitlab'
=
paginate
@labels
,
theme:
'gitlab'
-
else
-
else
.nothing-here-block
.nothing-here-block
-
if
can?
current_user
,
:admin_label
,
@project
-
if
can?
(
current_user
,
:admin_label
,
@project
)
Create a label or
#{
link_to
'generate a default set of labels'
,
generate_namespace_project_labels_path
(
@project
.
namespace
,
@project
),
method: :post
}
.
Create a label or
#{
link_to
'generate a default set of labels'
,
generate_namespace_project_labels_path
(
@project
.
namespace
,
@project
),
method: :post
}
.
-
else
-
else
No labels created
No labels created
app/views/shared/_label_row.html.haml
View file @
77f30af0
%span
.label-row
%span
.label-row
-
if
can?
current_user
,
:admin_label
,
@project
-
if
can?
(
current_user
,
:admin_label
,
@project
)
.js-toggle-priority.toggle-priority
{
data:
{
url:
remove_priority_namespace_project_label_path
(
@project
.
namespace
,
@project
,
label
),
.js-toggle-priority.toggle-priority
{
data:
{
url:
remove_priority_namespace_project_label_path
(
@project
.
namespace
,
@project
,
label
),
dom_id:
dom_id
(
label
)
}
}
dom_id:
dom_id
(
label
)
}
}
%button
.add-priority.btn.has-tooltip
{
title:
'Prioritize'
,
:'data-placement'
=>
'top'
}
%button
.add-priority.btn.has-tooltip
{
title:
'Prioritize'
,
:'data-placement'
=>
'top'
}
...
...
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