##// END OF EJS Templates
Do not show the changed files list on the revision page if the user is not allowed to browse the repository (#2762)....
Jean-Philippe Lang -
r2436:79fd564b6143
parent child
Show More
@@ -1,57 +1,59
1 <div class="contextual">
1 <div class="contextual">
2 &#171;
2 &#171;
3 <% unless @changeset.previous.nil? -%>
3 <% unless @changeset.previous.nil? -%>
4 <%= link_to l(:label_previous), :controller => 'repositories', :action => 'revision', :id => @project, :rev => @changeset.previous.revision %>
4 <%= link_to l(:label_previous), :controller => 'repositories', :action => 'revision', :id => @project, :rev => @changeset.previous.revision %>
5 <% else -%>
5 <% else -%>
6 <%= l(:label_previous) %>
6 <%= l(:label_previous) %>
7 <% end -%>
7 <% end -%>
8 |
8 |
9 <% unless @changeset.next.nil? -%>
9 <% unless @changeset.next.nil? -%>
10 <%= link_to l(:label_next), :controller => 'repositories', :action => 'revision', :id => @project, :rev => @changeset.next.revision %>
10 <%= link_to l(:label_next), :controller => 'repositories', :action => 'revision', :id => @project, :rev => @changeset.next.revision %>
11 <% else -%>
11 <% else -%>
12 <%= l(:label_next) %>
12 <%= l(:label_next) %>
13 <% end -%>
13 <% end -%>
14 &#187;&nbsp;
14 &#187;&nbsp;
15
15
16 <% form_tag({:controller => 'repositories', :action => 'revision', :id => @project, :rev => nil}, :method => :get) do %>
16 <% form_tag({:controller => 'repositories', :action => 'revision', :id => @project, :rev => nil}, :method => :get) do %>
17 <%= text_field_tag 'rev', @rev, :size => 5 %>
17 <%= text_field_tag 'rev', @rev, :size => 5 %>
18 <%= submit_tag 'OK', :name => nil %>
18 <%= submit_tag 'OK', :name => nil %>
19 <% end %>
19 <% end %>
20 </div>
20 </div>
21
21
22 <h2><%= l(:label_revision) %> <%= format_revision(@changeset.revision) %></h2>
22 <h2><%= l(:label_revision) %> <%= format_revision(@changeset.revision) %></h2>
23
23
24 <p><% if @changeset.scmid %>ID: <%= @changeset.scmid %><br /><% end %>
24 <p><% if @changeset.scmid %>ID: <%= @changeset.scmid %><br /><% end %>
25 <span class="author"><%= authoring(@changeset.committed_on, @changeset.author) %></span></p>
25 <span class="author"><%= authoring(@changeset.committed_on, @changeset.author) %></span></p>
26
26
27 <%= textilizable @changeset.comments %>
27 <%= textilizable @changeset.comments %>
28
28
29 <% if @changeset.issues.any? %>
29 <% if @changeset.issues.any? %>
30 <h3><%= l(:label_related_issues) %></h3>
30 <h3><%= l(:label_related_issues) %></h3>
31 <ul>
31 <ul>
32 <% @changeset.issues.each do |issue| %>
32 <% @changeset.issues.each do |issue| %>
33 <li><%= link_to_issue issue %>: <%=h issue.subject %></li>
33 <li><%= link_to_issue issue %>: <%=h issue.subject %></li>
34 <% end %>
34 <% end %>
35 </ul>
35 </ul>
36 <% end %>
36 <% end %>
37
37
38 <% if User.current.allowed_to?(:browse_repository, @project) %>
38 <h3><%= l(:label_attachment_plural) %></h3>
39 <h3><%= l(:label_attachment_plural) %></h3>
39 <ul id="changes-legend">
40 <ul id="changes-legend">
40 <li class="change change-A"><%= l(:label_added) %></li>
41 <li class="change change-A"><%= l(:label_added) %></li>
41 <li class="change change-M"><%= l(:label_modified) %></li>
42 <li class="change change-M"><%= l(:label_modified) %></li>
42 <li class="change change-C"><%= l(:label_copied) %></li>
43 <li class="change change-C"><%= l(:label_copied) %></li>
43 <li class="change change-R"><%= l(:label_renamed) %></li>
44 <li class="change change-R"><%= l(:label_renamed) %></li>
44 <li class="change change-D"><%= l(:label_deleted) %></li>
45 <li class="change change-D"><%= l(:label_deleted) %></li>
45 </ul>
46 </ul>
46
47
47 <p><%= link_to(l(:label_view_diff), :action => 'diff', :id => @project, :path => "", :rev => @changeset.revision) if @changeset.changes.any? %></p>
48 <p><%= link_to(l(:label_view_diff), :action => 'diff', :id => @project, :path => "", :rev => @changeset.revision) if @changeset.changes.any? %></p>
48
49
49 <div class="changeset-changes">
50 <div class="changeset-changes">
50 <%= render_changeset_changes %>
51 <%= render_changeset_changes %>
51 </div>
52 </div>
53 <% end %>
52
54
53 <% content_for :header_tags do %>
55 <% content_for :header_tags do %>
54 <%= stylesheet_link_tag "scm" %>
56 <%= stylesheet_link_tag "scm" %>
55 <% end %>
57 <% end %>
56
58
57 <% html_title("#{l(:label_revision)} #{@changeset.revision}") -%>
59 <% html_title("#{l(:label_revision)} #{@changeset.revision}") -%>
General Comments 0
You need to be logged in to leave comments. Login now