pics/templates/Alert.php
Dennis Brentjes 16ec547064 Changes the ConfirmDelete page and updates database code.
The ConfirmDelete page now uses parts of the photopage. The
Confirmation dialog is its own template which is based on Alert.

The database now updates the album thumb to the most recent
addition to the album, when the album thumb asset is being deleted.
When there are no pictures left in the album 0 will be set.
2018-07-13 23:00:36 +02:00

32 lines
889 B
PHP

<?php
/*****************************************************************************
* Alert.php
* Defines the key template Alert.
*
* Kabuki CMS (C) 2013-2015, Aaron van Geffen
*****************************************************************************/
class Alert extends SubTemplate
{
public function __construct($title = '', $message = '', $type = 'alert')
{
$this->_title = $title;
$this->_message = $message;
$this->_type = in_array($type, ['alert', 'error', 'success', 'info']) ? $type : 'alert';
}
protected function html_content()
{
echo '
<div class="alert', $this->_type != 'alert' ? ' alert-' . $this->_type : '', '">', (!empty($this->_title) ? '
<strong>' . $this->_title . '</strong><br>' : ''), '<p>', $this->_message, '</p>';
$this->additional_alert_content();
echo '</div>';
}
protected function additional_alert_content()
{}
}