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

Added delete state

parent ed1da57a
...@@ -41,6 +41,8 @@ ...@@ -41,6 +41,8 @@
return 'Edit board'; return 'Edit board';
} else if (this.currentPage === 'new') { } else if (this.currentPage === 'new') {
return 'Create new board'; return 'Create new board';
} else if (this.currentPage === 'delete') {
return 'Delete board';
} else { } else {
return 'Go to a board'; return 'Go to a board';
} }
......
...@@ -37,6 +37,18 @@ ...@@ -37,6 +37,18 @@
":current-page.sync" => "currentPage", ":current-page.sync" => "currentPage",
":reload.sync" => "reload" } ":reload.sync" => "reload" }
= render "projects/boards/components/form" = render "projects/boards/components/form"
.dropdown-content.board-selector-page-two{ "v-if" => "currentPage === 'delete'" }
%p
Are you sure you want to delete this board?
.clearfix
= link_to "",
class: "btn btn-danger pull-left",
method: :delete,
":href" => "'#{namespace_project_boards_path(@project.namespace, @project)}/' + currentBoard.id" do
Delete
%button.btn.btn-default.pull-right{ type: "button",
"@click.stop.prevent" => "currentPage = ''" }
Cancel
.dropdown-footer{ "v-if" => "currentPage === ''" } .dropdown-footer{ "v-if" => "currentPage === ''" }
%ul.dropdown-footer-list %ul.dropdown-footer-list
%li %li
...@@ -46,8 +58,5 @@ ...@@ -46,8 +58,5 @@
%a{ "@click.stop.prevent" => "showPage('edit')" } %a{ "@click.stop.prevent" => "showPage('edit')" }
Edit board name Edit board name
%li{ "v-if" => "showDelete" } %li{ "v-if" => "showDelete" }
= link_to "", %a.text-danger{ "@click.stop.prevent" => "showPage('delete')" }
class: "text-danger",
method: :delete,
":href" => "'#{namespace_project_boards_path(@project.namespace, @project)}/' + currentBoard.id" do
Delete board Delete board
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