annotate app/views/wiki/edit.rhtml @ 596:fcff84e1c1ce
feature_36
In the remote call now only passing the id of the form's object, instead of the complete name of the object.
author |
luisf <luis.figueira@eecs.qmul.ac.uk> |
date |
Tue, 16 Aug 2011 11:47:30 +0100 |
parents |
cbce1fd3b1b7 |
children |
|
rev |
line source |
Chris@0
|
1 <h2><%=h @page.pretty_title %></h2>
|
Chris@0
|
2
|
chris@37
|
3 <% form_for :content, @content, :url => {:action => 'update', :id => @page.title}, :html => {:method => :put, :multipart => true, :id => 'wiki_form'} do |f| %>
|
Chris@0
|
4 <%= f.hidden_field :version %>
|
Chris@0
|
5 <%= error_messages_for 'content' %>
|
Chris@0
|
6
|
Chris@0
|
7 <p><%= f.text_area :text, :cols => 100, :rows => 25, :class => 'wiki-edit', :accesskey => accesskey(:edit) %></p>
|
Chris@0
|
8 <p><label><%= l(:field_comments) %></label><br /><%= f.text_field :comments, :size => 120 %></p>
|
Chris@0
|
9 <p><label><%=l(:label_attachment_plural)%></label><br /><%= render :partial => 'attachments/form' %></p>
|
Chris@0
|
10
|
Chris@0
|
11 <p><%= submit_tag l(:button_save) %>
|
Chris@0
|
12 <%= link_to_remote l(:label_preview),
|
chris@37
|
13 { :url => { :controller => 'wiki', :action => 'preview', :project_id => @project, :id => @page.title },
|
chris@37
|
14 :method => :post,
|
Chris@0
|
15 :update => 'preview',
|
Chris@0
|
16 :with => "Form.serialize('wiki_form')",
|
Chris@0
|
17 :complete => "Element.scrollTo('preview')"
|
Chris@0
|
18 }, :accesskey => accesskey(:preview) %></p>
|
Chris@0
|
19 <%= wikitoolbar_for 'content_text' %>
|
Chris@0
|
20 <% end %>
|
Chris@0
|
21
|
Chris@0
|
22 <div id="preview" class="wiki"></div>
|
Chris@0
|
23
|
Chris@0
|
24 <% content_for :header_tags do %>
|
Chris@0
|
25 <%= stylesheet_link_tag 'scm' %>
|
Chris@441
|
26 <%= robot_exclusion_tag %>
|
Chris@0
|
27 <% end %>
|
Chris@0
|
28
|
Chris@0
|
29 <% html_title @page.pretty_title %>
|