diff --git a/src/Content/Item.php b/src/Content/Item.php index ed6ec9c877..f086fbe19c 100644 --- a/src/Content/Item.php +++ b/src/Content/Item.php @@ -42,10 +42,16 @@ final class Item $folders = []; $first = true; + if (!empty($item['author-link'])) { + $url = $item['author-link'] . "?category=" . rawurlencode($savedFolderName); + } else { + $url = '#'; + } + foreach (FileTag::fileToArray($item['file'] ?? '', 'category') as $savedFolderName) { $categories[] = [ 'name' => $savedFolderName, - 'url' => "#", + 'url' => $url, 'removeurl' => ((local_user() == $item['uid']) ? 'filerm/' . $item['id'] . '?f=&cat=' . rawurlencode($savedFolderName) : ""), 'first' => $first, 'last' => false diff --git a/view/templates/wall_thread.tpl b/view/templates/wall_thread.tpl index 01cd7559f1..a4834062c0 100644 --- a/view/templates/wall_thread.tpl +++ b/view/templates/wall_thread.tpl @@ -64,7 +64,7 @@ {{/if}} {{if $item.has_cats}} -
{{$item.txt_cats}} {{foreach $item.categories as $cat}}{{$cat.name}}{{if $cat.removeurl}} [{{$remove}}]{{/if}} {{if $cat.last}}{{else}}, {{/if}}{{/foreach}} +
{{$item.txt_cats}} {{foreach $item.categories as $cat}}{{$cat.name}}{{if $cat.removeurl}} [{{$remove}}]{{/if}} {{if $cat.last}}{{else}}, {{/if}}{{/foreach}}
{{/if}} diff --git a/view/theme/frio/templates/wall_thread.tpl b/view/theme/frio/templates/wall_thread.tpl index 631aad3be2..9d8d47355c 100644 --- a/view/theme/frio/templates/wall_thread.tpl +++ b/view/theme/frio/templates/wall_thread.tpl @@ -313,7 +313,7 @@ as the value of $top_child_total (this is done at the end of this file) {{/foreach}} {{foreach $item.categories as $cat}} - {{$cat.name}}{{if $cat.removeurl}} (x) {{/if}} + {{$cat.name}}{{if $cat.removeurl}} (x) {{/if}} {{/foreach}}
{{if $item.edited}}
{{$item.edited['label']}} ({{$item.edited['relative']}})
{{/if}} diff --git a/view/theme/quattro/templates/wall_thread.tpl b/view/theme/quattro/templates/wall_thread.tpl index a80aabf4b4..bfb903c7b8 100644 --- a/view/theme/quattro/templates/wall_thread.tpl +++ b/view/theme/quattro/templates/wall_thread.tpl @@ -72,7 +72,7 @@ {{$cat.name}}{{if $cat.removeurl}} (x) {{/if}} {{/foreach}} {{foreach $item.categories as $cat}} - {{$cat.name}}{{if $cat.removeurl}} (x) {{/if}} + {{$cat.name}}{{if $cat.removeurl}} (x) {{/if}} {{/foreach}} {{/if}} diff --git a/view/theme/smoothly/templates/wall_thread.tpl b/view/theme/smoothly/templates/wall_thread.tpl index 08ff557670..a4616d9c4c 100644 --- a/view/theme/smoothly/templates/wall_thread.tpl +++ b/view/theme/smoothly/templates/wall_thread.tpl @@ -72,7 +72,7 @@ {{if $item.has_cats}} -
{{$item.txt_cats}} {{foreach $item.categories as $cat}}{{$cat.name}} +
{{$item.txt_cats}} {{foreach $item.categories as $cat}}{{$cat.name}} [{{$remove}}] {{if $cat.last}}{{else}}, {{/if}}{{/foreach}}
diff --git a/view/theme/vier/templates/wall_thread.tpl b/view/theme/vier/templates/wall_thread.tpl index 37e01f75a4..eb9c2fe575 100644 --- a/view/theme/vier/templates/wall_thread.tpl +++ b/view/theme/vier/templates/wall_thread.tpl @@ -89,7 +89,7 @@ {{$cat.name}}{{if $cat.removeurl}} (x) {{/if}} {{/foreach}} {{foreach $item.categories as $cat}} - {{$cat.name}}{{if $cat.removeurl}} (x) {{/if}} + {{$cat.name}}{{if $cat.removeurl}} (x) {{/if}} {{/foreach}}