From 59da34fb0c7a590db505777742ca21e1dd5b5cba Mon Sep 17 00:00:00 2001 From: brettp Date: Thu, 4 Mar 2010 01:23:10 +0000 Subject: Merged members plugin's new layout. git-svn-id: http://code.elgg.org/elgg/trunk@5269 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/members/index.php | 65 +++++++++++++--------- mod/members/languages/en.php | 42 +++++++------- mod/members/start.php | 14 +---- mod/members/views/default/members/css.php | 56 ++++--------------- .../views/default/members/members_navigation.php | 23 ++++++++ .../views/default/members/members_sort_menu.php | 29 ---------- mod/members/views/default/members/online.php | 11 ---- mod/members/views/default/members/search.php | 24 ++++---- 8 files changed, 111 insertions(+), 153 deletions(-) create mode 100644 mod/members/views/default/members/members_navigation.php delete mode 100644 mod/members/views/default/members/members_sort_menu.php delete mode 100644 mod/members/views/default/members/online.php (limited to 'mod') diff --git a/mod/members/index.php b/mod/members/index.php index ecfcabb1c..d9ef0a732 100644 --- a/mod/members/index.php +++ b/mod/members/index.php @@ -1,7 +1,6 @@ getGUID()); +} + // get filter parameters $limit = get_input('limit', 10); $offset = get_input('offset', 0); @@ -20,45 +26,54 @@ $filter = get_input("filter", "newest"); // search options $tag = get_input('tag'); +// friends links +$area1 = ""; //search members -$sidebar = elgg_view("members/search"); - -// get the correct content based on filter/search -switch ($filter) { +$area1 .= elgg_view("members/search"); + +// count members +$members = get_number_users(); + +// title +$pagetitle = elgg_echo("members:members")." ({$members})"; +$area2 = elgg_view_title($pagetitle); + +//get the correct view based on filter +switch($filter){ + case "newest": + $content = list_entities("user","",0,10,false); + break; case "pop": $filter_content = list_entities_by_relationship_count('friend', true, '', '', 0, 10, false); - break; + break; case "active": - $filter_content = elgg_view("members/online"); - break; + $filter_content = get_online_users(); + break; // search based on name case "search": set_context('search'); $filter_content = list_user_search($tag); - break; + break; // search based on tags case "search_tags": $filter_content = trigger_plugin_hook('search','',$tag,""); $filter_content .= list_entities_from_metadata("", $tag, "user", "", "", 10, false, false); - break; + break; case "newest": case 'default': $filter_content = elgg_list_entities(array('type' => 'user', 'offset' => $offset, 'full_view' => FALSE)); - break; + break; } -// create the members navigation/filtering -$members = get_number_users(); -$members_nav = elgg_view("members/members_sort_menu", array("count" => $members, "filter" => $filter)); - -$content = $members_nav . $filter_content; - -// title -$main_content = elgg_view_title(elgg_echo("members:members")); - -$main_content .= elgg_view('page_elements/contentwrapper', array('body' => $content, 'subclass' => 'members')); +$area2 .= elgg_view('page_elements/elgg_content', array('body' => elgg_view("members/members_navigation", array("count" => $members, "filter" => $filter)) . "
".$filter_content."
", 'subclass' => 'members')); -$body = elgg_view_layout("sidebar_boxes", $sidebar, $main_content); +//select the correct canvas area +$body = elgg_view_layout("one_column_with_sidebar", $area1, $area2); -page_draw(elgg_echo('members:members'), $body); +// Display page +page_draw(sprintf(elgg_echo('members:members'), $page_owner->name), $body); \ No newline at end of file diff --git a/mod/members/languages/en.php b/mod/members/languages/en.php index a6c4d0079..fd99aa670 100644 --- a/mod/members/languages/en.php +++ b/mod/members/languages/en.php @@ -1,21 +1,25 @@ + * @copyright Curverider Ltd 2008-2010 + * @link http://elgg.com/ + */ - $english = array( - - 'members:members' => "Members", - 'members:online' => "Users active now", - 'members:active' => "site users", - 'members:searchtag' => "User search via tag", - 'members:searchname' => "User search via name", - - 'members:label:newest' => 'Newest', - 'members:label:popular' => 'Popular', - 'members:label:active' => 'Active', - 'members:search:name' => 'Users name', - 'members:search:tags' => 'Tags', - - ); - - add_translation("en",$english); - -?> \ No newline at end of file +$english = array( + 'members:members' => "Site members", + 'members:online' => "Members active now", + 'members:browse' => "Browse members", + 'members:active' => "site members", + 'members:searchtag' => "Member search via tag", + 'members:searchname' => "Member search via name", + + 'members:label:newest' => 'Newest', + 'members:label:popular' => 'Popular', + 'members:label:active' => 'Active', +); + +add_translation('en', $english); \ No newline at end of file diff --git a/mod/members/start.php b/mod/members/start.php index fa6810157..0a66cacbf 100644 --- a/mod/members/start.php +++ b/mod/members/start.php @@ -1,8 +1,6 @@ wwwroot . "mod/members/index.php"); - } - } // @todo - use page handler for members index register_elgg_event_handler('pagesetup','system','members_pagesetup'); - -register_elgg_event_handler('init','system','members_init'); +register_elgg_event_handler('init','system','members_init'); \ No newline at end of file diff --git a/mod/members/views/default/members/css.php b/mod/members/views/default/members/css.php index 048d71bad..3b8cc1cf0 100644 --- a/mod/members/views/default/members/css.php +++ b/mod/members/views/default/members/css.php @@ -1,54 +1,23 @@ - * @copyright Curverider Ltd 2008-2010 - * @link http://elgg.com/ - */ - +/** + * Elgg Members Css + * + * @package Members + * @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/ + */ ?> -/* new members page */ -.members .search_listing { - border:2px solid #cccccc; - margin:0 0 5px 0; -} -.members .search_listing:hover { - background:#dedede; +.members_list { + } .members .group_count { font-weight: bold; color: #666666; margin:0 0 5px 4px; } -.members .search_listing_info { - color:#666666; -} - -.members .profile_status { - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - background:#bbdaf7; - line-height:1.2em; - padding:2px 4px; -} -.members .profile_status span { - font-size:90%; - color:#666666; -} -.members p.owner_timestamp { - padding-left:3px; -} -.members .pagination { - border:2px solid #cccccc; - margin:5px 0 5px 0; -} - - #memberssearchform { border-bottom: 1px solid #cccccc; margin-bottom: 10px; @@ -60,5 +29,4 @@ } #memberssearchform .search_input { width:176px; -} - +} \ No newline at end of file diff --git a/mod/members/views/default/members/members_navigation.php b/mod/members/views/default/members/members_navigation.php new file mode 100644 index 000000000..6abe6f348 --- /dev/null +++ b/mod/members/views/default/members/members_navigation.php @@ -0,0 +1,23 @@ + +
+
    +
  • >
  • +
  • >
  • +
  • >
  • +
+
\ No newline at end of file diff --git a/mod/members/views/default/members/members_sort_menu.php b/mod/members/views/default/members/members_sort_menu.php deleted file mode 100644 index e9ad96039..000000000 --- a/mod/members/views/default/members/members_sort_menu.php +++ /dev/null @@ -1,29 +0,0 @@ - -
-
    -
  • >
  • -
  • >
  • -
  • >
  • -
-
- -
- -
\ No newline at end of file diff --git a/mod/members/views/default/members/online.php b/mod/members/views/default/members/online.php deleted file mode 100644 index cfbe062b4..000000000 --- a/mod/members/views/default/members/online.php +++ /dev/null @@ -1,11 +0,0 @@ -"; - echo get_online_users(); - echo ""; - -?> \ No newline at end of file diff --git a/mod/members/views/default/members/search.php b/mod/members/views/default/members/search.php index 69d8c06bf..f908d92c4 100644 --- a/mod/members/views/default/members/search.php +++ b/mod/members/views/default/members/search.php @@ -1,19 +1,19 @@ + * @copyright Curverider Ltd 2008-2010 + * @link http://elgg.com/ + */ - /** - * Simple member search - **/ - -$tag_string = elgg_echo('members:search:tags'); -$name_string = elgg_echo('members:search:name'); - -?> - -
+

- + @@ -22,7 +22,7 @@ $name_string = elgg_echo('members:search:name');

- + -- cgit v1.2.3