diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2017-07-29 22:38:55 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2017-07-29 22:38:55 +0300 |
commit | 33153c6816c65c96a083c6f5b5e85418c444f929 (patch) | |
tree | d48dff79ef36668b50a5f912aa98a75cce1ed823 /mod | |
parent | bb4daf280cbae9f37a44d3b8893a3b933134cddc (diff) |
Add support for src-url and doc-url package manifest values
Diffstat (limited to 'mod')
-rw-r--r-- | mod/mod-package-details.cxx | 11 | ||||
-rw-r--r-- | mod/mod-package-version-details.cxx | 6 |
2 files changed, 15 insertions, 2 deletions
diff --git a/mod/mod-package-details.cxx b/mod/mod-package-details.cxx index a241c23..605022d 100644 --- a/mod/mod-package-details.cxx +++ b/mod/mod-package-details.cxx @@ -180,8 +180,15 @@ handle (request& rq, response& rs) << TBODY << TR_LICENSE (licenses) << TR_URL (pkg->url) - << TR_EMAIL (pkg->email) - << TR_TAGS (pkg->tags, root) + << TR_EMAIL (pkg->email); + + if (pkg->doc_url) + s << TR_URL (*pkg->doc_url, "doc-url"); + + if (pkg->src_url) + s << TR_URL (*pkg->src_url, "src-url"); + + s << TR_TAGS (pkg->tags, root) << ~TBODY << ~TABLE; } diff --git a/mod/mod-package-version-details.cxx b/mod/mod-package-version-details.cxx index edab232..1186470 100644 --- a/mod/mod-package-version-details.cxx +++ b/mod/mod-package-version-details.cxx @@ -195,6 +195,12 @@ handle (request& rq, response& rs) << TR_URL (pkg->url) << TR_EMAIL (em); + if (pkg->doc_url) + s << TR_URL (*pkg->doc_url, "doc-url"); + + if (pkg->src_url) + s << TR_URL (*pkg->src_url, "src-url"); + const auto& pu (pkg->package_url); if (pu && *pu != pkg->url) s << TR_URL (*pu, "package-url"); |