aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/views
diff options
context:
space:
mode:
authordave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-17 16:39:20 +0000
committerdave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-17 16:39:20 +0000
commit5a6ecf982492cee7b01729295d1598caa921b95b (patch)
tree32e5b78c1937058ec0d16976c48468cf4f08a0f0 /mod/groups/views
parent32e4c110c77e42e028a76ee50e89b79bc78d97c8 (diff)
downloadelgg-5a6ecf982492cee7b01729295d1598caa921b95b.tar.gz
elgg-5a6ecf982492cee7b01729295d1598caa921b95b.tar.bz2
new all groups view
git-svn-id: https://code.elgg.org/elgg/trunk@2788 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/groups/views')
-rw-r--r--mod/groups/views/default/groups/featured.php9
-rw-r--r--mod/groups/views/default/groups/find.php21
-rw-r--r--mod/groups/views/default/groups/group_sort_menu.php28
-rw-r--r--mod/groups/views/default/groups/grouplisting.php12
4 files changed, 68 insertions, 2 deletions
diff --git a/mod/groups/views/default/groups/featured.php b/mod/groups/views/default/groups/featured.php
new file mode 100644
index 000000000..ab7691a0b
--- /dev/null
+++ b/mod/groups/views/default/groups/featured.php
@@ -0,0 +1,9 @@
+<?php
+
+ /**
+ * This view will display featured groups - these are set by admin
+ **/
+
+?>
+
+<h3>Featured groups</h3> \ No newline at end of file
diff --git a/mod/groups/views/default/groups/find.php b/mod/groups/views/default/groups/find.php
new file mode 100644
index 000000000..3dc37dac0
--- /dev/null
+++ b/mod/groups/views/default/groups/find.php
@@ -0,0 +1,21 @@
+<?php
+
+ /**
+ * A simlpe group search by tag view
+ **/
+
+?>
+<div class="group_search">
+<h3><?php echo elgg_echo('groups:searchtag'); ?></h3>
+<form id="searchform" action="" method="get">
+ <input type="text" name="group_find" value="Search" onclick="if (this.value=='Search') { this.value='' }" class="search_input" />
+ <input type="submit" value="<?php echo elgg_echo('go'); ?>" class="search_submit_button" />
+</form>
+</div>
+<div class="user_groups_link">
+<?php
+ if(isloggedin())
+ echo "<p><a href=\"{$vars['url']}pg/groups/member/{$_SESSION['user']->username}\">". elgg_echo('groups:yours') ."</a></p>";
+
+?>
+</div> \ No newline at end of file
diff --git a/mod/groups/views/default/groups/group_sort_menu.php b/mod/groups/views/default/groups/group_sort_menu.php
new file mode 100644
index 000000000..957094ee6
--- /dev/null
+++ b/mod/groups/views/default/groups/group_sort_menu.php
@@ -0,0 +1,28 @@
+<?php
+
+ /**
+ * A simple view to provide the user with group filters and the number of group on the site
+ **/
+
+ $num_groups = $vars['count'];
+ if(!$num_groups)
+ $num_groups = 0;
+
+ $filter = $vars['filter'];
+
+ //url
+ $url = $vars['url'] . "pg/groups/world/";
+
+?>
+<div id="elgg_horizontal_tabbed_nav">
+<ul>
+ <li <?php if($filter == "newest") echo "class='selected'"; ?>><a href="<?php echo $url; ?>?filter=newest"><?php echo elgg_echo('newest'); ?></a></li>
+ <li <?php if($filter == "pop") echo "class='selected'"; ?>><a href="<?php echo $url; ?>?filter=pop"><?php echo elgg_echo('popular'); ?></a></li>
+ <li <?php if($filter == "active") echo "class='selected'"; ?>><a href="<?php echo $url; ?>?filter=active"><?php echo elgg_echo('groups:latestdiscussion'); ?></a></li>
+</ul>
+</div>
+<div class="group_count">
+ <?php
+ echo $num_groups . " " . elgg_echo("groups:count");
+ ?>
+</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 3d0e1ce34..8d7e3c6d8 100644
--- a/mod/groups/views/default/groups/grouplisting.php
+++ b/mod/groups/views/default/groups/grouplisting.php
@@ -17,9 +17,17 @@
'size' => 'small',
)
);
-
+
+ //get the membership type
+ $membership = $vars['entity']->membership;
+ if($membership == 2)
+ $mem = elgg_echo("groups:open");
+ 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>";
$info .= "<p><b><a href=\"" . $vars['entity']->getUrl() . "\">" . $vars['entity']->name . "</a></b></p>";
- $info .= "<p class=\"owner_timestamp\">" . $vars['entity']->briefdescription . "</p>";
+ $info .= "<p class=\"owner_timestamp\">" . $vars['entity']->description . "</p>";
// num users, last activity, owner etc