From c91ca4fcd91fd15d26dfad587153dd5f7e10a738 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Barth Date: Fri, 29 Oct 2010 22:40:02 +0000 Subject: [PATCH] Fix wikilinks in project > settings > versions and version view. #6435 #4416 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Contributed by Mischa The Evil and Felix Schäfer. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4307 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/projects/settings/_versions.rhtml | 4 ++-- app/views/versions/show.rhtml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/projects/settings/_versions.rhtml b/app/views/projects/settings/_versions.rhtml index c8a5db1cf..f9a4dd109 100644 --- a/app/views/projects/settings/_versions.rhtml +++ b/app/views/projects/settings/_versions.rhtml @@ -6,7 +6,7 @@ <%= l(:field_description) %> <%= l(:field_status) %> <%= l(:field_sharing) %> - <%= l(:label_wiki_page) unless @project.wiki.nil? %> + <%= l(:label_wiki_page) %> @@ -17,7 +17,7 @@ <%=h version.description %> <%= l("version_status_#{version.status}") %> <%=h format_version_sharing(version.sharing) %> - <%= link_to(h(version.wiki_page_title), :controller => 'wiki', :action => 'show', :id => Wiki.titleize(version.wiki_page_title), :project_id => @project) unless version.wiki_page_title.blank? || @project.wiki.nil? %> + <%= link_to_if_authorized(h(version.wiki_page_title), {:controller => 'wiki', :action => 'show', :project_id => version.project, :id => Wiki.titleize(version.wiki_page_title)}) || h(version.wiki_page_title) unless version.wiki_page_title.blank? || version.project.wiki.nil? %> <% if version.project == @project %> <%= link_to_if_authorized l(:button_edit), {:controller => 'versions', :action => 'edit', :id => version }, :class => 'icon icon-edit' %> diff --git a/app/views/versions/show.rhtml b/app/views/versions/show.rhtml index f8a82142c..13769a5b9 100644 --- a/app/views/versions/show.rhtml +++ b/app/views/versions/show.rhtml @@ -1,6 +1,6 @@
<%= link_to_if_authorized l(:button_edit), {:controller => 'versions', :action => 'edit', :id => @version}, :class => 'icon icon-edit' %> -<%= link_to_if_authorized(l(:button_edit_associated_wikipage, :page_title => @version.wiki_page_title), {:controller => 'wiki', :action => 'edit', :id => Wiki.titleize(@version.wiki_page_title)}, :class => 'icon icon-edit') unless @version.wiki_page_title.blank? || @project.wiki.nil? %> +<%= link_to_if_authorized(l(:button_edit_associated_wikipage, :page_title => @version.wiki_page_title), {:controller => 'wiki', :action => 'edit', :project_id => @version.project, :id => Wiki.titleize(@version.wiki_page_title)}, :class => 'icon icon-edit') unless @version.wiki_page_title.blank? || @version.project.wiki.nil? %> <%= call_hook(:view_versions_show_contextual, { :version => @version, :project => @project }) %>