-rw-r--r-- | ui-view.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -39,8 +39,15 @@ void cgit_print_view(const char *hex, char *path) htmlf("%s (", 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); html("\n</td></tr>\n"); |