From 409331a459355fb827aa33acf3275f3d618a2510 Mon Sep 17 00:00:00 2001
From: pete
Date: Wed, 10 Mar 2010 17:13:37 +0000
Subject: Updated Groups to the new interface. Some view clean-up &
simplification done.
git-svn-id: http://code.elgg.org/elgg/trunk@5348 36083f99-b078-4883-b0ff-0f9b5a30f544
---
mod/groups/views/default/forms/forums/addpost.php | 42 +--
mod/groups/views/default/forms/forums/addtopic.php | 52 +--
mod/groups/views/default/forum/topicposts.php | 140 +++-----
mod/groups/views/default/forum/topics.php | 30 +-
mod/groups/views/default/forum/viewposts.php | 14 +-
mod/groups/views/default/group/group.php | 32 +-
.../views/default/groups/closedmembership.php | 4 +-
mod/groups/views/default/groups/css.php | 395 ++++-----------------
mod/groups/views/default/groups/featured.php | 14 +-
mod/groups/views/default/groups/find.php | 4 +-
mod/groups/views/default/groups/forum_latest.php | 30 +-
.../views/default/groups/group_sort_menu.php | 6 +-
mod/groups/views/default/groups/groupgallery.php | 25 --
mod/groups/views/default/groups/grouplisting.php | 68 ++--
mod/groups/views/default/groups/groupprofile.php | 163 ++++-----
mod/groups/views/default/groups/icon.php | 4 +-
.../views/default/groups/invitationrequests.php | 56 ++-
mod/groups/views/default/groups/members.php | 11 +-
.../views/default/groups/membershiprequests.php | 64 ++--
mod/groups/views/default/groups/profileitems.php | 6 +-
.../views/default/object/groupforumtopic.php | 54 ++-
21 files changed, 428 insertions(+), 786 deletions(-)
delete mode 100644 mod/groups/views/default/groups/groupgallery.php
(limited to 'mod/groups/views/default')
diff --git a/mod/groups/views/default/forms/forums/addpost.php b/mod/groups/views/default/forms/forums/addpost.php
index 004638f33..8aa316caa 100644
--- a/mod/groups/views/default/forms/forums/addpost.php
+++ b/mod/groups/views/default/forms/forums/addpost.php
@@ -13,28 +13,22 @@
*/
?>
-
\ No newline at end of file
diff --git a/mod/groups/views/default/forms/forums/addtopic.php b/mod/groups/views/default/forms/forums/addtopic.php
index e9fbb7109..37075aa6d 100644
--- a/mod/groups/views/default/forms/forums/addtopic.php
+++ b/mod/groups/views/default/forms/forums/addtopic.php
@@ -1,32 +1,40 @@
- * @copyright Curverider Ltd 2008-2010
- * @link http://elgg.com/
- *
- * @uses $vars['object'] Optionally, the topic to edit
- */
+/**
+ * Elgg Groups topic edit/add page
+ *
+ * @package ElggGroups
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.com/
+ *
+ * @uses $vars['object'] Optionally, the topic to edit
+ */
// Set title, form destination
- $title = elgg_echo("groups:addtopic");
- $action = "groups/addtopic";
- $tags = "";
- $title = "";
- $message = "";
- $message_id = "";
- $status = "";
- $access_id = ACCESS_DEFAULT;
+ $title = elgg_echo("groups:addtopic");
+ $action = "groups/addtopic";
+ $tags = "";
+ $title = "";
+ $message = "";
+ $message_id = "";
+ $status = "";
+ $access_id = ACCESS_DEFAULT;
// get the group guid
- $group_guid = (int) get_input('group_guid');
+ $group_guid = (int) get_input('group_guid');
+
+ // set breadcrumbs
+ echo elgg_view('page_elements/breadcrumbs', array(
+ 'breadcrumb_root_url' => '',
+ 'breadcrumb_root_text' => 'Parent Group Name',
+ 'breadcrumb_level1_url' => '#',
+ 'breadcrumb_level1_text' => elgg_echo('item:object:groupforumtopic'),
+ 'breadcrumb_currentpage' => elgg_echo("groups:addtopic")
+ ));
// set the title
- echo elgg_view_title(elgg_echo("groups:addtopic"));
+ echo elgg_view_title(elgg_echo("groups:addtopic"));
?>
diff --git a/mod/groups/views/default/forum/topicposts.php b/mod/groups/views/default/forum/topicposts.php
index 20a545eec..61bca298a 100644
--- a/mod/groups/views/default/forum/topicposts.php
+++ b/mod/groups/views/default/forum/topicposts.php
@@ -15,92 +15,64 @@
?>
-
+
+
+ owner_guid)) {
+ // display the user icon
+ echo "
" . elgg_view("profile/icon",array('entity' => $post_owner, 'size' => 'tiny')) . "
";
+ // display the user name
+ echo "
";
+ // if comment owner, group owner, or site admin - display edit and delete options
+ if (groups_can_edit_discussion($vars['entity'], page_owner_entity()->owner_guid)) {
+ echo "
";
+
+ }
+
+ echo "
" . $post_owner->name . "
";
+ } else {
+ echo "
";
+ echo "
" . elgg_echo('profile:deleteduser') . "
";
+ }
-
-
-
-
- owner_guid)) {
-
- //display the user icon
- echo " " . elgg_view("profile/icon",array('entity' => $post_owner, 'size' => 'small')) . " ";
-
- //display the user name
- echo "" . $post_owner->name . " ";
-
- } else {
- echo " ";
- echo "" . elgg_echo('profile:deleteduser') . " ";
- }
-
- //display the date of the comment
- echo "" . friendly_time($vars['entity']->time_created) . " ";
- ?>
- |
-
- $vars['entity']->value)));
- ?>
- |
-
-
- " . friendly_time($vars['entity']->time_created) . "";
- //if the comment owner is looking at it, or admin, or group owner they can edit
- if (groups_can_edit_discussion($vars['entity'], page_owner_entity()->owner_guid)) {
- ?>
-
";
- //get the edit form and details
- $submit_input = elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('save')));
- $text_textarea = elgg_view('input/longtext', array('internalname' => 'postComment'.$vars['entity']->id, 'value' => $vars['entity']->value));
- $post = elgg_view('input/hidden', array('internalname' => 'post', 'value' => $vars['entity']->id));
- $field = elgg_view('input/hidden', array('internalname' => 'field_num', 'value' => $vars['entity']->id));
- $topic = elgg_view('input/hidden', array('internalname' => 'topic', 'value' => get_input('topic')));
- $group = elgg_view('input/hidden', array('internalname' => 'group', 'value' => get_input('group_guid')));
-
- $form_body = <<
-
-EOT;
-
-?>
+ //display the actual message posted
+ echo parse_urls(elgg_view("output/longtext",array("value" => $vars['entity']->value)));
- "{$vars['url']}action/groups/editpost", 'body' => $form_body, 'internalid' => 'editforumpostForm'));
- ?>
-
-
+ // if comment owner, group owner, or site admin - display edit-form
+ if (groups_can_edit_discussion($vars['entity'], page_owner_entity()->owner_guid)) {
+ //get the edit form and details
+ $submit_input = elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('save')));
+ $text_textarea = elgg_view('input/longtext', array('internalname' => 'postComment'.$vars['entity']->id, 'value' => $vars['entity']->value));
+ $post = elgg_view('input/hidden', array('internalname' => 'post', 'value' => $vars['entity']->id));
+ $field = elgg_view('input/hidden', array('internalname' => 'field_num', 'value' => $vars['entity']->id));
+ $topic = elgg_view('input/hidden', array('internalname' => 'topic', 'value' => get_input('topic')));
+ $group = elgg_view('input/hidden', array('internalname' => 'group', 'value' => get_input('group_guid')));
+
+ $form_body = <<
+ $text_textarea
+ $post
+ $topic
+ $group
+ $field
+ $submit_input
+EOT;
+ echo "";
+ }
+ echo ""; // close entity_listing_info
+?>
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/mod/groups/views/default/forum/topics.php b/mod/groups/views/default/forum/topics.php
index fdeffa564..821e398e1 100644
--- a/mod/groups/views/default/forum/topics.php
+++ b/mod/groups/views/default/forum/topics.php
@@ -10,24 +10,24 @@
*/
?>
-
-
-
-isMember($vars['user'])){
-
-?>
-
-
-
-
+
". elgg_echo("grouptopic:notcreated") . "";
+ echo "". elgg_echo("grouptopic:notcreated") . "
";
?>
\ No newline at end of file
diff --git a/mod/groups/views/default/forum/viewposts.php b/mod/groups/views/default/forum/viewposts.php
index f2599f861..efb7e595c 100644
--- a/mod/groups/views/default/forum/viewposts.php
+++ b/mod/groups/views/default/forum/viewposts.php
@@ -12,10 +12,17 @@
?>
-
-
-
'',
+ 'breadcrumb_root_text' => 'Parent Group Name',
+ 'breadcrumb_level1_url' => '#',
+ 'breadcrumb_level1_text' => elgg_echo('item:object:groupforumtopic'),
+ 'breadcrumb_currentpage' => $vars['entity']->title
+ ));
+
+
+
//display follow up comments
$count = $vars['entity']->countAnnotations('group_topic_post');
$offset = (int) get_input('offset',0);
@@ -55,4 +62,3 @@
}
?>
-
\ No newline at end of file
diff --git a/mod/groups/views/default/group/group.php b/mod/groups/views/default/group/group.php
index 96f70d36a..e250a247b 100644
--- a/mod/groups/views/default/group/group.php
+++ b/mod/groups/views/default/group/group.php
@@ -1,21 +1,17 @@
\ No newline at end of file
diff --git a/mod/groups/views/default/groups/closedmembership.php b/mod/groups/views/default/groups/closedmembership.php
index 34e4169eb..e714602f1 100644
--- a/mod/groups/views/default/groups/closedmembership.php
+++ b/mod/groups/views/default/groups/closedmembership.php
@@ -10,6 +10,4 @@
*/
?>
-
\ No newline at end of file
+
diff --git a/mod/groups/views/default/groups/css.php b/mod/groups/views/default/groups/css.php
index 77568b0be..f1030243b 100644
--- a/mod/groups/views/default/groups/css.php
+++ b/mod/groups/views/default/groups/css.php
@@ -10,366 +10,113 @@
*/
?>
-
-/*
-#content_area_group_title h2 {
- color:#0054A7;
- font-size:1.35em;
- line-height:1.2em;
- margin:0 0 0 8px;
- padding:5px;
-}
-#topic_posts #content_area_group_title h2 {
- margin:0 0 0 0;
-}
-*/
-
-#two_column_left_sidebar_maincontent #owner_block_content {
- margin:0 0 10px 0 !important;
-}
-
-#groups_info_column_left {
- width:435px;
- margin-left:230px;
- margin-right:10px;
-}
-
-#groups_info_column_left .odd {
- background:#E9E9E9;
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
-}
-#groups_info_column_left .even {
- background:#E9E9E9;
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
-}
-#groups_info_column_left p {
- margin:0 0 7px 0;
- padding:2px 4px;
-}
-
-#groups_info_column_right {
- float:left;
- width:230px;
- margin:0 0 0 10px;
-}
-#groups_info_wide p {
- text-align: right;
- padding-right:10px;
-}
-#group_stats {
- width:190px;
- background: #e9e9e9;
- padding:5px;
- margin:10px 0 20px 0;
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
-}
-#group_stats p {
- margin:0;
+/* group listings */
+.group_count {
+ float:right;
}
-#group_members {
- margin:10px 0;
+.group_listings {
+ /* wraps group lists on
+ latest discussion, newest, popular */
}
-
-#right_column {
- clear:left;
+.entity_subtext.groups {
float:right;
- width:340px;
- margin:0 10px 0 0;
+ width:300px;
+ text-align: right;
+ margin-left: 10px;
}
-#left_column {
- width:340px;
- float:left;
- margin:0 10px 0 10px;
-
+.entity_listing.topic:hover {
+ background-color: white;
}
-.member_icon {
- margin:6px 6px 0 0;
- float:left;
+/* group invitations */
+.group_invitations a.action_button,
+.group_invitations a.submit_button {
+ float:right;
+ margin:0 0 0 14px;
}
-/* all browsers - force tinyMCE on edit comments to be full-width */
-.edit_forum_comments .defaultSkin table.mceLayout {
- width: 636px !important;
-}
-/* topics overview page */
-#forum_topics {
- padding:10px;
- margin:0 10px 0 10px;
- background:white;
- -webkit-border-radius: 8px;
- -moz-border-radius: 8px;
-}
-/* topics individual view page */
-#topic_posts {
- margin:0 10px 5px 10px;
-}
-#topic_posts #pages_breadcrumbs {
- margin:2px 0 0 0px;
-}
-#topic_posts form {
- padding:10px;
- margin:30px 0 0 0;
- background:white;
- -webkit-border-radius: 8px;
- -moz-border-radius: 8px;
-}
-.topic_post {
- padding:10px;
- margin:0 0 5px 0;
- background:white;
- -webkit-border-radius: 8px;
- -moz-border-radius: 8px;
-}
-.topic_post .post_icon {
- float:left;
- margin:0 8px 4px 0;
+/* GROUPS SIDEBAR ELEMENTS */
+#groupsearchform .search_input {
+ width:196px;
}
-.topic_post h2 {
- margin-bottom:20px;
+.featured_group {
+ margin-bottom:15px;
}
-.topic_post p.topic-post-menu {
- margin:0;
+.featured_group .usericon {
+ float:left;
+ margin-right:10px;
}
-.topic_post p.topic-post-menu a.collapsibleboxlink {
- padding-left:10px;
+.featured_group p.entity_title {
+ margin-bottom:0;
}
-.topic_post table, .topic_post td {
- border:none;
+.member_icon {
+ margin:6px 6px 0 0;
+ float:left;
}
-/* group latest discussions widget */
-#latest_discussion_widget {
- margin:0 0 20px 0;
- background:white;
- -webkit-border-radius: 8px;
- -moz-border-radius: 8px;
-}
-/* group files widget */
-#filerepo_widget_layout {
- margin:0 0 20px 0;
- padding: 0 0 5px 0;
- background:white;
- -webkit-border-radius: 8px;
- -moz-border-radius: 8px;
-}
-/* group pages widget */
-#group_pages_widget {
- margin:0 0 20px 0;
- padding: 0 0 5px 0;
- background:white;
- -webkit-border-radius: 8px;
- -moz-border-radius: 8px;
-}
-#group_pages_widget .search_listing {
- border: 2px solid #cccccc;
-}
-#right_column .filerepo_widget_singleitem {
- background: #dedede !important;
- margin:0 10px 5px 10px;
-}
-#left_column .filerepo_widget_singleitem {
- background: #dedede !important;
- margin:0 10px 5px 10px;
-}
-.forum_latest {
- margin:5px 0 5px 0;
- background: #dedede;
- padding:5px;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
-}
-.forum_latest:hover {
-}
-.forum_latest .topic_owner_icon {
+/* GROUP PROFILE PAGE (a groups homepage) */
+.group_profile_column {
float:left;
+ margin-top:10px;
}
-.forum_latest .topic_title {
- margin-left:35px;
+.group_profile_column.icon {
+ width:200px;
}
-.forum_latest .topic_title p {
- line-height: 1.0em;
- padding:0;
- margin:0;
- font-weight: bold;
+.group_profile_column.info {
+ width:510px;
+ margin-left:20px;
}
-.forum_latest p.topic_replies {
- padding:3px 0 0 0;
- margin:0;
- color:#666666;
+.group_profile_icon {
+ width:200px;
+ height:200px;
}
-.add_topic {
- -webkit-border-radius: 8px;
- -moz-border-radius: 8px;
- background:white;
- margin:5px 10px;
- padding:10px 10px 10px 6px;
-}
-
-a.add_topic_button {
- font: 12px/100% Arial, Helvetica, sans-serif;
- font-weight: bold;
- color: white;
- background:#4690d6;
- border:none;
+.group_stats {
+ background: #eeeeee;
+ padding:5px;
+ margin-top:10px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
- width: auto;
- height: auto;
- padding: 3px 6px 3px 6px;
- margin:0;
- cursor: pointer;
-}
-a.add_topic_button:hover {
- background: #0054a7;
- color:white;
- text-decoration: none;
-}
-
-
-
-/* latest discussion listing */
-.latest_discussion_info {
- float:right;
- width:300px;
- text-align: right;
- margin-left: 10px;
-}
-.groups .search_listing br {
- height:0;
- line-height:0;
}
-span.timestamp {
- color:#666666;
- font-size: 90%;
-}
-.latest_discussion_info .timestamp {
- font-size: 0.85em;
-}
-/* new groups page */
-.groups .search_listing {
- border:2px solid #cccccc;
- margin:0 0 5px 0;
-}
-.groups .search_listing:hover {
- background:#dedede;
-}
-.groups .group_count {
- font-weight: bold;
- color: #666666;
- margin:0 0 5px 4px;
-}
-.groups .search_listing_info {
- color:#666666;
-}
-.groupdetails {
- float:right;
-}
-.groupdetails p {
+.group_stats p {
margin:0;
- padding:0;
- line-height: 1.1em;
- text-align: right;
-}
-#groups_closed_membership {
- margin:0 10px 20px 10px;
- padding: 3px 5px 5px 5px;
- background:#bbdaf7;
- -webkit-border-radius: 8px;
- -moz-border-radius: 8px;
-}
-#groups_closed_membership p {
- margin:0;
-}
-
-/* groups membership widget */
-.groupmembershipwidget .contentWrapper {
- margin:0 10px 5px 10px;
}
-.groupmembershipwidget .contentWrapper .groupicon {
- float:left;
- margin:0 10px 0 0;
+.group_profile_column .odd,
+.group_profile_column .even {
+ background:#f4f4f4;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ padding:2px 4px;
+ margin:0 0 7px;
}
-.groupmembershipwidget .search_listing_info p {
- color: #666666;
+.group_profile.forum_latest {
+ margin-top:20px;
}
-.groupmembershipwidget .search_listing_info span {
- font-weight: bold;
+.group_profile.forum_latest h3 {
+ border-bottom:1px solid #CCCCCC;
+ padding-bottom:5px;
}
-
-/* groups sidebar */
-.featuredgroups .contentWrapper {
- margin:0 0 10px 0;
+.group_profile_column.right {
+ float:right;
+ width:350px;
+ margin-top:20px;
}
-.featuredgroups .contentWrapper .groupicon {
+.group_profile_column.left {
+ width:350px;
float:left;
- margin:0 10px 0 0;
-}
-.featuredgroups .contentWrapper p {
- margin: 0;
- line-height: 1.2em;
- color:#666666;
-}
-.featuredgroups .contentWrapper span {
- font-weight: bold;
-}
-#groupssearchform {
- border-bottom: 1px solid #cccccc;
- margin-bottom: 10px;
-}
-#groupssearchform input[type="submit"] {
- padding:2px;
- height:auto;
- margin:4px 0 5px 0;
-}
-.sidebarBox #owner_block_submenu {
- margin:5px 0 0 0;
+ margin-top:20px;
}
-/* delete post */
-.delete_discussion {
-
-}
-.delete_discussion a {
- display:block;
- float:right;
- cursor: pointer;
- width:14px;
- height:14px;
- margin:0;
- background: url("_graphics/icon_customise_remove.png") no-repeat 0 0;
-}
-.delete_discussion a:hover {
- background-position: 0 -16px;
- text-decoration: none;
-}
-/* IE6 */
-* html .delete_discussion a { font-size: 1px; }
-/* IE7 */
-*:first-child+html .delete_discussion a { font-size: 1px; }
-/* delete group button */
-#delete_group_option input[type="submit"] {
- background:#dedede;
- border-color:#dedede;
- color:#333333;
- margin:0;
- float:right;
- clear:both;
+/* Group forum */
+.topic .link {
+ color:#aaaaaa;
+ margin-right:10px;
}
-#delete_group_option input[type="submit"]:hover {
- background:red;
- border-color:red;
- color:white;
+.topic .entity_metadata .delete_button {
+ margin-top:3px;
}
-#groupsearchform .search_input {
- width:176px;
-}
diff --git a/mod/groups/views/default/groups/featured.php b/mod/groups/views/default/groups/featured.php
index 6e85bf5d8..e811642f8 100644
--- a/mod/groups/views/default/groups/featured.php
+++ b/mod/groups/views/default/groups/featured.php
@@ -6,7 +6,6 @@
?>
-
\ No newline at end of file
diff --git a/mod/groups/views/default/groups/find.php b/mod/groups/views/default/groups/find.php
index 671d618bc..5032a74fb 100644
--- a/mod/groups/views/default/groups/find.php
+++ b/mod/groups/views/default/groups/find.php
@@ -7,7 +7,6 @@
$tag_string = elgg_echo('groups:search:tags');
?>
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/mod/groups/views/default/groups/forum_latest.php b/mod/groups/views/default/groups/forum_latest.php
index 6baa8a575..d00dc4443 100644
--- a/mod/groups/views/default/groups/forum_latest.php
+++ b/mod/groups/views/default/groups/forum_latest.php
@@ -1,14 +1,11 @@
forum_enable != 'no'){
+// Latest forum discussion for the group home page
+//check to make sure this group forum has been activated
+if($vars['entity']->forum_enable != 'no'){
?>
-
-
-
+
'object', 'subtypes' => 'groupforumtopic', 'annotation_names' => 'group_topic_post', 'container_guid' => $vars['entity']->guid, 'limit' => 4, 'order_by' => 'maxtime desc'));
@@ -18,21 +15,16 @@
$count_annotations = $f->countAnnotations("group_topic_post");
- echo "
";
- echo "
" . elgg_view('profile/icon',array('entity' => $f->getOwnerEntity(), 'size' => 'tiny', 'override' => true)) . "
";
- echo "
";
-
+ echo "
";
+ echo "
" . elgg_view('profile/icon',array('entity' => $f->getOwnerEntity(), 'size' => 'tiny', 'override' => true)) . "
";
+ echo "
";
echo "
";
}
} else {
- echo "
";
- echo elgg_echo("grouptopic:notcreated");
- echo "
";
+ echo "
".elgg_echo("grouptopic:notcreated")."
";
}
-?>
-
-
-
\ 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
index 6c7ec3359..66569ba1e 100644
--- a/mod/groups/views/default/groups/group_sort_menu.php
+++ b/mod/groups/views/default/groups/group_sort_menu.php
@@ -15,14 +15,10 @@
?>
-
-
-
\ No newline at end of file
diff --git a/mod/groups/views/default/groups/groupgallery.php b/mod/groups/views/default/groups/groupgallery.php
deleted file mode 100644
index 7122dc098..000000000
--- a/mod/groups/views/default/groups/groupgallery.php
+++ /dev/null
@@ -1,25 +0,0 @@
- $vars['entity'],
- 'size' => 'large',
- )
- );
-
- $info .= "getUrl() . "\">" . $vars['entity']->name . "
";
-
- // num users, last activity, owner etc
-
-
- echo elgg_view('search/gallery_listing',array('icon' => $icon, 'info' => $info));
-?>
\ 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 d25eaff56..2b6887736 100644
--- a/mod/groups/views/default/groups/grouplisting.php
+++ b/mod/groups/views/default/groups/grouplisting.php
@@ -1,31 +1,34 @@
$vars['entity'],
- 'size' => 'small',
- )
- );
+$icon = elgg_view(
+ "groups/icon", array(
+ 'entity' => $vars['entity'],
+ 'size' => 'tiny',
+));
- //get the membership type
- $membership = $vars['entity']->membership;
- if($membership == 2)
- $mem = elgg_echo("groups:open");
- else
- $mem = elgg_echo("groups:closed");
+//get the membership type
+$membership = $vars['entity']->membership;
+if($membership == 2) {
+ $mem = elgg_echo("groups:open");
+} else {
+ $mem = elgg_echo("groups:closed");
+}
- //for admins display the feature or unfeature option
+$info .= "" . $mem . " / " . get_group_members($vars['entity']->guid, 10, 0, 0, true) ." " . elgg_echo("groups:member");
+
+//for admins only - display the feature or unfeature option
+if(isadminloggedin()) {
if($vars['entity']->featured_group == "yes"){
$url = elgg_add_action_tokens_to_url($vars['url'] . "action/groups/featured?group_guid=" . $vars['entity']->guid . "&action=unfeature");
$wording = elgg_echo("groups:makeunfeatured");
@@ -33,17 +36,14 @@
$url = elgg_add_action_tokens_to_url($vars['url'] . "action/groups/featured?group_guid=" . $vars['entity']->guid . "&action=feature");
$wording = elgg_echo("groups:makefeatured");
}
+ // display 'make featured' option
+ $info .= "
{$wording}";
+}
- $info .= "
" . $mem . " / " . get_group_members($vars['entity']->guid, 10, 0, 0, true) ." " . elgg_echo("groups:member") . "
";
- //if admin, show make featured option
- if(isadminloggedin())
- $info .= "
{$wording}
";
- $info .= "
";
- $info .= "getUrl() . "\">" . $vars['entity']->name . "
";
- $info .= "" . $vars['entity']->briefdescription . "
";
-
- // num users, last activity, owner etc
+$info .= "
";
+$info .= "getUrl() . "\">" . $vars['entity']->name . "
";
+$info .= "" . $vars['entity']->briefdescription . "
";
- echo elgg_view_listing($icon, $info);
+echo elgg_view_listing($icon, $info);
?>
diff --git a/mod/groups/views/default/groups/groupprofile.php b/mod/groups/views/default/groups/groupprofile.php
index 426eaeae6..5232e9a6f 100644
--- a/mod/groups/views/default/groups/groupprofile.php
+++ b/mod/groups/views/default/groups/groupprofile.php
@@ -1,102 +1,85 @@
+
-
-
-
+
+
+
$vars['entity'],
- //'align' => "left",
- 'size' => $iconsize,
- )
- );
+ echo elgg_view(
+ "groups/icon", array(
+ 'entity' => $vars['entity'],
+ 'size' => 'large',
+ ));
?>
-
-
-
+
+
+
+
+
+
-
-
-
- group) && sizeof($vars['config']->group) > 0){
-
- foreach($vars['config']->group as $shortname => $valtype) {
- if ($shortname != "name") {
- $value = $vars['entity']->$shortname;
-
- if (!empty($value)) {
- //This function controls the alternating class
- $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even';
- }
-
- echo "
";
- echo "";
- echo elgg_echo("groups:{$shortname}");
- echo ": ";
-
- $options = array(
- 'value' => $vars['entity']->$shortname
- );
-
- if ($valtype == 'tags') {
- $options['tag_names'] = $shortname;
+ if ($vars['full'] == true) {
+ if (is_array($vars['config']->group) && sizeof($vars['config']->group) > 0){
+
+ foreach($vars['config']->group as $shortname => $valtype) {
+ if ($shortname != "name") {
+ $value = $vars['entity']->$shortname;
+
+ if (!empty($value)) {
+ //This function controls the alternating class
+ $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even';
+ }
+
+ echo "
";
+ echo "";
+ echo elgg_echo("groups:{$shortname}");
+ echo ": ";
+
+ $options = array(
+ 'value' => $vars['entity']->$shortname
+ );
+
+ if ($valtype == 'tags') {
+ $options['tag_names'] = $shortname;
+ }
+
+ echo elgg_view("output/{$valtype}", $options);
+
+ echo "
";
}
-
- echo elgg_view("output/{$valtype}", $options);
-
- echo "";
}
}
}
- }
- ?>
-
-
-
-
-
-
-canEdit())
- {
-
-?>
-
-
-
-
-
+
+
- }
-?>
-
-
-
-
\ No newline at end of file
diff --git a/mod/groups/views/default/groups/icon.php b/mod/groups/views/default/groups/icon.php
index 7390200d9..e839e0f9b 100644
--- a/mod/groups/views/default/groups/icon.php
+++ b/mod/groups/views/default/groups/icon.php
@@ -19,7 +19,7 @@
// Get size
if (!in_array($vars['size'],array('small','medium','large','tiny','master','topbar')))
- $vars['size'] = "medium";
+ $vars['size'] = "tiny";
// Get any align and js
if (!empty($vars['align'])) {
@@ -37,7 +37,7 @@
?>
-
+
diff --git a/mod/groups/views/default/groups/invitationrequests.php b/mod/groups/views/default/groups/invitationrequests.php
index fbbbafb22..ddc8a057a 100644
--- a/mod/groups/views/default/groups/invitationrequests.php
+++ b/mod/groups/views/default/groups/invitationrequests.php
@@ -1,44 +1,40 @@
-
-
-
-
-
getUrl() . "\">" . $group->name . "";
+ echo "
" . $group->briefdescription . "
";
- }
+ ?>
+
+ " . elgg_echo('groups:invitations:none') . "";
-
- }
-
-?>
-
+ echo "" . elgg_echo('groups:invitations:none') . "
";
+}
+?>
\ No newline at end of file
diff --git a/mod/groups/views/default/groups/members.php b/mod/groups/views/default/groups/members.php
index 66f2604c0..fe6f38dd3 100644
--- a/mod/groups/views/default/groups/members.php
+++ b/mod/groups/views/default/groups/members.php
@@ -13,18 +13,13 @@
//var_export($vars['entity']);
?>
-
-
+
+
getMembers(10);
foreach($members as $mem){
-
- echo "
";
-
+ echo "
";
}
-
?>
-
\ No newline at end of file
diff --git a/mod/groups/views/default/groups/membershiprequests.php b/mod/groups/views/default/groups/membershiprequests.php
index 9ac37990a..b08e521cf 100644
--- a/mod/groups/views/default/groups/membershiprequests.php
+++ b/mod/groups/views/default/groups/membershiprequests.php
@@ -1,44 +1,40 @@
-
-
-
-
{$request->name}
";
-
- echo str_replace('
$vars['url'] . 'action/groups/killrequest?user_guid='.$request->guid.'&group_guid=' . $vars['entity']->guid,
- 'confirm' => elgg_echo('groups:joinrequest:remove:check'),
- 'text' => elgg_echo('delete'),
- )));
- $url = elgg_add_action_tokens_to_url("{$vars['url']}action/groups/addtogroup?user_guid={$request->guid}&group_guid={$vars['entity']->guid}");
- ?>
-
-
+ if ($request instanceof ElggUser) {
+
+ ?>
+
+ ";
+ echo elgg_view("profile/icon", array(
+ 'entity' => $request,
+ 'size' => 'small',
+ 'override' => 'true'
+ ));
+ echo "
";
+
+ $url = elgg_add_action_tokens_to_url("{$vars['url']}action/groups/addtogroup?user_guid={$request->guid}&group_guid={$vars['entity']->guid}");
+ ?>
+
+
+ $vars['url'] . 'action/groups/killrequest?user_guid='.$request->guid.'&group_guid=' . $vars['entity']->guid,
+ 'confirm' => elgg_echo('groups:joinrequest:remove:check'),
+ 'text' => elgg_echo('delete'),
+ )));
+ echo "
getUrl() . "\">" . $request->name . "
";
+ echo "
" . $request->briefdescription . "
";
+ ?>
+
-
-" . elgg_echo('groups:requests:none') . "";
-
}
-?>
-
+?>
\ No newline at end of file
diff --git a/mod/groups/views/default/groups/profileitems.php b/mod/groups/views/default/groups/profileitems.php
index 7309c8a71..2050ae941 100644
--- a/mod/groups/views/default/groups/profileitems.php
+++ b/mod/groups/views/default/groups/profileitems.php
@@ -11,17 +11,17 @@
*/
//forum
- echo "";
+ echo "
";
echo elgg_view("groups/forum_latest",array('entity' => $vars['entity']));
echo "
";
//right column
- echo "
";
+ echo "
";
echo elgg_view("groups/right_column",array('entity' => $vars['entity']));
echo "
";
//left column
- echo "
";
+ echo "
";
echo elgg_view("groups/left_column",array('entity' => $vars['entity']));
echo "
";
diff --git a/mod/groups/views/default/object/groupforumtopic.php b/mod/groups/views/default/object/groupforumtopic.php
index 1dd57c859..5fb1dad0b 100644
--- a/mod/groups/views/default/object/groupforumtopic.php
+++ b/mod/groups/views/default/object/groupforumtopic.php
@@ -21,8 +21,7 @@
//get the time and user
if ($last_post) {
- foreach($last_post as $last)
- {
+ foreach($last_post as $last) {
$last_time = $last->time_created;
$last_user = $last->owner_guid;
}
@@ -33,42 +32,37 @@
//select the correct output depending on where you are
if(get_context() == "search"){
- $info = "
" . sprintf(elgg_echo('group:created'), $forum_created, $counter) . "
";
+ $info = "" . sprintf(elgg_echo('group:created'), $forum_created, $counter) . "
";
if (($last_time) && ($u)) $info.= sprintf(elgg_echo('groups:lastupdated'), friendly_time($last_time), " getURL() . "\">" . $u->name . "");
- $info .= '
';
+ $info .= '';
//get the group avatar
- $icon = elgg_view("profile/icon",array('entity' => $group, 'size' => 'small'));
+ $icon = elgg_view("profile/icon",array('entity' => $group, 'size' => 'tiny'));
//get the group and topic title
- if ($group instanceof ElggGroup)
- $info .= "
" . elgg_echo('group') . ": getURL()}\">".htmlentities($group->name, ENT_QUOTES, 'UTF-8') ."
";
-
- $info .= "
" . elgg_echo('topic') . ": guid}&group_guid={$group->guid}\">{$title}
";
- //get the forum description
- //$info .= $description;
+ if ($group instanceof ElggGroup) {
+ $info .= "
" . elgg_echo('group') . ": getURL()}\">".htmlentities($group->name, ENT_QUOTES, 'UTF-8') ."
";
+ }
+ $info .= "
" . elgg_echo('topic') . ": guid}&group_guid={$group->guid}\">{$title}
";
}else{
- $info = "
" . sprintf(elgg_echo('group:created'), $forum_created, $counter) . "";
- if (($last_time) && ($u)) $info.= "
" . elgg_echo('groups:updated') . " " . friendly_time($last_time) . " by getURL() . "\">" . $u->name . "";
+ $info = "" . sprintf(elgg_echo('group:created'), $forum_created, $counter) . "
";
+ $info .= "" . elgg_echo('groups:started') . " " . $topic_owner->name . ": guid}&group_guid={$group->guid}\">{$title}
";
- if (groups_can_edit_discussion($vars['entity'], page_owner_entity()->owner_guid)) {
-
- // display the delete link to those allowed to delete
- $info .= "
" . elgg_view("output/confirmlink", array(
- 'href' => $vars['url'] . "action/groups/deletetopic?topic=" . $vars['entity']->guid . "&group=" . $vars['entity']->container_guid,
- 'text' => " ",
- 'confirm' => elgg_echo('deleteconfirm'),
- )) . "";
-
- }
-
- $info .= "";
-
+ if (groups_can_edit_discussion($vars['entity'], page_owner_entity()->owner_guid)) {
+ // display the delete link to those allowed to delete
+ $info .= "
" . elgg_view("output/confirmlink", array(
+ 'href' => $vars['url'] . "action/groups/deletetopic?topic=" . $vars['entity']->guid . "&group=" . $vars['entity']->container_guid,
+ 'text' => " ",
+ 'confirm' => elgg_echo('deleteconfirm'),
+ )) . "
";
+
+ }
+
+ if (($last_time) && ($u)) {
+ $info.= "
" . elgg_echo('groups:updated') . " " . friendly_time($last_time) . " by getURL() . "\">" . $u->name . "
";
+ }
//get the user avatar
- $icon = elgg_view("profile/icon",array('entity' => $topic_owner, 'size' => 'small'));
- $info .= "
" . elgg_echo('groups:started') . " " . $topic_owner->name . ": guid}&group_guid={$group->guid}\">{$title}
";
- $info .= "
";
-
+ $icon = elgg_view("profile/icon",array('entity' => $topic_owner, 'size' => 'tiny'));
}
//display
--
cgit v1.2.3