function show()
{
-// $this->out->elementStart('div', array('id' =>'attachments_primary'));
- $this->out->elementStart('div', array('id' =>'content'));
- $this->out->element('h2', null, _('Attachments'));
- $this->out->elementStart('ul', array('class' => 'attachments'));
-
$atts = new File;
$att = $atts->getAttachments($this->notice->id);
+ if (empty($att)) return 0;
+ $this->out->elementStart('dl', array('id' =>'attachments'));
+ $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('ul');
- $this->out->elementEnd('div');
+ $this->out->elementEnd('dd');
+ $this->out->elementEnd('ol');
+ $this->out->elementEnd('dl');
return count($att);
}
}
function showLink() {
- $attr = $this->linkAttr();
- $text = $this->linkTitle();
- $this->out->elementStart('h4');
- $this->out->elementStart('a', $attr);
- $this->out->element('span', null, $text);
+ $this->out->elementStart('a', $this->linkAttr());
+ $this->out->element('span', null, $this->linkTitle());
$this->showRepresentation();
$this->out->elementEnd('a');
- $this->out->elementEnd('h4');
}
function showNoticeAttachment()