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
7e1ddfb8
Commit
7e1ddfb8
authored
Oct 28, 2016
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Assign local_assigns[:subject] to a variable on the shared label partial
parent
37cb2e78
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 @
7e1ddfb8
-
label_css_id
=
dom_id
(
label
)
-
label_css_id
=
dom_id
(
label
)
-
open_issues_count
=
label
.
open_issues_count
(
current_user
)
-
open_issues_count
=
label
.
open_issues_count
(
current_user
)
-
open_merge_requests_count
=
label
.
open_merge_requests_count
(
current_user
)
-
open_merge_requests_count
=
label
.
open_merge_requests_count
(
current_user
)
-
subject
=
local_assigns
[
:subject
]
%li
{
id:
label_css_id
,
data:
{
id:
label
.
id
}
}
%li
{
id:
label_css_id
,
data:
{
id:
label
.
id
}
}
=
render
"shared/label_row"
,
label:
label
=
render
"shared/label_row"
,
label:
label
...
@@ -12,10 +13,10 @@
...
@@ -12,10 +13,10 @@
.dropdown-menu.dropdown-menu-align-right
.dropdown-menu.dropdown-menu-align-right
%ul
%ul
%li
%li
=
link_to_label
(
label
,
subject:
local_assigns
[
:subject
]
,
type: :merge_request
)
do
=
link_to_label
(
label
,
subject:
subject
,
type: :merge_request
)
do
=
pluralize
open_merge_requests_count
,
'merge request'
=
pluralize
open_merge_requests_count
,
'merge request'
%li
%li
=
link_to_label
(
label
,
subject:
local_assigns
[
:subject
]
)
do
=
link_to_label
(
label
,
subject:
subject
)
do
=
pluralize
open_issues_count
,
'open issue'
=
pluralize
open_issues_count
,
'open issue'
-
if
current_user
-
if
current_user
%li
.label-subscription
{
data:
toggle_subscription_data
(
label
)
}
%li
.label-subscription
{
data:
toggle_subscription_data
(
label
)
}
...
@@ -28,9 +29,9 @@
...
@@ -28,9 +29,9 @@
=
link_to
'Delete'
,
destroy_label_path
(
label
),
title:
'Delete'
,
method: :delete
,
remote:
true
,
data:
{
confirm:
'Remove this label? Are you sure?'
}
=
link_to
'Delete'
,
destroy_label_path
(
label
),
title:
'Delete'
,
method: :delete
,
remote:
true
,
data:
{
confirm:
'Remove this label? Are you sure?'
}
.pull-right.hidden-xs.hidden-sm.hidden-md
.pull-right.hidden-xs.hidden-sm.hidden-md
=
link_to_label
(
label
,
subject:
local_assigns
[
:subject
]
,
type: :merge_request
,
css_class:
'btn btn-transparent btn-action'
)
do
=
link_to_label
(
label
,
subject:
subject
,
type: :merge_request
,
css_class:
'btn btn-transparent btn-action'
)
do
=
pluralize
open_merge_requests_count
,
'merge request'
=
pluralize
open_merge_requests_count
,
'merge request'
=
link_to_label
(
label
,
subject:
local_assigns
[
:subject
]
,
css_class:
'btn btn-transparent btn-action'
)
do
=
link_to_label
(
label
,
subject:
subject
,
css_class:
'btn btn-transparent btn-action'
)
do
=
pluralize
open_issues_count
,
'open issue'
=
pluralize
open_issues_count
,
'open issue'
-
if
current_user
-
if
current_user
...
...
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