aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorAlberto Bertogli <albertito@blitiri.com.ar>2013-11-02 23:18:33 +0100
committerAlberto Bertogli <albertito@blitiri.com.ar>2013-11-02 23:18:33 +0100
commite49c69da2e53c8938f4d58bd478bb68f060e3849 (patch)
tree360cfbebf9faf3d9a48847bfa5f594b11e8538cc /views
parent6764bfcfd6bfb5e1aafc777fea9cfe00139710f2 (diff)
downloadgit-arr-fork-e49c69da2e53c8938f4d58bd478bb68f060e3849.zip
Show the age of a repository in the index, via javascript
This patch adds the age of the repository to the index view, using javascript to give a nice human string for the age. When javascript is not available, the element remains hidden. Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
Diffstat (limited to 'views')
-rw-r--r--views/index.html4
1 files changed, 3 insertions, 1 deletions
diff --git a/views/index.html b/views/index.html
index b218b8b..7967a7c 100644
--- a/views/index.html
+++ b/views/index.html
@@ -5,9 +5,10 @@
<title>git</title>
<link rel="stylesheet" type="text/css" href="static/git-arr.css"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
+<script src="static/git-arr.js"></script>
</head>
-<body class="index">
+<body class="index" onload="replace_timestamps()">
<h1>git</h1>
<table class="nice">
@@ -20,6 +21,7 @@
<tr>
<td><a href="r/{{repo.name}}/">{{repo.name}}</a></td>
<td><a href="r/{{repo.name}}/">{{repo.info.desc}}</a></td>
+ <td><span class="age">{{repo.last_commit_timestamp()}}</span></td>
</tr>
%end
</table>