aboutsummaryrefslogtreecommitdiffstats
path: root/html.c
diff options
context:
space:
mode:
authorLars Hjemli2006-12-28 02:01:49 +0100
committerLars Hjemli2006-12-28 02:01:49 +0100
commite39d738c39d37cdef115c145027f3eec85a62272 (patch)
treebe60a07674a0d118d42f572a35b62ada9529a6bd /html.c
parent27cd3b2a700e1cc46cd0393ddea48c07b62ee3a6 (diff)
downloadcgit-e39d738c39d37cdef115c145027f3eec85a62272.tar.gz
cgit-e39d738c39d37cdef115c145027f3eec85a62272.tar.bz2
cgit-e39d738c39d37cdef115c145027f3eec85a62272.zip
Add generic support for search box in page header
This adds the ability to show a search box in any pageheader with correct href and hidden form data, but does not enable the box on any pages. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'html.c')
-rw-r--r--html.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/html.c b/html.c
index 3a5d28d..c0b2ed4 100644
--- a/html.c
+++ b/html.c
@@ -117,6 +117,15 @@ void html_attr(char *txt)
117 html(txt); 117 html(txt);
118} 118}
119 119
120void html_hidden(char *name, char *value)
121{
122 html("<input type='hidden' name='");
123 html_attr(name);
124 html("' value='");
125 html_attr(value);
126 html("'/>");
127}
128
120void html_link_open(char *url, char *title, char *class) 129void html_link_open(char *url, char *title, char *class)
121{ 130{
122 html("<a href='"); 131 html("<a href='");
@@ -155,3 +164,4 @@ void html_filemode(unsigned short mode)
155 html_fileperm(mode >> 3); 164 html_fileperm(mode >> 3);
156 html_fileperm(mode); 165 html_fileperm(mode);
157} 166}
167