diff options
| author | Lars Hjemli <hjemli@gmail.com> | 2007-05-09 00:48:09 +0200 | 
|---|---|---|
| committer | Lars Hjemli <hjemli@gmail.com> | 2007-05-09 00:48:09 +0200 | 
| commit | ca8eb8fc8f71ee0a40015c323619f776840b6503 (patch) | |
| tree | f74a114ba19c215bffe8362bf8e63495155ebef4 /ui-view.c | |
| parent | ui-view: show pathname if specified in querystring (diff) | |
| download | cgit-ca8eb8fc8f71ee0a40015c323619f776840b6503.tar.gz cgit-ca8eb8fc8f71ee0a40015c323619f776840b6503.tar.bz2 cgit-ca8eb8fc8f71ee0a40015c323619f776840b6503.zip | |
Add support for downloading single blobs
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to '')
| -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)  	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); | 
