summaryrefslogtreecommitdiffstats
path: root/app/views/wiki
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-11-18 16:25:00 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-11-18 16:25:00 +0000
commit6fc245327ce5bb4bb75f1378424635e347dfcd02 (patch)
treefd9d00eab0e444da2f6ecb58842cb973c37540a5 /app/views/wiki
parentb38dc9a301c3ab0fafc5dd824ad57059ec58fc91 (diff)
downloadredmine-6fc245327ce5bb4bb75f1378424635e347dfcd02.tar.gz
redmine-6fc245327ce5bb4bb75f1378424635e347dfcd02.zip
Wiki: allows single section edit (#2222).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7829 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/wiki')
-rw-r--r--app/views/wiki/_content.html.erb5
-rw-r--r--app/views/wiki/edit.html.erb6
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>