summaryrefslogtreecommitdiff
path: root/actions/showgroup.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/showgroup.php')
-rw-r--r--actions/showgroup.php58
1 files changed, 25 insertions, 33 deletions
diff --git a/actions/showgroup.php b/actions/showgroup.php
index a2b40f994..d5e5a4e11 100644
--- a/actions/showgroup.php
+++ b/actions/showgroup.php
@@ -73,11 +73,17 @@ class ShowgroupAction extends Action
function title()
{
+ if (!empty($this->group->fullname)) {
+ $base = $this->group->fullname . ' (' . $this->group->nickname . ')';
+ } else {
+ $base = $this->group->nickname;
+ }
+
if ($this->page == 1) {
- return sprintf(_("%s group"), $this->group->nickname);
+ return sprintf(_("%s group"), $base);
} else {
return sprintf(_("%s group, page %d"),
- $this->group->nickname,
+ $base,
$this->page);
}
}
@@ -244,7 +250,7 @@ class ShowgroupAction extends Action
if ($this->group->location) {
$this->elementStart('dl', 'entity_location');
$this->element('dt', null, _('Location'));
- $this->element('dd', 'location', $this->group->location);
+ $this->element('dd', 'label', $this->group->location);
$this->elementEnd('dl');
}
@@ -275,10 +281,8 @@ class ShowgroupAction extends Action
$cur = common_current_user();
if ($cur) {
if ($cur->isMember($this->group)) {
- if (!$cur->isAdmin($this->group)) {
- $lf = new LeaveForm($this, $this->group);
- $lf->show();
- }
+ $lf = new LeaveForm($this, $this->group);
+ $lf->show();
} else {
$jf = new JoinForm($this, $this->group);
$jf->show();
@@ -292,37 +296,18 @@ class ShowgroupAction extends Action
}
/**
- * Show a list of links to feeds this page produces
- *
- * @return void
- */
-
- function showExportData()
- {
- $fl = new FeedList($this);
- $fl->show(array(0=>array('href'=>common_local_url('grouprss',
- array('nickname' => $this->group->nickname)),
- 'type' => 'rss',
- 'version' => 'RSS 1.0',
- 'item' => 'notices')));
- }
-
- /**
- * Show a list of links to feeds this page produces
+ * Get a list of the feeds for this page
*
* @return void
*/
- function showFeeds()
+ function getFeeds()
{
$url =
common_local_url('grouprss',
array('nickname' => $this->group->nickname));
- $this->element('link', array('rel' => 'alternate',
- 'href' => $url,
- 'type' => 'application/rss+xml',
- 'title' => sprintf(_('Notice feed for %s group'),
+ return array(new Feed(Feed::RSS1, $url, sprintf(_('Notice feed for %s group'),
$this->group->nickname)));
}
@@ -422,11 +407,18 @@ class ShowgroupAction extends Action
function showAnonymousMessage()
{
- $m = sprintf(_('**%s** is a user group on %%%%site.name%%%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' .
- 'based on the Free Software [Laconica](http://laconi.ca/) tool. Its members share ' .
- 'short messages about their life and interests. '.
- '[Join now](%%%%action.register%%%%) to become part of this group and many more! ([Read more](%%%%doc.help%%%%))'),
+ if (!(common_config('site','closed') || common_config('site','inviteonly'))) {
+ $m = sprintf(_('**%s** is a user group on %%%%site.name%%%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' .
+ 'based on the Free Software [Laconica](http://laconi.ca/) tool. Its members share ' .
+ 'short messages about their life and interests. '.
+ '[Join now](%%%%action.register%%%%) to become part of this group and many more! ([Read more](%%%%doc.help%%%%))'),
$this->group->nickname);
+ } else {
+ $m = sprintf(_('**%s** is a user group on %%%%site.name%%%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' .
+ 'based on the Free Software [Laconica](http://laconi.ca/) tool. Its members share ' .
+ 'short messages about their life and interests. '),
+ $this->group->nickname);
+ }
$this->elementStart('div', array('id' => 'anon_notice'));
$this->raw(common_markup_to_html($m));
$this->elementEnd('div');