aboutsummaryrefslogtreecommitdiff
path: root/views/default/widgets/videolist/content.php
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2011-11-19 22:37:34 +0100
committerSem <sembrestels@riseup.net>2011-11-19 22:37:34 +0100
commite7d8b73c0e65f188b835bbb0a7e98eb2fa0f3478 (patch)
treeb25bd69a5f625f71584683017d095f3613f54625 /views/default/widgets/videolist/content.php
parent4585e371857636c1dece9978fba65d978a3afc78 (diff)
downloadelgg-e7d8b73c0e65f188b835bbb0a7e98eb2fa0f3478.tar.gz
elgg-e7d8b73c0e65f188b835bbb0a7e98eb2fa0f3478.tar.bz2
Added videos widget.
Diffstat (limited to 'views/default/widgets/videolist/content.php')
-rw-r--r--views/default/widgets/videolist/content.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/views/default/widgets/videolist/content.php b/views/default/widgets/videolist/content.php
new file mode 100644
index 000000000..2b8de92bf
--- /dev/null
+++ b/views/default/widgets/videolist/content.php
@@ -0,0 +1,32 @@
+<?php
+/**
+ * Elgg video list widget
+ *
+ * @package ElggVideolist
+ */
+
+$num = (int) $vars['entity']->videos_num;
+
+$options = array(
+ 'type' => 'object',
+ 'subtype' => 'videolist_item',
+ 'container_guid' => $vars['entity']->owner_guid,
+ 'limit' => $num,
+ 'full_view' => FALSE,
+ 'pagination' => FALSE,
+);
+$content = elgg_list_entities($options);
+
+echo $content;
+
+if ($content) {
+ $url = "pages/owner/" . elgg_get_page_owner_entity()->username;
+ $more_link = elgg_view('output/url', array(
+ 'href' => $url,
+ 'text' => elgg_echo('videolist_item:more'),
+ 'is_trusted' => true,
+ ));
+ echo "<span class=\"elgg-widget-more\">$more_link</span>";
+} else {
+ echo elgg_echo('videolist_item:none');
+}