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
58726ffc
Commit
58726ffc
authored
May 08, 2017
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor haml
parent
410aa3d6
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
20 deletions
+22
-20
app/views/shared/issuable/_sidebar_assignees.html.haml
app/views/shared/issuable/_sidebar_assignees.html.haml
+1
-1
app/views/shared/issuable/form/_metadata.html.haml
app/views/shared/issuable/form/_metadata.html.haml
+2
-19
app/views/shared/issuable/form/_metadata_issue_assignee.html.haml
...s/shared/issuable/form/_metadata_issue_assignee.html.haml
+11
-0
app/views/shared/issuable/form/_metadata_merge_request_assignee.html.haml
.../issuable/form/_metadata_merge_request_assignee.html.haml
+8
-0
No files found.
app/views/shared/issuable/_sidebar_assignees.html.haml
View file @
58726ffc
app/views/shared/issuable/form/_metadata.html.haml
View file @
58726ffc
...
@@ -11,26 +11,9 @@
...
@@ -11,26 +11,9 @@
%div
{
class:
(
has_due_date
?
"col-lg-6"
:
"col-sm-12"
)
}
%div
{
class:
(
has_due_date
?
"col-lg-6"
:
"col-sm-12"
)
}
.form-group.issue-assignee
.form-group.issue-assignee
-
if
issuable
.
is_a?
(
Issue
)
-
if
issuable
.
is_a?
(
Issue
)
=
form
.
label
:assignee_ids
,
"Assignee"
,
class:
"control-label
#{
"col-lg-4"
if
has_due_date
}
"
=
render
"shared/issuable/form/metadata_issue_assignee"
,
issuable:
issuable
,
form:
form
,
has_due_date:
has_due_date
.col-sm-10
{
class:
(
"col-lg-8"
if
has_due_date
)
}
.issuable-form-select-holder.selectbox
-
issuable
.
assignees
.
each
do
|
assignee
|
=
hidden_field_tag
"
#{
issuable
.
to_ability_name
}
[assignee_ids][]"
,
assignee
.
id
,
id:
nil
,
data:
{
meta:
assignee
.
name
}
-
if
issuable
.
assignees
.
length
===
0
=
hidden_field_tag
"
#{
issuable
.
to_ability_name
}
[assignee_ids][]"
,
0
,
id:
nil
,
data:
{
meta:
''
}
=
dropdown_tag
(
users_dropdown_label
(
issuable
.
assignees
),
options:
issue_dropdown_options
(
issuable
,
false
))
=
link_to
'Assign to me'
,
'#'
,
class:
"assign-to-me-link
#{
'hide'
if
issuable
.
assignees
.
include?
(
current_user
)
}
"
-
else
-
else
=
form
.
label
:assignee_id
,
"Assignee"
,
class:
"control-label
#{
"col-lg-4"
if
has_due_date
}
"
=
render
"shared/issuable/form/metadata_merge_request_assignee"
,
issuable:
issuable
,
form:
form
,
has_due_date:
has_due_date
.col-sm-10
{
class:
(
"col-lg-8"
if
has_due_date
)
}
.issuable-form-select-holder
=
form
.
hidden_field
:assignee_id
=
dropdown_tag
(
user_dropdown_label
(
issuable
.
assignee_id
,
"Assignee"
),
options:
{
toggle_class:
"js-dropdown-keep-input js-user-search js-issuable-form-dropdown js-assignee-search"
,
title:
"Select assignee"
,
filter:
true
,
dropdown_class:
"dropdown-menu-user dropdown-menu-selectable dropdown-menu-assignee js-filter-submit"
,
placeholder:
"Search assignee"
,
data:
{
first_user:
current_user
.
try
(
:username
),
null_user:
true
,
current_user:
true
,
project_id:
issuable
.
project
.
try
(
:id
),
selected:
issuable
.
assignee_id
,
field_name:
"
#{
issuable
.
class
.
model_name
.
param_key
}
[assignee_id]"
,
default_label:
"Assignee"
}
})
=
link_to
'Assign to me'
,
'#'
,
class:
"assign-to-me-link
#{
'hide'
if
issuable
.
assignee_id
==
current_user
.
id
}
"
.form-group.issue-milestone
.form-group.issue-milestone
=
form
.
label
:milestone_id
,
"Milestone"
,
class:
"control-label
#{
"col-lg-4"
if
has_due_date
}
"
=
form
.
label
:milestone_id
,
"Milestone"
,
class:
"control-label
#{
"col-lg-4"
if
has_due_date
}
"
.col-sm-10
{
class:
(
"col-lg-8"
if
has_due_date
)
}
.col-sm-10
{
class:
(
"col-lg-8"
if
has_due_date
)
}
...
...
app/views/shared/issuable/form/_metadata_issue_assignee.html.haml
0 → 100644
View file @
58726ffc
=
form
.
label
:assignee_ids
,
"Assignee"
,
class:
"control-label
#{
"col-lg-4"
if
has_due_date
}
"
.col-sm-10
{
class:
(
"col-lg-8"
if
has_due_date
)
}
.issuable-form-select-holder.selectbox
-
issuable
.
assignees
.
each
do
|
assignee
|
=
hidden_field_tag
"
#{
issuable
.
to_ability_name
}
[assignee_ids][]"
,
assignee
.
id
,
id:
nil
,
data:
{
meta:
assignee
.
name
}
-
if
issuable
.
assignees
.
length
===
0
=
hidden_field_tag
"
#{
issuable
.
to_ability_name
}
[assignee_ids][]"
,
0
,
id:
nil
,
data:
{
meta:
''
}
=
dropdown_tag
(
users_dropdown_label
(
issuable
.
assignees
),
options:
issue_dropdown_options
(
issuable
,
false
))
=
link_to
'Assign to me'
,
'#'
,
class:
"assign-to-me-link
#{
'hide'
if
issuable
.
assignees
.
include?
(
current_user
)
}
"
app/views/shared/issuable/form/_metadata_merge_request_assignee.html.haml
0 → 100644
View file @
58726ffc
=
form
.
label
:assignee_id
,
"Assignee"
,
class:
"control-label
#{
"col-lg-4"
if
has_due_date
}
"
.col-sm-10
{
class:
(
"col-lg-8"
if
has_due_date
)
}
.issuable-form-select-holder
=
form
.
hidden_field
:assignee_id
=
dropdown_tag
(
user_dropdown_label
(
issuable
.
assignee_id
,
"Assignee"
),
options:
{
toggle_class:
"js-dropdown-keep-input js-user-search js-issuable-form-dropdown js-assignee-search"
,
title:
"Select assignee"
,
filter:
true
,
dropdown_class:
"dropdown-menu-user dropdown-menu-selectable dropdown-menu-assignee js-filter-submit"
,
placeholder:
"Search assignee"
,
data:
{
first_user:
current_user
.
try
(
:username
),
null_user:
true
,
current_user:
true
,
project_id:
issuable
.
project
.
try
(
:id
),
selected:
issuable
.
assignee_id
,
field_name:
"
#{
issuable
.
class
.
model_name
.
param_key
}
[assignee_id]"
,
default_label:
"Assignee"
}
})
=
link_to
'Assign to me'
,
'#'
,
class:
"assign-to-me-link
#{
'hide'
if
issuable
.
assignee_id
==
current_user
.
id
}
"
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