summaryrefslogtreecommitdiffabout
path: root/ui-shared.c
Side-by-side diff
Diffstat (limited to 'ui-shared.c') (more/less context) (ignore whitespace changes)
-rw-r--r--ui-shared.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ui-shared.c b/ui-shared.c
index e4bb98f..45105dc 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -396,44 +396,49 @@ void cgit_print_pageheader(char *title, int show_search)
cgit_diff_link("diff", NULL, NULL, cgit_query_head,
cgit_query_sha1, cgit_query_sha2,
cgit_query_path);
} else {
html_txt("Index of repositories");
}
html("</td>");
html("<td id='search'>");
if (show_search) {
html("<form method='get' action='");
html_attr(cgit_currurl());
html("'>");
if (!cgit_virtual_root) {
if (cgit_query_repo)
html_hidden("r", cgit_query_repo);
if (cgit_query_page)
html_hidden("p", cgit_query_page);
}
if (cgit_query_head)
html_hidden("h", cgit_query_head);
if (cgit_query_sha1)
html_hidden("id", cgit_query_sha1);
if (cgit_query_sha2)
html_hidden("id2", cgit_query_sha2);
- html("<input type='text' name='q' value='");
+ html("<select name='qt'>");
+ html_option("grep", "log msg", cgit_query_grep);
+ html_option("author", "author", cgit_query_grep);
+ html_option("committer", "committer", cgit_query_grep);
+ html("</select>");
+ html("<input class='txt' type='text' name='q' value='");
html_attr(cgit_query_search);
- html("'/></form>");
+ html("'/><input class='btn' type='submit' value='...'/></form>");
}
html("</td></tr>");
html("<tr><td id='content' colspan='2'>");
}
void cgit_print_snapshot_start(const char *mimetype, const char *filename,
struct cacheitem *item)
{
htmlf("Content-Type: %s\n", mimetype);
htmlf("Content-Disposition: inline; filename=\"%s\"\n", filename);
htmlf("Last-Modified: %s\n", http_date(item->st.st_mtime));
htmlf("Expires: %s\n", http_date(item->st.st_mtime +
ttl_seconds(item->ttl)));
html("\n");
}
/* vim:set sw=8: */