]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/showgroup.php
slightly better formatting on events
[quix0rs-gnu-social.git] / actions / showgroup.php
index a895f81b84bec6bce4a017b76d3086ed25329c57..aa1f620880e0c9ccf6594ef2d7d643b30dda1b1b 100644 (file)
@@ -167,7 +167,7 @@ class ShowgroupAction extends GroupDesignAction
      *
      * @return void
      */
-    function showLocalNav()
+    function showObjectNav()
     {
         $nav = new GroupNav($this, $this->group);
         $nav->show();
@@ -180,7 +180,6 @@ class ShowgroupAction extends GroupDesignAction
      */
     function showContent()
     {
-        $this->showGroupProfile();
         $this->showGroupNotices();
     }
 
@@ -194,7 +193,7 @@ class ShowgroupAction extends GroupDesignAction
         $notice = $this->group->getNotices(($this->page-1)*NOTICES_PER_PAGE,
                                            NOTICES_PER_PAGE + 1);
 
-        $nl = new NoticeList($notice, $this);
+        $nl = new ThreadedNoticeList($notice, $this);
         $cnt = $nl->show();
 
         $this->pagination($this->page > 1,
@@ -204,93 +203,6 @@ class ShowgroupAction extends GroupDesignAction
                           array('nickname' => $this->group->nickname));
     }
 
-    /**
-     * Show the group profile
-     *
-     * Information about the group
-     *
-     * @return void
-     */
-    function showGroupProfile()
-    {
-        $this->elementStart('div', array('id' => 'i',
-                                         'class' => 'entity_profile vcard author'));
-
-        $logo = ($this->group->homepage_logo) ?
-          $this->group->homepage_logo : User_group::defaultLogo(AVATAR_PROFILE_SIZE);
-
-        $this->element('img', array('src' => $logo,
-                                    'class' => 'photo avatar entity_depiction',
-                                    'width' => AVATAR_PROFILE_SIZE,
-                                    'height' => AVATAR_PROFILE_SIZE,
-                                    'alt' => $this->group->nickname));
-
-        $hasFN = ($this->group->fullname) ? 'entity_nickname nickname url uid' :
-            'entity_nickname fn org nickname url uid';
-        $this->element('a', array('href' => $this->group->homeUrl(),
-                                  'rel' => 'me', 'class' => $hasFN),
-                            $this->group->nickname);
-
-        if ($this->group->fullname) {
-            $this->element('div', 'entity_fn fn org', $this->group->fullname);
-        }
-
-        if ($this->group->location) {
-            $this->element('div', 'entity_location label', $this->group->location);
-        }
-
-        if ($this->group->homepage) {
-            $this->element('a', array('href' => $this->group->homepage,
-                                      'rel' => 'me',
-                                      'class' => 'url entity_url'),
-                           $this->group->homepage);
-        }
-
-        if ($this->group->description) {
-            $this->element('div', 'note entity_note', $this->group->description);
-        }
-
-        if (common_config('group', 'maxaliases') > 0) {
-            $aliases = $this->group->getAliases();
-
-            if (!empty($aliases)) {
-                $this->element('div',
-                               'aliases entity_aliases',
-                               implode(' ', $aliases));
-            }
-        }
-
-        $this->elementEnd('div');
-
-        $cur = common_current_user();
-        $this->elementStart('div', 'entity_actions');
-        // TRANS: Group actions header (h2). Text hidden by default.
-        $this->element('h2', null, _('Group actions'));
-        $this->elementStart('ul');
-        $this->elementStart('li', 'entity_subscribe');
-        if (Event::handle('StartGroupSubscribe', array($this, $this->group))) {
-            if ($cur) {
-                if ($cur->isMember($this->group)) {
-                    $lf = new LeaveForm($this, $this->group);
-                    $lf->show();
-                } else if (!Group_block::isBlocked($this->group, $cur->getProfile())) {
-                    $jf = new JoinForm($this, $this->group);
-                    $jf->show();
-                }
-            }
-            Event::handle('EndGroupSubscribe', array($this, $this->group));
-        }
-        $this->elementEnd('li');
-        if ($cur && $cur->hasRight(Right::DELETEGROUP)) {
-            $this->elementStart('li', 'entity_delete');
-            $df = new DeleteGroupForm($this, $this->group);
-            $df->show();
-            $this->elementEnd('li');
-        }
-        $this->elementEnd('ul');
-        $this->elementEnd('div');
-    }
-
     /**
      * Get a list of the feeds for this page
      *
@@ -411,7 +323,7 @@ class ShowgroupAction extends GroupDesignAction
         // TRANS: Header for group statistics on a group page (h2).
         $this->element('h2', null, _('Statistics'));
 
-        $this->elementEnd('dl');
+        $this->elementStart('dl');
         $this->element('dt', null, _m('LABEL','Created'));
         $this->element('dd', 'entity_created', date('j M Y',
                                                  strtotime($this->group->created)));