Sha256: 2493cf4cefd58d68056c04a5ce1154c18c5e71e723f426334c64d02ff4268020

Contents?: true

Size: 1.62 KB

Versions: 1

Compression:

Stored size: 1.62 KB

Contents

<%= wiki_page_style %>

<h1><%=wt 'Editing wiki page' %></h1>

<% if params[:preview] %>
<div class="wiki_content">
  <%=wiki_content @page.content %>
</div>
<% end %>

<%= wiki_page_form do |f| %>
  <%= f.hidden_field :previous_version_number, :value => f.object.last_version_number %>
  <%= hidden_field_tag :path, @page.path %>

  <p><%=wt 'Title:' %><br /><%= f.text_field :title %></p>

  <%# If our 'content' contains newlines, Erubis will indent them (to make the
      produced HTML look nicer). However those indenting spaces *will* appear
      in the textarea in the user's browser and will get POSTed by the browser
      when submitting the form and thus would get written to the wiki content
      into the database.  The gsub's below replace the linebreaks ('\r\n')
      with UTF8 linefeeds (same way HAML solves this problem), which are
      ignored by Erubis and should be correctly displayed as linebreaks by
      modern browsers. %>
  <p><%=wt "Content: #{link_to('(Textile Markup', 'http://redcloth.org/hobix.com/textile/', target: '_blank')}".html_safe %> allowed)<br /><%= f.text_area(:content) %> </p>
  <%#<p><%#=wt 'Content:' %><br /><%#= f.text_area(:content, :value => f.object.content.gsub("\n", '&#x000A;').gsub("\r",'')).html_safe %#></p>%>
  <p><%=wt 'Comment on this change (optional):' %><br /><%= f.text_field :comment %></p>
  <input type="submit" name="save" value="<%=wt 'Save page' %>" class="submit" />
  <input type="submit" name="preview" value="<%=wt 'Preview' %>" class="submit" />
  <input type="submit" name="cancel" value="<%=wt 'Cancel' %>" class="submit" />
<% end %>

<%= wiki_page_attachments(@page) %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
irwi-0.5.0 app/views/base_wiki_pages/edit.html.erb