summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authorLars Hjemli <hjemli@gmail.com>2007-10-28 12:08:45 +0100
committerLars Hjemli <hjemli@gmail.com>2007-10-28 12:08:45 +0100
commit6ec5f36f279a85f59db2851ab476d9acd0015770 (patch)
tree18aff69bb319bbbf7427a1f401d86063ee850824 /html.c
parent0c8dd9c4bcc7a1a7a49f4eca1f3eb869d0995ea2 (diff)
downloadcgit-6ec5f36f279a85f59db2851ab476d9acd0015770.tar.gz
cgit-6ec5f36f279a85f59db2851ab476d9acd0015770.tar.bz2
cgit-6ec5f36f279a85f59db2851ab476d9acd0015770.zip
Add html_option() function
This is a generic function used to output html "option" tags. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'html.c')
-rw-r--r--html.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/html.c b/html.c
index 76fa6c4..6c9cc8b 100644
--- a/html.c
+++ b/html.c
@@ -126,6 +126,18 @@ void html_hidden(char *name, char *value)
html("'/>");
}
+void html_option(char *value, char *text, char *selected_value)
+{
+ html("<option value='");
+ html_attr(value);
+ html("'");
+ if (selected_value && !strcmp(selected_value, value))
+ html(" selected");
+ html(">");
+ html_txt(text);
+ html("</option>\n");
+}
+
void html_link_open(char *url, char *title, char *class)
{
html("<a href='");
René 'Necoro' Neumann3-2/+199 working dir. 2013-10-22Use chpwd_functions and precmd_functions instead of putting everything inRené 'Necoro' Neumann1-19/+23 precmd(). 2013-09-30urxvt: execute the wgetpaste check each timeRené 'Necoro' Neumann1-2/+5 2013-09-30urxvt: wgetpaste fixRené 'Necoro' Neumann1-4/+4 2013-09-30Allow HOME variable in .Xresources.René 'Necoro' Neumann2-3/+3 2013-09-30wgetpaste support for urxvt.René 'Necoro' Neumann2-1/+28 2013-09-30Urxvt autotransform for <filename>:<line>.René 'Necoro' Neumann1-1/+4 2013-09-30Remove tabbed(x) from urxvt. We use i3 -- no need for it.René 'Necoro' Neumann1-9/+0 2013-09-30Do not display icon in urxvt. It's not supported by i3 anyway.René 'Necoro' Neumann1-1/+1 2013-09-29Remove wrong monitors lineRené 'Necoro' Neumann1-1/+0 2013-09-29Delete vimperator paste plugin -- seems not to work anymore with new FFRené 'Necoro' Neumann1-266/+0 versions. And it wasn't used anyway. 2013-09-29Use $HOST instead of Cauchiy in titleRené 'Necoro' Neumann1-1/+1 2013-09-24Remove herbstluftwmRené 'Necoro' Neumann1-1/+0 2013-09-24Conky changesRené 'Necoro' Neumann2-5/+13 2013-09-15Remove trailing slash from \~ulpRené 'Necoro' Neumann1-1/+1 2013-09-15Make cci explicitly use python2René 'Necoro' Neumann1-1/+1 2013-09-10Node/NPM preparationRené 'Necoro' Neumann3-1/+13