2011-07-04 23:56:38 +04:00
|
|
|
<%= wiki_page_breadcrumb(@page) %>
|
|
|
|
|
2012-02-06 03:51:03 +04:00
|
|
|
<h2><%= h @page.pretty_title %></h2>
|
2007-03-12 20:59:02 +03:00
|
|
|
|
2012-04-25 21:17:49 +04:00
|
|
|
<%= form_for @content, :as => :content,
|
2012-02-06 03:51:03 +04:00
|
|
|
:url => {:action => 'update', :id => @page.title},
|
|
|
|
:html => {:method => :put, :multipart => true, :id => 'wiki_form'} do |f| %>
|
2007-05-26 21:22:27 +04:00
|
|
|
<%= f.hidden_field :version %>
|
2011-11-18 20:25:00 +04:00
|
|
|
<% if @section %>
|
|
|
|
<%= hidden_field_tag 'section', @section %>
|
|
|
|
<%= hidden_field_tag 'section_hash', @section_hash %>
|
|
|
|
<% end %>
|
2007-03-12 20:59:02 +03:00
|
|
|
<%= error_messages_for 'content' %>
|
2008-03-05 14:14:35 +03:00
|
|
|
|
2011-12-17 15:11:13 +04:00
|
|
|
<div class="box tabular">
|
2012-05-09 18:18:53 +04:00
|
|
|
<%= text_area_tag 'content[text]', @text, :cols => 100, :rows => 25,
|
|
|
|
:class => 'wiki-edit', :accesskey => accesskey(:edit) %>
|
2011-12-17 15:11:13 +04:00
|
|
|
|
2012-02-05 18:35:27 +04:00
|
|
|
<% if @page.safe_attribute_names.include?('parent_id') && @wiki.pages.any? %>
|
2012-04-25 21:17:49 +04:00
|
|
|
<%= fields_for @page do |fp| %>
|
2012-02-05 18:35:27 +04:00
|
|
|
<p>
|
2012-02-06 03:50:36 +04:00
|
|
|
<label><%= l(:field_parent_title) %></label>
|
2012-05-09 18:18:53 +04:00
|
|
|
<%= fp.select :parent_id,
|
|
|
|
content_tag('option', '', :value => '') +
|
2014-01-10 08:45:46 +04:00
|
|
|
wiki_page_options_for_select(
|
|
|
|
@wiki.pages.includes(:parent).all -
|
2012-05-09 18:18:53 +04:00
|
|
|
@page.self_and_descendants, @page.parent) %>
|
2012-02-06 03:50:36 +04:00
|
|
|
</p>
|
2012-02-05 18:35:27 +04:00
|
|
|
<% end %>
|
2011-12-17 15:44:04 +04:00
|
|
|
<% end %>
|
|
|
|
|
2011-12-17 15:11:13 +04:00
|
|
|
<p><label><%= l(:field_comments) %></label><%= f.text_field :comments, :size => 120 %></p>
|
|
|
|
<p><label><%=l(:label_attachment_plural)%></label><%= render :partial => 'attachments/form' %></p>
|
|
|
|
</div>
|
2010-02-28 12:43:13 +03:00
|
|
|
|
2007-03-12 20:59:02 +03:00
|
|
|
<p><%= submit_tag l(:button_save) %>
|
2012-07-18 21:47:19 +04:00
|
|
|
<%= preview_link({:controller => 'wiki', :action => 'preview', :project_id => @project, :id => @page.title }, 'wiki_form') %></p>
|
2007-08-25 18:51:06 +04:00
|
|
|
<%= wikitoolbar_for 'content_text' %>
|
2007-03-12 20:59:02 +03:00
|
|
|
<% end %>
|
|
|
|
|
2007-08-25 18:51:06 +04:00
|
|
|
<div id="preview" class="wiki"></div>
|
2007-09-06 21:06:07 +04:00
|
|
|
|
|
|
|
<% content_for :header_tags do %>
|
2011-04-12 23:22:44 +04:00
|
|
|
<%= robot_exclusion_tag %>
|
2007-09-06 21:06:07 +04:00
|
|
|
<% end %>
|
2007-09-08 00:52:45 +04:00
|
|
|
|
2011-10-02 22:45:17 +04:00
|
|
|
<% html_title @page.pretty_title %>
|