annotate app/views/wiki/edit.html.erb @ 1628:9c5f8e24dadc live tip

Quieten this cron script
author Chris Cannam
date Tue, 25 Aug 2020 11:38:49 +0100
parents dffacf8a6908
children
rev   line source
Chris@909 1 <%= wiki_page_breadcrumb(@page) %>
Chris@909 2
Chris@1115 3 <h2><%= h @page.pretty_title %></h2>
Chris@0 4
Chris@1115 5 <%= form_for @content, :as => :content,
Chris@1115 6 :url => {:action => 'update', :id => @page.title},
Chris@1115 7 :html => {:method => :put, :multipart => true, :id => 'wiki_form'} do |f| %>
Chris@0 8 <%= f.hidden_field :version %>
Chris@909 9 <% if @section %>
Chris@909 10 <%= hidden_field_tag 'section', @section %>
Chris@909 11 <%= hidden_field_tag 'section_hash', @section_hash %>
Chris@909 12 <% end %>
Chris@0 13 <%= error_messages_for 'content' %>
Chris@0 14
Chris@1115 15 <div class="box tabular">
Chris@1115 16 <%= text_area_tag 'content[text]', @text, :cols => 100, :rows => 25,
Chris@1115 17 :class => 'wiki-edit', :accesskey => accesskey(:edit) %>
Chris@1115 18
Chris@1115 19 <% if @page.safe_attribute_names.include?('parent_id') && @wiki.pages.any? %>
Chris@1115 20 <%= fields_for @page do |fp| %>
Chris@1115 21 <p>
Chris@1115 22 <label><%= l(:field_parent_title) %></label>
Chris@1115 23 <%= fp.select :parent_id,
Chris@1115 24 content_tag('option', '', :value => '') +
Chris@1517 25 wiki_page_options_for_select(
Chris@1517 26 @wiki.pages.includes(:parent).all -
Chris@1115 27 @page.self_and_descendants, @page.parent) %>
Chris@1115 28 </p>
Chris@1115 29 <% end %>
Chris@1115 30 <% end %>
Chris@1115 31
Chris@1115 32 <p><label><%= l(:field_comments) %></label><%= f.text_field :comments, :size => 120 %></p>
Chris@1115 33 <p><label><%=l(:label_attachment_plural)%></label><%= render :partial => 'attachments/form' %></p>
Chris@1115 34 </div>
Chris@0 35
Chris@0 36 <p><%= submit_tag l(:button_save) %>
Chris@1115 37 <%= preview_link({:controller => 'wiki', :action => 'preview', :project_id => @project, :id => @page.title }, 'wiki_form') %></p>
Chris@0 38 <%= wikitoolbar_for 'content_text' %>
Chris@0 39 <% end %>
Chris@0 40
Chris@0 41 <div id="preview" class="wiki"></div>
Chris@0 42
Chris@0 43 <% content_for :header_tags do %>
Chris@441 44 <%= robot_exclusion_tag %>
Chris@0 45 <% end %>
Chris@0 46
Chris@0 47 <% html_title @page.pretty_title %>