Rev 1008 | Rev 1050 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1008 | Rev 1014 | ||
---|---|---|---|
Line 78... | Line 78... | ||
78 | } |
78 | } |
79 | } |
79 | } |
80 | 80 | ||
81 | if (count($notifications_by_sev) == 0) { |
81 | if (count($notifications_by_sev) == 0) { |
82 | 82 | ||
83 | $out['text'] .= '<p><i>'._L('No notifications').'</i></p>'; |
83 | $out['text'] .= '<br><p><i>'._L('No notifications').'</i></p>'; |
84 | 84 | ||
85 | } else { |
85 | } else { |
86 | krsort($notifications_by_sev); |
86 | krsort($notifications_by_sev); |
87 | 87 | ||
88 | foreach ($notifications_by_sev as $severity => $htmlMessages) { |
88 | foreach ($notifications_by_sev as $severity => $htmlMessages) { |
- | 89 | if (count($htmlMessages) == 0) continue; |
|
89 | 90 | ||
90 | if ($severity == 1) $sev_hf = _L('OK'); |
91 | if ($severity == 1) $sev_hf = _L('OK'); |
91 | else if ($severity == 2) $sev_hf = _L('Informational'); |
92 | else if ($severity == 2) $sev_hf = _L('Informational'); |
92 | else if ($severity == 3) $sev_hf = _L('Warnings'); |
93 | else if ($severity == 3) $sev_hf = _L('Warnings'); |
93 | else if ($severity == 4) $sev_hf = _L('Errors'); |
94 | else if ($severity == 4) $sev_hf = _L('Errors'); |
94 | else if ($severity == 5) $sev_hf = _L('Critical issues'); |
95 | else if ($severity == 5) $sev_hf = _L('Critical issues'); |
95 | else $sev_hf = _L('Severity %1', $severity-1); |
96 | else $sev_hf = _L('Severity %1', $severity-1); |
96 | 97 | ||
97 | $out['text'] .= '<h2><span class="severity_'.$severity.'">'.$sev_hf.'</span></h2>'; |
98 | $out['text'] .= '<h2><span class="severity_'.$severity.'">'.$sev_hf.' ('.count($htmlMessages).')</span></h2>'; |
- | 99 | $out['text'] .= '<span class="severity_'.$severity.'"><ol>'; |
|
98 | foreach ($htmlMessages as $htmlMessage) { |
100 | foreach ($htmlMessages as $htmlMessage) { |
99 | $out['text'] .= '<p><span class="severity_'.$severity.'">'.$htmlMessage.'</span></p>'; |
101 | $out['text'] .= '<li>'.$htmlMessage.'</li>'; |
100 | } |
102 | } |
- | 103 | $out['text'] .= '</ol></span>'; |
|
101 | } |
104 | } |
102 | } |
105 | } |
103 | } |
106 | } |
104 | } |
107 | } |
105 | 108 |