aboutsummaryrefslogtreecommitdiff
path: root/views/default/forms/friends/collections/add.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-26 20:57:09 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-26 20:57:09 +0000
commita2250e1854f23351b2a39e304e2bd5977f3fd867 (patch)
treec7a846a455073b88ef2db21115baf21fee57b138 /views/default/forms/friends/collections/add.php
parent657295df1ff884ed9f00b001389978b142ac6ba7 (diff)
downloadelgg-a2250e1854f23351b2a39e304e2bd5977f3fd867.tar.gz
elgg-a2250e1854f23351b2a39e304e2bd5977f3fd867.tar.bz2
Fixes #2982 friends collections work even if the code is convoluted and poorly written.
git-svn-id: http://code.elgg.org/elgg/trunk@8495 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/forms/friends/collections/add.php')
-rw-r--r--views/default/forms/friends/collections/add.php53
1 files changed, 53 insertions, 0 deletions
diff --git a/views/default/forms/friends/collections/add.php b/views/default/forms/friends/collections/add.php
new file mode 100644
index 000000000..644c7adb9
--- /dev/null
+++ b/views/default/forms/friends/collections/add.php
@@ -0,0 +1,53 @@
+<?php
+/**
+ * Form body for editing or adding a friend collection
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['collection'] Optionally, the collection to edit
+ */
+
+// Set title, form destination
+if (isset($vars['collection'])) {
+ $title = $vars['collection']->name;
+ $highlight = 'default';
+} else {
+ $title = "";
+ $highlight = 'all';
+}
+
+echo "<div class=\"mtm\"><label>" . elgg_echo("friends:collectionname") . "<br/>";
+echo elgg_view("input/text", array(
+ "name" => "collection_name",
+ "value" => $title,
+ ));
+echo "</label></div>";
+
+echo "<div>";
+if ($vars['collection_members']) {
+ echo elgg_echo("friends:collectionfriends") . "<br />";
+ foreach ($vars['collection_members'] as $mem) {
+ echo elgg_view_entity_icon($mem, 'tiny');
+ echo $mem->name;
+ }
+}
+echo "</div>";
+
+echo "<div><label>" . elgg_echo("friends:addfriends") . "</label>";
+echo elgg_view('input/friendspicker', array(
+ 'entities' => $vars['friends'],
+ 'name' => 'friends_collection',
+ 'highlight' => $highlight,
+));
+echo "</div>";
+
+echo "<div>";
+if (isset($vars['collection'])) {
+ echo elgg_view('input/hidden', array(
+ 'name' => 'collection_id',
+ 'value' => $vars['collection']->id,
+ ));
+}
+echo elgg_view('input/submit', array('name' => 'submit', 'value' => elgg_echo('save')));
+echo "</div>";