mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Hide the table sorting links on the dashboard
The tables on the dashboard always show the 50 most recent packages, ordered by last update. Do not make the table headers of these tables clickable. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
parent
1049f93191
commit
7d7e079326
1 changed files with 27 additions and 8 deletions
|
@ -1,4 +1,23 @@
|
||||||
<?php
|
<?php
|
||||||
|
if ($show_headers) {
|
||||||
|
$fmtth = function($title, $sb=false, $so=false, $hint=false) {
|
||||||
|
echo '<th>';
|
||||||
|
if ($sb) {
|
||||||
|
echo '<a href="?' . mkurl('SB=' . $sb . '&SO = ' . $so) . '">' . $title . '</a>';
|
||||||
|
} else {
|
||||||
|
echo $title;
|
||||||
|
}
|
||||||
|
if ($hint) {
|
||||||
|
echo '<span title="' . $hint . '" class="hover-help"><sup>?</sup></span>';
|
||||||
|
}
|
||||||
|
echo '</th>';
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
$fmtth = function($title, $sb=false, $so=false, $hint=false) {
|
||||||
|
echo '<th>' . $title . '</th>';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
if (!$result): ?>
|
if (!$result): ?>
|
||||||
<p><?= __("Error retrieving package list.") ?></p>
|
<p><?= __("Error retrieving package list.") ?></p>
|
||||||
<?php elseif ($total == 0): ?>
|
<?php elseif ($total == 0): ?>
|
||||||
|
@ -33,16 +52,16 @@ if (!$result): ?>
|
||||||
<?php if ($SID && $show_headers): ?>
|
<?php if ($SID && $show_headers): ?>
|
||||||
<th> </th>
|
<th> </th>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<th><a href="?<?= mkurl('SB=n&SO=' . $SO_next) ?>"><?= __("Name") ?></a></th>
|
<?php $fmtth(__('Name'), 'n', $SO_next) ?>
|
||||||
<th><?= __("Version") ?></th>
|
<?php $fmtth(__('Version')) ?>
|
||||||
<th><a href="?<?= mkurl('SB=v&SO=' . $SO_next) ?>"><?= __("Votes") ?></a></th>
|
<?php $fmtth(__('Votes'), 'v', $SO_next) ?>
|
||||||
<th><a href="?<?= mkurl('SB=p&SO=' . $SO_next) ?>"><?= __("Popularity") ?></a><span title="<?= __('Popularity is calculated as the sum of all votes with each vote being weighted with a factor of %.2f per day since its creation.', 0.98) ?>" class="hover-help"><sup>?</sup></span></th>
|
<?php $fmtth(__('Popularity'), 'p', $SO_next, __('Popularity is calculated as the sum of all votes with each vote being weighted with a factor of %.2f per day since its creation.', 0.98)) ?>
|
||||||
<?php if ($SID): ?>
|
<?php if ($SID): ?>
|
||||||
<th><a href="?<?= mkurl('SB=w&SO=' . $SO_next) ?>"><?= __("Voted") ?></a></th>
|
<?php $fmtth(__('Voted'), 'w', $SO_next) ?>
|
||||||
<th><a href="?<?= mkurl('SB=o&SO=' . $SO_next) ?>"><?= __("Notify") ?></a></th>
|
<?php $fmtth(__('Notify'), 'o', $SO_next) ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<th><?= __("Description") ?></th>
|
<?php $fmtth(__('Description')) ?>
|
||||||
<th><a href="?<?= mkurl('SB=m&SO=' . $SO_next) ?>"><?= __("Maintainer") ?></a></th>
|
<?php $fmtth(__('Maintainer'), 'm', $SO_next) ?>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
Loading…
Add table
Reference in a new issue