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
fe37ca87
Commit
fe37ca87
authored
Jun 23, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract common paths to a variable
parent
1cd76c39
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
app/views/shared/_label.html.haml
app/views/shared/_label.html.haml
+5
-4
No files found.
app/views/shared/_label.html.haml
View file @
fe37ca87
-
label_css_id
=
dom_id
(
label
)
-
status
=
label_subscription_status
(
label
,
@project
).
inquiry
if
current_user
-
subject
=
local_assigns
[
:subject
]
-
toggle_subscription_path
=
toggle_subscription_label_path
(
label
,
@project
)
%li
{
id:
label_css_id
,
data:
{
id:
label
.
id
}
}
=
render
"shared/label_row"
,
label:
label
...
...
@@ -20,10 +21,10 @@
-
if
current_user
%li
.label-subscription
-
if
defined?
(
@group
)
||
label
.
is_a?
(
ProjectLabel
)
%a
.js-subscribe-button.label-subscribe-button
{
role:
'button'
,
href:
'#'
,
data:
{
status:
status
,
url:
toggle_subscription_
label_path
(
label
,
@project
)
}
}
%a
.js-subscribe-button.label-subscribe-button
{
role:
'button'
,
href:
'#'
,
data:
{
status:
status
,
url:
toggle_subscription_
path
}
}
%span
=
label_subscription_toggle_button_text
(
label
,
@project
)
-
else
%a
.js-unsubscribe-button.label-subscribe-button
{
role:
'button'
,
href:
'#'
,
class:
(
'hidden'
if
status
.
unsubscribed?
),
data:
{
url:
toggle_subscription_
label_path
(
label
,
@project
)
}
}
%a
.js-unsubscribe-button.label-subscribe-button
{
role:
'button'
,
href:
'#'
,
class:
(
'hidden'
if
status
.
unsubscribed?
),
data:
{
url:
toggle_subscription_
path
}
}
%span
Unsubscribe
%a
.js-subscribe-button.label-subscribe-button
{
role:
'button'
,
href:
'#'
,
class:
(
'hidden'
unless
status
.
unsubscribed?
),
data:
{
url:
toggle_subscription_namespace_project_label_path
(
@project
.
namespace
,
@project
,
label
)
}
}
%span
Subscribe at project level
...
...
@@ -45,11 +46,11 @@
-
if
current_user
.label-subscription.inline
-
if
defined?
(
@group
)
||
label
.
is_a?
(
ProjectLabel
)
%button
.js-subscribe-button.label-subscribe-button.btn.btn-default
{
type:
'button'
,
data:
{
status:
status
,
url:
toggle_subscription_
label_path
(
label
,
@project
)
}
}
%button
.js-subscribe-button.label-subscribe-button.btn.btn-default
{
type:
'button'
,
data:
{
status:
status
,
url:
toggle_subscription_
path
}
}
%span
=
label_subscription_toggle_button_text
(
label
,
@project
)
=
icon
(
'spinner spin'
,
class:
'label-subscribe-button-loading'
)
-
else
%button
.js-unsubscribe-button.label-subscribe-button.btn.btn-default
{
type:
'button'
,
class:
(
'hidden'
if
status
.
unsubscribed?
),
data:
{
url:
toggle_subscription_
label_path
(
label
,
@project
)
}
}
%button
.js-unsubscribe-button.label-subscribe-button.btn.btn-default
{
type:
'button'
,
class:
(
'hidden'
if
status
.
unsubscribed?
),
data:
{
url:
toggle_subscription_
path
}
}
%span
Unsubscribe
=
icon
(
'spinner spin'
,
class:
'label-subscribe-button-loading'
)
...
...
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