- gitlist.git
- themes
- bootstrap
- twig
- commit.twig
This file ( 4kB ) exceeds the allowed full mode (48 kb) size.
The editor full hight is disabled, only scrolling is allowed..
If you wish to edit a file, it is recommended to use the scroll mode as some users do not like the full height
mode, although some users like it.
{% extends 'layout_page.twig' %}
{% set page = 'commits' %}
{% block title %}GitList{% endblock %}
{% block content %}
{% include 'breadcrumb.twig' with {breadcrumbs: [{dir: "Commit #{commit.hash}", path:''}]} %}
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="javascript:;" onclick="document.location.hash='#';">{{ commit.message }}</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li>
<a href="{{ path('branch', {repo: repo, branch: commit.hash}) }}" title="Browse code at this point in history"><span class="fa fa-list-alt"></span> Browse code</a>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<div class="commit-view">
<div class="commit-body">
{% if commit.body is not empty %}
<p>{{ commit.body | nl2br }}</p>
{% endif %}
<img src="{{ avatar(commit.author.email, 32) }}" class="pull-left space-right" />
<span>
<a href="mailto:{{ commit.author.email }}">{{ commit.author.name }}</a> authored on {{ commit.date | format_date }}
{% if commit.author.email != commit.commiter.email %}
• <a href="mailto:{{ commit.commiter.email }}">{{ commit.commiter.name }}</a> committed on {{ commit.commiterDate | format_date }}
{% endif %}
<br />Showing {{ commit.changedFiles }} changed files
</span>
</div>
</div>
<ul class="commit-list">
{% for diff in commit.diffs %}
<li><i class="fa fa-file-text-o"></i> <a href="#diff-{{ loop.index }}">{{ diff.file }}</a> <span class="meta pull-right">{{ diff.index }}</span></li>
{% endfor %}
</ul>
{% for diff in commit.diffs %}
<br/>
<div class="btn-group pull-right">
<a href="{{ path('commits', {repo: repo, commitishPath: commit.hash ~ '/' ~ diff.file}) }}" class="btn btn-default btn-sm"><span class="fa fa-list-alt"></span> History</a>
<a href="{{ path('blob', {repo: repo, commitishPath: commit.hash ~'/' ~ diff.file}) }}" class="btn btn-default btn-sm"><span class="fa fa-file"></span> View file @ {{ commit.shortHash }}</a>
</div>
<div style="clear: both; height: 5px;"></div>
<div class="source-view">
<div class="source-header">
<div class="meta"><a id="diff-{{ loop.index }}">{{ diff.file }}</div>
</div>
<div class="source-diff">
<table>
{% for line in diff.getLines %}
<tr>
<td class="lineNo">
{% if line.getType != 'chunk' %}
<a id="L{{ loop.index }}R{{ line.getNumOld }}"></a>
<a href="#L{{ loop.index }}R{{ line.getNumOld }}">
{% endif %}
{{ line.getNumOld }}
{% if line.getType != 'chunk' %}
</a>
{% endif %}
</td>
<td class="lineNo">
{% if line.getType != 'chunk' %}
<a id="L{{ loop.index }}L{{ line.getNumNew }}"></a>
<a href="#L{{ loop.index }}L{{ line.getNumNew }}">
{% endif %}
{{ line.getNumNew }}
{% if line.getType != 'chunk' %}
</a>
{% endif %}
</td>
<td style="width: 100%">
<pre{% if line.getType %} class="{{ line.getType }}"{% endif %}>{{ line.getLine }}</pre>
</td>
</tr>
{% endfor %}
</table>
</div>
</div>
{% endfor %}
{% endblock %}