Project

General

Profile

Feature #4266 » add_changeset_comment_to_diff_page_v2.diff

compatible with r15012 - Go MAEDA, 2016-01-09 08:01

View differences:

app/views/repositories/_changeset.html.erb (working copy)
1
<h2><%= avatar(@changeset.user, :size => "24") %><%= l(:label_revision) %> <%= format_revision(@changeset) %></h2>
2

  
3
<div class="details">
4
  <% if @changeset.scmid.present? || @changeset.parents.present? || @changeset.children.present? %>
5
  <table class="revision-info">
6
    <% if @changeset.scmid.present? %>
7
      <tr>
8
        <td>ID</td><td><%= @changeset.scmid %></td>
9
      </tr>
10
    <% end %>
11
    <% if @changeset.parents.present? %>
12
      <tr>
13
        <td><%= l(:label_parent_revision) %></td>
14
        <td>
15
          <%= @changeset.parents.collect{
16
                |p| link_to_revision(p, @repository, :text => format_revision(p))
17
              }.join(", ").html_safe %>
18
        </td>
19
      </tr>
20
    <% end %>
21
    <% if @changeset.children.present? %>
22
      <tr>
23
        <td><%= l(:label_child_revision) %></td>
24
        <td>
25
         <%= @changeset.children.collect{
26
                |p| link_to_revision(p, @repository, :text => format_revision(p))
27
               }.join(", ").html_safe %>
28
        </td>
29
      </tr>
30
    <% end %>
31
  </table>
32
  <% end %>
33

  
34
  <p>
35
  <span class="author">
36
  <%= authoring(@changeset.committed_on, @changeset.author) %>
37
  </span>
38
  </p>
39
</div>
40

  
41
<%= textilizable @changeset.comments %>
42

  
43
<% if @changeset.issues.visible.any? || User.current.allowed_to?(:manage_related_issues, @repository.project) %>
44
  <%= render :partial => 'related_issues' %>
45
<% end %>
app/views/repositories/diff.html.erb (working copy)
1
<h2><%= l(:label_revision) %> <%= @diff_format_revisions %> <%=h @path %></h2>
1
<%= render :partial => 'changeset', :locals => {:repository => @repository, :changeset => @changeset} %>
2 2

  
3 3
<!-- Choose view type -->
4 4
<%= form_tag({:action => 'diff', :id => @project,
app/views/repositories/revision.html.erb (working copy)
26 26
  <% end %>
27 27
</div>
28 28

  
29
<h2><%= avatar(@changeset.user, :size => "24") %><%= l(:label_revision) %> <%= format_revision(@changeset) %></h2>
29
<%= render :partial => 'changeset', :locals => {:repository => @repository, :changeset => @changeset} %>
30 30

  
31
<div class="details">
32
  <% if @changeset.scmid.present? || @changeset.parents.present? || @changeset.children.present? %>
33
  <table class="revision-info">
34
    <% if @changeset.scmid.present? %>
35
      <tr>
36
        <td>ID</td><td><%= @changeset.scmid %></td>
37
      </tr>
38
    <% end %>
39
    <% if @changeset.parents.present? %>
40
      <tr>
41
        <td><%= l(:label_parent_revision) %></td>
42
        <td>
43
          <%= @changeset.parents.collect{
44
                |p| link_to_revision(p, @repository, :text => format_revision(p))
45
              }.join(", ").html_safe %>
46
        </td>
47
      </tr>
48
    <% end %>
49
    <% if @changeset.children.present? %>
50
      <tr>
51
        <td><%= l(:label_child_revision) %></td>
52
        <td>
53
         <%= @changeset.children.collect{
54
                |p| link_to_revision(p, @repository, :text => format_revision(p))
55
               }.join(", ").html_safe %>
56
        </td>
57
      </tr>
58
    <% end %>
59
  </table>
60
  <% end %>
61

  
62
  <p>
63
  <span class="author">
64
  <%= authoring(@changeset.committed_on, @changeset.author) %>
65
  </span>
66
  </p>
67
</div>
68

  
69
<%= textilizable @changeset.comments %>
70

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

  
75 31
<% if User.current.allowed_to?(:browse_repository, @project) %>
76 32
<h3><%= l(:label_attachment_plural) %></h3>
77 33
<ul id="changes-legend">
(8-8/8)