summaryrefslogtreecommitdiffabout
path: root/ui-shared.h
authorJohan Herland <johan@herland.net>2010-06-09 23:09:29 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2010-06-19 08:40:22 (UTC)
commit24fd7e54c82294efa68ecae5dd9cb8a8986c04bf (patch) (side-by-side diff)
tree5a4824456d046f40717fc50686c1e03b5c6efdf4 /ui-shared.h
parentc93ef96aaf77437abeb552bd9e30973f90365f3a (diff)
downloadcgit-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>
Diffstat (limited to 'ui-shared.h') (more/less context) (ignore whitespace changes)
-rw-r--r--ui-shared.h2
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
@@ -25,39 +25,41 @@ extern void cgit_plain_link(const char *name, const char *title,
const char *rev, const char *path);
extern void cgit_log_link(const char *name, const char *title,
const char *class, const char *head, const char *rev,
const char *path, int ofs, const char *grep,
const char *pattern, int showmsg);
extern void cgit_commit_link(char *name, const char *title,
const char *class, const char *head,
const char *rev, int toggle_ssdiff);
extern void cgit_patch_link(const char *name, const char *title,
const char *class, const char *head,
const char *rev);
extern void cgit_refs_link(const char *name, const char *title,
const char *class, const char *head,
const char *rev, const char *path);
extern void cgit_snapshot_link(const char *name, const char *title,
const char *class, const char *head,
const char *rev, const char *archivename);
extern void cgit_diff_link(const char *name, const char *title,
const char *class, const char *head,
const char *new_rev, const char *old_rev,
const char *path, int toggle_ssdiff);
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);
extern void cgit_print_date(time_t secs, const char *format, int local_time);
extern void cgit_print_age(time_t t, time_t max_relative, const char *format);
extern void cgit_print_http_headers(struct cgit_context *ctx);
extern void cgit_print_docstart(struct cgit_context *ctx);
extern void cgit_print_docend();
extern void cgit_print_pageheader(struct cgit_context *ctx);
extern void cgit_print_filemode(unsigned short mode);
extern void cgit_print_snapshot_links(const char *repo, const char *head,
const char *hex, int snapshots);
extern void cgit_add_hidden_formfields(int incl_head, int incl_search,
const char *page);
#endif /* UI_SHARED_H */