X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Finlineattachmentlist.php;h=3eed70a3165e1690026bb5c55c31fdc3a97c3c2d;hb=1ae5ea8f4cf40113a14a183b754101177f99ba32;hp=de5008e87babb796e2ebd8d92b6066e453de901f;hpb=fa6c6077d6e49d03b10da4339e3c97e0734897de;p=quix0rs-gnu-social.git diff --git a/lib/inlineattachmentlist.php b/lib/inlineattachmentlist.php index de5008e87b..3eed70a316 100644 --- a/lib/inlineattachmentlist.php +++ b/lib/inlineattachmentlist.php @@ -35,12 +35,8 @@ class InlineAttachmentList extends AttachmentList { function showListStart() { - $this->out->elementStart('div', array('class' => 'entry-content thumbnails')); - } - - function showListEnd() - { - $this->out->elementEnd('div'); + $this->out->element('h3', 'attachments-title', _('Attachments')); + parent::showListStart(); } /** @@ -50,7 +46,7 @@ class InlineAttachmentList extends AttachmentList * * @return ListItem a list item for displaying the attachment */ - function newListItem($attachment) + function newListItem(File $attachment) { return new InlineAttachmentListItem($attachment, $this->out); } @@ -58,28 +54,8 @@ class InlineAttachmentList extends AttachmentList class InlineAttachmentListItem extends AttachmentListItem { - function show() - { - if ($this->attachment->isEnclosure()) { - parent::show(); - } - } - function showLink() { - $this->out->elementStart('a', $this->linkAttr()); $this->showRepresentation(); - $this->out->elementEnd('a'); - } - - /** - * Build HTML attributes for the link - * @return array - */ - function linkAttr() - { - $attr = parent::linkAttr(); - $attr['class'] = 'attachment-thumbnail'; - return $attr; } /** @@ -91,7 +67,7 @@ class InlineAttachmentListItem extends AttachmentListItem { // XXX: RDFa // TODO: add notice_type class e.g., notice_video, notice_image - $this->out->elementStart('span', array('class' => 'inline-attachment')); + $this->out->elementStart('li', array('class' => 'inline-attachment')); } /** @@ -103,6 +79,6 @@ class InlineAttachmentListItem extends AttachmentListItem */ function showEnd() { - $this->out->elementEnd('span'); + $this->out->elementEnd('li'); } }