summaryrefslogtreecommitdiff
path: root/web/template/pkg_details.php
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2014-04-26 14:21:43 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2014-04-26 14:21:55 +0200
commit38eb8d2a3ab0b7f35618d151613211d45f6ec4d8 (patch)
tree974147a73e98fe18cbb0dcf7289f5216689ca12b /web/template/pkg_details.php
parentcc3244ea8ae0202265df3d0fd2cfe86fbbeb9d30 (diff)
Display package groups on the details page
The groups field is hidden if a package doesn't belong to any group. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/template/pkg_details.php')
-rw-r--r--web/template/pkg_details.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php
index da90c9d..ff3f710 100644
--- a/web/template/pkg_details.php
+++ b/web/template/pkg_details.php
@@ -22,6 +22,8 @@ $out_of_date_time = ($row["OutOfDateTS"] == 0) ? $msg : gmdate("Y-m-d", intval($
$urlpath = URL_DIR . substr($row['BaseName'], 0, 2) . "/" . $row['BaseName'];
+$grps = pkg_groups($row["ID"]);
+
$deps = pkg_dependencies($row["ID"]);
$requiredby = pkg_required($row["Name"]);
@@ -172,6 +174,22 @@ if ($SID && ($uid == $row["MaintainerUID"] ||
<th><?= __('License') . ': ' ?></th>
<td><?= htmlspecialchars($license) ?></td>
</tr>
+ <?php if (count($grps) > 0): ?>
+ <tr>
+ <th><?= __('Groups') . ': ' ?></th>
+ <td class="wrap">
+ <?php foreach($grps as $grp): ?>
+ <span class="related">
+ <?php if ($grp !== end($grps)): ?>
+ <?= htmlspecialchars($grp) ?>,
+ <?php else: ?>
+ <?= htmlspecialchars($grp) ?>
+ <?php endif; ?>
+ </span>
+ <?php endforeach; ?>
+ </td>
+ </tr>
+ <?php endif; ?>
<?php if (count($rels_c) > 0): ?>
<tr>
<th><?= __('Conflicts') . ': ' ?></th>