Hide edit button when not authorized
This commit is contained in:
parent
76831c469f
commit
1d658a9e76
@ -11,10 +11,11 @@ component CharacterDetails(character *arn.Character, characterAnime []*arn.Anime
|
|||||||
.character-image-container.mountable
|
.character-image-container.mountable
|
||||||
img.character-image-fullsize(src=character.ImageLink("large"), alt=character.Name.Canonical)
|
img.character-image-fullsize(src=character.ImageLink("large"), alt=character.Name.Canonical)
|
||||||
|
|
||||||
.buttons
|
if user != nil && (user.Role == "editor" || user.Role == "admin")
|
||||||
a.button(href=character.Link() + "/edit")
|
.buttons
|
||||||
Icon("pencil")
|
a.button(href=character.Link() + "/edit")
|
||||||
span Edit character
|
Icon("pencil")
|
||||||
|
span Edit character
|
||||||
|
|
||||||
.character-description-container
|
.character-description-container
|
||||||
h1.character-name.mountable= character.Name.Canonical
|
h1.character-name.mountable= character.Name.Canonical
|
||||||
|
Loading…
Reference in New Issue
Block a user