Browse Source

fix(ui): update entry tags display logic to show links based on user authentication

Frédéric Guillot 1 year ago
parent
commit
c0fcdf3b6e
1 changed files with 8 additions and 1 deletions
  1. 8 1
      internal/template/templates/views/entry.html

+ 8 - 1
internal/template/templates/views/entry.html

@@ -135,7 +135,14 @@
         {{ if .entry.Tags }}
         <div class="entry-tags">
             {{ t "entry.tags.label" }}
-	    {{range $i, $e := .entry.Tags}}{{if $i}}, {{end}}<a href="{{ route "tagEntriesAll" "tagName" (urlEncode $e) }}"><strong>{{ $e }}</strong></a>{{end}}
+            {{ range $i, $e := .entry.Tags }}
+                {{if $i}}, {{end}}
+                {{ if $.user }}
+                    <a href="{{ route "tagEntriesAll" "tagName" (urlEncode $e) }}"><strong>{{ $e }}</strong></a>
+                {{ else }}
+                    <strong>{{ $e }}</strong>
+                {{ end }}
+            {{ end }}
         </div>
         {{ end }}
         <div class="entry-date">