backend: include links to tags in media#show

This commit is contained in:
Lucas 2023-03-19 21:59:41 +00:00
parent ac9054f918
commit 0a20d7e9f7

View File

@ -14,7 +14,11 @@
<dt>Content-Type</dt> <dt>Content-Type</dt>
<dd><%= $media->{content_type} %></dd> <dd><%= $media->{content_type} %></dd>
<dt>Tags</dt> <dt>Tags</dt>
<% for my $tag ($media->{tags}->@*) { %> % if ($media->{tags}->@* == 0) {
<dd><%= link_to $tag => url_for("tag_show", tag_id_or_name => $tag) %></dd> <dd>None yet.</dd>
<% } %> % } else {
<dd><%= c($media->{tags}->@*)
->map(sub { link_to $_ => url_for("tag_show", tag_id_or_name => $_) })
->join(", ") %>.</dd>
% }
</dl> </dl>