<%= wiki_page_breadcrumb(@page) %>

<%= @original_title %>

<%= error_messages_for 'page' %> <%= labelled_form_for :wiki_page, @page, :url => { :action => 'rename' }, :html => { :method => :post } do |f| %>

<%= f.text_field :title, :required => true, :size => 100 %>

<% if @page.safe_attribute? 'is_start_page' %>

<%= f.check_box :is_start_page, :label => :field_start_page, :disabled => @page.is_start_page %>

<% end %>

<%= f.check_box :redirect_existing_links %>

<% if @page.safe_attribute? 'wiki_id' %>

<%= f.select :wiki_id, wiki_page_wiki_options_for_select(@page), :label => :label_project %>

<% end %>

<%= f.select :parent_id, content_tag('option', '', :value => '') + wiki_page_options_for_select( @wiki.pages.includes(:parent).to_a - @page.self_and_descendants, @page.parent), :label => :field_parent_title %>

<%= submit_tag l(:button_rename) %> <% end %> <%= javascript_tag do %> $('#wiki_page_wiki_id').change(function() { $.ajax({ url: '<%= rename_project_wiki_page_path(@wiki, :format => 'js') %>', type: 'get', data: { 'wiki_page[wiki_id]': $('#wiki_page_wiki_id').val() } }); }); <% end %>