diff options
author | Alberto Bertogli <albertito@blitiri.com.ar> | 2012-09-16 12:17:56 +0200 |
---|---|---|
committer | Alberto Bertogli <albertito@blitiri.com.ar> | 2012-11-10 18:49:54 +0100 |
commit | 80ef0017d47f536bf2c8c6af4b514efa50071a23 (patch) | |
tree | db630a50bf30abca5a62cd206d8bc9abed61b4e0 /views/commit-list.html | |
download | git-arr-fork-80ef0017d47f536bf2c8c6af4b514efa50071a23.zip |
Initial commit0.01
Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
Diffstat (limited to 'views/commit-list.html')
-rw-r--r-- | views/commit-list.html | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/views/commit-list.html b/views/commit-list.html new file mode 100644 index 0000000..3af9838 --- /dev/null +++ b/views/commit-list.html @@ -0,0 +1,47 @@ + +% def refs_to_html(refs): +% for ref in refs: +% c = ref.split('/', 2) +% if len(c) != 3: +% return +% end +% if c[1] == 'heads': +<span class="refs head">{{c[2]}}</span> +% elif c[1] == 'tags': +% if c[2].endswith('^{}'): +% c[2] = c[2][:-3] +% end +<span class="refs tag">{{c[2]}}</span> +% end +% end +% end + +<table class="nice commits"> + +% refs = repo.refs() +% if not defined("commits"): +% commits = repo.commits(start_ref, limit = limit, offset = offset) +% end + +% for c in commits: +<tr> + <td class="date"> + <span title="{{c.author_date.str}}">{{c.author_date.utc.date()}}</span> + </td> + <td class="subject"> + <a href="{{repo_root}}/c/{{c.id}}/" + title="{{c.subject}}"> + {{shorten(c.subject)}}</a> + </td> + <td class="author"> + <span title="{{c.author_name}}">{{shorten(c.author_name, 26)}}</span> + </td> + % if c.id in refs: + <td> + % refs_to_html(refs[c.id]) + </td> + % end +</tr> +% end +</table> + |