aboutsummaryrefslogtreecommitdiff
path: root/views/default/friends
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-31 14:05:54 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-31 14:05:54 +0000
commit7e8a3d71ca771f077edea92e3e73685d30ca7aba (patch)
treefe436a4e09c602eaa6f61ff6de1a22aa6e9e7e2f /views/default/friends
parentc42862e15c82d0ffbb45d3bdc2bcfcea2d0c75f6 (diff)
downloadelgg-7e8a3d71ca771f077edea92e3e73685d30ca7aba.tar.gz
elgg-7e8a3d71ca771f077edea92e3e73685d30ca7aba.tar.bz2
Friends collections are now fully part of the main core
git-svn-id: https://code.elgg.org/elgg/trunk@1630 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/friends')
-rw-r--r--views/default/friends/forms/edit.php75
1 files changed, 75 insertions, 0 deletions
diff --git a/views/default/friends/forms/edit.php b/views/default/friends/forms/edit.php
new file mode 100644
index 000000000..6ed58d5bf
--- /dev/null
+++ b/views/default/friends/forms/edit.php
@@ -0,0 +1,75 @@
+<?php
+
+ /**
+ * Elgg friend collections add/edit
+ *
+ * @package ElggFriends
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Dave Tosh <dave@elgg.com>
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.com/
+ *
+ * @uses $vars['object'] Optionally, the collection edit
+ */
+
+ // var_export($vars['collection'][0]->id);
+
+ // Set title, form destination
+ if (isset($vars['collection'])) {
+ $action = "friends/editcollection";
+ $title = $vars['collection'][0]->name;
+ } else {
+ $action = "friends/addcollection";
+ $title = "";
+ }
+
+?>
+
+ <form action="<?php echo $vars['url']; ?>action/<?php echo $action; ?>" method="post">
+ <p>
+ <label><?php echo elgg_echo("friends:collectionname"); ?><br />
+ <?php
+
+ echo elgg_view("input/text", array(
+ "internalname" => "collection_name",
+ "value" => $title,
+ ));
+
+ ?>
+ </label>
+ </p>
+ <p>
+ <?php
+ if($vars['collection_members']){
+ echo elgg_echo("friends:collectionfriends") . "<br />";
+ foreach($vars['collection_members'] as $mem){
+
+ echo elgg_view("profile/icon",array('entity' => $mem, 'size' => 'tiny'));
+ echo $mem->name;
+
+ }
+ }
+ ?>
+ </p>
+ <p>
+ <label><?php echo elgg_echo("friends:addfriends"); ?><br />
+ <?php
+
+ //echo elgg_view('friends/friendslist');
+ echo elgg_view('friends/picker',array('entities' => $vars['friends'], 'internalname' => 'friends_collection'));
+
+ ?>
+ </label>
+ </p>
+ <p>
+ <?php
+
+ if (isset($vars['collection'])) {
+ ?><input type="hidden" name="collection_id" value="<?php echo $vars['collection'][0]->id; ?>" /><?php
+ }
+
+ ?>
+ <input type="submit" name="submit" value="<?php echo elgg_echo('save'); ?>" />
+ </p>
+
+ </form> \ No newline at end of file