author | Lars Hjemli <hjemli@gmail.com> | 2008-02-23 21:45:33 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2008-03-18 07:13:10 (UTC) |
commit | b1f9b9c1459cb9a30ebf80721aff6ef788d1f891 (patch) (unidiff) | |
tree | 05796a741faef90c12aadd3a5c92b702ec870c48 /ui-refs.c | |
parent | b88fb016d0209f7041ac7d3b4d2c077318407a4d (diff) | |
download | cgit-b1f9b9c1459cb9a30ebf80721aff6ef788d1f891.zip cgit-b1f9b9c1459cb9a30ebf80721aff6ef788d1f891.tar.gz cgit-b1f9b9c1459cb9a30ebf80721aff6ef788d1f891.tar.bz2 |
Introduce html.h
All html-functions can be quite easily separated from the rest of cgit, so
lets do it; the only issue was html_filemode which uses some git-defined
macros so the function is moved into ui-shared.c::cgit_print_filemode().
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | ui-refs.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -1,30 +1,28 @@ | |||
1 | /* ui-refs.c: browse symbolic refs | 1 | /* ui-refs.c: browse symbolic refs |
2 | * | 2 | * |
3 | * Copyright (C) 2006 Lars Hjemli | 3 | * Copyright (C) 2006 Lars Hjemli |
4 | * | 4 | * |
5 | * Licensed under GNU General Public License v2 | 5 | * Licensed under GNU General Public License v2 |
6 | * (see COPYING for full license text) | 6 | * (see COPYING for full license text) |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include "cgit.h" | 9 | #include "cgit.h" |
10 | 10 | #include "html.h" | |
11 | |||
12 | |||
13 | 11 | ||
14 | void cgit_print_refs() | 12 | void cgit_print_refs() |
15 | { | 13 | { |
16 | 14 | ||
17 | html("<table class='list nowrap'>"); | 15 | html("<table class='list nowrap'>"); |
18 | 16 | ||
19 | if (ctx.qry.path && !strncmp(ctx.qry.path, "heads", 5)) | 17 | if (ctx.qry.path && !strncmp(ctx.qry.path, "heads", 5)) |
20 | cgit_print_branches(0); | 18 | cgit_print_branches(0); |
21 | else if (ctx.qry.path && !strncmp(ctx.qry.path, "tags", 4)) | 19 | else if (ctx.qry.path && !strncmp(ctx.qry.path, "tags", 4)) |
22 | cgit_print_tags(0); | 20 | cgit_print_tags(0); |
23 | else { | 21 | else { |
24 | cgit_print_branches(0); | 22 | cgit_print_branches(0); |
25 | html("<tr class='nohover'><td colspan='4'> </td></tr>"); | 23 | html("<tr class='nohover'><td colspan='4'> </td></tr>"); |
26 | cgit_print_tags(0); | 24 | cgit_print_tags(0); |
27 | } | 25 | } |
28 | 26 | ||
29 | html("</table>"); | 27 | html("</table>"); |
30 | } | 28 | } |