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
226908b8
Commit
226908b8
authored
Dec 18, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue weight selection
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
b4efe44d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
app/helpers/issues_helper.rb
app/helpers/issues_helper.rb
+2
-2
app/views/shared/issuable/_form.html.haml
app/views/shared/issuable/_form.html.haml
+1
-1
app/views/shared/issuable/_sidebar.html.haml
app/views/shared/issuable/_sidebar.html.haml
+1
-1
No files found.
app/helpers/issues_helper.rb
View file @
226908b8
...
...
@@ -121,13 +121,13 @@ module IssuesHelper
end
end
def
projects_weight_options
def
projects_weight_options
(
selected
=
nil
)
options
=
(
Issue
::
WEIGHT_RANGE
).
map
do
|
i
|
[
i
,
i
]
end
options
.
unshift
([
'Any'
,
nil
])
options_for_select
(
options
,
params
[
:weight
])
options_for_select
(
options
,
selected
||
params
[
:weight
])
end
# Required for Banzai::Filter::IssueReferenceFilter
...
...
app/views/shared/issuable/_form.html.haml
View file @
226908b8
...
...
@@ -60,7 +60,7 @@
=
icon
(
'magnet'
)
Weight
.col-sm-10
=
f
.
select
:weight
,
projects_weight_options
,
{
include_blank:
true
},
=
f
.
select
:weight
,
projects_weight_options
(
issuable
.
weight
)
,
{
include_blank:
true
},
{
class:
'select2 js-select2'
,
data:
{
placeholder:
"Select weight"
}}
.form-group
...
...
app/views/shared/issuable/_sidebar.html.haml
View file @
226908b8
...
...
@@ -68,7 +68,7 @@
-
else
.light
None
.selectbox
=
f
.
select
:weight
,
projects_weight_options
,
{
include_blank:
true
},
=
f
.
select
:weight
,
projects_weight_options
(
issuable
.
weight
)
,
{
include_blank:
true
},
{
class:
'select2 js-select2'
,
data:
{
placeholder:
"Select weight"
}}
.block
...
...
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