- common_element_start('div', 'notices width100');
- common_element('h2', 'notices', _t('Notices'));
-
- while ($notice->fetch()) {
- $this->show_notice($notice);
+ if ($cnt > 0) {
+ common_element_start('ul', array('id' => 'notices'));
+ for ($i = 0; $i < min($cnt, NOTICES_PER_PAGE); $i++) {
+ if ($notice->fetch()) {
+ $this->show_notice($notice);
+ } else {
+ // shouldn't happen!
+ break;
+ }
+ }
+ common_element_end('ul');