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 Handler.Common
import Data.Maybe (fromJust)
getRestockR :: Handler Html
getRestockR = do

View file

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