abouttreesummaryrefslogcommitdiff
diff options
context:
space:
mode:
authorpatrick-scho2025-12-01 00:11:23 +0100
committerpatrick-scho2025-12-01 00:11:23 +0100
commitc1357dd45874f00d2f7d280a30a63e29eae62b66 (patch)
tree5ca6abccba0a42b884c2d19182ec25488954812c
parent8398d7f957a32a45496242c50eeb0d4eccc7ad8a (diff)
downloadps-cgit-c1357dd45874f00d2f7d280a30a63e29eae62b66.tar.gz
ps-cgit-c1357dd45874f00d2f7d280a30a63e29eae62b66.zip
fix again
-rw-r--r--cmd.c3
-rw-r--r--ui-summary.c34
2 files changed, 29 insertions, 8 deletions
diff --git a/cmd.c b/cmd.c
index bf6d8f5..bbab402 100644
--- a/cmd.c
+++ b/cmd.c
@@ -151,7 +151,8 @@ static void stats_fn(void)
static void summary_fn(void)
{
- cgit_print_summary();
+ about_fn(); // print about page including summary instead of regular summary
+ // cgit_print_summary();
}
static void tag_fn(void)
diff --git a/ui-summary.c b/ui-summary.c
index 3ee4c3f..988c927 100644
--- a/ui-summary.c
+++ b/ui-summary.c
@@ -51,13 +51,6 @@ void cgit_print_summary(void)
cgit_print_layout_start();
- // insert readme
- if (ctx.cfg.root_readme) {
- cgit_open_filter(ctx.cfg.about_filter, ctx.cfg.root_readme);
- html_include(ctx.cfg.root_readme);
- cgit_close_filter(ctx.cfg.about_filter);
- }
-
html("<table summary='repository info' class='list nowrap'>");
cgit_print_branches(ctx.cfg.summary_branches);
htmlf("<tr class='nohover'><td colspan='%d'>&nbsp;</td></tr>", columns);
@@ -109,9 +102,21 @@ static char* append_readme_path(const char *filename, const char *ref, const cha
void cgit_print_repo_readme(const char *path)
{
+ cgit_print_layout_end();
+
+
char *filename, *ref, *mimetype;
int free_filename = 0;
+ // summary {{{
+ int columns = 3;
+
+ if (ctx.repo->enable_log_filecount)
+ columns++;
+ if (ctx.repo->enable_log_linecount)
+ columns++;
+ // }}}
+
mimetype = get_mimetype_for_filename(path);
if (mimetype && (!strncmp(mimetype, "image/", 6) || !strncmp(mimetype, "video/", 6))) {
ctx.page.mimetype = mimetype;
@@ -151,6 +156,21 @@ void cgit_print_repo_readme(const char *path)
if (free_filename)
free(filename);
+ // summary {{{
+ html("<table summary='repository info' class='list nowrap'>");
+ cgit_print_branches(ctx.cfg.summary_branches);
+ htmlf("<tr class='nohover'><td colspan='%d'>&nbsp;</td></tr>", columns);
+ cgit_print_tags(ctx.cfg.summary_tags);
+ if (ctx.cfg.summary_log > 0) {
+ htmlf("<tr class='nohover'><td colspan='%d'>&nbsp;</td></tr>", columns);
+ cgit_print_log(ctx.qry.head, 0, ctx.cfg.summary_log, NULL,
+ NULL, NULL, 0, 0, 0);
+ }
+ urls = 0;
+ cgit_add_clone_urls(print_url);
+ html("</table>");
+ // }}}
+
done:
cgit_print_layout_end();
}