diff --git a/ui-shared.c b/ui-shared.c index df52a9be..bef6dc58 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -1085,36 +1085,34 @@ void cgit_print_pageheader(void) print_header(); html("
\n"); + /* patch: change order of tabs*/ + /* made by initframs */ if (ctx.env.authenticated && ctx.repo) { - if (ctx.repo->readme.nr) - reporevlink("about", "about", NULL, - hc("about"), ctx.qry.head, NULL, - NULL); - cgit_summary_link("summary", NULL, hc("summary"), - ctx.qry.head); - cgit_refs_link("refs", NULL, hc("refs"), ctx.qry.head, - ctx.qry.oid, NULL); - cgit_log_link("log", NULL, hc("log"), ctx.qry.head, - NULL, ctx.qry.vpath, 0, NULL, NULL, - ctx.qry.showmsg, ctx.qry.follow); - if (ctx.qry.page && !strcmp(ctx.qry.page, "blame")) - cgit_blame_link("blame", NULL, hc("blame"), ctx.qry.head, - ctx.qry.oid, ctx.qry.vpath); - else - cgit_tree_link("tree", NULL, hc("tree"), ctx.qry.head, - ctx.qry.oid, ctx.qry.vpath); - cgit_commit_link("commit", NULL, hc("commit"), - ctx.qry.head, ctx.qry.oid, ctx.qry.vpath); - cgit_diff_link("diff", NULL, hc("diff"), ctx.qry.head, - ctx.qry.oid, ctx.qry.oid2, ctx.qry.vpath); + if (ctx.repo->readme.nr) + reporevlink("about", "README", NULL, + hc("about"), ctx.qry.head, NULL, + NULL); + + cgit_log_link("log", NULL, hc("log"), ctx.qry.head, + NULL, ctx.qry.vpath, 0, NULL, NULL, + ctx.qry.showmsg, ctx.qry.follow); + + cgit_tree_link("files", NULL, hc("tree"), ctx.qry.head, + ctx.qry.oid, ctx.qry.vpath); + + cgit_refs_link("refs", NULL, hc("refs"), ctx.qry.head, + ctx.qry.oid, NULL); + if (ctx.repo->max_stats) cgit_stats_link("stats", NULL, hc("stats"), - ctx.qry.head, ctx.qry.vpath); + ctx.qry.head, ctx.qry.vpath); + if (ctx.repo->homepage) { - html("homepage"); + html("homepage"); } + html(""); html("