aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/views
diff options
context:
space:
mode:
Diffstat (limited to 'mod/groups/views')
-rw-r--r--mod/groups/views/default/discussion/group_module.php4
-rw-r--r--mod/groups/views/default/group/default.php2
-rw-r--r--mod/groups/views/default/groups/invitationrequests.php4
-rw-r--r--mod/groups/views/default/groups/membershiprequests.php52
-rw-r--r--mod/groups/views/default/groups/profile/activity_module.php1
-rw-r--r--mod/groups/views/default/groups/profile/summary.php1
-rw-r--r--mod/groups/views/default/groups/profile/widgets.php6
-rw-r--r--mod/groups/views/default/groups/sidebar/members.php1
-rw-r--r--mod/groups/views/default/object/groupforumtopic.php6
-rw-r--r--mod/groups/views/default/plugins/groups/settings.php (renamed from mod/groups/views/default/settings/groups/edit.php)0
-rw-r--r--mod/groups/views/default/river/annotation/group_topic_post/reply.php2
-rw-r--r--mod/groups/views/default/river/group/create.php2
-rw-r--r--mod/groups/views/default/river/object/groupforumtopic/create.php2
-rw-r--r--mod/groups/views/default/river/relationship/member/create.php2
-rw-r--r--mod/groups/views/default/widgets/a_users_groups/content.php1
-rw-r--r--mod/groups/views/rss/annotation/group_topic_post.php32
-rw-r--r--mod/groups/views/rss/discussion/replies.php12
-rw-r--r--mod/groups/views/rss/forum/topicposts.php3
-rw-r--r--mod/groups/views/rss/forum/topics.php10
-rw-r--r--mod/groups/views/rss/forum/viewposts.php22
-rw-r--r--mod/groups/views/rss/groups/contentwrapper.php5
-rw-r--r--mod/groups/views/rss/groups/profile/layout.php13
-rw-r--r--mod/groups/views/rss/groups/profileitems.php15
-rw-r--r--mod/groups/views/rss/object/groupforumtopic.php49
24 files changed, 130 insertions, 117 deletions
diff --git a/mod/groups/views/default/discussion/group_module.php b/mod/groups/views/default/discussion/group_module.php
index 3a46e336e..e0bcd55d6 100644
--- a/mod/groups/views/default/discussion/group_module.php
+++ b/mod/groups/views/default/discussion/group_module.php
@@ -15,6 +15,7 @@ $group = $vars['entity'];
$all_link = elgg_view('output/url', array(
'href' => "discussion/owner/$group->guid",
'text' => elgg_echo('link:view:all'),
+ 'is_trusted' => true,
));
elgg_push_context('widgets');
@@ -30,12 +31,13 @@ $content = elgg_list_entities($options);
elgg_pop_context();
if (!$content) {
- $content = '<p>' . elgg_echo('grouptopic:notcreated') . '</p>';
+ $content = '<p>' . elgg_echo('discussion:none') . '</p>';
}
$new_link = elgg_view('output/url', array(
'href' => "discussion/add/" . $group->getGUID(),
'text' => elgg_echo('groups:addtopic'),
+ 'is_trusted' => true,
));
echo elgg_view('groups/profile/module', array(
diff --git a/mod/groups/views/default/group/default.php b/mod/groups/views/default/group/default.php
index fc91f90d0..6eae467c6 100644
--- a/mod/groups/views/default/group/default.php
+++ b/mod/groups/views/default/group/default.php
@@ -34,5 +34,5 @@ if ($vars['full_view']) {
$params = $params + $vars;
$list_body = elgg_view('group/elements/summary', $params);
- echo elgg_view_image_block($icon, $list_body);
+ echo elgg_view_image_block($icon, $list_body, $vars);
}
diff --git a/mod/groups/views/default/groups/invitationrequests.php b/mod/groups/views/default/groups/invitationrequests.php
index 788788324..94dbdf1f2 100644
--- a/mod/groups/views/default/groups/invitationrequests.php
+++ b/mod/groups/views/default/groups/invitationrequests.php
@@ -10,11 +10,12 @@ if (!empty($vars['invitations']) && is_array($vars['invitations'])) {
echo '<ul class="elgg-list">';
foreach ($vars['invitations'] as $group) {
if ($group instanceof ElggGroup) {
- $icon = elgg_view_entity_icon($group, 'tiny', array('override' => 'true'));
+ $icon = elgg_view_entity_icon($group, 'tiny', array('use_hover' => 'true'));
$group_title = elgg_view('output/url', array(
'href' => $group->getURL(),
'text' => $group->name,
+ 'is_trusted' => true,
));
$url = elgg_add_action_tokens_to_url(elgg_get_site_url()."action/groups/join?user_guid={$user->guid}&group_guid={$group->guid}");
@@ -22,6 +23,7 @@ if (!empty($vars['invitations']) && is_array($vars['invitations'])) {
'href' => $url,
'text' => elgg_echo('accept'),
'class' => 'elgg-button elgg-button-submit',
+ 'is_trusted' => true,
));
$url = "action/groups/killinvitation?user_guid={$user->getGUID()}&group_guid={$group->getGUID()}";
diff --git a/mod/groups/views/default/groups/membershiprequests.php b/mod/groups/views/default/groups/membershiprequests.php
index 4d1c78c8c..9cd28262f 100644
--- a/mod/groups/views/default/groups/membershiprequests.php
+++ b/mod/groups/views/default/groups/membershiprequests.php
@@ -10,37 +10,37 @@ if (!empty($vars['requests']) && is_array($vars['requests'])) {
$user = elgg_get_logged_in_user_entity();
echo '<ul class="elgg-list">';
foreach ($vars['requests'] as $user) {
- if ($user instanceof ElggUser) {
- $icon = elgg_view_entity_icon($user, 'tiny', array('override' => 'true'));
+ $icon = elgg_view_entity_icon($user, 'tiny', array('use_hover' => 'true'));
- $user_title = elgg_view('output/url', array(
- 'href' => $user->getURL(),
- 'text' => $user->name,
- ));
+ $user_title = elgg_view('output/url', array(
+ 'href' => $user->getURL(),
+ 'text' => $user->name,
+ 'is_trusted' => true,
+ ));
- $url = "action/groups/addtogroup?user_guid={$user->guid}&group_guid={$vars['entity']->guid}";
- $url = elgg_add_action_tokens_to_url($url);
- $accept_button = elgg_view('output/url', array(
- 'href' => $url,
- 'text' => elgg_echo('accept'),
- 'class' => 'elgg-button elgg-button-submit',
- ));
+ $url = "action/groups/addtogroup?user_guid={$user->guid}&group_guid={$vars['entity']->guid}";
+ $url = elgg_add_action_tokens_to_url($url);
+ $accept_button = elgg_view('output/url', array(
+ 'href' => $url,
+ 'text' => elgg_echo('accept'),
+ 'class' => 'elgg-button elgg-button-submit',
+ 'is_trusted' => true,
+ ));
- $url = 'action/groups/killrequest?user_guid=' . $user->guid . '&group_guid=' . $vars['entity']->guid;
- $delete_button = elgg_view('output/confirmlink', array(
- 'href' => $url,
- 'confirm' => elgg_echo('groups:joinrequest:remove:check'),
- 'text' => elgg_echo('delete'),
- 'class' => 'elgg-button elgg-button-delete mlm',
- ));
+ $url = 'action/groups/killrequest?user_guid=' . $user->guid . '&group_guid=' . $vars['entity']->guid;
+ $delete_button = elgg_view('output/confirmlink', array(
+ 'href' => $url,
+ 'confirm' => elgg_echo('groups:joinrequest:remove:check'),
+ 'text' => elgg_echo('delete'),
+ 'class' => 'elgg-button elgg-button-delete mlm',
+ ));
- $body = "<h4>$user_title</h4>";
- $alt = $accept_button . $delete_button;
+ $body = "<h4>$user_title</h4>";
+ $alt = $accept_button . $delete_button;
- echo '<li class="pvs">';
- echo elgg_view_image_block($icon, $body, array('image_alt' => $alt));
- echo '</li>';
- }
+ echo '<li class="pvs">';
+ echo elgg_view_image_block($icon, $body, array('image_alt' => $alt));
+ echo '</li>';
}
echo '</ul>';
} else {
diff --git a/mod/groups/views/default/groups/profile/activity_module.php b/mod/groups/views/default/groups/profile/activity_module.php
index 5e557b443..832ff4a4b 100644
--- a/mod/groups/views/default/groups/profile/activity_module.php
+++ b/mod/groups/views/default/groups/profile/activity_module.php
@@ -19,6 +19,7 @@ if (!$group) {
$all_link = elgg_view('output/url', array(
'href' => "groups/activity/$group->guid",
'text' => elgg_echo('link:view:all'),
+ 'is_trusted' => true,
));
diff --git a/mod/groups/views/default/groups/profile/summary.php b/mod/groups/views/default/groups/profile/summary.php
index b7ae51070..54abcb1e5 100644
--- a/mod/groups/views/default/groups/profile/summary.php
+++ b/mod/groups/views/default/groups/profile/summary.php
@@ -28,6 +28,7 @@ $owner = $group->getOwnerEntity();
echo elgg_view('output/url', array(
'text' => $owner->name,
'value' => $owner->getURL(),
+ 'is_trusted' => true,
));
?>
</p>
diff --git a/mod/groups/views/default/groups/profile/widgets.php b/mod/groups/views/default/groups/profile/widgets.php
index caf019a3a..7635cad4f 100644
--- a/mod/groups/views/default/groups/profile/widgets.php
+++ b/mod/groups/views/default/groups/profile/widgets.php
@@ -6,8 +6,8 @@
*/
// tools widget area
-echo '<div id="groups-tools" class="elgg-gallery elgg-gallery-fluid mtl clearfix">';
-
+echo '<ul id="groups-tools" class="elgg-gallery elgg-gallery-fluid mtl clearfix">';
+
// enable tools to extend this area
echo elgg_view("groups/tool_latest", $vars);
@@ -20,5 +20,5 @@ if ($right || $left) {
echo $right;
}
-echo "</div>";
+echo "</ul>";
diff --git a/mod/groups/views/default/groups/sidebar/members.php b/mod/groups/views/default/groups/sidebar/members.php
index 7249ffbf4..49f14697c 100644
--- a/mod/groups/views/default/groups/sidebar/members.php
+++ b/mod/groups/views/default/groups/sidebar/members.php
@@ -13,6 +13,7 @@ $limit = elgg_extract('limit', $vars, 10);
$all_link = elgg_view('output/url', array(
'href' => 'groups/members/' . $vars['entity']->guid,
'text' => elgg_echo('groups:members:more'),
+ 'is_trusted' => true,
));
$body = elgg_list_entities_from_relationship(array(
diff --git a/mod/groups/views/default/object/groupforumtopic.php b/mod/groups/views/default/object/groupforumtopic.php
index 22589b84d..34e0ee3cc 100644
--- a/mod/groups/views/default/object/groupforumtopic.php
+++ b/mod/groups/views/default/object/groupforumtopic.php
@@ -20,6 +20,7 @@ $poster_icon = elgg_view_entity_icon($poster, 'tiny');
$poster_link = elgg_view('output/url', array(
'href' => $poster->getURL(),
'text' => $poster->name,
+ 'is_trusted' => true,
));
$poster_text = elgg_echo('groups:started', array($poster->name));
@@ -27,7 +28,7 @@ $tags = elgg_view('output/tags', array('tags' => $topic->tags));
$date = elgg_view_friendly_time($topic->time_created);
$replies_link = '';
-$replies_text = '';
+$reply_text = '';
$num_replies = elgg_get_annotations(array(
'annotation_name' => 'group_topic_post',
'guid' => $topic->getGUID(),
@@ -42,6 +43,7 @@ if ($num_replies != 0) {
$replies_link = elgg_view('output/url', array(
'href' => $topic->getURL() . '#group-replies',
'text' => elgg_echo('group:replies') . " ($num_replies)",
+ 'is_trusted' => true,
));
}
@@ -62,7 +64,6 @@ if ($full) {
$params = array(
'entity' => $topic,
- 'title' => false,
'metadata' => $metadata,
'subtitle' => $subtitle,
'tags' => $tags,
@@ -75,7 +76,6 @@ if ($full) {
$body = elgg_view('output/longtext', array('value' => $topic->description));
echo <<<HTML
-$header
$info
$body
HTML;
diff --git a/mod/groups/views/default/settings/groups/edit.php b/mod/groups/views/default/plugins/groups/settings.php
index 7197dcb37..7197dcb37 100644
--- a/mod/groups/views/default/settings/groups/edit.php
+++ b/mod/groups/views/default/plugins/groups/settings.php
diff --git a/mod/groups/views/default/river/annotation/group_topic_post/reply.php b/mod/groups/views/default/river/annotation/group_topic_post/reply.php
index cc94fbd43..afc823bde 100644
--- a/mod/groups/views/default/river/annotation/group_topic_post/reply.php
+++ b/mod/groups/views/default/river/annotation/group_topic_post/reply.php
@@ -6,7 +6,7 @@ $object = $vars['item']->getObjectEntity();
$reply = $vars['item']->getAnnotation();
$excerpt = elgg_get_excerpt($reply->value);
-echo elgg_view('river/item', array(
+echo elgg_view('river/elements/layout', array(
'item' => $vars['item'],
'message' => $excerpt,
)); \ No newline at end of file
diff --git a/mod/groups/views/default/river/group/create.php b/mod/groups/views/default/river/group/create.php
index cacb5ad3f..ea42b5b00 100644
--- a/mod/groups/views/default/river/group/create.php
+++ b/mod/groups/views/default/river/group/create.php
@@ -7,7 +7,7 @@ $object = $vars['item']->getObjectEntity();
$excerpt = strip_tags($object->description);
$excerpt = elgg_get_excerpt($excerpt);
-echo elgg_view('river/item', array(
+echo elgg_view('river/elements/layout', array(
'item' => $vars['item'],
'message' => $excerpt,
)); \ No newline at end of file
diff --git a/mod/groups/views/default/river/object/groupforumtopic/create.php b/mod/groups/views/default/river/object/groupforumtopic/create.php
index 80e7b09aa..e7d92bc08 100644
--- a/mod/groups/views/default/river/object/groupforumtopic/create.php
+++ b/mod/groups/views/default/river/object/groupforumtopic/create.php
@@ -15,7 +15,7 @@ if (elgg_is_logged_in() && $object->canAnnotate(0, 'group_topic_post')) {
$responses = elgg_view_form('discussion/reply/save', $form_vars, $body_vars);
}
-echo elgg_view('river/item', array(
+echo elgg_view('river/elements/layout', array(
'item' => $vars['item'],
'message' => $excerpt,
'responses' => $responses,
diff --git a/mod/groups/views/default/river/relationship/member/create.php b/mod/groups/views/default/river/relationship/member/create.php
index d1c4c3ed3..0afd87e4b 100644
--- a/mod/groups/views/default/river/relationship/member/create.php
+++ b/mod/groups/views/default/river/relationship/member/create.php
@@ -3,6 +3,6 @@
* Group join river view.
*/
-echo elgg_view('river/item', array(
+echo elgg_view('river/elements/layout', array(
'item' => $vars['item'],
));
diff --git a/mod/groups/views/default/widgets/a_users_groups/content.php b/mod/groups/views/default/widgets/a_users_groups/content.php
index 114fd7565..fe1a46e39 100644
--- a/mod/groups/views/default/widgets/a_users_groups/content.php
+++ b/mod/groups/views/default/widgets/a_users_groups/content.php
@@ -25,6 +25,7 @@ if ($content) {
$more_link = elgg_view('output/url', array(
'href' => $url,
'text' => elgg_echo('groups:more'),
+ 'is_trusted' => true,
));
echo "<span class=\"elgg-widget-more\">$more_link</span>";
} else {
diff --git a/mod/groups/views/rss/annotation/group_topic_post.php b/mod/groups/views/rss/annotation/group_topic_post.php
new file mode 100644
index 000000000..0d3a40117
--- /dev/null
+++ b/mod/groups/views/rss/annotation/group_topic_post.php
@@ -0,0 +1,32 @@
+<?php
+/**
+ * RSS view for a discussion reply
+ *
+ * @uses $vars['annotation']
+ */
+
+$annotation = $vars['annotation'];
+
+$poster = $annotation->getOwnerEntity();
+$poster_name = htmlspecialchars($poster->name, ENT_NOQUOTES, 'UTF-8');
+$pubdate = date('r', $annotation->getTimeCreated());
+$permalink = $annotation->getURL();
+
+$title = elgg_echo('discussion:reply:title', array($poster_name));
+
+$creator = elgg_view('page/components/creator', array('entity' => $annotation));
+$extensions = elgg_view('extensions/item', $vars);
+
+$item = <<<__HTML
+<item>
+ <guid isPermaLink='true'>$permalink</guid>
+ <pubDate>$pubdate</pubDate>
+ <link>$permalink</link>
+ <title><![CDATA[$title]]></title>
+ <description><![CDATA[{$vars['annotation']->value}]]></description>
+ $creator$extensions
+</item>
+
+__HTML;
+
+echo $item;
diff --git a/mod/groups/views/rss/discussion/replies.php b/mod/groups/views/rss/discussion/replies.php
new file mode 100644
index 000000000..419003b21
--- /dev/null
+++ b/mod/groups/views/rss/discussion/replies.php
@@ -0,0 +1,12 @@
+<?php
+/**
+ * List replies RSS view
+ *
+ * @uses $vars['entity'] ElggEntity
+ */
+
+$options = array(
+ 'guid' => $vars['entity']->getGUID(),
+ 'annotation_name' => 'group_topic_post',
+);
+echo elgg_list_annotations($options);
diff --git a/mod/groups/views/rss/forum/topicposts.php b/mod/groups/views/rss/forum/topicposts.php
deleted file mode 100644
index 15c5adc7f..000000000
--- a/mod/groups/views/rss/forum/topicposts.php
+++ /dev/null
@@ -1,3 +0,0 @@
-<?php
-
-?> \ No newline at end of file
diff --git a/mod/groups/views/rss/forum/topics.php b/mod/groups/views/rss/forum/topics.php
deleted file mode 100644
index 1cb22aaea..000000000
--- a/mod/groups/views/rss/forum/topics.php
+++ /dev/null
@@ -1,10 +0,0 @@
-<?php
- /**
- * Elgg groups plugin
- *
- * @package ElggGroups
- */
-
- // If there are any topics to view, view them
- echo $vars['topics'];
-?> \ No newline at end of file
diff --git a/mod/groups/views/rss/forum/viewposts.php b/mod/groups/views/rss/forum/viewposts.php
deleted file mode 100644
index ad52365e6..000000000
--- a/mod/groups/views/rss/forum/viewposts.php
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-
- /**
- * Elgg groups plugin display topic posts
- *
- * @package ElggGroups
- */
-
- //display follow up comments
- $count = $vars['entity']->countAnnotations('group_topic_post');
- $offset = (int) get_input('offset',0);
-
- foreach($vars['entity']->getAnnotations('group_topic_post', 50, $offset, "asc") as $post) {
-
- $post->title = '';
- $post->description = $post->value;
- echo elgg_view('object/default', array('entity' => $post));
- // echo elgg_view("forum/topicposts",array('entity' => $post));
-
- }
-
-?> \ No newline at end of file
diff --git a/mod/groups/views/rss/groups/contentwrapper.php b/mod/groups/views/rss/groups/contentwrapper.php
deleted file mode 100644
index 15397d552..000000000
--- a/mod/groups/views/rss/groups/contentwrapper.php
+++ /dev/null
@@ -1,5 +0,0 @@
-<?php
-
- echo $vars['body'];
-
-?> \ No newline at end of file
diff --git a/mod/groups/views/rss/groups/profile/layout.php b/mod/groups/views/rss/groups/profile/layout.php
new file mode 100644
index 000000000..3eeb9eaf2
--- /dev/null
+++ b/mod/groups/views/rss/groups/profile/layout.php
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Group profile RSS view
+ *
+ * Displays a list of the latest content in the group
+ *
+ * @uses $vars['entity'] ElggGroup object
+ */
+
+echo elgg_list_entities(array(
+ 'type' => 'object',
+ 'container_guid' => $vars['entity']->getGUID(),
+));
diff --git a/mod/groups/views/rss/groups/profileitems.php b/mod/groups/views/rss/groups/profileitems.php
deleted file mode 100644
index 5e595a379..000000000
--- a/mod/groups/views/rss/groups/profileitems.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
- /**
- * Elgg groups items view.
- * This is the messageboard, members, pages and latest forums posts. Each plugin will extend the views
- *
- * @package ElggGroups
- */
-
- //right column
- if ($forae = elgg_get_entities(array('types' => 'object', 'container_guid' => $vars['entity']->guid))) {
- foreach($forae as $forum)
- echo elgg_view_entity($forum);
- }
-
-?> \ No newline at end of file
diff --git a/mod/groups/views/rss/object/groupforumtopic.php b/mod/groups/views/rss/object/groupforumtopic.php
index 19297b350..d730ef796 100644
--- a/mod/groups/views/rss/object/groupforumtopic.php
+++ b/mod/groups/views/rss/object/groupforumtopic.php
@@ -1,32 +1,35 @@
<?php
/**
- * Elgg groupforumtopic view
+ * Elgg groupforumtopic RSS view
*
- * @package Elgg
- * @subpackage Core
+ * @package ElggGroups
*/
$title = $vars['entity']->title;
-
-$body = '';
-$annotation = $vars['entity']->getAnnotations('group_topic_post', 1, 0, "asc");
-if (count($annotation == 1)) {
- $body = $annotation[0]->value;
+if (empty($title)) {
+ $title = strip_tags($vars['entity']->description);
+ $title = elgg_get_excerpt($title, 32);
}
-?>
+$permalink = htmlspecialchars($vars['entity']->getURL(), ENT_NOQUOTES, 'UTF-8');
+$pubdate = date('r', $vars['entity']->getTimeCreated());
+
+$description = autop($vars['entity']->description);
+
+$creator = elgg_view('page/components/creator', $vars);
+$georss = elgg_view('page/components/georss', $vars);
+$extension = elgg_view('extensions/item', $vars);
+
+$item = <<<__HTML
<item>
-<guid isPermaLink='true'><?php echo htmlspecialchars($vars['entity']->getURL()); ?></guid>
-<pubDate><?php echo date("r",$vars['entity']->time_created) ?></pubDate>
-<link><?php echo htmlspecialchars($vars['entity']->getURL()); ?></link>
-<title><![CDATA[<?php echo $title; ?>]]></title>
-<description><![CDATA[<?php echo (autop($body)); ?>]]></description>
-<?php
- $owner = $vars['entity']->getOwnerEntity();
- if ($owner) {
-?>
-<dc:creator><?php echo $owner->name; ?></dc:creator>
-<?php
- }
-?>
-</item> \ No newline at end of file
+ <guid isPermaLink="true">$permalink</guid>
+ <pubDate>$pubdate</pubDate>
+ <link>$permalink</link>
+ <title><![CDATA[$title]]></title>
+ <description><![CDATA[$description]]></description>
+ $creator$georss$extension
+</item>
+
+__HTML;
+
+echo $item;