From 230748c73d48abcba0f53e49151d775c9b462ffe Mon Sep 17 00:00:00 2001 From: dave Date: Wed, 18 Feb 2009 16:18:56 +0000 Subject: admins can highlight featured groups git-svn-id: https://code.elgg.org/elgg/trunk@2799 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/groups/views/default/groups/featured.php | 21 ++++++++++++++++++++- mod/groups/views/default/groups/grouplisting.php | 15 ++++++++++++++- 2 files changed, 34 insertions(+), 2 deletions(-) (limited to 'mod/groups/views') 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 **/ + ?> -

Featured groups

\ No newline at end of file +

+ + $group, + 'size' => 'small', + ) + ); + + echo "
" . $icon . " " . $group->name . "
"; + echo $group->briefdescription . "
"; + + } + } +?> \ 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 .= "
" . $mem . " / " . elgg_echo("groups:member") . " (" . get_group_members($vars['entity']->guid, 10, 0, 0, true) . ")
"; + //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 .= "
" . $mem . " / " . elgg_echo("groups:member") . " (" . get_group_members($vars['entity']->guid, 10, 0, 0, true) . ")
"; + //if admin, show make featured option + if(isadminloggedin()) + $info .= "{$wording}"; + $info .= "
"; $info .= "

getUrl() . "\">" . $vars['entity']->name . "

"; $info .= "

" . $vars['entity']->description . "

"; -- cgit v1.2.3