@@ -1,49 +1,54 | |||
|
1 | 1 | <%= wiki_page_breadcrumb(@page) %> |
|
2 | 2 | |
|
3 | 3 | <h2><%= h @page.pretty_title %></h2> |
|
4 | 4 | |
|
5 | 5 | <%= form_for @content, :as => :content, |
|
6 | 6 | :url => {:action => 'update', :id => @page.title}, |
|
7 | 7 | :html => {:method => :put, :multipart => true, :id => 'wiki_form'} do |f| %> |
|
8 | 8 | <%= f.hidden_field :version %> |
|
9 | 9 | <% if @section %> |
|
10 | 10 | <%= hidden_field_tag 'section', @section %> |
|
11 | 11 | <%= hidden_field_tag 'section_hash', @section_hash %> |
|
12 | 12 | <% end %> |
|
13 | 13 | <%= error_messages_for 'content' %> |
|
14 | 14 | |
|
15 | 15 | <div class="box tabular"> |
|
16 |
<%= text_area_tag 'content[text]', @text, :cols => 100, :rows => 25, |
|
|
16 | <%= text_area_tag 'content[text]', @text, :cols => 100, :rows => 25, | |
|
17 | :class => 'wiki-edit', :accesskey => accesskey(:edit) %> | |
|
17 | 18 | |
|
18 | 19 | <% if @page.safe_attribute_names.include?('parent_id') && @wiki.pages.any? %> |
|
19 | 20 | <%= fields_for @page do |fp| %> |
|
20 | 21 | <p> |
|
21 | 22 | <label><%= l(:field_parent_title) %></label> |
|
22 | <%= fp.select :parent_id, content_tag('option', '', :value => '') + wiki_page_options_for_select(@wiki.pages.all(:include => :parent) - @page.self_and_descendants, @page.parent) %> | |
|
23 | <%= fp.select :parent_id, | |
|
24 | content_tag('option', '', :value => '') + | |
|
25 | wiki_page_options_for_select(@wiki.pages.all(:include => :parent) - | |
|
26 | @page.self_and_descendants, @page.parent) %> | |
|
23 | 27 | </p> |
|
24 | 28 | <% end %> |
|
25 | 29 | <% end %> |
|
26 | 30 | |
|
27 | 31 | <p><label><%= l(:field_comments) %></label><%= f.text_field :comments, :size => 120 %></p> |
|
28 | 32 | <p><label><%=l(:label_attachment_plural)%></label><%= render :partial => 'attachments/form' %></p> |
|
29 | 33 | </div> |
|
30 | 34 | |
|
31 | 35 | <p><%= submit_tag l(:button_save) %> |
|
32 | 36 | <%= link_to_remote l(:label_preview), |
|
33 |
{ :url => { :controller => 'wiki', :action => 'preview', |
|
|
37 | { :url => { :controller => 'wiki', :action => 'preview', | |
|
38 | :project_id => @project, :id => @page.title }, | |
|
34 | 39 | :method => :post, |
|
35 | 40 | :update => 'preview', |
|
36 | 41 | :with => "Form.serialize('wiki_form')", |
|
37 | 42 | :complete => "Element.scrollTo('preview')" |
|
38 | 43 | }, :accesskey => accesskey(:preview) %></p> |
|
39 | 44 | <%= wikitoolbar_for 'content_text' %> |
|
40 | 45 | <% end %> |
|
41 | 46 | |
|
42 | 47 | <div id="preview" class="wiki"></div> |
|
43 | 48 | |
|
44 | 49 | <% content_for :header_tags do %> |
|
45 | 50 | <%= stylesheet_link_tag 'scm' %> |
|
46 | 51 | <%= robot_exclusion_tag %> |
|
47 | 52 | <% end %> |
|
48 | 53 | |
|
49 | 54 | <% html_title @page.pretty_title %> |
General Comments 0
You need to be logged in to leave comments.
Login now