]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
fixing friends collections for backward compatibility
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Thu, 24 Feb 2011 02:49:04 +0000 (02:49 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Thu, 24 Feb 2011 02:49:04 +0000 (02:49 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8459 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/users.php
languages/en.php
pages/friends/collections.php
views/default/css/elements/misc.php

index 8a5289a03037661f168a7c173c818e314bee8a23..1ac87e7d1eea8249f542389c8786b0d34d83677e 100644 (file)
@@ -1087,16 +1087,18 @@ function collections_submenu_items() {
        $user = elgg_get_logged_in_user_entity();
 
        elgg_register_menu_item('page', array(
-               'name' => 'friends:collections:view',
+               'name' => 'friends:view:collections',
                'text' => elgg_echo('friends:collections'),
                'href' => "pg/collections/$user->username",
        ));
-
+/*
        elgg_register_menu_item('page', array(
                'name' => 'friends:collections:add',
                'text' => elgg_echo('friends:collections:add'),
                'href' => "pg/collections/add",
        ));
+ * 
+ */
 }
 
 /**
@@ -1111,7 +1113,6 @@ function friends_page_handler($page_elements) {
                set_page_owner($user->getGUID());
        }
        if (elgg_get_logged_in_user_guid() == elgg_get_page_owner_guid()) {
-               // disabled for now as we no longer use friends collections (replaced by shared access)
                collections_submenu_items();
        }
        require_once(dirname(dirname(dirname(__FILE__))) . "/pages/friends/index.php");
@@ -1130,7 +1131,6 @@ function friends_of_page_handler($page_elements) {
                set_page_owner($user->getGUID());
        }
        if (elgg_get_logged_in_user_guid() == elgg_get_page_owner_guid()) {
-               // disabled for now as we no longer use friends collections (replaced by shared access)
                collections_submenu_items();
        }
        require_once(dirname(dirname(dirname(__FILE__))) . "/pages/friends/of.php");
@@ -1144,6 +1144,7 @@ function friends_of_page_handler($page_elements) {
  * @return void
  */
 function collections_page_handler($page_elements) {
+       elgg_set_context('friends');
        if (isset($page_elements[0])) {
                if ($page_elements[0] == "add") {
                        set_page_owner(elgg_get_logged_in_user_guid());
@@ -1474,7 +1475,7 @@ function users_pagesetup() {
                elgg_register_menu_item('page', $params);
 
                $params = array(
-                       'name' => 'friendsof',
+                       'name' => 'friends:of',
                        'text' => elgg_echo('friends:of'),
                        'href' => 'pg/friendsof/' . elgg_get_page_owner_entity()->username,
                        'contexts' => array('friends')
index 60eea1a651ddb135c3de8008958585a5b79d4393..26599414b9e46de9fd1abde78f4a66b879899a50 100644 (file)
@@ -324,7 +324,8 @@ $english = array(
        'friends:of:owned' => "People who have made %s a friend",
 
        'friends:of' => "Friends of",
-       'friends:collections' => "Collections of friends",
+       'friends:collections' => "Friend collections",
+       'collections:add' => "New collection",
        'friends:collections:add' => "New friends collection",
        'friends:addfriends' => "Add friends",
        'friends:collectionname' => "Collection name",
index 5a32b7f902980377db2a42a6790a8003a66b6d43..fa7527f4dee2ab26728f6be1080019e16e09dde8 100644 (file)
@@ -11,10 +11,13 @@ gatekeeper();
 
 $title = elgg_echo('friends:collections');
 
-$content = elgg_view_title($title);
+$content = elgg_view_access_collections(elgg_get_logged_in_user_guid());
 
-$content .= elgg_view_access_collections(elgg_get_logged_in_user_guid());
-
-$body = elgg_view_layout('one_sidebar', array('content' => $content));
+$body = elgg_view_layout('content', array(
+       'filter' => false,
+       'content' => $content,
+       'title' => $title,
+       'context' => 'collections',
+));
 
 echo elgg_view_page($title, $body);
index 14551c27321f5adf59678ac3437e83fdafffdda2..d0c97169def1e11b37172a1172777ad548fa3d40 100644 (file)
        overflow: hidden;
        width: 100px;
        height: 100px;
-}
\ No newline at end of file
+}
+
+/* ***************************************
+       FRIENDS COLLECTIONS
+*************************************** */
+
+#friends_collections_accordian li {
+    color: #666666;
+}
+#friends_collections_accordian li h2 {
+    -moz-border-radius: 8px 8px 8px 8px;
+    background: none repeat scroll 0 0 #4690D6;
+    color: white;
+    cursor: pointer;
+    font-size: 1.2em;
+    margin: 10px 0;
+    padding: 4px 2px 4px 6px;
+}
+#friends_collections_accordian .friends_collections_controls {
+    float: right;
+    font-size: 70%;
+}
+#friends_collections_accordian .friends-picker {
+    background: none repeat scroll 0 0 white;
+    display: none;
+    padding: 0;
+}