<%#-- copyright OpenProject is a project management system. Copyright (C) 2012-2013 the OpenProject Team This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3. See doc/COPYRIGHT.rdoc for more details. ++#%> <%= error_messages_for "wiki_menu_item", :object => @wiki_menu_item %> <% breadcrumb_paths(*@page.ancestors.reverse.collect {|parent| link_to h(parent.pretty_title), {:id => parent.title, :project_id => parent.project}}.push(@page.title)) %>

<%= l(:wiki_menu_item_for, :title => @page_title) %>

<%= form_for @wiki_menu_item, :html => {:id => 'wiki_menu_item_form', :class => 'wiki_menu_item_form', :method => :put}, :url => wiki_menu_item_path(@project, @page_title) do |form| %>

<%= form.label :name, l(:label_menu_item_name), {:id => 'name_of_item'} %> <% if @wiki_menu_item.name.nil? %> <%= form.text_field :name, :size => 20, :value => @page_title.gsub("_"," ") %> <% else %> <%= form.text_field :name, :size => 20 %> <% end %>


<%=l(:wiki_menu_item_setting)%>

<%= form.radio_button 'setting', :no_item %> <%= form.label 'setting_no_item', l(:label_wiki_dont_show_menu_item) %>

<%= form.radio_button 'setting', :main_item %> <%= form.label 'setting_main_item', l(:label_wiki_show_menu_item) %>

<% disabled = @possible_parent_menu_items.empty? %> <%= form.radio_button 'setting', :sub_item, :disabled => disabled %> <%= form.label 'setting_sub_item', l(:label_wiki_show_submenu_item), {:id => 'with-select'} %> <%= select_tag "parent_wiki_menu_item", options_for_select(@possible_parent_menu_items), :disabled => disabled %>

<%= submit_tag l(:button_save), :method => :post %> <%= link_to l(:button_cancel), {:controller => '/wiki', :action => 'show', :project_id => @project, :id => @page_title} %>

<% end %>