-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathnotices.inc
More file actions
34 lines (25 loc) · 864 Bytes
/
Copy pathnotices.inc
File metadata and controls
34 lines (25 loc) · 864 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<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 = 'ui-icon-info';
} else {
$class .= ' ui-priority-primary NoticeError';
$icon = 'ui-icon-alert';
}
}
if($notice->flags & Notice::debug) {
$class .= ' ui-priority-secondary NoticeDebug';
if(!$icon) $icon = 'ui-icon-circle-arrow-e';
}
if(!$icon) $icon = 'ui-icon-info';
if($notice->class && $config->debug) $text = "{$notice->class}: $text";
echo "\n\t\t<li class='$class'><div class='container'><p><span class='ui-icon $icon'></span>{$text}</p></div></li>";
}
echo "\n\t</ul><!--/notices-->";