-rw-r--r-- | ui-repolist.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ui-repolist.c b/ui-repolist.c index a884c20..8724589 100644 --- a/ui-repolist.c +++ b/ui-repolist.c | |||
@@ -1,63 +1,63 @@ | |||
1 | /* ui-repolist.c: functions for generating the repolist page | 1 | /* ui-repolist.c: functions for generating the repolist page |
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 | ||
11 | void cgit_print_repolist(struct cacheitem *item) | 11 | void cgit_print_repolist(struct cacheitem *item) |
12 | { | 12 | { |
13 | struct repoinfo *repo; | 13 | struct repoinfo *repo; |
14 | int i; | 14 | int i; |
15 | char *last_group = NULL; | 15 | char *last_group = NULL; |
16 | 16 | ||
17 | cgit_print_docstart(cgit_root_title, item); | 17 | cgit_print_docstart(cgit_root_title, item); |
18 | cgit_print_pageheader(cgit_root_title, 0); | 18 | cgit_print_pageheader(cgit_root_title, 0); |
19 | 19 | ||
20 | html("<table class='list nowrap'>"); | 20 | html("<table class='list nowrap'>"); |
21 | html("<tr class='nohover'>" | 21 | html("<tr class='nohover'>" |
22 | "<th class='left'>Name</th>" | 22 | "<th class='left'>Name</th>" |
23 | "<th class='left'>Description</th>" | 23 | "<th class='left'>Description</th>" |
24 | "<th class='left'>Owner</th>" | 24 | "<th class='left'>Owner</th>" |
25 | "<th class='left'>Links</th></tr>\n"); | 25 | "<th class='left'>Links</th></tr>\n"); |
26 | 26 | ||
27 | for (i=0; i<cgit_repolist.count; i++) { | 27 | for (i=0; i<cgit_repolist.count; i++) { |
28 | repo = &cgit_repolist.repos[i]; | 28 | repo = &cgit_repolist.repos[i]; |
29 | if ((last_group == NULL && repo->group != NULL) || | 29 | if ((last_group == NULL && repo->group != NULL) || |
30 | (last_group != NULL && repo->group == NULL) || | 30 | (last_group != NULL && repo->group == NULL) || |
31 | (last_group != NULL && repo->group!= NULL && | 31 | (last_group != NULL && repo->group!= NULL && |
32 | strcmp(repo->group, last_group))) { | 32 | strcmp(repo->group, last_group))) { |
33 | html("<tr><td colspan='4' class='repogroup'>"); | 33 | html("<tr class='nohover'><td colspan='4' class='repogroup'>"); |
34 | html_txt(repo->group); | 34 | html_txt(repo->group); |
35 | html("</td></tr>"); | 35 | html("</td></tr>"); |
36 | last_group = repo->group; | 36 | last_group = repo->group; |
37 | } | 37 | } |
38 | html("<tr><td>"); | 38 | html("<tr><td>"); |
39 | html_link_open(cgit_repourl(repo->url), NULL, NULL); | 39 | html_link_open(cgit_repourl(repo->url), NULL, NULL); |
40 | html_txt(repo->name); | 40 | html_txt(repo->name); |
41 | html_link_close(); | 41 | html_link_close(); |
42 | html("</td><td>"); | 42 | html("</td><td>"); |
43 | html_ntxt(cgit_max_repodesc_len, repo->desc); | 43 | html_ntxt(cgit_max_repodesc_len, repo->desc); |
44 | html("</td><td>"); | 44 | html("</td><td>"); |
45 | html_txt(repo->owner); | 45 | html_txt(repo->owner); |
46 | html("</td><td>"); | 46 | html("</td><td>"); |
47 | html_link_open(cgit_pageurl(repo->name, "commit", NULL), | 47 | html_link_open(cgit_pageurl(repo->name, "commit", NULL), |
48 | "Commit: display last commit", NULL); | 48 | "Commit: display last commit", NULL); |
49 | html("C</a> "); | 49 | html("C</a> "); |
50 | html_link_open(cgit_pageurl(repo->name, "diff", NULL), | 50 | html_link_open(cgit_pageurl(repo->name, "diff", NULL), |
51 | "Diff: see changes introduced by last commit", NULL); | 51 | "Diff: see changes introduced by last commit", NULL); |
52 | html("D</a> "); | 52 | html("D</a> "); |
53 | html_link_open(cgit_pageurl(repo->name, "log", NULL), | 53 | html_link_open(cgit_pageurl(repo->name, "log", NULL), |
54 | "Log: show history of the main branch", NULL); | 54 | "Log: show history of the main branch", NULL); |
55 | html("L</a> "); | 55 | html("L</a> "); |
56 | html_link_open(cgit_pageurl(repo->name, "tree", NULL), | 56 | html_link_open(cgit_pageurl(repo->name, "tree", NULL), |
57 | "Tree: browse the files in the main branch", NULL); | 57 | "Tree: browse the files in the main branch", NULL); |
58 | html("T</a>"); | 58 | html("T</a>"); |
59 | html("</td></tr>\n"); | 59 | html("</td></tr>\n"); |
60 | } | 60 | } |
61 | html("</table>"); | 61 | html("</table>"); |
62 | cgit_print_docend(); | 62 | cgit_print_docend(); |
63 | } | 63 | } |