]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
an almost done widget-based profile plugin
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 19 Dec 2010 23:45:20 +0000 (23:45 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 19 Dec 2010 23:45:20 +0000 (23:45 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7695 36083f99-b078-4883-b0ff-0f9b5a30f544

mod/profile/views/default/profile/box.php
mod/profile/views/default/profile/css.php
mod/profile/views/default/profile/details.php
mod/profile/views/default/profile/listing.php
mod/profile/views/default/profile/ownerblock.php
mod/profile/views/default/profile/sidebar.php
views/default/css/elements/skin.php

index 9d97ddc3527ddbce0f7aacd8681b76ba9a6e6648..77c40853608382439855725642fd33222b5cf842 100644 (file)
@@ -4,9 +4,23 @@
  */
 
 ?>
-<div class="profile">
+<div class="profile elgg-col-2of3">
+       <div class="elgg-inner clearfix">
 <?php
-       echo elgg_view('profile/sidebar');
+       echo elgg_view('profile/sidebar', array('section' => 'details'));
        echo elgg_view('profile/details', array('entity' => elgg_get_page_owner()));
 ?>
-</div>
\ No newline at end of file
+       </div>
+</div>
+
+<script type="text/javascript">
+       $(document).ready(function() {
+               $('#elgg-widget-col-1').css('min-height', $('.profile').outerHeight(true));
+       //$(selector).each(function() {
+       //      if ($(this).height() > maxHeight) {
+       //              maxHeight = $(this).height();
+       //      }
+       //})
+       //$(selector).css('min-height', maxHeight);
+       });
+</script>
\ No newline at end of file
index 9de6d0a0b6a0a4a1be682421500bb8fd0876ecda..754276c69b3f4871d0aab95a2a241eab2dfe3a00 100644 (file)
 *************************************** */
 .profile {
        float: left;
-       width: 625px;
-       margin: 0 5px 15px;
-       padding: 5px;
-       border: 2px solid #dedede;
+       margin-bottom: 15px;
 }
-#widget-col-1 {
-       min-height: 300px;
-}
-#profile_content {
-       float:right;
-       width:700px;
-       position: relative;
+.profile .elgg-inner {
+       margin: 0 5px;
+       border: 2px solid #eeeeee;
+       -webkit-border-radius: 8px;
+       -moz-border-radius: 8px;
 }
-#profile_sidebar {
+#profile-sidebar {
        width:230px;
        float:left;
 }
-.elgg-horizontal-tabbed-nav.profile {
-       margin-top:0px;
-       margin-bottom:25px;
-       position:relative;
-}
-.elgg-horizontal-tabbed-nav.profile .profile_name {
-       display:block;
-       width:265px;
-       position:absolute;
-}
-.elgg-horizontal-tabbed-nav.profile .profile_name h2 {
-       margin:0;
-       padding:0;
-       border:none;
-}
-.elgg-horizontal-tabbed-nav.profile ul {
-       margin-left:260px;
+#profile-details {
+       padding: 15px;
 }
 
 /* ***************************************
        ownerblock in sidebar
 *************************************** */
-#profile_sidebar #owner_block {
+#profile-sidebar #owner_block {
        background-color: #eeeeee;
-       -webkit-border-radius: 8px; 
-       -moz-border-radius: 8px;
        padding:15px;
-       min-height:270px;
-}
-#elgg-sidebar #owner_block {
-       background-color: white;
-       -webkit-border-radius: 8px; 
-       -moz-border-radius: 8px;
-       padding:5px;
-       margin-bottom:10px;
-}
-#owner_block .owner_block_icon {
-       float:left;
-       padding:0;
-       margin:0;
 }
 #owner_block .owner_block_icon.large {
-       width:200px;
-       height:200px;
        overflow: hidden;
-       float:none;
-}
-#owner_block .owner_block_contents {
-       margin-left: 50px;
-}
-#elgg-sidebar #owner_block .owner_block_contents {
-       margin-left: 34px;
-}
-#owner_block .owner_block_contents h3 {
-       margin-top:-4px;
-       border-bottom:none;
-       margin-bottom:0;
-       padding-bottom:0;
-}
-#owner_block .owner_block_contents p.profile_info {
-       margin:0;
-       padding:0;
-       color: #666666;
-}
-#owner_block .owner_block_contents p.profile_info.briefdescription {
-       font-size: 90%;
-       line-height:1.2em;
-       font-style: italic;
-}
-#owner_block .owner_block_contents p.profile_info.location {
-       font-size: 90%;
 }
 #owner_block .profile_actions {
        margin-top:10px;
 /* ***************************************
        full profile info panel
 *************************************** */
-#profile_content .odd {
+#profile-details .odd {
        background-color:#f4f4f4;
        -webkit-border-radius: 4px; 
        -moz-border-radius: 4px;
        margin:0 0 7px 0;
        padding:2px 4px 2px 4px;
 }
-#profile_content .even {
+#profile-details .even {
        background-color:#f4f4f4;
        -webkit-border-radius: 4px; 
        -moz-border-radius: 4px;
        margin:0 0 7px 0;
        padding:2px 4px 2px 4px;
 }
-#profile_content .aboutme_title {
+#profile-details .aboutme_title {
        background-color:#f4f4f4;
        -webkit-border-radius: 4px; 
        -moz-border-radius: 4px;
        margin:0 0 0px 0;
        padding:2px 4px 2px 4px;
 }
-#profile_content .aboutme_contents {
+#profile-details .aboutme_contents {
        padding:2px 0 0 3px;
 }
 
-
-/* ***************************************
-       friends panel within profile
-*************************************** */
-#profile_content .entity-listing .entity-listing-info {
-       width:664px;
-}
-
-
-/* ***************************************
-       commentwall within profile
-*************************************** */
-#comment_wall_add textarea {
-       width:685px;
-}
-#comment_wall_add #postit {
-       float:right;
-}
-
-
-/* ***************************************
-       twitter panel within profile
-*************************************** */
-ul#twitter_update_list {
-       padding-left:0;
-}
-ul#twitter_update_list li {
-       background-image: url(<?php echo elgg_get_site_url(); ?>mod/profile/graphics/speech_bubble_tail.gif);
-       background-position:right bottom;
-       background-repeat: no-repeat;
-       list-style-image:none;
-       list-style-position:outside;
-       list-style-type:none;
-       margin:0 0 5px 0;
-       padding:0;
-       overflow-x: hidden;
-}
-ul#twitter_update_list li span {
-       color:#666666;
-       background:#ececec;
-       -webkit-border-radius: 4px; 
-       -moz-border-radius: 4px;
-       padding:3px 5px 4px 5px;
-       display:block;
-}
-ul#twitter_update_list li a {
-       display:block;
-       margin:-2px 0 0 4px;
-}
-ul#twitter_update_list li span a {
-       display:inline !important;
-}
-p.visit_twitter a {
-    background:url(<?php echo elgg_get_site_url(); ?>mod/profile/graphics/twitter16px.png) left no-repeat;
-    padding:0 0 0 20px;
-    margin:0;
-}
-.visit_twitter {
-       padding:5px 0;
-       margin:0 0 0 0;
-       border-top:1px solid #dedede;
-}
-
 /* ***************************************
        banned user
 *************************************** */
@@ -293,38 +167,3 @@ p.visit_twitter a {
        color:red;
 }
 
-
-/* ***************************************
-       admin area - custom profile fields
-*************************************** */
-.default_profile_reset {
-       border-top: 1px solid #dedede;
-       margin-top:30px;
-}
-.default_profile_reset .elgg-action-button {
-       float:right;
-}
-/* field re-order */
-#sortable_profile_fields {
-       list-style: none;
-       padding:0;
-       margin:0;
-       border-top:1px solid #cccccc;
-}
-#sortable_profile_fields li {
-       padding:5px 0 5px 0;
-       border-bottom:1px solid #cccccc;
-}
-#sortable_profile_fields li img.handle {
-       margin-right: 7px;
-       cursor: move;
-}
-#sortable_profile_fields .ui-sortable-helper {
-       background: #eeeeee;
-       color:#333333;
-       padding: 5px 0 5px 0;
-       margin: 0;
-       width:100%;
-}
-
-
index 27b0f943b5e6c0bab75fe231a19f5bbb6e071f6f..c2f4cc01bc7b490b3708339f74c9962355784c26 100644 (file)
@@ -4,6 +4,9 @@
  * @uses $vars['entity'] The user entity
  */
 
+echo '<div id="profile-details" class="elgg-body pll">';
+echo "<h2>{$vars['entity']->name}</h2>";
+
 $even_odd = null;
 if (is_array($vars['config']->profile) && sizeof($vars['config']->profile) > 0) {
        foreach($vars['config']->profile as $shortname => $valtype) {
@@ -39,3 +42,5 @@ if (!get_plugin_setting('user_defined_fields', 'profile')) {
                }
        }
 }
+
+echo '</div>';
\ No newline at end of file
index 0622264b8c19c270c9fdaaadff4a4bc24393083b..489b1d50ede1380f287ff6522a8750203eeb3a3c 100644 (file)
@@ -46,4 +46,4 @@ if (!$banned) {
        $info .= "</p>";
 }
                
-echo elgg_view_listing($icon, $info);
+echo elgg_view_image_block($icon, $info);
index 0350aea2f817d266d302ce86bb89c1e1eea00737..7670f569981b453d1d875d244cb16dda7433fdbb 100755 (executable)
@@ -1,5 +1,4 @@
 <?php
-
 /**
  * A simple owner block which houses info about the user whose 'stuff' you are looking at
  */
@@ -23,18 +22,11 @@ if (!$user) {
 $more_info = '';
 
 $location = elgg_view("output/tags",array('value' => $user->location));
-$section = $vars['section'];
-if ($section == 'details') {
-       $icon = elgg_view("profile/icon",array('entity' => $user, 'size' => 'large', 'override' => 'true'));
-       $icon_class = "large";
-} else {
-       $icon = elgg_view("profile/icon",array('entity' => $user, 'size' => 'small'));
-       $more_info = "<div class='owner_block_contents clearfix'>";
-       $more_info .= "<h3><a href='{$url}'>{$user->name}</a></h3>";
-       $more_info .= "<p class='profile_info briefdescription'>{$user->briefdescription}</p>";
-       $more_info .= "<p class='profile_info location'>{$location}</p>";
-       $more_info .= "</div>";
-}
+
+$icon = elgg_view("profile/icon",array('entity' => $user, 'size' => 'large', 'override' => 'true'));
+$icon_class = "large";
+
+// @todo pull out into menu
 $profile_actions = "";
 if (isloggedin() && (get_loggedin_userid() == elgg_get_page_owner_guid())) {
        $profile_actions = "<div class='clearfix profile_actions'>";
@@ -62,10 +54,6 @@ if (isloggedin() && (get_loggedin_userid() == elgg_get_page_owner_guid())) {
        $profile_actions .= "</div>";
 }
 
-$username = $user->username;
-$email = $user->email;
-$phone = $user->phone;
-
 
 // if admin, display admin links
 $admin_links = '';
@@ -79,6 +67,7 @@ if (isadminloggedin() && get_loggedin_userid() != elgg_get_page_owner_guid()) {
        $admin_links = "<div class=\"owner_block_links\">$admin_links</div>";
 }
 
+// content links
 $menu = elgg_view_menu('user_ownerblock', array('user' => elgg_get_page_owner()));
 
 //contruct the display
index 525a2da815a7f246f3e49b52659c372ed44d7744..d98964f5bec3a0b1133b8a8a7505cb9ec0df2a45 100644 (file)
@@ -5,7 +5,7 @@
  * @package ElggProfile
  */
 ?>
-<div id="profile_sidebar">
+<div id="profile-sidebar">
 <?php
        $section = $vars['section'];
        echo elgg_view('profile/ownerblock', array('section' => $section));
index a95fc37a2f4188f761afa86ecd3f9cbaee6ec600..8994785ef6d7769b9ef81c2099ef381b1acaa0b0 100644 (file)
@@ -130,7 +130,7 @@ a.selected {
     border-bottom: 1px solid #CCCCCC;
     padding-bottom: 3px;
 }
-.elgg-main h2 {
+.elgg-main .elgg-header h2 {
        float: left;
        max-width: 530px;
        margin-right: 10px;