]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Single anchor to include thumbnail and title for attachment
authorRobin Millette <millette@controlyourself.ca>
Mon, 25 May 2009 19:38:50 +0000 (15:38 -0400)
committerRobin Millette <millette@controlyourself.ca>
Mon, 25 May 2009 19:38:50 +0000 (15:38 -0400)
lib/attachmentlist.php

index 52aa5d9ee58ab61fea2e21de5ac6a3e0fca34512..2a0114b12773d5fd89ba1e3ef8a6006ea9504a9a 100644 (file)
@@ -198,23 +198,22 @@ class AttachmentListItem extends Widget
         $attr = $this->linkAttr();
         $text = $this->linkTitle();
         $this->out->elementStart('h4');
-        $this->out->element('a', $attr, $text);
-
+        $this->out->elementStart('a', $attr);
+        $this->out->element('span', null, $text);
+        $this->showRepresentation();
+        $this->out->elementEnd('a');
         $this->out->elementEnd('h4');
     }
 
     function showNoticeAttachment()
     {
         $this->showLink();
-        $this->showRepresentation();
     }
 
     function showRepresentation() {
         $thumbnail = File_thumbnail::staticGet('file_id', $this->attachment->id);
         if (!empty($thumbnail)) {
-            $this->out->elementStart('a', $this->linkAttr()/*'href' => $this->linkTo()*/);
             $this->out->element('img', array('alt' => 'nothing to say', 'src' => $thumbnail->url, 'width' => $thumbnail->width, 'height' => $thumbnail->height));
-            $this->out->elementEnd('a');
         }
     }