]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/noticelist.php
Removed <dl> structure from NoticeListItem::showNoticeLink. Reason:
[quix0rs-gnu-social.git] / lib / noticelist.php
index 9ace341d8018b632103583bf88641ed1896ed806..a3d20025f63cbcac602101f3a1def970347cc900 100644 (file)
@@ -50,7 +50,6 @@ require_once INSTALLDIR.'/lib/attachmentlist.php';
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://laconi.ca/
  * @see      Notice
- * @see      StreamAction
  * @see      NoticeListItem
  * @see      ProfileNoticeList
  */
@@ -180,7 +179,6 @@ class NoticeListItem extends Widget
     {
         $this->showStart();
         $this->showNotice();
-        $this->showNoticeAttachments();
         $this->showNoticeInfo();
         $this->showNoticeOptions();
         $this->showEnd();
@@ -194,36 +192,10 @@ class NoticeListItem extends Widget
         $this->out->elementEnd('div');
     }
 
-    function showNoticeAttachments() {
-        if ($this->isUsedInList()) {
-            return;
-        }
-        $al = new AttachmentList($this->notice, $this->out);
-        $al->show();
-    }
-
-    function isUsedInList() {
-        return 'shownotice' !== $this->out->args['action'];
-    }
-
-/*
-    function attachmentCount($discriminant = true) {
-        $file_oembed = new File_oembed;
-        $query = "select count(*) as c from file_oembed join file_to_post on file_oembed.file_id = file_to_post.file_id where post_id=" . $this->notice->id;
-        $file_oembed->query($query);
-        $file_oembed->fetch();
-        return intval($file_oembed->c);
-    }
-*/
-
-    function showWithAttachment() {
-    }
-
     function showNoticeInfo()
     {
         $this->out->elementStart('div', 'entry-content');
         $this->showNoticeLink();
-//        $this->showWithAttachment();
         $this->showNoticeSource();
         $this->showContext();
         $this->out->elementEnd('div');
@@ -364,10 +336,6 @@ class NoticeListItem extends Widget
             // versions (>> 0.4.x)
             $this->out->raw(common_render_content($this->notice->content, $this->notice));
         }
-        $uploaded = $this->notice->getUploadedAttachment();
-        if ($uploaded) {
-            $this->out->element('a', array('href' => $uploaded, 'class' => 'attachment'), $uploaded);
-        }
         $this->out->elementEnd('p');
     }
 
@@ -389,19 +357,14 @@ class NoticeListItem extends Widget
             preg_match('/^http/', $this->notice->uri)) {
             $noticeurl = $this->notice->uri;
         }
-        $this->out->elementStart('dl', 'timestamp');
-        $this->out->element('dt', null, _('Published'));
-        $this->out->elementStart('dd', null);
         $this->out->elementStart('a', array('rel' => 'bookmark',
+                                            'class' => 'timestamp',
                                             'href' => $noticeurl));
         $dt = common_date_iso8601($this->notice->created);
         $this->out->element('abbr', array('class' => 'published',
                                           'title' => $dt),
                             common_date_string($this->notice->created));
-
         $this->out->elementEnd('a');
-        $this->out->elementEnd('dd');
-        $this->out->elementEnd('dl');
     }
 
     /**
@@ -464,7 +427,7 @@ class NoticeListItem extends Widget
             $this->out->elementStart('dl', 'response');
             $this->out->element('dt', null, _('To'));
             $this->out->elementStart('dd');
-            $this->out->element('a', array('href' => $convurl),
+            $this->out->element('a', array('href' => $convurl.'#notice-'.$this->notice->id),
                                 _('in context'));
             $this->out->elementEnd('dd');
             $this->out->elementEnd('dl');
@@ -485,17 +448,12 @@ class NoticeListItem extends Widget
         if (common_logged_in()) {
             $reply_url = common_local_url('newnotice',
                                           array('replyto' => $this->profile->nickname));
-
-            $this->out->elementStart('dl', 'notice_reply');
-            $this->out->element('dt', null, _('Reply to this notice'));
-            $this->out->elementStart('dd');
             $this->out->elementStart('a', array('href' => $reply_url,
+                                                'class' => 'notice_reply',
                                                 'title' => _('Reply to this notice')));
             $this->out->text(_('Reply'));
             $this->out->element('span', 'notice_id', $this->notice->id);
             $this->out->elementEnd('a');
-            $this->out->elementEnd('dd');
-            $this->out->elementEnd('dl');
         }
     }
 
@@ -511,13 +469,9 @@ class NoticeListItem extends Widget
         if ($user && $this->notice->profile_id == $user->id) {
             $deleteurl = common_local_url('deletenotice',
                                           array('notice' => $this->notice->id));
-            $this->out->elementStart('dl', 'notice_delete');
-            $this->out->element('dt', null, _('Delete this notice'));
-            $this->out->elementStart('dd');
             $this->out->element('a', array('href' => $deleteurl,
+                                           'class' => 'notice_delete',
                                            'title' => _('Delete this notice')), _('Delete'));
-            $this->out->elementEnd('dd');
-            $this->out->elementEnd('dl');
         }
     }