From 24fd7e54c82294efa68ecae5dd9cb8a8986c04bf Mon Sep 17 00:00:00 2001 From: Johan Herland Date: Thu, 10 Jun 2010 01:09:29 +0200 Subject: ui-shared: Teach "breadcrumb" navigation to path limit display beneath tab bar When a path limit is in effect, and displayed directly beneath the tab bar, it should offer breadcrumb navigation (like what the 'tree' page does), to allow changing the path limit easily. Implementing this requires a robust way to link back to the current page with a changed ctx->qry.path, but without losing track of the other query arguments. This is solved by adding the new cgit_self_link() function, which is then invoked repeatedly by the new cgit_print_path_crumbs() function while manipulating ctx->qry.path. Signed-off-by: Johan Herland Signed-off-by: Lars Hjemli --- ui-shared.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ui-shared.h') diff --git a/ui-shared.h b/ui-shared.h index 308c982..3df5464 100644 --- a/ui-shared.h +++ b/ui-shared.h @@ -46,6 +46,8 @@ extern void cgit_diff_link(const char *name, const char *title, extern void cgit_stats_link(const char *name, const char *title, const char *class, const char *head, const char *path); +extern void cgit_self_link(char *name, const char *title, + const char *class, struct cgit_context *ctx); extern void cgit_object_link(struct object *obj); extern void cgit_print_error(const char *msg); -- cgit v1.2.3-59-g8ed1b