Removing the parsing of shas from the commit msg
[gitorious:yousource.git] / app / views / merge_request_versions / _merge_request_version.html.erb
1 <%
2 #--
3 #   Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
4 #
5 #   This program is free software: you can redistribute it and/or modify
6 #   it under the terms of the GNU Affero General Public License as published by
7 #   the Free Software Foundation, either version 3 of the License, or
8 #   (at your option) any later version.
9 #
10 #   This program is distributed in the hope that it will be useful,
11 #   but WITHOUT ANY WARRANTY; without even the implied warranty of
12 #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 #   GNU Affero General Public License for more details.
14 #
15 #   You should have received a copy of the GNU Affero General Public License
16 #   along with this program.  If not, see <http://www.gnu.org/licenses/>.
17 #++
18 %>
19
20 <% if @commit -%>
21 <div class="commit-infobox">
22   <div class="commit-meta">
23     <ul class="people">
24       <li class="avatar">
25         <div>
26           <%= avatar_from_email(@commit.committer.email, { :size => 32 }) %>
27         </div>
28       </li>
29       <li>
30         <%=h @commit.committer.name -%>
31         <%= render_email(@commit.committer.email) -%>
32         <% if @commit.committer != @commit.author -%>
33           <small>(<%= t("views.commits.committer") %>)</small>
34         <% end -%>
35       </li>
36       <li class="meta"><%=h time_ago_in_words @commit.committed_date -%> ago</li>
37       <% if @commit.committer != @commit.author -%>
38         <li class="clear"></li>
39         <li class="avatar">
40           <div>
41             <%= avatar_from_email(@commit.author.email, { :size => 32 }) %>
42           </div>
43         </li>
44         <li>
45             <%=h @commit.author.name -%>
46             <%= render_email(@commit.author.email) -%>
47           <small>(<%= t("views.commits.author") %>)</small>
48         </li>
49         <li class="meta"><%=h time_ago_in_words @commit.authored_date -%> ago</li>
50       <% end -%>
51     </ul>
52   </div>
53   <pre class="commit_message"><%= h(@commit.message) -%></pre>
54 </div>
55 <% end -%>
56
57 <div class="file-diff-controls">
58   <small><a href="#" id="expand-all">expand all</a> / 
59   <a href="#" id="collapse-all">collapse all</a></small>
60 </div>
61
62 <% diffs.each do |file| -%>
63 <% diff_renderer = Diff::Display::Unified.new(file.diff) %>
64 <div class="file-diff">
65   <div class="header round-top-10 closed">
66     <span class="title">
67       <span class="icon"></span><%= h(file.a_path) -%>
68     </span>
69     <div class="diff-stats"><%= render_compact_diff_stats(diff_renderer.stats) -%></div>
70   </div>
71   <div class="diff-hunks" style="display:none">
72     <%= render_inline_diff(file.diff, diff_renderer) -%>
73   </div>
74 </div>
75 <% end -%>