From 4718a059f842a791c89a1922996bb8f1dbea8f65 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 16 May 2017 23:27:53 +0300 Subject: Add filter form to builds page --- mod/page.hxx | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to 'mod/page.hxx') diff --git a/mod/page.hxx b/mod/page.hxx index 6d18f36..d7c44d6 100644 --- a/mod/page.hxx +++ b/mod/page.hxx @@ -108,6 +108,55 @@ namespace brep const string& value_; }; + // Generates table row element, that has the 'label: ' + // layout. + // + class TR_INPUT + { + public: + TR_INPUT (const string& l, + const string& n, + const string& v, + const string& p = string (), + bool a = false) + : label_ (l), name_ (n), value_ (v), placeholder_ (p), autofocus_ (a) + { + } + + void + operator() (xml::serializer&) const; + + private: + const string& label_; + const string& name_; + const string& value_; + const string& placeholder_; + bool autofocus_; + }; + + // Generates table row element, that has the 'label: ' + // layout. Option elements are represented as a list of value/inner-text + // pairs. + // + class TR_SELECT + { + public: + TR_SELECT (const string& l, + const string& n, + const string& v, + const vector>& o) + : label_ (l), name_ (n), value_ (v), options_ (o) {} + + void + operator() (xml::serializer&) const; + + private: + const string& label_; + const string& name_; + const string& value_; + const vector>& options_; + }; + // Generates package name element. // class TR_NAME -- cgit v1.1