History

ui-tag: add snapshot links

Alexey Nezhdanov committed 17 years ago

Commit 8cdccac1 parent 121898e1 file · +12 −0Browse files

Unified · Split

ui-tag.c+12−0
@@ -30,6 +30,14 @@ static void print_tag_content(char *buf) · 29 unmodified lines
3030 }
3131 }
3232
33+void print_download_links(char *revname)
34+{
35+ html("<tr><th>download</th><td class='sha1'>");
36+ cgit_print_snapshot_links(ctx.qry.repo, ctx.qry.head,
37+ revname, ctx.repo->snapshots);
38+ html("</td></tr>");
39+}
40+
3341 void cgit_print_tag(char *revname)
3442 {
3543 unsigned char sha1[20];
@@ -76,6 +84,8 @@ void cgit_print_tag(char *revname) · 40 unmodified lines
7684 html("<tr><td>Tagged object</td><td>");
7785 cgit_object_link(tag->tagged);
7886 html("</td></tr>\n");
87+ if (ctx.repo->snapshots)
88+ print_download_links(revname);
7989 html("</table>\n");
8090 print_tag_content(info->msg);
8191 } else {
@@ -86,6 +96,8 @@ void cgit_print_tag(char *revname) · 4 unmodified lines
8696 html("<tr><td>Tagged object</td><td>");
8797 cgit_object_link(obj);
8898 html("</td></tr>\n");
99+ if (ctx.repo->snapshots)
100+ print_download_links(revname);
89101 html("</table>\n");
90102 }
91103 return;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t