hide reactivate button, when there's nothing to reactivate.
This commit is contained in:
parent
daf9f838c8
commit
8980d99f7e
2 changed files with 5 additions and 3 deletions
|
@ -31,6 +31,7 @@ getHomeR = do
|
|||
beverages <- runDB $ selectList [BeverageAmount !=. 0] [Desc BeverageIdent]
|
||||
today <- liftIO $ utctDay <$> getCurrentTime
|
||||
users <- runDB $ selectList [UserTimestamp >=. addDays (-30) today] [Asc UserIdent]
|
||||
ousers <- runDB $ selectList [UserTimestamp <. addDays (-30) today] [Asc UserIdent]
|
||||
defaultLayout $ do
|
||||
addScript $ StaticR js_barcode_js
|
||||
$(widgetFile "home")
|
||||
|
|
|
@ -20,7 +20,8 @@ $forall (Entity uId user) <- users
|
|||
<a href=@{NewUserR}>
|
||||
<p>_{MsgCreateUser}
|
||||
|
||||
<article .article #func>
|
||||
$if not (null ousers)
|
||||
<article .article #func>
|
||||
<a href=@{ReactivateR}>
|
||||
<p>_{MsgReactivateOldUser}
|
||||
|
||||
|
|
Loading…
Reference in a new issue