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
300f6aba
Commit
300f6aba
authored
Jul 28, 2018
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more UI logic to label search functionality
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
c0bf3615
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
app/views/projects/labels/index.html.haml
app/views/projects/labels/index.html.haml
+13
-5
No files found.
app/views/projects/labels/index.html.haml
View file @
300f6aba
...
@@ -2,13 +2,14 @@
...
@@ -2,13 +2,14 @@
-
page_title
"Labels"
-
page_title
"Labels"
-
can_admin_label
=
can?
(
current_user
,
:admin_label
,
@project
)
-
can_admin_label
=
can?
(
current_user
,
:admin_label
,
@project
)
-
hide_class
=
''
-
hide_class
=
''
-
search
=
params
[
:search
]
-
if
can_admin_label
-
if
can_admin_label
-
content_for
(
:header_content
)
do
-
content_for
(
:header_content
)
do
.nav-controls
.nav-controls
=
link_to
_
(
'New label'
),
new_project_label_path
(
@project
),
class:
"btn btn-new"
=
link_to
_
(
'New label'
),
new_project_label_path
(
@project
),
class:
"btn btn-new"
-
if
@labels
.
exists?
||
@prioritized_labels
.
exists?
||
params
[
:search
]
.
present?
-
if
@labels
.
exists?
||
@prioritized_labels
.
exists?
||
search
.
present?
#promote-label-modal
#promote-label-modal
%div
{
class:
container_class
}
%div
{
class:
container_class
}
.top-area.adjust
.top-area.adjust
...
@@ -33,10 +34,13 @@
...
@@ -33,10 +34,13 @@
.prioritized-labels
{
class:
(
'hide'
if
hide
)
}
.prioritized-labels
{
class:
(
'hide'
if
hide
)
}
%h5
.prepend-top-10
=
_
(
'Prioritized Labels'
)
%h5
.prepend-top-10
=
_
(
'Prioritized Labels'
)
.content-list.manage-labels-list.js-prioritized-labels
{
"data-url"
=>
set_priorities_project_labels_path
(
@project
)
}
.content-list.manage-labels-list.js-prioritized-labels
{
"data-url"
=>
set_priorities_project_labels_path
(
@project
)
}
#js-priority-labels-empty-state
.priority-labels-empty-state
{
class:
"#{'hidden' unless @prioritized_labels.empty?}"
}
#js-priority-labels-empty-state
.priority-labels-empty-state
{
class:
"#{'hidden' unless @prioritized_labels.empty?
&& search.blank?
}"
}
=
render
'shared/empty_states/priority_labels'
=
render
'shared/empty_states/priority_labels'
-
if
@prioritized_labels
.
present?
-
if
@prioritized_labels
.
present?
=
render
partial:
'shared/label'
,
subject:
@project
,
collection:
@prioritized_labels
,
as: :label
,
locals:
{
force_priority:
true
}
=
render
partial:
'shared/label'
,
subject:
@project
,
collection:
@prioritized_labels
,
as: :label
,
locals:
{
force_priority:
true
}
-
elsif
search
.
present?
.nothing-here-block
=
_
(
'No labels with such name or description'
)
-
if
@labels
.
present?
-
if
@labels
.
present?
.other-labels
.other-labels
...
@@ -45,9 +49,13 @@
...
@@ -45,9 +49,13 @@
.content-list.manage-labels-list.js-other-labels
.content-list.manage-labels-list.js-other-labels
=
render
partial:
'shared/label'
,
subject:
@project
,
collection:
@labels
,
as: :label
=
render
partial:
'shared/label'
,
subject:
@project
,
collection:
@labels
,
as: :label
=
paginate
@labels
,
theme:
'gitlab'
=
paginate
@labels
,
theme:
'gitlab'
-
elsif
params
[
:search
].
present?
-
elsif
search
.
present?
.nothing-here-block
.other-labels
=
_
(
'No labels with such name or description'
)
-
if
@available_labels
.
any?
%h5
=
_
(
'Other Labels'
)
.nothing-here-block
=
_
(
'No labels with such name or description'
)
-
else
-
else
=
render
'shared/empty_states/labels'
=
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