diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/wiki/_content.html.erb | 5 | ||||
-rw-r--r-- | app/views/wiki/edit.html.erb | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/app/views/wiki/_content.html.erb b/app/views/wiki/_content.html.erb index 421d26cbb..0e747799d 100644 --- a/app/views/wiki/_content.html.erb +++ b/app/views/wiki/_content.html.erb @@ -1,3 +1,4 @@ -<div class="wiki"> - <%= textilizable content, :text, :attachments => content.page.attachments %> +<div class="wiki wiki-page"> + <%= textilizable content, :text, :attachments => content.page.attachments, + :edit_section_links => (content.is_a?(WikiContent) && @editable && User.current.allowed_to?(:edit_wiki_pages, @page.project) && {:controller => 'wiki', :action => 'edit', :project_id => @page.project, :id => @page.title}) %> </div> diff --git a/app/views/wiki/edit.html.erb b/app/views/wiki/edit.html.erb index ae04a1a51..c628c2f7a 100644 --- a/app/views/wiki/edit.html.erb +++ b/app/views/wiki/edit.html.erb @@ -4,9 +4,13 @@ <% form_for :content, @content, :url => {:action => 'update', :id => @page.title}, :html => {:method => :put, :multipart => true, :id => 'wiki_form'} do |f| %> <%= f.hidden_field :version %> +<% if @section %> +<%= hidden_field_tag 'section', @section %> +<%= hidden_field_tag 'section_hash', @section_hash %> +<% end %> <%= error_messages_for 'content' %> -<p><%= f.text_area :text, :cols => 100, :rows => 25, :class => 'wiki-edit', :accesskey => accesskey(:edit) %></p> +<p><%= text_area_tag 'content[text]', @text, :cols => 100, :rows => 25, :class => 'wiki-edit', :accesskey => accesskey(:edit) %></p> <p><label><%= l(:field_comments) %></label><br /><%= f.text_field :comments, :size => 120 %></p> <p><label><%=l(:label_attachment_plural)%></label><br /><%= render :partial => 'attachments/form' %></p> |