templates/history.tmpl
browsing at commit = 55fa1ac0b398c748c7e2421b855a1606790cafc9
<% c++ #include "content.h" %>
<% c++ #include "util.h" %>
<% skin git %>
<% view log_view uses content::log_view extends master %>
<% template content_body() %>
<h1>log: <%= repo %></h1>
<% if (content.has_bodies) %>
<p class="log-controls"><button type="button" class="log-toggle" aria-pressed="false">expand: off</button></p>
<% end %>
<table class="log">
<% foreach c in commits %><% item %>
<tr>
<td class="commit"><a href="/repos/<%= repo %>/commit/<%= c.oid %>"><%= c.short_oid %></a></td>
<td class="msg"><a href="/repos/<%= repo %>/commit/<%= c.oid %>"><%= c.summary %></a>
<% if (c.body.length() > 0) %>
<pre class="commit-body" hidden><%= c.body %></pre>
<% end %>
</td>
<td class="author"><%= c.author_name %></td>
<td class="date"><% c++ out() << util::format_time(c.time); %></td>
</tr>
<% end item %><% empty %>
<tr><td>no commits</td></tr>
<% end %>
</table>
<% end template %>
<% end view %>
<% view object_view uses content::object_view extends master %>
<% template content_body() %>
<h1>object <%= object.oid %></h1>
<p class="meta">type: <%= object.type_name %></p>
<% if (content.object.kind == ObjectKind::Tree) %>
<table class="tree">
<% foreach e in object.entries %><% item %>
<tr>
<td class="name"><a href="/repos/<%= repo %>/object/<%= e.oid %>"><%= e.name %></a></td>
<td class="oid"><%= e.oid %></td>
</tr>
<% end item %><% end foreach %>
</table>
<% else %>
<pre class="code"><code><%= object.body %></code></pre>
<% end %>
<% end template %>
<% end view %>
<% view tags_view uses content::tags_view extends master %>
<% template content_body() %>
<h1>tags: <%= repo %></h1>
<table class="log">
<% foreach t in tags %><% item %>
<tr>
<td class="commit"><a href="/repos/<%= repo %>/commit/<%= t.target_oid %>"><%= t.short_oid %></a></td>
<td class="msg"><a href="/repos/<%= repo %>/tags/<%= t.name %>"><%= t.name %></a></td>
<td class="msg"><a href="/repos/<%= repo %>/tree/?id=<%= t.target_oid %>">browse files</a></td>
<td class="msg"><a href="/repos/<%= repo %>/tags/<%= t.name %>.tar.gz">download .tar.gz</a></td>
<td class="date"><% c++ out() << util::format_time(t.time); %></td>
</tr>
<% end item %><% empty %>
<tr><td>no tags</td></tr>
<% end %>
</table>
<% end template %>
<% end view %>
<% view tag_view uses content::tag_view extends master %>
<% template content_body() %>
<h1>tag: <%= tag.name %></h1>
<p class="meta">
<% if tag.annotated %>annotated<% else %>lightweight<% end %> ·
points to <a href="/repos/<%= repo %>/commit/<%= tag.target_oid %>"><%= tag.short_oid %></a>
· <% c++ out() << util::format_time(content.tag.time); %>
· <a href="/repos/<%= repo %>/tree/?id=<%= tag.target_oid %>">browse files</a>
· <a href="/repos/<%= repo %>/tags/<%= tag.name %>.tar.gz">download .tar.gz</a>
<% if (content.tag.tagger_name.length() > 0) %><br>tagger: <%= tag.tagger_name %><% end %>
</p>
<% if (content.tag.message.length() > 0) %>
<pre class="code"><code><%= tag.message %></code></pre>
<% end %>
<% end template %>
<% end view %>
<% view branches_view uses content::branches_view extends master %>
<% template content_body() %>
<h1>branches: <%= repo %></h1>
<table class="log">
<% foreach b in branches %><% item %>
<tr>
<td class="commit"><a href="/repos/<%= repo %>/commit/<%= b.target_oid %>"><%= b.short_oid %></a></td>
<td class="msg"><%= b.name %><% if b.is_default %> (default)<% end %></td>
<td class="msg"><a href="/repos/<%= repo %>/log/?id=<%= b.target_oid %>">log</a></td>
<td class="msg"><a href="/repos/<%= repo %>/tree/?id=<%= b.target_oid %>">browse files</a></td>
<td class="date"><% c++ out() << util::format_time(b.time); %></td>
</tr>
<% end item %><% empty %>
<tr><td>no branches</td></tr>
<% end %>
</table>
<% end template %>
<% end view %>
<% view commit_view uses content::commit_view extends master %>
<% template content_body() %>
<h1>commit <%= commit.short_oid %></h1>
<% if (not content.on_default_branch) %>
<% if (content.branches.size() > 0) %>
<p class="tags">branches: <% foreach b in branches %><% item %><a href="/repos/<%= repo %>/tree/?id=<%= b.target_oid %>"><%= b.name %></a> <% end item %><% end foreach %></p>
<% else %>
<p class="tags">not on any branch</p>
<% end %>
<% end %>
<p class="meta">
<%= commit.author_name %><% if (content.commit.author_email.length() > 0) %> <<%= commit.author_email %>><% end %> ·
<% c++ out() << util::format_time(content.commit.time); %><br>
<%= commit.oid %>
<a href="/repos/<%= repo %>/commit/<%= commit.oid %>.patch">patch</a>
· <a href="/repos/<%= repo %>/tree/?id=<%= commit.oid %>">browse files</a>
<% foreach p in commit.parents %><% item %><br>parent <a href="/repos/<%= repo %>/commit/<%= p %>"><%= p %></a><% end item %><% end foreach %>
</p>
<pre class="code"><code><%= commit.message %></code></pre>
<h2>Changed files</h2>
<table class="tree">
<% foreach f in commit.files %><% item %>
<tr>
<td class="status"><%= f.status %></td>
<td class="name">
<% if (f.status == 'D') %>
<%= f.path %>
<% else %>
<a href="/repos/<%= repo %>/tree/<%= f.path %>?id=<%= commit.oid %>"><%= f.path %></a>
<% end %>
<% if (content.commit.first_parent.length() > 0 and (f.status == 'M' or f.status == 'D')) %>
<a class="before" href="/repos/<%= repo %>/tree/<%= f.old_path %>?id=<%= commit.first_parent %>">before</a>
<% end %>
</td>
</tr>
<% end item %><% empty %>
<tr><td>no changes</td></tr>
<% end %>
</table>
<div class="diff">
<% foreach d in commit.diff %><% item %>
<div class="<%= d.css %>"><%= d.content %></div>
<% end item %><% end foreach %>
</div>
<% end template %>
<% end view %>
<% end skin %>