summaryrefslogtreecommitdiffstatshomepage
path: root/ui-tree.c
Commit message (Expand)AuthorAge
...
* ui-tree: show hexdump of binary blobsLars Hjemli2009-01-31
* Merge branch 'og/tree-view-selection'Lars Hjemli2009-01-27
|\
| * changed objects are outputted, allowing for selections of code onlyOnne Gorter2009-01-10
* | Merge branch 'lh/stats'Lars Hjemli2009-01-27
|\ \ | |/ |/|
| * ui-tree: add link to stats page per pathLars Hjemli2008-12-07
* | Merge branch 'stable'Lars Hjemli2009-01-06
|\ \
| * | ui-tree.c: do not add blank line when displaying blobsLars Hjemli2009-01-06
| |/
* / ui-log: add support for showing the full commit messageLars Hjemli2008-11-29
|/
* ui-tree: link to plain view instead of blob viewLars Hjemli2008-08-06
* Adjust to new calling convention for read_tree_recursive()Lars Hjemli2008-07-21
* ui-tree.c: avoid peeking at GITLINK objectsLars Hjemli2008-05-20
* Don't specify mimetype in ui-blob.cLars Hjemli2008-04-08
* Add ui-shared.hLars Hjemli2008-03-24
* Introduce html.hLars Hjemli2008-03-18
* Move cgit_repo into cgit_contextLars Hjemli2008-02-16
* Introduce struct cgit_contextLars Hjemli2008-02-16
* Fix html error detected by test-suiteLars Hjemli2007-11-11
* Add search parameters to cgit_log_linkLars Hjemli2007-11-03
* Remove a few compiler warningsLars Hjemli2007-09-20
* ui-tree: show last line of blobLars Hjemli2007-09-20
* ui-tree: specify parameter position for all htmlf formatsLars Hjemli2007-09-19
* Merge branch 'jo/dirlink'Lars Hjemli2007-09-03
|\
| * Rename dirlink to gitlink.Jeffrey C. Ollie2007-06-04
* | Add support for line number in url fragmentLars Hjemli2007-07-23
* | link raw blob from tree file viewMichael Krelin2007-07-21
* | Add ofs argument to cgit_log_link and use it in ui-log.cLars Hjemli2007-06-29
* | Change S/L/T to summary/log/treeLars Hjemli2007-06-18
* | Add cgit_commit_link() + support for id=sha1 to commit viewLars Hjemli2007-06-17
* | Add git_log_link() and fix bug in generic repolink functionLars Hjemli2007-06-17
* | ui-tree: html/css cleanupLars Hjemli2007-06-17
* | Add and use cgit_tree_link()Lars Hjemli2007-06-17
* | ui-tree: make blob viewer generate valid htmlLars Hjemli2007-06-16
* | ui-tree: unify with ui-view, use path to select tree/blobLars Hjemli2007-06-16
|/
* Use & instead of & in URLs.Ondrej Jirman2007-05-31
* Fixed unexpected tags in html output.Ondrej Jirman2007-05-31
* Add support for tree listing via h parameterLars Hjemli2007-05-16
* Add log filtering by path and link to it from tree viewLars Hjemli2007-05-14
* Add submodule links in tree listingLars Hjemli2007-05-11
* Update to libgit 1.5.2-rc2Lars Hjemli2007-05-08
* Layout updateLars Hjemli2007-02-21
* Cleanup table listingsLars Hjemli2007-01-28
* WIP: add paths/backlinks to tree/blobviewLars Hjemli2007-01-12
* Use html_filemode in ui-tree.cLars Hjemli2006-12-17
* Add ui-commit.c + misc ui cleanupsLars Hjemli2006-12-16
* Add display of tree content w/ui-tree.cLars Hjemli2006-12-13
cfg.agefile); if (stat(path, &s) == 0) { cgit_print_age(read_agefile(path), -1, NULL); return; } path = fmt("%s/refs/heads/%s", repo->path, repo->defbranch); if (stat(path, &s) != 0) return; cgit_print_age(s.st_mtime, -1, NULL); } int is_match(struct cgit_repo *repo) { if (!ctx.qry.search) return 1; if (repo->url && strcasestr(repo->url, ctx.qry.search)) return 1; if (repo->name && strcasestr(repo->name, ctx.qry.search)) return 1; if (repo->desc && strcasestr(repo->desc, ctx.qry.search)) return 1; if (repo->owner && strcasestr(repo->owner, ctx.qry.search)) return 1; return 0; } void print_header(int columns) { html("<tr class='nohover'>" "<th class='left'>Name</th>" "<th class='left'>Description</th>" "<th class='left'>Owner</th>" "<th class='left'>Idle</th>"); if (ctx.cfg.enable_index_links) html("<th class='left'>Links</th>"); html("</tr>\n"); } void print_pager(int items, int pagelen, char *search) { int i; html("<div class='pager'>"); for(i = 0; i * pagelen < items; i++) cgit_index_link(fmt("[%d]", i+1), fmt("Page %d", i+1), NULL, search, i * pagelen); html("</div>"); } void cgit_print_repolist() { int i, columns = 4, hits = 0, header = 0; char *last_group = NULL; if (ctx.cfg.enable_index_links) columns++; ctx.page.title = ctx.cfg.root_title; cgit_print_http_headers(&ctx); cgit_print_docstart(&ctx); cgit_print_pageheader(&ctx); if (ctx.cfg.index_header) html_include(ctx.cfg.index_header); html("<table summary='repository list' class='list nowrap'>"); for (i=0; i<cgit_repolist.count; i++) { ctx.repo = &cgit_repolist.repos[i]; if (!is_match(ctx.repo)) continue; hits++; if (hits <= ctx.qry.ofs) continue; if (hits > ctx.qry.ofs + ctx.cfg.max_repo_count) continue; if (!header++) print_header(columns); if ((last_group == NULL && ctx.repo->group != NULL) || (last_group != NULL && ctx.repo->group == NULL) || (last_group != NULL && ctx.repo->group != NULL && strcmp(ctx.repo->group, last_group))) { htmlf("<tr class='nohover'><td colspan='%d' class='repogroup'>", columns); html_txt(ctx.repo->group); html("</td></tr>"); last_group = ctx.repo->group; } htmlf("<tr><td class='%s'>", ctx.repo->group ? "sublevel-repo" : "toplevel-repo"); html_link_open(cgit_repourl(ctx.repo->url), NULL, NULL); html_txt(ctx.repo->name); html_link_close(); html("</td><td>"); html_link_open(cgit_repourl(ctx.repo->url), NULL, NULL); html_ntxt(ctx.cfg.max_repodesc_len, ctx.repo->desc); html_link_close(); html("</td><td>"); html_txt(ctx.repo->owner); html("</td><td>"); print_modtime(ctx.repo); html("</td>"); if (ctx.cfg.enable_index_links) { html("<td>"); html_link_open(cgit_repourl(ctx.repo->url), NULL, "button"); html("summary</a>"); cgit_log_link("log", NULL, "button", NULL, NULL, NULL, 0, NULL, NULL); cgit_tree_link("tree", NULL, "button", NULL, NULL, NULL); html("</td>"); } html("</tr>\n"); } html("</table>"); if (!hits) cgit_print_error("No repositories found"); else if (hits > ctx.cfg.max_repo_count) print_pager(hits, ctx.cfg.max_repo_count, ctx.qry.search); cgit_print_docend(); } void cgit_print_site_readme() { if (ctx.cfg.root_readme) html_include(ctx.cfg.root_readme); }