aboutsummaryrefslogtreecommitdiff
path: root/mod/mod-package-version-details.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2024-08-01 20:03:48 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2024-08-07 19:01:06 +0300
commit7db53790ca2d2c004bfd00b503eca59a8d084870 (patch)
tree5f6201d48322043e1f2802efddb28e5643a2dab7 /mod/mod-package-version-details.cxx
parentee220058d977738c02ead45cc5567bbab33adf48 (diff)
Add support for loading package version reviews
Diffstat (limited to 'mod/mod-package-version-details.cxx')
-rw-r--r--mod/mod-package-version-details.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/mod/mod-package-version-details.cxx b/mod/mod-package-version-details.cxx
index 91923e5..e28310c 100644
--- a/mod/mod-package-version-details.cxx
+++ b/mod/mod-package-version-details.cxx
@@ -528,6 +528,22 @@ handle (request& rq, response& rs)
print_tests (test_dependency_type::examples);
print_tests (test_dependency_type::benchmarks);
+ if (options_->reviews_url_specified ())
+ {
+ package_db_->load (*pkg, pkg->reviews_section);
+
+ const optional<reviews_summary>& rvs (pkg->reviews);
+ const string& u (options_->reviews_url ());
+
+ s << H3 << "Reviews" << ~H3
+ << TABLE(CLASS="proplist", ID="reviews")
+ << TBODY
+ << TR_REVIEWS_COUNTER (review_result::fail, rvs, u)
+ << TR_REVIEWS_COUNTER (review_result::pass, rvs, u)
+ << ~TBODY
+ << ~TABLE;
+ }
+
bool builds (build_db_ != nullptr && pkg->buildable);
if (builds)