git-annex/templates/sidebar/alert.hamlet
Joey Hess 01bedb54c6 improve display of multiline messages in alerts
This better handles error messages formatted for console display, by
adding a <br> after each line.

Hmm, I wonder if it'd be worth pulling in a markdown formatter, and running
the messages through it?
2013-04-24 11:45:41 -04:00

25 lines
702 B
Text

<div .alert .fade .in .#{divclass} :block:.alert-block ##{alertid}>
$if closable
<a .close onclick="(function( $ ) { $.get('@{CloseAlert aid}') })( jQuery );">&times;</a>
$maybe h <- renderAlertHeader alert
$if block
<h4 .alert-heading>
$maybe i <- alertIcon alert
^{htmlIcon i} #
#{h}
$else
$maybe i <- alertIcon alert
^{htmlIcon i} #
<strong>#{h}</strong> #
$nothing
$maybe i <- alertIcon alert
^{htmlIcon i} #
$if multiline
$forall l <- messagelines
#{l}<br>
$else
#{message}
$maybe button <- alertButton alert
<br>
<a .btn .btn-primary href="@{ClickAlert aid}">
#{buttonLabel button}