aboutsummaryrefslogtreecommitdiff
path: root/mod/page.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-05-14 00:37:16 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-05-15 20:37:43 +0300
commit5163436b00711318baea4fc0ad43a4de8222354a (patch)
treea05c06693bda84dd9a9b365a50c227126a5ec05f /mod/page.cxx
parent2ebf9de408f3fd629126a20b21221e186195813c (diff)
Implement builds page
Diffstat (limited to 'mod/page.cxx')
-rw-r--r--mod/page.cxx26
1 files changed, 26 insertions, 0 deletions
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));