mirror of
https://github.com/processwire/processwire.git
synced 2025-08-22 22:34:15 +02:00
Initial commit to new repo (carried over from: https://github.com/ryancramerdesign/ProcessWire/tree/devns)
This commit is contained in:
36
wire/templates-admin/notices.inc
Normal file
36
wire/templates-admin/notices.inc
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php namespace ProcessWire;
|
||||
?><ul id='notices' class='ui-widget'>
|
||||
<?php
|
||||
|
||||
foreach($notices as $notice) {
|
||||
|
||||
$class = 'ui-state-highlight NoticeMessage';
|
||||
$text = $notice->text;
|
||||
$icon = '';
|
||||
|
||||
if($notice instanceof NoticeError || $notice->flags & Notice::warning) {
|
||||
$class = 'ui-state-error';
|
||||
if($notice->flags & Notice::warning) {
|
||||
$class .= ' NoticeWarning';
|
||||
$icon = 'warning';
|
||||
} else {
|
||||
$class .= ' ui-priority-primary NoticeError';
|
||||
$icon = 'exclamation-triangle';
|
||||
}
|
||||
}
|
||||
|
||||
if($notice->flags & Notice::debug) {
|
||||
$class .= ' ui-priority-secondary NoticeDebug';
|
||||
$icon = 'gear';
|
||||
}
|
||||
|
||||
if(!$icon) $icon = 'check-square';
|
||||
|
||||
if($notice->class && $config->debug) $text = "{$notice->class}: $text";
|
||||
|
||||
echo "\n\t\t<li class='$class'><div class='container'><p><i class='fa fa-$icon'></i> {$text}</p></div></li>";
|
||||
|
||||
}
|
||||
|
||||
echo "\n\t</ul><!--/notices-->";
|
||||
|
Reference in New Issue
Block a user