]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-view.c
Show time since last change on index page
[ps-cgit] / ui-view.c
index 7d022fdf501dc06b1bf9f641b29715466967d98a..dbe4b29d18dc8f799075d93b88b02662813e903f 100644 (file)
--- a/ui-view.c
+++ b/ui-view.c
@@ -40,6 +40,13 @@ void cgit_print_view(const char *hex, char *path)
        htmlf("%s %s, %li bytes", typename(type), hex, size);
        if (path)
                html(")");
+
+       html(" <a href='");
+       html_attr(cgit_pageurl(cgit_query_repo, "blob", 
+                              fmt("id=%s&path=%s", 
+                                  hex,
+                                  path)));
+       html("'>download</a>");
        html("</th></tr>\n");
        html("<tr><td class='blob'>\n");
        html_txt(buf);