Commit 5266ff93 authored by Phil Hughes's avatar Phil Hughes Committed by Douglas Barbosa Alexandre

Only show dropdown on new & edit milestone

parent 29aec403
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
- if can?(current_user, :admin_board, @project) - if can?(current_user, :admin_board, @project)
%board-selector-form{ "inline-template" => true, %board-selector-form{ "inline-template" => true,
":milestone-path" => "milestonePath", ":milestone-path" => "milestonePath",
"v-if" => "currentPage === 'new' || currentPage === 'edit'" } "v-if" => "currentPage === 'new' || currentPage === 'edit' || currentPage === 'milestone'" }
= render "projects/boards/components/form" = render "projects/boards/components/form"
.dropdown-content.board-selector-page-two{ "v-if" => "currentPage === 'delete'" } .dropdown-content.board-selector-page-two{ "v-if" => "currentPage === 'delete'" }
%p %p
...@@ -49,6 +49,9 @@ ...@@ -49,6 +49,9 @@
%li %li
%a{ "href" => "#", "@click.stop.prevent" => "showPage('edit')" } %a{ "href" => "#", "@click.stop.prevent" => "showPage('edit')" }
Edit board name Edit board name
%li
%a{ "href" => "#", "@click.stop.prevent" => "showPage('milestone')" }
Edit board milestone
%li{ "v-if" => "showDelete" } %li{ "v-if" => "showDelete" }
%a.text-danger{ "href" => "#", "@click.stop.prevent" => "showPage('delete')" } %a.text-danger{ "href" => "#", "@click.stop.prevent" => "showPage('delete')" }
Delete board Delete board
.dropdown-content.board-selector-page-two .dropdown-content.board-selector-page-two
%form{ "@submit.prevent" => "submit" } %form{ "@submit.prevent" => "submit" }
%label.label-light{ for: "board-new-name" }
Board name
%input.form-control{ type: "text",
id: "board-new-name",
"v-model" => "board.name" }
%label.label-light{ for: "board-milestone" }
Board milestone
%input{ type: "hidden", %input{ type: "hidden",
id: "board-milestone", id: "board-milestone",
"v-model.number" => "board.milestone_id" } "v-model.number" => "board.milestone_id" }
.dropdown{ ":class" => "{ open: milestoneDropdownOpen }" } %div{ "v-if" => "currentPage !== 'milestone'" }
%label.label-light{ for: "board-new-name" }
Board name
%input.form-control{ type: "text",
id: "board-new-name",
"v-model" => "board.name" }
.dropdown{ ":class" => "{ open: milestoneDropdownOpen }",
"v-if" => "currentPage !== 'edit'" }
%label.label-light{ for: "board-milestone" }
Board milestone
%button.dropdown-menu-toggle.wide{ type: "button", %button.dropdown-menu-toggle.wide{ type: "button",
"@click.stop.prevent" => "loadMilestones" } "@click.stop.prevent" => "loadMilestones" }
{{ milestoneToggleText }} {{ milestoneToggleText }}
...@@ -24,6 +26,8 @@ ...@@ -24,6 +26,8 @@
"@click.stop.prevent" => "selectMilestone(milestone)" } "@click.stop.prevent" => "selectMilestone(milestone)" }
{{ milestone.title }} {{ milestone.title }}
= dropdown_loading = dropdown_loading
%span
Only show issues scheduled for the selected milestone
.clearfix.prepend-top-10 .clearfix.prepend-top-10
%button.btn.btn-primary.pull-left{ type: "submit", %button.btn.btn-primary.pull-left{ type: "submit",
":disabled" => "board.name === ''", ":disabled" => "board.name === ''",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment