diff options
author | dave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-02-18 16:18:56 +0000 |
---|---|---|
committer | dave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-02-18 16:18:56 +0000 |
commit | 230748c73d48abcba0f53e49151d775c9b462ffe (patch) | |
tree | c4bdb290464912278af0afeb43fc450686e1cc0a /mod/groups/views | |
parent | 864b96d63b5690411f83aa3d9b2c49554aa9c25c (diff) | |
download | elgg-230748c73d48abcba0f53e49151d775c9b462ffe.tar.gz elgg-230748c73d48abcba0f53e49151d775c9b462ffe.tar.bz2 |
admins can highlight featured groups
git-svn-id: https://code.elgg.org/elgg/trunk@2799 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/groups/views')
-rw-r--r-- | mod/groups/views/default/groups/featured.php | 21 | ||||
-rw-r--r-- | mod/groups/views/default/groups/grouplisting.php | 15 |
2 files changed, 34 insertions, 2 deletions
diff --git a/mod/groups/views/default/groups/featured.php b/mod/groups/views/default/groups/featured.php index ab7691a0b..381e01a4d 100644 --- a/mod/groups/views/default/groups/featured.php +++ b/mod/groups/views/default/groups/featured.php @@ -4,6 +4,25 @@ * This view will display featured groups - these are set by admin
**/
+
?>
-<h3>Featured groups</h3>
\ No newline at end of file +<h3><?php echo elgg_echo("groups:featured"); ?></h3>
+
+<?php
+ if($vars['featured']){
+
+ foreach($vars['featured'] as $group){
+ $icon = elgg_view(
+ "groups/icon", array(
+ 'entity' => $group,
+ 'size' => 'small',
+ )
+ );
+
+ echo "<div class=\"featured_group\">" . $icon . " " . $group->name . "<br />";
+ echo $group->briefdescription . "</div>";
+
+ }
+ }
+?>
\ No newline at end of file diff --git a/mod/groups/views/default/groups/grouplisting.php b/mod/groups/views/default/groups/grouplisting.php index 8d7e3c6d8..418a3d16f 100644 --- a/mod/groups/views/default/groups/grouplisting.php +++ b/mod/groups/views/default/groups/grouplisting.php @@ -25,7 +25,20 @@ else $mem = elgg_echo("groups:closed"); - $info .= "<div style=\"float:right;\">" . $mem . " / " . elgg_echo("groups:member") . " (" . get_group_members($vars['entity']->guid, 10, 0, 0, true) . ")</div>"; + //for admins display the feature or unfeature option + if($vars['entity']->featured_group == "yes"){ + $url = $vars['url'] . "action/groups/featured?group_guid=" . $vars['entity']->guid . "&action=unfeature"; + $wording = "Unfeature"; + }else{ + $url = $vars['url'] . "action/groups/featured?group_guid=" . $vars['entity']->guid . "&action=feature"; + $wording = "Make featured"; + } + + $info .= "<div style=\"float:right;\">" . $mem . " / " . elgg_echo("groups:member") . " (" . get_group_members($vars['entity']->guid, 10, 0, 0, true) . ")<br />"; + //if admin, show make featured option + if(isadminloggedin()) + $info .= "<a href=\"{$url}\">{$wording}</a>"; + $info .= "</div>"; $info .= "<p><b><a href=\"" . $vars['entity']->getUrl() . "\">" . $vars['entity']->name . "</a></b></p>"; $info .= "<p class=\"owner_timestamp\">" . $vars['entity']->description . "</p>"; |