Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

118 lines (111 sloc) 4.439 kb
<%= js_bundle(:commit_app_js) %>
<%= js_bundle(:commit_vendor_js) %>
<script id="context-expander-template" type="text/x-mustache-template">
<%= MustacheRenderer.context_expander_source %>
</script>
<% line_length = current_user ? current_user.line_length || 110 : 110 %>
<% default_to_side_by_side = current_user ? current_user.default_to_side_by_side : false %>
<div id="commit" sha="<%= commit.sha %>" repo="<%= commit.git_repo.name %>" margin-size="<%= line_length %>"
data-default-to-side-by-side="<%= default_to_side_by_side %>">
<div id="center">
<div id="commitMetadata" class="embossedPanel">
<div id="messageAndAuthor">
<div id="messageMetadata">
<p class="name">
<span class="sha"><%= commit.sha %></span>
<span class="repoName">| <%= commit.git_repo.name %></span>
</p>
<p class="message"><%= commit.filter_message %></p>
</div>
<div id="authorMetadata">
<div class="avatar"><img src="<%= commit.grit_commit.author.gravatar %>" /></div>
<div class="authorInfo">
<p class="author"><%= commit.grit_commit.author.name %></p>
<p class="email"><%= commit.grit_commit.author.email %></p>
<p class="date">
<span class="north" rel="tipsy" title="<%= commit.date.strftime("%Y-%m-%d %H:%M:%S") %>">
<%= commit.date.to_pretty %>
</span>
</p>
</div>
</div>
</div>
<div id="metadataButtons">
<div id="approvalGroup">
<% if current_user %>
<% if commit.approved? %>
<button id="disapproveButton" class="fancy" title="ಠ_ಠ">Disapprove Commit</button>
<% else %>
<button id="approveButton" class="fancy">Approve Commit</button>
<% end %>
<% end %>
<% if commit.approved? %>
<%= erb :_approved_banner, :layout => false, :locals => { :commit => commit } %>
<% end %>
</div>
<div id="minorButtons">
<% if current_user %>
<button id="requestReviewButton" class="standard">Request Review</button>
<% end %>
<button id="sideBySideButton" class="standard">View Side-By-Side</button>
<button id="hideCommentButton" class="standard">Hide comments</button>
</div>
</div>
</div>
<div id="reviewRequestContainer">
<div id="reviewRequest" animatingDirection="in">
<div id="requestInput">
<label>Request reviews from</label>
<input id="authorInput" type="text" />
<button class="standard">Send</button>
</div>
<div id="requestSubmitted">
<p>Review requests emailed to<span></span></p>
</div>
</div>
</div>
<div id="commitSummary">
<table id="filesChanged">
<tr><th></th><th>+</th><th>-</th></tr>
<% tagged_diff.each do |diff| %>
<tr>
<td class="path">
<a href="#<%= diff.file_name_before %>">
<%= StringFilter.truncate_front(diff.display_file_name, 100) %>
</a>
</td>
<td class="linesAdded"><%= diff.lines_added if diff.lines_added > 0%></td>
<td class="linesRemoved"><%= diff.lines_removed if diff.lines_removed > 0%></td>
</tr>
<% end %>
<% added, removed = [:lines_added, :lines_removed].map { |m| tagged_diff.map(&m).reduce(&:+) } %>
<tr class="total" >
<td class="path">Total</td>
<td class="linesAdded"><%= added %></td>
<td class="linesRemoved"><%= removed %></td>
</tr>
</table>
</div>
<% tagged_diff.each do |file| %>
<%= erb :_diff, :locals => { :commit => commit, :file => file } %>
<br/>
<% end %>
<div class="comments">
<% commit.comments.each do |comment| %>
<%= erb :_comment, :locals => { :comment => comment } %>
<% end %>
</div>
<% if current_user %>
<div id="commitComments">
<%= erb :_comment_form, :locals => {
:repo_name => commit.git_repo.name,
:sha => commit.sha,
:filename => nil,
:line_number => nil
} %>
</div>
<% else %>
<div id="signinPrompt" class="commit"><a href="/signin">Sign in</a> to post a comment.</div>
<% end %>
</div>
</div>
Jump to Line
Something went wrong with that request. Please try again.