Browse Source

Do not show section edit links for wiki page history (#2222).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7830 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/1.3.0
Jean-Philippe Lang 12 years ago
parent
commit
2770e28535
2 changed files with 2 additions and 1 deletions
  1. 1
    0
      app/controllers/wiki_controller.rb
  2. 1
    1
      app/views/wiki/_content.html.erb

+ 1
- 0
app/controllers/wiki_controller.rb View File

end end
end end
@editable = editable? @editable = editable?
@sections_editable = @editable && User.current.allowed_to?(:edit_wiki_pages, @page.project) && params[:version].nil?
render :action => 'show' render :action => 'show'
end end



+ 1
- 1
app/views/wiki/_content.html.erb View File

<div class="wiki wiki-page"> <div class="wiki wiki-page">
<%= textilizable content, :text, :attachments => content.page.attachments, <%= 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}) %>
:edit_section_links => (@sections_editable && {:controller => 'wiki', :action => 'edit', :project_id => @page.project, :id => @page.title}) %>
</div> </div>

Loading…
Cancel
Save