Add last commit message to index page.
[viewgit.git] / templates / index.php
blob55b334451a8667687460186a64402e981efecf4a
2 <table>
3 <thead>
4 <tr>
5 <th>Project</th>
6 <th>Description</th>
7 <th>Last Commit</th>
8 <th>Last Change</th>
9 <th>Actions</th>
10 </tr>
11 </thead>
12 <tbody>
13 <?php
14 foreach ($page['projects'] as $p) {
15 $tr_class = $tr_class=="odd" ? "even" : "odd";
16 echo "<tr class=\"$tr_class\">\n";
17 echo "\t<td><a href=\"". makelink(array('a' => 'summary', 'p' => $p['name'])) ."\">$p[name]</a></td>\n";
18 echo "\t<td>". htmlentities_wrapper($p['description']) ."</td>\n";
19 echo "\t<td>". htmlentities_wrapper($p['message']) ."</td>\n";
20 echo "\t<td>". htmlentities_wrapper($p['head_datetime']) ."</td>\n";
21 echo "\t<td>";
22 echo "<a href=\"". makelink(array('a' => 'tree', 'p' => $p['name'], 'h' => $p['head_tree'], 'hb' => $p['head_hash'])) ."\" class=\"tree_link\" title=\"Tree\">tree</a>";
23 echo " <a href=\"". makelink(array('a' => 'archive', 'p' => $p['name'], 'h' => $p['head_tree'], 'hb' => $p['head_hash'], 't' => 'targz')) ."\" rel=\"nofollow\" class=\"tar_link\" title=\"tar/gz\">tar/gz</a>";
24 echo " <a href=\"". makelink(array('a' => 'archive', 'p' => $p['name'], 'h' => $p['head_tree'], 'hb' => $p['head_hash'], 't' => 'zip')) ."\" rel=\"nofollow\" class=\"zip_link\" title=\"zip\">zip</a>";
25 echo "</td>\n";
26 echo "</tr>\n";
29 </tbody>
30 </table>