author | Johan Herland <johan@herland.net> | 2010-06-09 23:09:29 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2010-06-19 08:40:22 (UTC) |
commit | 24fd7e54c82294efa68ecae5dd9cb8a8986c04bf (patch) (unidiff) | |
tree | 5a4824456d046f40717fc50686c1e03b5c6efdf4 /ui-shared.h | |
parent | c93ef96aaf77437abeb552bd9e30973f90365f3a (diff) | |
download | cgit-24fd7e54c82294efa68ecae5dd9cb8a8986c04bf.zip cgit-24fd7e54c82294efa68ecae5dd9cb8a8986c04bf.tar.gz cgit-24fd7e54c82294efa68ecae5dd9cb8a8986c04bf.tar.bz2 |
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>
-rw-r--r-- | ui-shared.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ui-shared.h b/ui-shared.h index 308c982..3df5464 100644 --- a/ui-shared.h +++ b/ui-shared.h | |||
@@ -37,24 +37,26 @@ extern void cgit_refs_link(const char *name, const char *title, | |||
37 | const char *class, const char *head, | 37 | const char *class, const char *head, |
38 | const char *rev, const char *path); | 38 | const char *rev, const char *path); |
39 | extern void cgit_snapshot_link(const char *name, const char *title, | 39 | extern void cgit_snapshot_link(const char *name, const char *title, |
40 | const char *class, const char *head, | 40 | const char *class, const char *head, |
41 | const char *rev, const char *archivename); | 41 | const char *rev, const char *archivename); |
42 | extern void cgit_diff_link(const char *name, const char *title, | 42 | extern void cgit_diff_link(const char *name, const char *title, |
43 | const char *class, const char *head, | 43 | const char *class, const char *head, |
44 | const char *new_rev, const char *old_rev, | 44 | const char *new_rev, const char *old_rev, |
45 | const char *path, int toggle_ssdiff); | 45 | const char *path, int toggle_ssdiff); |
46 | extern void cgit_stats_link(const char *name, const char *title, | 46 | extern void cgit_stats_link(const char *name, const char *title, |
47 | const char *class, const char *head, | 47 | const char *class, const char *head, |
48 | const char *path); | 48 | const char *path); |
49 | extern void cgit_self_link(char *name, const char *title, | ||
50 | const char *class, struct cgit_context *ctx); | ||
49 | extern void cgit_object_link(struct object *obj); | 51 | extern void cgit_object_link(struct object *obj); |
50 | 52 | ||
51 | extern void cgit_print_error(const char *msg); | 53 | extern void cgit_print_error(const char *msg); |
52 | extern void cgit_print_date(time_t secs, const char *format, int local_time); | 54 | extern void cgit_print_date(time_t secs, const char *format, int local_time); |
53 | extern void cgit_print_age(time_t t, time_t max_relative, const char *format); | 55 | extern void cgit_print_age(time_t t, time_t max_relative, const char *format); |
54 | extern void cgit_print_http_headers(struct cgit_context *ctx); | 56 | extern void cgit_print_http_headers(struct cgit_context *ctx); |
55 | extern void cgit_print_docstart(struct cgit_context *ctx); | 57 | extern void cgit_print_docstart(struct cgit_context *ctx); |
56 | extern void cgit_print_docend(); | 58 | extern void cgit_print_docend(); |
57 | extern void cgit_print_pageheader(struct cgit_context *ctx); | 59 | extern void cgit_print_pageheader(struct cgit_context *ctx); |
58 | extern void cgit_print_filemode(unsigned short mode); | 60 | extern void cgit_print_filemode(unsigned short mode); |
59 | extern void cgit_print_snapshot_links(const char *repo, const char *head, | 61 | extern void cgit_print_snapshot_links(const char *repo, const char *head, |
60 | const char *hex, int snapshots); | 62 | const char *hex, int snapshots); |