6435-fix_links_to_wikipages_with_version-sharing.diff

Patch against trunk at r4101. - Mischa The Evil, 2010-09-20 05:44

Download (2.07 KB)

View differences:

app/views/projects/settings/_versions.rhtml (working copy)
6 6
    <th><%= l(:field_description) %></th>
7 7
    <th><%= l(:field_status) %></th>
8 8
    <th><%= l(:field_sharing) %></th>
9
    <th><%= l(:label_wiki_page) unless @project.wiki.nil? %></th>
9
    <th><%= l(:label_wiki_page) %></th>
10 10
    <th style="width:15%"></th>
11 11
    </tr></thead>
12 12
	<tbody>
......
17 17
    <td class="description"><%=h version.description %></td>
18 18
    <td class="status"><%= l("version_status_#{version.status}") %></td>
19 19
    <td class="sharing"><%=h format_version_sharing(version.sharing) %></td>
20
    <td><%= link_to(h(version.wiki_page_title), :controller => 'wiki', :page => Wiki.titleize(version.wiki_page_title)) unless version.wiki_page_title.blank? || @project.wiki.nil? %></td>
20
    <td>
21
    	<% if version.project == @project %>
22
    		<%= link_to(h(version.wiki_page_title), :controller => 'wiki', :page => Wiki.titleize(version.wiki_page_title)) unless version.wiki_page_title.blank? || @project.wiki.nil? %>
23
    	<% else %>
24
    		<%= link_to(h(version.wiki_page_title), :controller => 'wiki', :id => version.project, :page => Wiki.titleize(version.wiki_page_title)) unless version.wiki_page_title.blank? || version.project.wiki.nil? %>
25
    	<% end %>
26
    </td>
21 27
    <td class="buttons">
22 28
    	<% if version.project == @project %>
23
    		<%= link_to_if_authorized l(:button_edit),   {:controller => 'versions', :action => 'edit', :id => version }, :class => 'icon icon-edit' %>
29
    		<%= link_to_if_authorized l(:button_edit),   {:controller => 'versions', :action => 'edit', :id => version}, :class => 'icon icon-edit' %>
24 30
    		<%= link_to_if_authorized l(:button_delete), {:controller => 'versions', :action => 'destroy', :id => version}, :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del' %>
25 31
    	<% end %>
26
   	</td>
32
    </td>
27 33
    </tr>
28 34
<% end; reset_cycle %>
29 35
    </tbody>