From 5163436b00711318baea4fc0ad43a4de8222354a Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sun, 14 May 2017 00:37:16 +0300 Subject: Implement builds page --- mod/page.cxx | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'mod/page.cxx') diff --git a/mod/page.cxx b/mod/page.cxx index bf090ef..de7b5f5 100644 --- a/mod/page.cxx +++ b/mod/page.cxx @@ -111,6 +111,17 @@ namespace brep << ~DIV; } + // TR_VALUE + // + void TR_VALUE:: + operator() (serializer& s) const + { + s << TR(CLASS=label_) + << TH << label_ << ~TH + << TD << SPAN(CLASS="value") << value_ << ~SPAN << ~TD + << ~TR; + } + // TR_NAME // void TR_NAME:: @@ -135,6 +146,8 @@ namespace brep << ~TR; } + // TR_VERSION + // void TR_VERSION:: operator() (serializer& s) const { @@ -532,6 +545,14 @@ namespace brep << ~SPAN; } + // SPAN_BUILD_RESULT_STATUS + // + void SPAN_BUILD_RESULT_STATUS:: + operator() (serializer& s) const + { + s << SPAN(CLASS=to_string (status_)) << status_ << ~SPAN; + } + // P_DESCRIPTION // void P_DESCRIPTION:: @@ -663,6 +684,11 @@ namespace brep size_t from (current_page_ > offset ? current_page_ - offset : 0); size_t to (min (from + page_number_count_, pcount)); + // Display as many pages as allowed. + // + if (to - from < page_number_count_ && from > 0) + from -= min (from, page_number_count_ - (to - from)); + for (size_t p (from); p < to; ++p) { s << A(HREF=url (p)); -- cgit v1.1