showing beverage avatars in restock menu

This commit is contained in:
nek0 2015-09-16 14:40:06 +02:00
parent a93cdb937f
commit 0689cd76b7
2 changed files with 7 additions and 3 deletions

View file

@ -17,6 +17,7 @@ module Handler.Restock where
import Import import Import
import Handler.Common import Handler.Common
import Data.Maybe (fromJust)
getRestockR :: Handler Html getRestockR :: Handler Html
getRestockR = do getRestockR = do

View file

@ -5,9 +5,12 @@ $doctype 5
$forall (Entity bId bev) <- beverages $forall (Entity bId bev) <- beverages
<article .article> <article .article>
<a href=@{UpstockR bId}> $if isNothing (beverageAvatar bev)
<p> <a href="@{UpstockR bId}">
#{beverageIdent bev} <p>#{beverageIdent bev}
$else
<a href="@{UpstockR bId}" style="background-image: url(@{GetAvatarR $ fromJust $ beverageAvatar bev})" .avatar>
<p>#{beverageIdent bev}
<article .article #func> <article .article #func>
<a href=@{NewArticleR}> <a href=@{NewArticleR}>