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
0caeb99a
Commit
0caeb99a
authored
Feb 22, 2017
by
Phil Hughes
Committed by
Douglas Barbosa Alexandre
Mar 06, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added extra milestone to new dropdown
Defaults to any milestone on new board
parent
6978a86b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
16 deletions
+29
-16
app/assets/javascripts/boards/components/board_new_form.js
app/assets/javascripts/boards/components/board_new_form.js
+8
-4
app/assets/javascripts/boards/components/milestone_select.js
app/assets/javascripts/boards/components/milestone_select.js
+5
-12
app/assets/javascripts/boards/mixins/extra_milestones.js
app/assets/javascripts/boards/mixins/extra_milestones.js
+10
-0
app/views/projects/boards/components/_form.html.haml
app/views/projects/boards/components/_form.html.haml
+6
-0
No files found.
app/assets/javascripts/boards/components/board_new_form.js
View file @
0caeb99a
/* global Vue */
/*
eslint-disabl
e */
/*
global BoardServic
e */
const
boardMilestoneSelect
=
require
(
'
./milestone_select
'
);
const
extraMilestones
=
require
(
'
../mixins/extra_milestones
'
);
(()
=>
{
window
.
gl
=
window
.
gl
||
{};
window
.
gl
.
issueBoards
=
window
.
gl
.
issueBoards
||
{};
...
...
@@ -19,13 +21,14 @@ const boardMilestoneSelect = require('./milestone_select');
board
:
{
id
:
false
,
name
:
''
,
milestone
:
{}
,
milestone_id
:
''
,
milestone
:
extraMilestones
[
0
]
,
milestone_id
:
extraMilestones
[
0
].
id
,
},
currentBoard
:
Store
.
state
.
currentBoard
,
currentPage
:
Store
.
state
.
currentPage
,
milestones
:
[],
milestoneDropdownOpen
:
false
,
extraMilestones
,
};
},
components
:
{
...
...
@@ -70,7 +73,8 @@ const boardMilestoneSelect = require('./milestone_select');
this
.
currentBoard
.
milestone_id
=
this
.
board
.
milestone_id
;
this
.
currentBoard
.
milestone
=
this
.
board
.
milestone
;
Store
.
state
.
filters
.
milestone_title
=
this
.
currentBoard
.
milestone_id
?
this
.
currentBoard
.
milestone
.
title
:
null
;
Store
.
state
.
filters
.
milestone_title
=
this
.
currentBoard
.
milestone_id
?
this
.
currentBoard
.
milestone
.
title
:
null
;
}
}
...
...
app/assets/javascripts/boards/components/milestone_select.js
View file @
0caeb99a
/* global BoardService */
/* global Vue */
module
.
exports
=
Vue
.
extend
({
const
extraMilestones
=
require
(
'
../mixins/extra_milestones
'
);
module
.
exports
=
{
props
:
{
board
:
{
type
:
Object
,
...
...
@@ -19,16 +21,7 @@ module.exports = Vue.extend({
return
{
loading
:
false
,
milestones
:
[],
extraMilestones
:
[
{
id
:
null
,
title
:
'
Any Milestone
'
,
},
{
id
:
-
2
,
title
:
'
Upcoming
'
,
},
],
extraMilestones
,
};
},
mounted
()
{
...
...
@@ -68,4 +61,4 @@ module.exports = Vue.extend({
</ul>
</div>
`
,
}
)
;
};
app/assets/javascripts/boards/mixins/extra_milestones.js
0 → 100644
View file @
0caeb99a
module
.
exports
=
[
{
id
:
null
,
title
:
'
Any Milestone
'
,
},
{
id
:
-
2
,
title
:
'
Upcoming
'
,
},
];
app/views/projects/boards/components/_form.html.haml
View file @
0caeb99a
...
...
@@ -20,6 +20,12 @@
.dropdown-menu.dropdown-menu-selectable
{
"v-if"
=>
"milestoneDropdownOpen"
}
.dropdown-content
%ul
%li
{
"v-for"
=>
"milestone in extraMilestones"
}
%a
{
href:
"#"
,
":class"
=>
"{ 'is-active': milestone.id === board.milestone_id }"
,
"@click.stop.prevent"
=>
"selectMilestone(milestone)"
}
{{ milestone.title }}
%li
.divider
%li
{
"v-for"
=>
"milestone in milestones"
}
%a
{
href:
"#"
,
":class"
=>
"{ 'is-active': milestone.id === board.milestone_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