Compare commits
2 Commits
35cb6798c8
...
1f53689e4b
Author | SHA1 | Date | |
---|---|---|---|
1f53689e4b | |||
accf093935 |
@ -55,6 +55,7 @@ class ViewPhotoAlbum extends HTMLController
|
||||
{
|
||||
$filters[$contributor['slug']] = [
|
||||
'id_user' => $contributor['id_user'],
|
||||
'label' => $contributor['first_name'],
|
||||
'caption' => sprintf('By %s (%s photos)',
|
||||
$contributor['first_name'], $contributor['num_assets']),
|
||||
'link' => $tag->getUrl() . '/?by=' . $contributor['slug'],
|
||||
|
@ -155,24 +155,20 @@ class PageIndex
|
||||
|
||||
public function getLink($start = null, $order = null, $dir = null)
|
||||
{
|
||||
$url = $this->base_url;
|
||||
$amp = strpos($this->base_url, '?') ? '&' : '?';
|
||||
$page = !is_string($start) ? ($start / $this->items_per_page) + 1 : $start;
|
||||
$url = $this->base_url . str_replace('%PAGE%', $page, $this->page_slug);
|
||||
|
||||
if (!empty($start))
|
||||
{
|
||||
$page = $start !== '%d' ? ($start / $this->items_per_page) + 1 : $start;
|
||||
$url .= strtr($this->page_slug, ['%PAGE%' => $page, '%AMP%' => $amp]);
|
||||
$amp = '&';
|
||||
}
|
||||
$urlParams = [];
|
||||
if (!empty($order))
|
||||
{
|
||||
$url .= $amp . 'order=' . $order;
|
||||
$amp = '&';
|
||||
}
|
||||
$urlParams['order'] = $order;
|
||||
if (!empty($dir))
|
||||
$urlParams['dir'] = $dir;
|
||||
|
||||
if (!empty($urlParams))
|
||||
{
|
||||
$url .= $amp . 'dir=' . $dir;
|
||||
$amp = '&';
|
||||
$queryString = (strpos($uri, '?') !== false ? '&' : '?');
|
||||
$queryString .= http_build_query($urlParams);
|
||||
$url .= $queryString;
|
||||
}
|
||||
|
||||
return $url;
|
||||
|
@ -33,7 +33,16 @@ class AlbumButtonBox extends Template
|
||||
echo '
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-light dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<i class="bi bi-filter"></i>
|
||||
<i class="bi bi-filter"></i>';
|
||||
|
||||
if ($this->active_filter)
|
||||
{
|
||||
echo '
|
||||
<span class="badge text-bg-danger">',
|
||||
$this->filters[$this->active_filter]['label'], '</span>';
|
||||
}
|
||||
|
||||
echo '
|
||||
</button>
|
||||
<ul class="dropdown-menu">';
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user