diff app/views/projects/show.rhtml @ 490:cd64fb9ab701 feature_199

Add "Edit this page" link to welcome page if the current user is authorised to do so
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Tue, 12 Jul 2011 11:51:42 +0100
parents 350acce374a2
children 4bc63ccdb6ed
line wrap: on
line diff
--- a/app/views/projects/show.rhtml	Mon Jul 11 16:50:45 2011 +0100
+++ b/app/views/projects/show.rhtml	Tue Jul 12 11:51:42 2011 +0100
@@ -10,6 +10,14 @@
 
 <% if page %>
 
+<% if @project.module_enabled? :wiki %>
+<% if User.current.allowed_to?(:edit_wiki_pages, @project) %>
+<div class="contextual">
+<%= link_to(l(:button_welcome_page_edit_this), {:controller => 'wiki', :action => 'edit', :project_id => @project, :id => Wiki.titleize("Overview")}, :class => 'icon icon-edit') %>
+</div>
+<% end %>
+<% end %>
+
 <div class="contextual" style="clear: right">
 <ul>
 <% @users_by_role.keys.sort.each do |role| %>