Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.zx2c4.com/cgit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Hjemli <hjemli@gmail.com>2007-05-09 02:48:09 +0400
committerLars Hjemli <hjemli@gmail.com>2007-05-09 02:48:09 +0400
commitca8eb8fc8f71ee0a40015c323619f776840b6503 (patch)
treef74a114ba19c215bffe8362bf8e63495155ebef4 /ui-view.c
parent7250a154678477a1e8260efbc9810ec389754ef9 (diff)
Add support for downloading single blobs
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'ui-view.c')
-rw-r--r--ui-view.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ui-view.c b/ui-view.c
index 7d022fd..dbe4b29 100644
--- 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);