Config: decrease default 'summary_shortlog' to 15.
[viewgit.git] / templates / shortlog.php
blob2410f2d0bd4a50ebc898d39a52b42e529caa5c09
1 <h1><a href="<?php echo makelink(array('a' => 'shortlog', 'p' => $page['project'])); ?>">Shortlog</a></h1>
3 <table class="shortlog">
4 <thead>
5 <tr>
6 <th class="date">Date</th>
7 <th class="author">Author</th>
8 <th class="message">Message</th>
9 <th class="actions">Actions</th>
10 </tr>
11 </thead>
12 <tbody>
13 <?php
14 $page['lasthash'] = 'HEAD';
15 foreach ($page['shortlog'] as $l) {
16 $tr_class = $tr_class=="odd" ? "even" : "odd";
17 echo "<tr class=\"$tr_class\">\n";
18 echo "\t<td>$l[date]</td>\n";
19 echo "\t<td>". htmlentities_wrapper($l['author']) ."</td>\n";
20 echo "\t<td><a href=\"". makelink(array('a' => 'commit', 'p' => $page['project'], 'h' => $l['commit_id'])) ."\">". htmlentities_wrapper($l['message']) ."</a>";
21 if (count($l['refs']) > 0) {
22 foreach ($l['refs'] as $ref) {
23 $parts = explode('/', $ref);
24 $shortref = join('/', array_slice($parts, 1));
25 $type = 'head';
26 if ($parts[0] == 'tags') { $type = 'tag'; }
27 elseif ($parts[0] == 'remotes') { $type = 'remote'; }
28 echo "<span class=\"label $type\" title=\"$ref\">$shortref</span>";
31 echo "</td>\n";
32 echo "\t<td>";
33 echo "<a href=\"". makelink(array('a' => 'commitdiff', 'p' => $page['project'], 'h' => $l['commit_id'])) ."\" class=\"cdiff_link\" title=\"Commit Diff\">commitdiff</a>";
34 echo " <a href=\"". makelink(array('a' => 'tree', 'p' => $page['project'], 'h' => $l['tree'], 'hb' => $l['commit_id'])) ."\" class=\"tree_link\" title=\"Tree\">tree</a>";
35 echo " <a href=\"". makelink(array('a' => 'archive', 'p' => $page['project'], 'h' => $l['tree'], 't' => 'targz')) ."\" rel=\"nofollow\" class=\"tar_link\" title=\"tar/gz\">tar/gz</a>";
36 echo " <a href=\"". makelink(array('a' => 'archive', 'p' => $page['project'], 'h' => $l['tree'], 't' => 'zip')) ."\" rel=\"nofollow\" class=\"zip_link\" title=\"zip\">zip</a>";
37 echo " <a href=\"". makelink(array('a' => 'patch', 'p' => $page['project'], 'h' => $l['commit_id'])) ."\" class=\"patch_link\" title=\"Patch\">patch</a>";
38 echo "</td>\n";
39 echo "</tr>\n";
40 $page['lasthash'] = $l['commit_id'];
43 </tbody>
44 </table>
47 <?php
48 if ($page['lasthash'] !== 'HEAD') {
49 echo "<p><a href=\"". makelink(array('a' => 'shortlog', 'p' => $page['project'], 'h' => $page['lasthash'])) ."\">More...</a></p>";