-rw-r--r-- | cgit.css | 5 | ||||
-rw-r--r-- | cgit.h | 2 | ||||
-rw-r--r-- | shared.c | 4 | ||||
-rw-r--r-- | ui-repolist.c | 10 |
4 files changed, 21 insertions, 0 deletions
@@ -355 +355,6 @@ table.diff td div.del { | |||
355 | } | 355 | } |
356 | |||
357 | table.list td.repogroup { | ||
358 | padding-top: 1em; | ||
359 | border-bottom: solid 1px #777; | ||
360 | } | ||
@@ -49,2 +49,3 @@ struct repoinfo { | |||
49 | char *defbranch; | 49 | char *defbranch; |
50 | char *group; | ||
50 | char *module_link; | 51 | char *module_link; |
@@ -95,2 +96,3 @@ extern char *cgit_script_name; | |||
95 | extern char *cgit_cache_root; | 96 | extern char *cgit_cache_root; |
97 | extern char *cgit_repo_group; | ||
96 | 98 | ||
@@ -23,2 +23,3 @@ char *cgit_script_name = CGIT_SCRIPT_NAME; | |||
23 | char *cgit_cache_root = "/var/cache/cgit"; | 23 | char *cgit_cache_root = "/var/cache/cgit"; |
24 | char *cgit_repo_group = NULL; | ||
24 | 25 | ||
@@ -101,2 +102,3 @@ struct repoinfo *add_repo(const char *url) | |||
101 | ret->owner = NULL; | 102 | ret->owner = NULL; |
103 | ret->group = cgit_repo_group; | ||
102 | ret->defbranch = "master"; | 104 | ret->defbranch = "master"; |
@@ -162,2 +164,4 @@ void cgit_global_config_cb(const char *name, const char *value) | |||
162 | cgit_max_commit_count = atoi(value); | 164 | cgit_max_commit_count = atoi(value); |
165 | else if (!strcmp(name, "repo.group")) | ||
166 | cgit_repo_group = xstrdup(value); | ||
163 | else if (!strcmp(name, "repo.url")) | 167 | else if (!strcmp(name, "repo.url")) |
diff --git a/ui-repolist.c b/ui-repolist.c index 8e367a2..33e3e7f 100644 --- a/ui-repolist.c +++ b/ui-repolist.c | |||
@@ -14,2 +14,3 @@ void cgit_print_repolist(struct cacheitem *item) | |||
14 | int i; | 14 | int i; |
15 | char *last_group = NULL; | ||
15 | 16 | ||
@@ -32,2 +33,11 @@ void cgit_print_repolist(struct cacheitem *item) | |||
32 | repo = &cgit_repolist.repos[i]; | 33 | repo = &cgit_repolist.repos[i]; |
34 | if ((last_group == NULL && repo->group != NULL) || | ||
35 | (last_group != NULL && repo->group == NULL) || | ||
36 | (last_group != NULL && repo->group!= NULL && | ||
37 | strcmp(repo->group, last_group))) { | ||
38 | html("<tr class='nohover'><td colspan='4' class='repogroup'>"); | ||
39 | html_txt(repo->group); | ||
40 | html("</td></tr>"); | ||
41 | last_group = repo->group; | ||
42 | } | ||
33 | html("<tr><td>"); | 43 | html("<tr><td>"); |