forked from klaussilveira/gitlist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
commits_list.twig
40 lines (39 loc) · 1.28 KB
/
commits_list.twig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{% if commits %}
{% for date, commit in commits %}
<table class="table table-striped table-bordered">
<thead>
<tr>
<th colspan="3">{{ date | date("F j, Y") }}</th>
</tr>
</thead>
<tbody>
{% for item in commit %}
<tr>
<td width="5%"><img src="https://gravatar.com/avatar/{{ item.author.email | lower | md5 }}?s=40" /></td>
<td width="95%">
<span class="pull-right"><a class="btn btn-small" href="{{ path('commit', {repo: repo, commit: item.hash}) }}"><i class="icon-list-alt"></i> View {{ item.shortHash }}</a></span>
<h4>{{ item.message }}</h4>
<span><a href="mailto:{{ item.author.email }}">{{ item.author.name }}</a> authored on {{ item.date | date('d/m/Y \\a\\t H:i:s') }}</span>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endfor %}
{% else %}
<p>No results found.</p>
{% endif %}
{% if page != 'searchcommits' %}
<ul class="pager">
{% if pager.current != 0 %}
<li class="previous">
<a href="?page={{ pager.previous }}">← Newer</a>
</li>
{% endif %}
{% if pager.current != pager.last %}
<li class="next">
<a href="?page={{ pager.next }}">Older →</a>
</li>
{% endif %}
</ul>
{% endif %}