git-annex/templates/sidebar/alert.hamlet
Joey Hess 6abaf19c41 restart on upgrade is working, including automatic restart
Made alerts be able to have multiple buttons, so the alerts about upgrading
can have a button that enables automatic upgrades.

Implemented automatic upgrading when the program file has changed.

Note that when an automatic upgrade happens, the webapp displays an alert
about it for a few minutes, and then closes. This still needs work.
2013-11-23 00:54:08 -04:00

26 lines
800 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}
$if not (null buttons)
<br>
$forall (button, bnum) <- buttons
<a .btn :buttonPrimary button:.btn-primary :not (buttonPrimary button):.btn-success href="@{ClickAlert aid bnum}">
#{buttonLabel button}