@@ -13,13 +13,17 | |||||
13 | <%= error_messages_for 'content' %> |
|
13 | <%= error_messages_for 'content' %> | |
14 |
|
14 | |||
15 | <div class="box tabular"> |
|
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 | <% if @page.safe_attribute_names.include?('parent_id') && @wiki.pages.any? %> |
|
19 | <% if @page.safe_attribute_names.include?('parent_id') && @wiki.pages.any? %> | |
19 | <%= fields_for @page do |fp| %> |
|
20 | <%= fields_for @page do |fp| %> | |
20 | <p> |
|
21 | <p> | |
21 | <label><%= l(:field_parent_title) %></label> |
|
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 | </p> |
|
27 | </p> | |
24 | <% end %> |
|
28 | <% end %> | |
25 | <% end %> |
|
29 | <% end %> | |
@@ -30,7 +34,8 | |||||
30 |
|
34 | |||
31 | <p><%= submit_tag l(:button_save) %> |
|
35 | <p><%= submit_tag l(:button_save) %> | |
32 | <%= link_to_remote l(:label_preview), |
|
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 | :method => :post, |
|
39 | :method => :post, | |
35 | :update => 'preview', |
|
40 | :update => 'preview', | |
36 | :with => "Form.serialize('wiki_form')", |
|
41 | :with => "Form.serialize('wiki_form')", |
General Comments 0
You need to be logged in to leave comments.
Login now