- gitlist.git
- twig
- commit.twig
This file ( 6kB ) 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 %}P3X GitList{% endblock %}
{% block content %}
<script type="text/javascript">
window.gitlist.lastload = Date.now();
</script>
<div class="p3x-gitlist-overlay">
<div>
<i class="fas fa-cog fa-spin fa-3x"></i>
</div>
<br/>
<div>
Loading a big commit ...
</div>
</div>
{% embed 'breadcrumb.twig' with {breadcrumbs: [{dir: "Commit #{commit.hash}", path:''}]} %}
{% block right %}
<a class="btn btn-info btn-sm" 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>
{% endblock %}
{% endembed %}
<div class="panel panel-default">
<div class="panel-heading">
<div class="media">
<div class="media-left">
<a>
<img class="media-object" src="{{ avatar(commit.author.email, 32) }}"/>
</a>
</div>
<div class="media-body">
<h4 class="media-heading" id="p3x-git-commit-heading">
{{ commit.message }}
{% if commit.body is not empty %}
{{ commit.body }}
{% endif %}
</h4>
<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 %}
</div>
</div>
</div>
<div class="panel-body">
Showing {{ commit.changedFiles }} changed files
</div>
<ul class="list-group">
{% for diff in commit.diffs %}
<li class="list-group-item">
<!--<div class="pull-right">{{ diff.index }}</div>-->
<i class="far fa-file-alt"></i>
<a id="{{ diff.file | to_id }}" href="#p3x-gitlist-diff-{{ loop.index }}">{{ diff.file }}</a>
</li>
{% endfor %}
</ul>
</div>
<div role="alert" class="alert-dismissable alert alert-warning">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span
aria-hidden="true">×</span></button>
The diffs are not showing by default, because it costs a lot of computing.
</div>
{% for diff in commit.diffs %}
<div class="pull-right">
<a href="{{ path('commits', {repo: repo, commitishPath: commit.hash ~ '/' ~ diff.file}) }}"
class="btn btn-primary 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-primary btn-sm"><span class="fas fa-file-alt"></span> View file
@ {{ commit.shortHash }}</a>
</div>
<a id="p3x-gitlist-diff-{{ loop.index }}" href="#{{ diff.file | to_id }}">{{ diff.file }}</a>
<div class="p3x-gitlist-breadcrumb-divider"></div>
<div class="panel panel-default" id="p3x-gitlist-diff-data-{{ loop.index }}" style="cursor: pointer;">
<div class="panel-body" style="text-align: center;">
Click to load this diff ...
</div>
</div>
<div class="p3x-gitlist-diff-container" data-diff-ref="p3x-gitlist-diff-{{ loop.index }}"
data-diff-id="p3x-gitlist-diff-data-{{ loop.index }}" style="display: none;">
<div class="p3x-gitlist-diff">
<table>
{% for line in diff.getLines %}
<tr>
<td class="lineNo">
{% if line.getType != 'chunk' %}
<!-- <a id="{{ diff.index | to_id }}L{{ loop.index }}R{{ line.getNumOld }}"></a> -->
<!-- <a href="#{{ diff.index | to_id }}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="{{ diff.index | to_id }}L{{ loop.index }}L{{ line.getNumNew }}"></a> -->
<!-- <a href="#{{ diff.index | to_id }}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>
<div class="p3x-gitlist-breadcrumb-divider"></div>
{% endfor %}
{% endblock %}