summaryrefslogtreecommitdiffstats
path: root/app/views/wiki
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-04-21 12:19:56 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-04-21 12:19:56 +0000
commitbb44430b631eba1d33b218c97cb5d506073aeb08 (patch)
tree7e37b43149c5fceebb2a61a08f4c0d814c009615 /app/views/wiki
parent65cbd94e422ed7119edc474f2c66bdb675f32f98 (diff)
downloadredmine-bb44430b631eba1d33b218c97cb5d506073aeb08.tar.gz
redmine-bb44430b631eba1d33b218c97cb5d506073aeb08.zip
Ask user what to do with child pages when deleting a parent wiki page (#3202).
3 options are available: * move child pages as root pages * move child pages to another parent page * delete all descendants git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2676 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/wiki')
-rw-r--r--app/views/wiki/destroy.rhtml19
-rw-r--r--app/views/wiki/edit.rhtml2
2 files changed, 20 insertions, 1 deletions
diff --git a/app/views/wiki/destroy.rhtml b/app/views/wiki/destroy.rhtml
new file mode 100644
index 000000000..f552c69a5
--- /dev/null
+++ b/app/views/wiki/destroy.rhtml
@@ -0,0 +1,19 @@
+<h2><%=h @page.pretty_title %></h2>
+
+<% form_tag({}) do %>
+<div class="box">
+<p><strong><%= l(:text_wiki_page_destroy_question, :descendants => @descendants_count) %></strong></p>
+<p><label><%= radio_button_tag 'todo', 'nullify', true %> <%= l(:text_wiki_page_nullify_children) %></label><br />
+<label><%= radio_button_tag 'todo', 'destroy', false %> <%= l(:text_wiki_page_destroy_children) %></label>
+<% if @reassignable_to.any? %>
+<br />
+<label><%= radio_button_tag 'todo', 'reassign', false %> <%= l(:text_wiki_page_reassign_children) %></label>:
+<%= select_tag 'reassign_to_id', wiki_page_options_for_select(@reassignable_to),
+ :onclick => "$('todo_reassign').checked = true;" %>
+<% end %>
+</p>
+</div>
+
+<%= submit_tag l(:button_apply) %>
+<%= link_to l(:button_cancel), :controller => 'wiki', :action => 'index', :id => @project, :page => @page.title %>
+<% end %>
diff --git a/app/views/wiki/edit.rhtml b/app/views/wiki/edit.rhtml
index 19f3bd5ae..6a949e2aa 100644
--- a/app/views/wiki/edit.rhtml
+++ b/app/views/wiki/edit.rhtml
@@ -1,4 +1,4 @@
-<h2><%= @page.pretty_title %></h2>
+<h2><%=h @page.pretty_title %></h2>
<% form_for :content, @content, :url => {:action => 'edit', :page => @page.title}, :html => {:id => 'wiki_form'} do |f| %>
<%= f.hidden_field :version %>