X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Finlineattachmentlist.php;h=a8f383c3fe80b2a5e0191d4e57238dc14abfd545;hb=e8d1bb25469fe1ef0cbcb32c3022010997aca4b0;hp=a0243c825f673cffcfbf5398555ace1321540a8f;hpb=19b965d99188fde59cdd39b668df8951bc0f180c;p=quix0rs-gnu-social.git diff --git a/lib/inlineattachmentlist.php b/lib/inlineattachmentlist.php index a0243c825f..a8f383c3fe 100644 --- a/lib/inlineattachmentlist.php +++ b/lib/inlineattachmentlist.php @@ -35,12 +35,7 @@ class InlineAttachmentList extends AttachmentList { function showListStart() { - $this->out->elementStart('div', array('class' => 'entry-content thumbnails')); - } - - function showListEnd() - { - $this->out->elementEnd('div'); + parent::showListStart(); } /** @@ -50,7 +45,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,37 +53,8 @@ class InlineAttachmentList extends AttachmentList class InlineAttachmentListItem extends AttachmentListItem { - protected $thumb; - - function show() - { - $this->thumb = parent::getThumbInfo(); - if (!empty($this->thumb)) { - parent::show(); - } - - } - - function getThumbInfo() - { - return $this->thumb; - } - 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; } /** @@ -100,7 +66,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')); } /** @@ -112,6 +78,6 @@ class InlineAttachmentListItem extends AttachmentListItem */ function showEnd() { - $this->out->elementEnd('span'); + $this->out->elementEnd('li'); } }