From 7fdff2460440c09d13fc76af3b75e85434e6f563 Mon Sep 17 00:00:00 2001 From: Johan Herland Date: Thu, 10 Jun 2010 01:09:36 +0200 Subject: ui-shared: Preserve path limit in "tab bar" links When using the "tab bar" in the pageheader to navigate between pages, any path limit in effect on the current page is forgotten in the link to the target page, even if the target page can interpret and use the path limit constructively. Instead, preserve the current page's path limit in the "tab bar" links to other pages, where the path limit is useful to the target page. Signed-off-by: Johan Herland Signed-off-by: Lars Hjemli --- ui-shared.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ui-shared.c b/ui-shared.c index 372b9e7..e991799 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -790,16 +790,17 @@ void cgit_print_pageheader(struct cgit_context *ctx) cgit_refs_link("refs", NULL, hc(ctx, "refs"), ctx->qry.head, ctx->qry.sha1, NULL); cgit_log_link("log", NULL, hc(ctx, "log"), ctx->qry.head, - NULL, NULL, 0, NULL, NULL, ctx->qry.showmsg); + NULL, ctx->qry.vpath, 0, NULL, NULL, + ctx->qry.showmsg); cgit_tree_link("tree", NULL, hc(ctx, "tree"), ctx->qry.head, - ctx->qry.sha1, NULL); + ctx->qry.sha1, ctx->qry.vpath); cgit_commit_link("commit", NULL, hc(ctx, "commit"), - ctx->qry.head, ctx->qry.sha1, NULL, 0); + ctx->qry.head, ctx->qry.sha1, ctx->qry.vpath, 0); cgit_diff_link("diff", NULL, hc(ctx, "diff"), ctx->qry.head, - ctx->qry.sha1, ctx->qry.sha2, NULL, 0); + ctx->qry.sha1, ctx->qry.sha2, ctx->qry.vpath, 0); if (ctx->repo->max_stats) cgit_stats_link("stats", NULL, hc(ctx, "stats"), - ctx->qry.head, NULL); + ctx->qry.head, ctx->qry.vpath); if (ctx->repo->readme) reporevlink("about", "about", NULL, hc(ctx, "about"), ctx->qry.head, NULL, -- cgit 1.4.1 value='range'>range
Commit message (Expand)Author
2014-01-14filter: add interface layerJohn Keeping
2014-01-14filter: add fprintf_filter functionJohn Keeping
2014-01-14authors: specify maintainersJason A. Donenfeld
2014-01-13filters: Improved syntax-highlighting.pyStefan Tatschner
2014-01-12tests: add CGIT_TEST_OPTS variable to MakefileJohn Keeping
2014-01-12ui-repolist: HTML-escape cgit_rooturl() responseJohn Keeping
2014-01-12ui-shared: URL-escape script_nameJohn Keeping
2014-01-12ui-refs: escape HTML chars in author and tagger namesJohn Keeping
2014-01-12filter: pass extra arguments via cgit_open_filterJohn Keeping
2014-01-12ui-snapshot: set unused cgit_filter fields to zeroJohn Keeping
2014-01-12html: remove redundant htmlfd variableJohn Keeping
2014-01-12tests: add Valgrind supportJohn Keeping
2014-01-12cache: don't leave cache_slot fields uninitializedJohn Keeping
2014-01-10filter: split filter functions into their own fileJason A. Donenfeld
2014-01-10filter: make exit status localJason A. Donenfeld
2014-01-10parsing: fix header typoJason A. Donenfeld
2014-01-10cgit.c: Fix comment on bit mask hackLukas Fleischer
2014-01-10cgit.c: Use "else" for mutually exclusive branchesLukas Fleischer
2014-01-10ui-snapshot.c: Do not reinvent suffixcmp()Lukas Fleischer
2014-01-10Refactor cgit_parse_snapshots_mask()Lukas Fleischer
2014-01-10Disallow use of undocumented snapshot delimitersLukas Fleischer
2014-01-10Replace most uses of strncmp() with prefixcmp()Lukas Fleischer
2014-01-09README: Fix dependenciesLukas Fleischer
2014-01-08README: Spelling and formatting fixesLukas Fleischer
2014-01-08Fix UTF-8 with syntax-highlighting.pyPřemysl Janouch
2014-01-08Add a suggestion to the manpagePřemysl Janouch
2014-01-08Fix the example configurationPřemysl Janouch
2014-01-08Fix about-formatting.shPřemysl Janouch
2014-01-08Fix some spelling errorsPřemysl Janouch
2014-01-08filters: highlight.sh: add css comments for highlight 2.6 and 3.8Ferry Huberts