aboutsummaryrefslogtreecommitdiff
path: root/mod/riverdashboard/views/default/widgets
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-03 17:53:05 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-03 17:53:05 +0000
commit4766f36a4d74924f21ff329c4318ce4e069ffa04 (patch)
tree969b84632f2a8b0db79788a8a6db8e41d63e5cb4 /mod/riverdashboard/views/default/widgets
parent57a217fd6b708844407486046a1faa23b46cac08 (diff)
downloadelgg-4766f36a4d74924f21ff329c4318ce4e069ffa04.tar.gz
elgg-4766f36a4d74924f21ff329c4318ce4e069ffa04.tar.bz2
Pulled in the interface changes.
git-svn-id: http://code.elgg.org/elgg/trunk@5257 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/riverdashboard/views/default/widgets')
-rw-r--r--mod/riverdashboard/views/default/widgets/river_widget/edit.php36
-rw-r--r--mod/riverdashboard/views/default/widgets/river_widget/view.php40
2 files changed, 76 insertions, 0 deletions
diff --git a/mod/riverdashboard/views/default/widgets/river_widget/edit.php b/mod/riverdashboard/views/default/widgets/river_widget/edit.php
new file mode 100644
index 000000000..3f3c9d625
--- /dev/null
+++ b/mod/riverdashboard/views/default/widgets/river_widget/edit.php
@@ -0,0 +1,36 @@
+<?php
+ /**
+ * Edit the widget
+ *
+ * @package ElggRiver
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.com/
+ */
+
+ if(!$vars['entity']->content_type)
+ $content_type = 'mine';
+ else
+ $content_type = $vars['entity']->content_type;
+
+
+?>
+<p>
+ <?php echo elgg_echo('river:widget:label:displaynum'); ?>
+
+ <select name="params[num_display]">
+ <option value="5" <?php if ($vars['entity']->num_display == 5) echo " selected=\"yes\" "; ?>>5</option>
+ <option value="8" <?php if (($vars['entity']->num_display == 8)) echo " selected=\"yes\" "; ?>>8</option>
+ <option value="12" <?php if ($vars['entity']->num_display == 12) echo " selected=\"yes\" "; ?>>12</option>
+ <option value="15" <?php if ($vars['entity']->num_display == 15) echo " selected=\"yes\" "; ?>>15</option>
+ </select>
+</p>
+<p>
+ <?php echo elgg_echo('river:widget:type'); ?>
+
+ <select name="params[content_type]">
+ <option value="mine" <?php if ($content_type == 'mine') echo " selected=\"yes\" "; ?>><?php echo elgg_echo("river:widgets:mine");?></option>
+ <option value="friends" <?php if ($content_type != 'mine') echo " selected=\"yes\" "; ?>><?php echo elgg_echo("river:widgets:friends");?></option>
+ </select>
+</p> \ No newline at end of file
diff --git a/mod/riverdashboard/views/default/widgets/river_widget/view.php b/mod/riverdashboard/views/default/widgets/river_widget/view.php
new file mode 100644
index 000000000..039962c27
--- /dev/null
+++ b/mod/riverdashboard/views/default/widgets/river_widget/view.php
@@ -0,0 +1,40 @@
+<?php
+ /**
+ * View the widget
+ *
+ * @package ElggRiver
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.com/
+ */
+
+ $owner = page_owner_entity();
+
+ //get the type - mine or friends
+ $type = $vars['entity']->content_type;
+ if(!$type)
+ $type = "mine";
+
+ //based on type grab the correct content type
+ if($type == "mine")
+ $content_type = '';
+ else
+ $content_type = 'friend';
+
+ //get the number of items to display
+ $limit = $vars['entity']->num_display;
+ if(!$limit)
+ $limit = 4;
+
+ //grab the river
+ $river = elgg_view_river_items($owner->getGuid(), 0, $content_type, $content[0], $content[1], '', $limit,0,0,false);
+
+ //display
+ echo "<div class=\"contentWrapper\">";
+ if($type != 'mine')
+ echo "<div class='content_area_user_title'><h2>" . elgg_echo("friends") . "</h2></div>";
+ echo $river;
+ echo "</div>";
+
+?> \ No newline at end of file