diff options
| author | 2007-05-09 07:48:09 (JST) | |
|---|---|---|
| committer | 2007-05-09 07:48:09 (JST) | |
| commit | ca8eb8fc8f71ee0a40015c323619f776840b6503 (patch) | |
| tree | f74a114ba19c215bffe8362bf8e63495155ebef4 /ui-view.c | |
| parent | 7250a154678477a1e8260efbc9810ec389754ef9 (diff) | |
| download | cgit-ca8eb8fc8f71ee0a40015c323619f776840b6503.zip cgit-ca8eb8fc8f71ee0a40015c323619f776840b6503.tar.gz | |
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.c | 7 |
1 files changed, 7 insertions, 0 deletions
| @@ -40,6 +40,13 @@ void cgit_print_view(const char *hex, char *path) | |||
| 40 | htmlf("%s %s, %li bytes", typename(type), hex, size); | 40 | htmlf("%s %s, %li bytes", typename(type), hex, size); |
| 41 | if (path) | 41 | if (path) |
| 42 | html(")"); | 42 | html(")"); |
| 43 | |||
| 44 | html(" <a href='"); | ||
| 45 | html_attr(cgit_pageurl(cgit_query_repo, "blob", | ||
| 46 | fmt("id=%s&path=%s", | ||
| 47 | hex, | ||
| 48 | path))); | ||
| 49 | html("'>download</a>"); | ||
| 43 | html("</th></tr>\n"); | 50 | html("</th></tr>\n"); |
| 44 | html("<tr><td class='blob'>\n"); | 51 | html("<tr><td class='blob'>\n"); |
| 45 | html_txt(buf); | 52 | html_txt(buf); |
