mirror of
https://git.zx2c4.com/cgit
synced 2025-08-03 01:25:34 +02:00
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 <johan@herland.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
This commit is contained in:
parent
c93ef96aaf
commit
24fd7e54c8
2 changed files with 82 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue