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
Boxiang Sun
gitlab-ce
Commits
2fd334b8
Commit
2fd334b8
authored
May 17, 2018
by
Luke Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix group labels list
parent
bd47118e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
24 deletions
+11
-24
app/assets/stylesheets/pages/labels.scss
app/assets/stylesheets/pages/labels.scss
+0
-2
app/controllers/groups/labels_controller.rb
app/controllers/groups/labels_controller.rb
+3
-3
app/views/groups/labels/index.html.haml
app/views/groups/labels/index.html.haml
+8
-19
No files found.
app/assets/stylesheets/pages/labels.scss
View file @
2fd334b8
...
...
@@ -262,8 +262,6 @@
}
.label-list-item
{
overflow-x
:
scroll
;
.content-list
&
:before
,
.content-list
&
:after
{
content
:
none
;
...
...
app/controllers/groups/labels_controller.rb
View file @
2fd334b8
...
...
@@ -9,11 +9,11 @@ class Groups::LabelsController < Groups::ApplicationController
respond_to
:html
def
index
@prioritized_labels
=
@available_labels
.
prioritized
(
@group
)
@labels
=
@available_labels
.
unprioritized
(
@group
).
page
(
params
[
:page
])
@labels
=
@group
.
labels
.
page
(
params
[
:page
])
respond_to
do
|
format
|
format
.
html
format
.
html
do
end
format
.
json
do
render
json:
LabelSerializer
.
new
.
represent_appearance
(
@available_labels
)
end
...
...
app/views/groups/labels/index.html.haml
View file @
2fd334b8
...
...
@@ -2,6 +2,7 @@
-
page_title
"Labels"
-
can_admin_label
=
can?
(
current_user
,
:admin_label
,
@group
)
-
hide_class
=
''
-
hide
=
@available_labels
.
empty?
||
(
params
[
:page
].
present?
&&
params
[
:page
]
!=
'1'
)
-
if
can_admin_label
-
content_for
(
:header_content
)
do
...
...
@@ -9,7 +10,7 @@
=
link_to
new_group_label_path
(
@group
),
class:
"btn btn-new"
do
New label
-
if
@labels
.
exists?
||
@prioritized_labels
.
exists?
-
if
@labels
.
exists?
#promote-label-modal
%div
{
class:
container_class
}
.top-area.adjust
...
...
@@ -19,24 +20,12 @@
Star a label to make it a priority label. Order the prioritized labels to change their relative priority, by dragging.
.labels-container.prepend-top-5
-
if
can_admin_label
-# Only show it in the first page
-
hide
=
@available_labels
.
empty?
||
(
params
[
:page
].
present?
&&
params
[
:page
]
!=
'1'
)
.prioritized-labels
{
class:
(
'hide'
if
hide
)
}
%h5
.prepend-top-0
Prioritized Labels
%ul
.content-list.manage-labels-list.js-prioritized-labels
#js-priority-labels-empty-state
.priority-labels-empty-state
{
class:
"#{'hidden' unless @prioritized_labels.empty?}"
}
=
render
'shared/empty_states/priority_labels'
-
if
@prioritized_labels
.
present?
=
render
partial:
'shared/label'
,
subject:
@group
,
collection:
@prioritized_labels
,
as: :label
-
if
@labels
.
present?
.other-labels
-
if
can_admin_label
%h5
{
class:
(
'hide'
if
hide
)
}
Other Labels
%ul
.content-list.manage-labels-list.js-other-labels
=
render
partial:
'shared/label'
,
subject:
@group
,
collection:
@labels
,
as: :label
=
paginate
@labels
,
theme:
'gitlab'
.other-labels
-
if
can_admin_label
%h5
{
class:
(
'hide'
if
hide
)
}
Labels
%ul
.content-list.manage-labels-list.js-other-labels
=
render
partial:
'shared/label'
,
subject:
@group
,
collection:
@labels
,
as: :label
=
paginate
@labels
,
theme:
'gitlab'
-
else
=
render
'shared/empty_states/labels'
...
...
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