Hide edit button when not authorized

This commit is contained in:
Eduard Urbach 2018-04-10 21:28:50 +02:00
parent 76831c469f
commit 1d658a9e76

View File

@ -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