/**
  * show the list of notices
  *
  * "Uses up" the stream by looping through it. So, probably can't
  * be called twice on the same list.
  *
  * @return int count of notices listed.
  */
 function show()
 {
     $att = File::getAttachments($this->notice->id);
     if (empty($att)) {
         return 0;
     }
     $this->showListStart();
     foreach ($att as $n => $attachment) {
         $item = $this->newListItem($attachment);
         $item->show();
     }
     $this->showListEnd();
     return count($att);
 }
 /**
  * show the list of notices
  *
  * "Uses up" the stream by looping through it. So, probably can't
  * be called twice on the same list.
  *
  * @return int count of notices listed.
  */
 function show()
 {
     $atts = new File();
     $att = $atts->getAttachments($this->notice->id);
     if (empty($att)) {
         return 0;
     }
     $this->out->elementStart('dl', array('id' => 'attachments', 'class' => 'entry-content'));
     $this->out->element('dt', null, _('Attachments'));
     $this->out->elementStart('dd');
     $this->out->elementStart('ol', array('class' => 'attachments'));
     foreach ($att as $n => $attachment) {
         $item = $this->newListItem($attachment);
         $item->show();
     }
     $this->out->elementEnd('dd');
     $this->out->elementEnd('ol');
     $this->out->elementEnd('dl');
     return count($att);
 }