summaryrefslogtreecommitdiffstats
path: root/app/views/repositories/_changeset.html.erb
blob: 5809be241d05f0ea4056622f703b92d1e6d6bdc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<h2><%= l(:label_revision) %> <%= format_revision(@changeset) %></h2>

<div class="details">
  <h4>
    <%= avatar(@changeset.user, :size => "24") %>
    <%= authoring(@changeset.committed_on, @changeset.author) %>
  </h4>
  <% if @changeset.scmid.present? || @changeset.parents.present? || @changeset.children.present? %>
  <ul class="revision-info">
    <% if @changeset.scmid.present? %>
      <li>
        <strong>ID </strong><%= @changeset.scmid %>
      </li>
    <% end %>
    <% if @changeset.parents.present? %>
      <li>
        <strong><%= l(:label_parent_revision) %></strong>
          <%= @changeset.parents.collect{
                |p| link_to_revision(p, @repository, :text => format_revision(p))
              }.join(", ").html_safe %>
      </li>
    <% end %>
    <% if @changeset.children.present? %>
      <li>
        <strong><%= l(:label_child_revision) %></strong>
         <%= @changeset.children.collect{
                |p| link_to_revision(p, @repository, :text => format_revision(p))
               }.join(", ").html_safe %>
      </li>
    <% end %>
  </ul>
  <% end %>

</div>

<div class="wiki changeset-comments">
  <%= format_changeset_comments @changeset %>
</div>

<% if @changeset.issues.visible.any? || User.current.allowed_to?(:manage_related_issues, @repository.project) %>
  <%= render :partial => 'related_issues' %>
<% end %>

<% if User.current.allowed_to?(:browse_repository, @repository.project) %>
<%
tabs = []
tabs << { name: 'revision', label: :label_change_plural,
          url: { :action => 'revision',
                 :id     => @project,
                 :repository_id => @repository.identifier_param,
                 :path   => nil,
                 :rev    => @changeset.identifier}
        }

tabs << { name: 'diff', label: :label_view_diff,
          url: { :action => 'diff',
                 :id     => @project,
                 :repository_id => @repository.identifier_param,
                 :path   => "",
                 :rev    => @changeset.identifier }
        } if action_name == 'diff' || @changeset.filechanges.any?
%>

<%= render :partial => 'common/tabs', :locals => {:tabs => tabs, :selected_tab => action_name} %>
<% end %>