diff options
Diffstat (limited to 'mod/mod-package-details.cxx')
-rw-r--r-- | mod/mod-package-details.cxx | 37 |
1 files changed, 13 insertions, 24 deletions
diff --git a/mod/mod-package-details.cxx b/mod/mod-package-details.cxx index fc2e6be..5cf0759 100644 --- a/mod/mod-package-details.cxx +++ b/mod/mod-package-details.cxx @@ -1,5 +1,4 @@ // file : mod/mod-package-details.cxx -*- C++ -*- -// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file #include <mod/mod-package-details.hxx> @@ -10,15 +9,16 @@ #include <odb/database.hxx> #include <odb/transaction.hxx> -#include <web/xhtml.hxx> -#include <web/module.hxx> -#include <web/mime-url-encoding.hxx> +#include <web/server/module.hxx> +#include <web/server/mime-url-encoding.hxx> + +#include <web/xhtml/serialization.hxx> #include <libbrep/package.hxx> #include <libbrep/package-odb.hxx> #include <mod/page.hxx> -#include <mod/options.hxx> +#include <mod/module-options.hxx> using namespace odb::core; using namespace brep::cli; @@ -183,20 +183,20 @@ handle (request& rq, response& rs) // s << H2 << pkg->summary << ~H2; - if (const optional<string>& d = pkg->description) + if (const optional<typed_text>& d = pkg->package_description + ? pkg->package_description + : pkg->description) { const string id ("description"); const string what (name.string () + " description"); s << (full ? DIV_TEXT (*d, - *pkg->description_type, true /* strip_title */, id, what, error) : DIV_TEXT (*d, - *pkg->description_type, true /* strip_title */, options_->package_description (), url (!full, squery, page, id), @@ -265,23 +265,12 @@ handle (request& rq, response& rs) assert (p->internal ()); - // @@ Shouldn't we make package repository name to be a link to the proper - // place of the About page, describing corresponding repository? - // Yes, I think that's sounds reasonable. - // Or maybe it can be something more valuable like a link to the - // repository package search page ? - // - // @@ In most cases package location will be the same for all versions - // of the same package. Shouldn't we put package location to the - // package summary part and display it here only if it differs - // from the one in the summary ? - // - // Hm, I am not so sure about this. Consider: stable/testing/unstable. + const repository_location& rl (p->internal_repository.load ()->location); + + // @@ Maybe the repository link can be something more valuable like a link + // to the repository package search page ? // - s << TR_REPOSITORY ( - p->internal_repository.object_id ().canonical_name, - root, - tenant) + s << TR_REPOSITORY (rl, root, tenant) << TR_DEPENDS (p->dependencies, root, tenant) << TR_REQUIRES (p->requirements) << ~TBODY |