summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-09-09 14:59:46 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-09-09 14:59:46 -0400
commitf75ac910c4876e6cdbb2eb4f48a9dd5ea7c8ec54 (patch)
tree0dd3bf11d3f2b47faa68318f8bd23d8402bfaa42
parentc6f3c410d4f555fe2c989780ddbddd6b37e59096 (diff)
display icon for alerts with no header too
-rw-r--r--templates/sidebar/alert.hamlet25
1 files changed, 11 insertions, 14 deletions
diff --git a/templates/sidebar/alert.hamlet b/templates/sidebar/alert.hamlet
index 73e7e7ded..ee15f1621 100644
--- a/templates/sidebar/alert.hamlet
+++ b/templates/sidebar/alert.hamlet
@@ -4,21 +4,18 @@
$maybe h <- renderAlertHeader alert
$if block
<h4 .alert-heading>
- $case alertIcon alert
- $of Nothing
- $of Just name
- <i .icon-#{name}></i> #
+ $maybe name <- alertIcon alert
+ <i .icon-#{name}></i> #
#{h}
$else
- $case alertIcon alert
- $of Nothing
- $of Just name
- <i .icon-#{name}></i> #
+ $maybe name <- alertIcon alert
+ <i .icon-#{name}></i> #
<strong>#{h}</strong> #
+ $nothing
+ $maybe name <- alertIcon alert
+ <i .icon-#{name}></i> #
#{renderAlertMessage alert}
- $case alertButton alert
- $of Nothing
- $of Just button
- <br>
- <a .btn .btn-primary href="@{ClickAlert aid}">
- #{buttonLabel button}
+ $maybe button <- alertButton alert
+ <br>
+ <a .btn .btn-primary href="@{ClickAlert aid}">
+ #{buttonLabel button}