X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/61c3ca978c586c673aec618cb94210657278dda8..57f6a8bf0de6c112cabc1d8e20ade2698bd886b7:/ui-view.c diff --git a/ui-view.c b/ui-view.c index 9d23c45..dbe4b29 100644 --- a/ui-view.c +++ b/ui-view.c @@ -8,7 +8,7 @@ #include "cgit.h" -void cgit_print_view(const char *hex) +void cgit_print_view(const char *hex, char *path) { unsigned char sha1[20]; enum object_type type; @@ -34,8 +34,20 @@ void cgit_print_view(const char *hex) buf[size] = '\0'; html("\n"); - htmlf("\n", - typename(type), hex, size); + html("\n"); html("\n");
%s %s, %li bytes
"); + if (path) + htmlf("%s (", path); + htmlf("%s %s, %li bytes", typename(type), hex, size); + if (path) + html(")"); + + html(" download"); + html("
\n"); html_txt(buf); html("\n