aboutsummaryrefslogtreecommitdiff
path: root/views/default/widgets/friends/edit.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-16 02:12:03 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-16 02:12:03 +0000
commitfcc68792fd00a2778746f6813efd0a5d879584d6 (patch)
tree177d2e48710e46aa1b922a0a12b17dd0d7e4f9f9 /views/default/widgets/friends/edit.php
parent5922d93173db6353e3404c1c2a941842a9f166ed (diff)
downloadelgg-fcc68792fd00a2778746f6813efd0a5d879584d6.tar.gz
elgg-fcc68792fd00a2778746f6813efd0a5d879584d6.tar.bz2
moved friends widget into core
git-svn-id: http://code.elgg.org/elgg/trunk@7640 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/widgets/friends/edit.php')
-rw-r--r--views/default/widgets/friends/edit.php57
1 files changed, 57 insertions, 0 deletions
diff --git a/views/default/widgets/friends/edit.php b/views/default/widgets/friends/edit.php
new file mode 100644
index 000000000..9a6499ede
--- /dev/null
+++ b/views/default/widgets/friends/edit.php
@@ -0,0 +1,57 @@
+<?php
+
+/**
+ * Elgg Friends
+ * Friend widget options
+ *
+ * @package ElggFriends
+ * @subpackage Core
+ */
+
+$selections = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 20, 30, 50, 100);
+$icon_sizes = array('small', 'tiny');
+
+// set defaults
+if (!isset($vars['entity']->num_display)) {
+ $vars['entity']->num_display = 12;
+ $vars['entity']->icon_size = 'small';
+}
+
+// handle upgrade to 1.7.2 from previous versions
+if ($vars['entity']->icon_size == 1) {
+ $vars['entity']->icon_size = 'small';
+} elseif ($vars['entity']->icon_size == 2) {
+ $vars['entity']->icon_size = 'tiny';
+}
+?>
+
+<p>
+ <?php echo elgg_echo("friends:num_display"); ?>:
+ <select name="params[num_display]">
+<?php
+foreach ($selections as $selection) {
+ $selected = '';
+ if ($vars['entity']->num_display == $selection) {
+ $selected = 'selected="selected"';
+ }
+ echo "<option value=\"$selection\" $selected>$selection</option>";
+}
+?>
+ </select>
+</p>
+
+<p>
+ <?php echo elgg_echo("friends:icon_size"); ?>
+ <select name="params[icon_size]">
+<?php
+foreach ($icon_sizes as $size) {
+ $selected = '';
+ if ($vars['entity']->icon_size == $size) {
+ $selected = 'selected="selected"';
+ }
+ $label = elgg_echo("friends:$size");
+ echo "<option value=\"$size\" $selected>$label</option>";
+}
+?>
+ </select>
+</p>