-rw-r--r-- | cgit.h | 3 | ||||
-rw-r--r-- | ui-log.c | 6 | ||||
-rw-r--r-- | ui-repolist.c | 3 | ||||
-rw-r--r-- | ui-shared.c | 13 | ||||
-rw-r--r-- | ui-summary.c | 2 | ||||
-rw-r--r-- | ui-tree.c | 2 |
6 files changed, 21 insertions, 8 deletions
@@ -240,3 +240,4 @@ extern void cgit_tree_link(char *name, char *title, char *class, char *head, extern void cgit_log_link(char *name, char *title, char *class, char *head, - char *rev, char *path, int ofs); + char *rev, char *path, int ofs, char *grep, + char *pattern); extern void cgit_commit_link(char *name, char *title, char *class, char *head, @@ -120,3 +120,4 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern cgit_query_sha1, cgit_query_path, - ofs - cnt); + ofs - cnt, cgit_query_grep, + cgit_query_search); html(" "); @@ -126,3 +127,4 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern cgit_query_sha1, cgit_query_path, - ofs + cnt); + ofs + cnt, cgit_query_grep, + cgit_query_search); } diff --git a/ui-repolist.c b/ui-repolist.c index 4c86543..9aa5c1e 100644 --- a/ui-repolist.c +++ b/ui-repolist.c @@ -100,3 +100,4 @@ void cgit_print_repolist(struct cacheitem *item) html("summary</a>"); - cgit_log_link("log", NULL, "button", NULL, NULL, NULL, 0); + cgit_log_link("log", NULL, "button", NULL, NULL, NULL, + 0, NULL, NULL); cgit_tree_link("tree", NULL, "button", NULL, NULL, NULL); diff --git a/ui-shared.c b/ui-shared.c index 1d66940..a03661a 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -196,3 +196,3 @@ void cgit_tree_link(char *name, char *title, char *class, char *head, void cgit_log_link(char *name, char *title, char *class, char *head, - char *rev, char *path, int ofs) + char *rev, char *path, int ofs, char *grep, char *pattern) { @@ -207,2 +207,11 @@ void cgit_log_link(char *name, char *title, char *class, char *head, } + if (grep && pattern) { + html(delim); + html("qt="); + html_attr(grep); + delim = "&"; + html(delim); + html("q="); + html_attr(pattern); + } if (ofs > 0) { @@ -463,3 +472,3 @@ void cgit_print_pageheader(char *title, int show_search) cgit_log_link("log", NULL, "menu", cgit_query_head, - cgit_query_sha1, cgit_query_path, 0); + cgit_query_sha1, cgit_query_path, 0, NULL, NULL); cgit_tree_link("tree", NULL, "menu", cgit_query_head, diff --git a/ui-summary.c b/ui-summary.c index 39fe330..c856793 100644 --- a/ui-summary.c +++ b/ui-summary.c @@ -58,3 +58,3 @@ static int print_branch(struct refinfo *ref) html("<tr><td>"); - cgit_log_link(name, NULL, NULL, name, NULL, NULL, 0); + cgit_log_link(name, NULL, NULL, name, NULL, NULL, 0, NULL, NULL); html("</td><td>"); @@ -102,3 +102,3 @@ static int ls_item(const unsigned char *sha1, const char *base, int baselen, cgit_log_link("log", NULL, "button", cgit_query_head, curr_rev, - fullpath, 0); + fullpath, 0, NULL, NULL); html("</td></tr>\n"); |