From 0a18eb475fcda950a211c8b4ef80683ff892f78b Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Fri, 10 Jul 2020 07:05:24 -0400 Subject: Add syntax and columns to search form --- html.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/html.c b/html.c index 59ecc30..9d9134b 100644 --- a/html.c +++ b/html.c @@ -90,6 +90,14 @@ htmlNav(struct khtmlreq *html, const char *network, const char *context) { return khtml_closeelem(html, 2); } +static const char *SyntaxURL = { + "https://www.sqlite.org/fts5.html#full_text_query_syntax" +}; + +static const char *Columns = { + "network, channel, query, nick, user, target, message" +}; + enum kcgi_err htmlSearch(struct khtmlreq *html, const char *network, const char *context) { char label[256]; @@ -105,6 +113,14 @@ htmlSearch(struct khtmlreq *html, const char *network, const char *context) { KATTR_ACTION, Pages[Search], KATTR__MAX ) + || khtml_attr(html, KELEM_A, KATTR_HREF, SyntaxURL, KATTR__MAX) + || khtml_puts(html, "Syntax") + || khtml_closeelem(html, 1) + || khtml_putc(html, ' ') + || khtml_attr(html, KELEM_SPAN, KATTR_TITLE, Columns, KATTR__MAX) + || khtml_puts(html, "Columns") + || khtml_closeelem(html, 1) + || khtml_putc(html, ' ') || khtml_attr( html, KELEM_INPUT, KATTR_TYPE, "search", -- cgit 1.4.1