From d852da79e4c3de66552bc216a76bdfa40bc1e0bd Mon Sep 17 00:00:00 2001 From: Marcel Korpel Date: Thu, 18 Jun 2015 17:11:48 +0200 Subject: pkgbase_details.php/pkg_details.php: Show keywords Keywords are hyperlinked so a user can search for other packages with the same name and/or keyword. Signed-off-by: Marcel Korpel Signed-off-by: Lukas Fleischer --- web/html/css/aurweb.css | 18 ++++++++++++++++++ web/template/pkg_details.php | 14 +++++++++++++- web/template/pkgbase_details.php | 14 +++++++++++++- 3 files changed, 44 insertions(+), 2 deletions(-) (limited to 'web') diff --git a/web/html/css/aurweb.css b/web/html/css/aurweb.css index 346f2ea..620e0fa 100644 --- a/web/html/css/aurweb.css +++ b/web/html/css/aurweb.css @@ -53,6 +53,24 @@ text-align:right; } +.keyword:link, .keyword:visited { + float: left; + margin: 1px .5ex 1px 0; + padding: 0 1em; + color: white; + background-color: #36a; + border: 1px solid transparent; + border-radius: 2px; +} + +.keyword:hover { + cursor: pointer; +} + +.keyword:focus { + border: 1px dotted #000; +} + .text-button { background: transparent; border: none !important; diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php index 90e5729..2f121e7 100644 --- a/web/template/pkg_details.php +++ b/web/template/pkg_details.php @@ -190,11 +190,14 @@ $sources = pkg_sources($row["ID"]); 0): ?> +
@@ -205,6 +208,15 @@ if (has_credential(CRED_PKGBASE_SET_KEYWORDS, array($row["MaintainerUID"]))):
+' . htmlspecialchars($kw) . "\n"; + } +endif; +?> diff --git a/web/template/pkgbase_details.php b/web/template/pkgbase_details.php index 9989369..dc30e48 100644 --- a/web/template/pkgbase_details.php +++ b/web/template/pkgbase_details.php @@ -129,11 +129,14 @@ $pkgs = pkgbase_get_pkgnames($base_id); 0): ?> +
@@ -144,6 +147,15 @@ if (has_credential(CRED_PKGBASE_SET_KEYWORDS, array($row["MaintainerUID"]))):
+' . htmlspecialchars($kw) . "\n"; + } +endif; +?> -- cgit v1.2.3-70-g09d2