mirror of
https://github.com/friendica/friendica
synced 2024-11-18 23:03:40 +00:00
Merge pull request #7811 from tobiasd/20191103-clickoncat
categories of postings linked
This commit is contained in:
commit
17061b22d2
6 changed files with 12 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
{{/if}}
|
||||
</div>
|
||||
{{if $item.has_cats}}
|
||||
<div class="categorytags"><span>{{$item.txt_cats}} {{foreach $item.categories as $cat}}<span class="p-category">{{$cat.name}}</span>{{if $cat.removeurl}} <a href="{{$cat.removeurl}}" title="{{$remove}}">[{{$remove}}]</a>{{/if}} {{if $cat.last}}{{else}}, {{/if}}{{/foreach}}
|
||||
<div class="categorytags"><span>{{$item.txt_cats}} {{foreach $item.categories as $cat}}<span class="p-category"><a href="{{$cat.url}}">{{$cat.name}}</a></span>{{if $cat.removeurl}} <a href="{{$cat.removeurl}}" title="{{$remove}}">[{{$remove}}]</a>{{/if}} {{if $cat.last}}{{else}}, {{/if}}{{/foreach}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
|
|
|
@ -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}}
|
||||
<span class="category label btn-success sm p-category">{{$cat.name}}{{if $cat.removeurl}} (<a href="{{$cat.removeurl}}" title="{{$remove}}">x</a>) {{/if}} </span>
|
||||
<span class="category label btn-success sm p-category"><a href="{{$cat.url}}">{{$cat.name}}</a>{{if $cat.removeurl}} (<a href="{{$cat.removeurl}}" title="{{$remove}}">x</a>) {{/if}} </span>
|
||||
{{/foreach}}
|
||||
</div>
|
||||
{{if $item.edited}}<div class="itemedited text-muted">{{$item.edited['label']}} (<span title="{{$item.edited['date']}}">{{$item.edited['relative']}}</span>)</div>{{/if}}
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
<span class="folder p-category">{{$cat.name}}</a>{{if $cat.removeurl}} (<a href="{{$cat.removeurl}}" title="{{$remove}}">x</a>) {{/if}} </span>
|
||||
{{/foreach}}
|
||||
{{foreach $item.categories as $cat}}
|
||||
<span class="category p-category">{{$cat.name}}</a>{{if $cat.removeurl}} (<a href="{{$cat.removeurl}}" title="{{$remove}}">x</a>) {{/if}} </span>
|
||||
<span class="category p-category"><a href="{{$cat.url}}">{{$cat.name}}</a>{{if $cat.removeurl}} (<a href="{{$cat.removeurl}}" title="{{$remove}}">x</a>) {{/if}} </span>
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
</div>
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
</div>
|
||||
|
||||
{{if $item.has_cats}}
|
||||
<div class="categorytags"><span>{{$item.txt_cats}} {{foreach $item.categories as $cat}}<span class="p-category">{{$cat.name}}</span>
|
||||
<div class="categorytags"><span>{{$item.txt_cats}} {{foreach $item.categories as $cat}}<span class="p-category"><a href="{{$cat.url}}">{{$cat.name}}</a></span>
|
||||
<a href="{{$cat.removeurl}}" title="{{$remove}}">[{{$remove}}]</a>
|
||||
{{if $cat.last}}{{else}}, {{/if}}{{/foreach}}
|
||||
</div>
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
<span class="folder p-category">{{$cat.name}}{{if $cat.removeurl}} (<a href="{{$cat.removeurl}}" title="{{$remove}}">x</a>) {{/if}} </span>
|
||||
{{/foreach}}
|
||||
{{foreach $item.categories as $cat}}
|
||||
<span class="category p-category">{{$cat.name}}{{if $cat.removeurl}} (<a href="{{$cat.removeurl}}" title="{{$remove}}">x</a>) {{/if}} </span>
|
||||
<span class="category p-category"><a href="{{$cat.url}}">{{$cat.name}}</a>{{if $cat.removeurl}} (<a href="{{$cat.removeurl}}" title="{{$remove}}">x</a>) {{/if}} </span>
|
||||
{{/foreach}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue