##// END OF EJS Templates
Fix wikilinks in project > settings > versions and version view. #6435 #4416...
Jean-Baptiste Barth -
r4193:c91ca4fcd91f
parent child
Show More
@@ -1,41 +1,41
1 <% if @project.shared_versions.any? %>
1 <% if @project.shared_versions.any? %>
2 <table class="list versions">
2 <table class="list versions">
3 <thead><tr>
3 <thead><tr>
4 <th><%= l(:label_version) %></th>
4 <th><%= l(:label_version) %></th>
5 <th><%= l(:field_effective_date) %></th>
5 <th><%= l(:field_effective_date) %></th>
6 <th><%= l(:field_description) %></th>
6 <th><%= l(:field_description) %></th>
7 <th><%= l(:field_status) %></th>
7 <th><%= l(:field_status) %></th>
8 <th><%= l(:field_sharing) %></th>
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 <th style="width:15%"></th>
10 <th style="width:15%"></th>
11 </tr></thead>
11 </tr></thead>
12 <tbody>
12 <tbody>
13 <% for version in @project.shared_versions.sort %>
13 <% for version in @project.shared_versions.sort %>
14 <tr class="version <%= cycle 'odd', 'even' %> <%=h version.status %> <%= 'shared' if version.project != @project %>">
14 <tr class="version <%= cycle 'odd', 'even' %> <%=h version.status %> <%= 'shared' if version.project != @project %>">
15 <td class="name"><%= link_to_version version %></td>
15 <td class="name"><%= link_to_version version %></td>
16 <td class="date"><%= format_date(version.effective_date) %></td>
16 <td class="date"><%= format_date(version.effective_date) %></td>
17 <td class="description"><%=h version.description %></td>
17 <td class="description"><%=h version.description %></td>
18 <td class="status"><%= l("version_status_#{version.status}") %></td>
18 <td class="status"><%= l("version_status_#{version.status}") %></td>
19 <td class="sharing"><%=h format_version_sharing(version.sharing) %></td>
19 <td class="sharing"><%=h format_version_sharing(version.sharing) %></td>
20 <td><%= 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? %></td>
20 <td><%= 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? %></td>
21 <td class="buttons">
21 <td class="buttons">
22 <% if version.project == @project %>
22 <% if version.project == @project %>
23 <%= link_to_if_authorized l(:button_edit), {:controller => 'versions', :action => 'edit', :id => version }, :class => 'icon icon-edit' %>
23 <%= link_to_if_authorized l(:button_edit), {:controller => 'versions', :action => 'edit', :id => version }, :class => 'icon icon-edit' %>
24 <%= 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' %>
24 <%= 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 <% end %>
25 <% end %>
26 </td>
26 </td>
27 </tr>
27 </tr>
28 <% end; reset_cycle %>
28 <% end; reset_cycle %>
29 </tbody>
29 </tbody>
30 </table>
30 </table>
31 <% else %>
31 <% else %>
32 <p class="nodata"><%= l(:label_no_data) %></p>
32 <p class="nodata"><%= l(:label_no_data) %></p>
33 <% end %>
33 <% end %>
34
34
35 <div class="contextual">
35 <div class="contextual">
36 <% if @project.versions.any? %>
36 <% if @project.versions.any? %>
37 <%= link_to l(:label_close_versions), close_completed_project_versions_path(@project), :method => :put %>
37 <%= link_to l(:label_close_versions), close_completed_project_versions_path(@project), :method => :put %>
38 <% end %>
38 <% end %>
39 </div>
39 </div>
40
40
41 <p><%= link_to_if_authorized l(:label_version_new), :controller => 'versions', :action => 'new', :project_id => @project %></p>
41 <p><%= link_to_if_authorized l(:label_version_new), :controller => 'versions', :action => 'new', :project_id => @project %></p>
@@ -1,49 +1,49
1 <div class="contextual">
1 <div class="contextual">
2 <%= link_to_if_authorized l(:button_edit), {:controller => 'versions', :action => 'edit', :id => @version}, :class => 'icon icon-edit' %>
2 <%= link_to_if_authorized l(:button_edit), {:controller => 'versions', :action => 'edit', :id => @version}, :class => 'icon icon-edit' %>
3 <%= 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? %>
3 <%= 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? %>
4 <%= call_hook(:view_versions_show_contextual, { :version => @version, :project => @project }) %>
4 <%= call_hook(:view_versions_show_contextual, { :version => @version, :project => @project }) %>
5 </div>
5 </div>
6
6
7 <h2><%= h(@version.name) %></h2>
7 <h2><%= h(@version.name) %></h2>
8
8
9 <div id="version-summary">
9 <div id="version-summary">
10 <% if @version.estimated_hours > 0 || User.current.allowed_to?(:view_time_entries, @project) %>
10 <% if @version.estimated_hours > 0 || User.current.allowed_to?(:view_time_entries, @project) %>
11 <fieldset><legend><%= l(:label_time_tracking) %></legend>
11 <fieldset><legend><%= l(:label_time_tracking) %></legend>
12 <table>
12 <table>
13 <tr>
13 <tr>
14 <td width="130px" align="right"><%= l(:field_estimated_hours) %></td>
14 <td width="130px" align="right"><%= l(:field_estimated_hours) %></td>
15 <td width="240px" class="total-hours"width="130px" align="right"><%= html_hours(l_hours(@version.estimated_hours)) %></td>
15 <td width="240px" class="total-hours"width="130px" align="right"><%= html_hours(l_hours(@version.estimated_hours)) %></td>
16 </tr>
16 </tr>
17 <% if User.current.allowed_to?(:view_time_entries, @project) %>
17 <% if User.current.allowed_to?(:view_time_entries, @project) %>
18 <tr>
18 <tr>
19 <td width="130px" align="right"><%= l(:label_spent_time) %></td>
19 <td width="130px" align="right"><%= l(:label_spent_time) %></td>
20 <td width="240px" class="total-hours"><%= html_hours(l_hours(@version.spent_hours)) %></td>
20 <td width="240px" class="total-hours"><%= html_hours(l_hours(@version.spent_hours)) %></td>
21 </tr>
21 </tr>
22 <% end %>
22 <% end %>
23 </table>
23 </table>
24 </fieldset>
24 </fieldset>
25 <% end %>
25 <% end %>
26
26
27 <div id="status_by">
27 <div id="status_by">
28 <%= render_issue_status_by(@version, params[:status_by]) if @version.fixed_issues.count > 0 %>
28 <%= render_issue_status_by(@version, params[:status_by]) if @version.fixed_issues.count > 0 %>
29 </div>
29 </div>
30 </div>
30 </div>
31
31
32 <div id="roadmap">
32 <div id="roadmap">
33 <%= render :partial => 'versions/overview', :locals => {:version => @version} %>
33 <%= render :partial => 'versions/overview', :locals => {:version => @version} %>
34 <%= render(:partial => "wiki/content", :locals => {:content => @version.wiki_page.content}) if @version.wiki_page %>
34 <%= render(:partial => "wiki/content", :locals => {:content => @version.wiki_page.content}) if @version.wiki_page %>
35
35
36 <% if @issues.present? %>
36 <% if @issues.present? %>
37 <fieldset class="related-issues"><legend><%= l(:label_related_issues) %></legend>
37 <fieldset class="related-issues"><legend><%= l(:label_related_issues) %></legend>
38 <ul>
38 <ul>
39 <% @issues.each do |issue| -%>
39 <% @issues.each do |issue| -%>
40 <li><%= link_to_issue(issue) %></li>
40 <li><%= link_to_issue(issue) %></li>
41 <% end -%>
41 <% end -%>
42 </ul>
42 </ul>
43 </fieldset>
43 </fieldset>
44 <% end %>
44 <% end %>
45 </div>
45 </div>
46
46
47 <%= call_hook :view_versions_show_bottom, :version => @version %>
47 <%= call_hook :view_versions_show_bottom, :version => @version %>
48
48
49 <% html_title @version.name %>
49 <% html_title @version.name %>
General Comments 0
You need to be logged in to leave comments. Login now