summaryrefslogtreecommitdiffabout
path: root/ui-repolist.c
authorLars Hjemli <hjemli@gmail.com>2009-08-23 20:58:39 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2009-08-24 08:22:58 (UTC)
commite7af002d5c405c82652f739d08ced3908d1f57e7 (patch) (unidiff)
tree1e31e5dd8d33ca4a8392c4d6207b2ff6bf8a0d76 /ui-repolist.c
parent50d5af3adcdd90424b70e9472af24356ed50aa9b (diff)
downloadcgit-e7af002d5c405c82652f739d08ced3908d1f57e7.zip
cgit-e7af002d5c405c82652f739d08ced3908d1f57e7.tar.gz
cgit-e7af002d5c405c82652f739d08ced3908d1f57e7.tar.bz2
Introduce 'section' as canonical spelling for 'repo.group'
The 'repo.' prefix should be reserved for repo-specific options, but the option 'repo.group' must still be honored to stay backwards compatible. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'ui-repolist.c') (more/less context) (ignore whitespace changes)
-rw-r--r--ui-repolist.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/ui-repolist.c b/ui-repolist.c
index 7c7aa9b..4dea3b3 100644
--- a/ui-repolist.c
+++ b/ui-repolist.c
@@ -200,13 +200,13 @@ int sort_repolist(char *field)
200} 200}
201 201
202 202
203void cgit_print_repolist() 203void cgit_print_repolist()
204{ 204{
205 int i, columns = 4, hits = 0, header = 0; 205 int i, columns = 4, hits = 0, header = 0;
206 char *last_group = NULL; 206 char *last_section = NULL;
207 int sorted = 0; 207 int sorted = 0;
208 208
209 if (ctx.cfg.enable_index_links) 209 if (ctx.cfg.enable_index_links)
210 columns++; 210 columns++;
211 211
212 ctx.page.title = ctx.cfg.root_title; 212 ctx.page.title = ctx.cfg.root_title;
@@ -230,24 +230,24 @@ void cgit_print_repolist()
230 continue; 230 continue;
231 if (hits > ctx.qry.ofs + ctx.cfg.max_repo_count) 231 if (hits > ctx.qry.ofs + ctx.cfg.max_repo_count)
232 continue; 232 continue;
233 if (!header++) 233 if (!header++)
234 print_header(columns); 234 print_header(columns);
235 if (!sorted && 235 if (!sorted &&
236 ((last_group == NULL && ctx.repo->group != NULL) || 236 ((last_section == NULL && ctx.repo->section != NULL) ||
237 (last_group != NULL && ctx.repo->group == NULL) || 237 (last_section != NULL && ctx.repo->section == NULL) ||
238 (last_group != NULL && ctx.repo->group != NULL && 238 (last_section != NULL && ctx.repo->section != NULL &&
239 strcmp(ctx.repo->group, last_group)))) { 239 strcmp(ctx.repo->section, last_section)))) {
240 htmlf("<tr class='nohover'><td colspan='%d' class='repogroup'>", 240 htmlf("<tr class='nohover'><td colspan='%d' class='reposection'>",
241 columns); 241 columns);
242 html_txt(ctx.repo->group); 242 html_txt(ctx.repo->section);
243 html("</td></tr>"); 243 html("</td></tr>");
244 last_group = ctx.repo->group; 244 last_section = ctx.repo->section;
245 } 245 }
246 htmlf("<tr><td class='%s'>", 246 htmlf("<tr><td class='%s'>",
247 !sorted && ctx.repo->group ? "sublevel-repo" : "toplevel-repo"); 247 !sorted && ctx.repo->section ? "sublevel-repo" : "toplevel-repo");
248 cgit_summary_link(ctx.repo->name, ctx.repo->name, NULL, NULL); 248 cgit_summary_link(ctx.repo->name, ctx.repo->name, NULL, NULL);
249 html("</td><td>"); 249 html("</td><td>");
250 html_link_open(cgit_repourl(ctx.repo->url), NULL, NULL); 250 html_link_open(cgit_repourl(ctx.repo->url), NULL, NULL);
251 html_ntxt(ctx.cfg.max_repodesc_len, ctx.repo->desc); 251 html_ntxt(ctx.cfg.max_repodesc_len, ctx.repo->desc);
252 html_link_close(); 252 html_link_close();
253 html("</td><td>"); 253 html("</td><td>");