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
Tatuya Kamada
gitlab-ce
Commits
a33a67e5
Commit
a33a67e5
authored
Jul 16, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use target_project instead of projectg
parent
f0691ec7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
8 deletions
+12
-8
app/assets/javascripts/dispatcher.js.coffee
app/assets/javascripts/dispatcher.js.coffee
+2
-0
app/views/shared/issuable/_label_dropdown.html.haml
app/views/shared/issuable/_label_dropdown.html.haml
+3
-2
app/views/shared/issuable/_milestone_dropdown.html.haml
app/views/shared/issuable/_milestone_dropdown.html.haml
+7
-6
No files found.
app/assets/javascripts/dispatcher.js.coffee
View file @
a33a67e5
...
...
@@ -46,6 +46,8 @@ class Dispatcher
shortcut_handler
=
new
ShortcutsNavigation
()
new
GLForm
(
$
(
'.merge-request-form'
))
new
IssuableForm
(
$
(
'.merge-request-form'
))
new
LabelsSelect
()
new
MilestoneSelect
()
when
'projects:tags:new'
new
ZenMode
()
new
GLForm
(
$
(
'.tag-form'
))
...
...
app/views/shared/issuable/_label_dropdown.html.haml
View file @
a33a67e5
-
project
=
@target_project
||
@project
-
show_create
=
local_assigns
.
fetch
(
:show_create
,
true
)
-
extra_options
=
local_assigns
.
fetch
(
:extra_options
,
true
)
-
filter_submit
=
local_assigns
.
fetch
(
:filter_submit
,
true
)
...
...
@@ -6,7 +7,7 @@
-
classes
=
local_assigns
.
fetch
(
:classes
,
[])
-
selected
=
local_assigns
.
fetch
(
:selected
,
nil
)
-
selected_toggle
=
local_assigns
.
fetch
(
:selected_toggle
,
nil
)
-
dropdown_data
=
{
toggle:
'dropdown'
,
field_name:
"label_name[]"
,
show_no:
"true"
,
show_any:
"true"
,
selected:
selected
,
project_id:
@
project
.
try
(
:id
),
labels:
labels_filter_path
,
default_label:
"Label"
}
-
dropdown_data
=
{
toggle:
'dropdown'
,
field_name:
"label_name[]"
,
show_no:
"true"
,
show_any:
"true"
,
selected:
selected
,
project_id:
project
.
try
(
:id
),
labels:
labels_filter_path
,
default_label:
"Label"
}
-
dropdown_data
.
merge!
(
data_options
)
-
classes
<<
'js-extra-options'
if
extra_options
-
classes
<<
'js-filter-submit'
if
filter_submit
...
...
@@ -22,6 +23,6 @@
=
icon
(
'chevron-down'
)
.dropdown-menu.dropdown-select.dropdown-menu-paging.dropdown-menu-labels.dropdown-menu-selectable
=
render
partial:
"shared/issuable/label_page_default"
,
locals:
{
title:
"Filter by label"
,
show_footer:
show_footer
,
show_create:
show_create
}
-
if
show_create
and
@project
and
can?
(
current_user
,
:admin_label
,
@
project
)
-
if
show_create
and
project
and
can?
(
current_user
,
:admin_label
,
project
)
=
render
partial:
"shared/issuable/label_page_create"
=
dropdown_loading
app/views/shared/issuable/_milestone_dropdown.html.haml
View file @
a33a67e5
-
project
=
@target_project
||
@project
-
if
selected
.
present?
=
hidden_field_tag
(
name
,
selected
)
=
dropdown_tag
(
milestone_dropdown_label
(
selected
),
options:
{
title:
"Filter by milestone"
,
toggle_class:
'js-milestone-select js-filter-submit'
,
filter:
true
,
dropdown_class:
"dropdown-menu-selectable"
,
placeholder:
"Search milestones"
,
footer_content:
@project
.
present?
,
data:
{
show_no:
true
,
show_any:
show_any
,
show_upcoming:
show_upcoming
,
field_name:
name
,
selected:
selected
,
project_id:
@
project
.
try
(
:id
),
milestones:
milestones_filter_dropdown_path
,
default_label:
"Milestone"
}
})
do
-
if
@
project
placeholder:
"Search milestones"
,
footer_content:
project
.
present?
,
data:
{
show_no:
true
,
show_any:
show_any
,
show_upcoming:
show_upcoming
,
field_name:
name
,
selected:
selected
,
project_id:
project
.
try
(
:id
),
milestones:
milestones_filter_dropdown_path
,
default_label:
"Milestone"
}
})
do
-
if
project
%ul
.dropdown-footer-list
-
if
can?
current_user
,
:admin_milestone
,
@
project
-
if
can?
current_user
,
:admin_milestone
,
project
%li
=
link_to
new_namespace_project_milestone_path
(
@project
.
namespace
,
@
project
),
title:
"New Milestone"
do
=
link_to
new_namespace_project_milestone_path
(
project
.
namespace
,
project
),
title:
"New Milestone"
do
Create new
%li
=
link_to
namespace_project_milestones_path
(
@project
.
namespace
,
@
project
)
do
-
if
can?
current_user
,
:admin_milestone
,
@
project
=
link_to
namespace_project_milestones_path
(
project
.
namespace
,
project
)
do
-
if
can?
current_user
,
:admin_milestone
,
project
Manage milestones
-
else
View milestones
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