]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/inlineattachmentlist.php
Cannot use NoticeListemItem as type-hint as NoticeListItemAdapter exists.
[quix0rs-gnu-social.git] / lib / inlineattachmentlist.php
index 9fb746b5e89f7279f1db0d5e6f7973f6bbc7f827..40ec114ad82eb024862d5acf08f13dd5c8161521 100644 (file)
  * @link      http://status.net/
  */
 
-if (!defined('STATUSNET')) {
-    exit(1);
-}
+if (!defined('GNUSOCIAL')) { exit(1); }
 
 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();
     }
 
     /**
@@ -55,47 +49,3 @@ class InlineAttachmentList extends AttachmentList
         return new InlineAttachmentListItem($attachment, $this->out);
     }
 }
-
-class InlineAttachmentListItem extends AttachmentListItem
-{
-    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;
-    }
-
-    /**
-     * start a single notice.
-     *
-     * @return void
-     */
-    function showStart()
-    {
-        // XXX: RDFa
-        // TODO: add notice_type class e.g., notice_video, notice_image
-        $this->out->elementStart('span', array('class' => 'inline-attachment'));
-    }
-
-    /**
-     * finish the notice
-     *
-     * Close the last elements in the notice list item
-     *
-     * @return void
-     */
-    function showEnd()
-    {
-        $this->out->elementEnd('span');
-    }
-}