diff --git a/app/User/Bookmark.php b/app/User/Bookmark.php index 84a625574..f800f5e5b 100644 --- a/app/User/Bookmark.php +++ b/app/User/Bookmark.php @@ -244,15 +244,17 @@ class Bookmark extends \Gazelle\BaseUser { public function artistList(): array { self::$db->prepared_query(" - SELECT ag.ArtistID, aa.Name - FROM bookmarks_artists AS ba - INNER JOIN artists_group AS ag USING (ArtistID) + SELECT ag.ArtistID AS artist_id, + aa.Name AS artist_name, + ba.Time AS created + FROM bookmarks_artists ba + INNER JOIN artists_group ag USING (ArtistID) INNER JOIN artists_alias aa ON (ag.PrimaryAlias = aa.AliasID) WHERE ba.UserID = ? ORDER BY aa.Name ", $this->user->id() ); - return self::$db->to_pair('ArtistID', 'Name', false); + return self::$db->to_array(false, MYSQLI_ASSOC, false); } /** diff --git a/templates/bookmark/artist.twig b/templates/bookmark/artist.twig index b0a765c9e..1e59ba5a1 100644 --- a/templates/bookmark/artist.twig +++ b/templates/bookmark/artist.twig @@ -1,7 +1,7 @@ {{ header(user.username ~ ' › Bookmarked artists', {'js': 'browse'}) }}
-

{{ user.username }} › Bookmarked artists

+

{{ user.id|user_url }} › Bookmarked artists

{% set own_profile = user.id == viewer.id %} -{% for id, name in list %} - {% if loop.first %} +{% for item in list %} +{% if loop.first %} + + - {% endif %} +{% endif %} + - {% if loop.last %} +{% if loop.last %}
ArtistCreatedAction
- {{ name }} - - {% if viewer.permitted('site_torrents_notify') %} - {% if not viewer.hasArtistNotification(name) %} - Notify of new uploads - {% else %} - Do not notify of new uploads - {% endif %} - {% endif %} - {% if own_profile %} - Remove bookmark - {% endif %} - + {{ item.artist_name }} + + {{ item.created|time_diff }} + +{% if own_profile %} + Remove bookmark +{% endif %} +{% if viewer.permitted('site_torrents_notify') %} +{% if not viewer.hasArtistNotification(item.artist_name) %} + Notify of new uploads +{% else %} + Do not notify of new uploads +{% endif %} +{% endif %}
- {% endif %} +{% endif %} {% else %}

No bookmarked artists

{% endfor %}