Minor user profile improvements
authorMarcel Werk <burntime@woltlab.com>
Mon, 25 Jan 2016 12:01:23 +0000 (13:01 +0100)
committerMarcel Werk <burntime@woltlab.com>
Mon, 25 Jan 2016 12:01:33 +0000 (13:01 +0100)
com.woltlab.wcf/templates/user.tpl
com.woltlab.wcf/templates/userSidebar.tpl
wcfsetup/install/files/js/WCF.Comment.js
wcfsetup/install/files/lib/page/UserPage.class.php
wcfsetup/install/files/style/layout/containerList.scss
wcfsetup/install/files/style/layout/global.scss

index 6e39a70b692bb50a1c6d2b5974323b0079cecfa0..97aeb1231342bdbe6e059b719b0814be99b8d35b 100644 (file)
 
 <body id="tpl{$templateName|ucfirst}" data-template="{$templateName}" data-application="{$templateNameApplication}" class="userProfile">
 
-{include file='userSidebar' assign='sidebar'}
+{include file='userSidebar' assign='sidebarRight'}
 
-{include file='header' sidebarOrientation='left'}
+{include file='header'}
 
 {include file='userNotice'}
 
index 17ac5f44be93fabb53c71896412781cec292199d..75d58e013f95d672772706f39b3a3eec13dacc7d 100644 (file)
@@ -11,7 +11,7 @@
                        data-disable-signature="{@$user->disableSignature}"
                {/if}
        {/if}
->
+>{*todo*}
        <div class="userAvatar">
                {if $user->userID == $__wcf->user->userID}
                        <a href="{link controller='AvatarEdit'}{/link}" class="framed jsTooltip" title="{lang}wcf.user.avatar.edit{/lang}">{@$user->getAvatar()->getImageTag()}</a>
@@ -33,7 +33,7 @@
                </div>
        {/if}
        
-       <ul class="dataList">
+       <ul class="inlineList commaSeparated">
                {if $user->isVisibleOption('gender') && $user->gender}<li>{lang}wcf.user.gender.{if $user->gender == 1}male{else}female{/if}{/lang}</li>{/if}
                {if $user->isVisibleOption('birthday') && $user->getAge()}<li>{@$user->getAge()}</li>{/if}
                {if $user->isVisibleOption('location') && $user->location}<li>{lang}wcf.user.membersList.location{/lang}</li>{/if}
                        {if $user->getCurrentLocation()}<span>{@$user->getCurrentLocation()}</span>{/if}
                </p>
        {/if}
+       {hascontent}
+               <dl class="plain inlineDataList">
+                       {content}
+                               {event name='statistics'}
+                               
+                               {if MODULE_LIKE && $user->likesReceived}
+                                       <dt>{if !$user->isProtected()}<a href="{link controller='User' object=$user}{/link}#likes" class="jsTooltip" title="{lang}wcf.like.showLikesReceived{/lang}">{lang}wcf.like.likesReceived{/lang}</a>{else}{lang}wcf.like.likesReceived{/lang}{/if}</dt>
+                                       <dd>{#$user->likesReceived}</dd>
+                               {/if}
+                               
+                               {if $user->activityPoints}
+                                       <dt><a href="#" class="activityPointsDisplay jsTooltip" title="{lang}wcf.user.activityPoint.showActivityPoints{/lang}" data-user-id="{@$user->userID}">{lang}wcf.user.activityPoint{/lang}</a></dt>
+                                       <dd>{#$user->activityPoints}</dd>
+                               {/if}
+                               
+                               {if $user->profileHits}
+                                       <dt>{lang}wcf.user.profileHits{/lang}</dt>
+                                       <dd{if $user->getProfileAge() > 1} title="{lang}wcf.user.profileHits.hitsPerDay{/lang}"{/if}>{#$user->profileHits}</dd>
+                               {/if}
+                       {/content}
+               </dl>
+       {/hascontent}
+       
        <nav class="jsMobileNavigation buttonGroupNavigation">
                <ul id="profileButtonContainer" class="buttonGroup">
                        {hascontent}
        </nav>
 </section>
 
-{hascontent}
-       <section>
-               <h1 class="invisible">{lang}wcf.user.stats{/lang}</h1>
-               
-               <dl class="plain statsDataList">
-                       {content}
-                               {event name='statistics'}
-                               
-                               {if MODULE_LIKE && $user->likesReceived}
-                                       <dt>{if !$user->isProtected()}<a href="{link controller='User' object=$user}{/link}#likes" class="jsTooltip" title="{lang}wcf.like.showLikesReceived{/lang}">{lang}wcf.like.likesReceived{/lang}</a>{else}{lang}wcf.like.likesReceived{/lang}{/if}</dt>
-                                       <dd>{#$user->likesReceived}</dd>
-                               {/if}
-                               
-                               {if $user->activityPoints}
-                                       <dt><a href="#" class="activityPointsDisplay jsTooltip" title="{lang}wcf.user.activityPoint.showActivityPoints{/lang}" data-user-id="{@$user->userID}">{lang}wcf.user.activityPoint{/lang}</a></dt>
-                                       <dd>{#$user->activityPoints}</dd>
-                               {/if}
-                               
-                               {if $user->profileHits}
-                                       <dt>{lang}wcf.user.profileHits{/lang}</dt>
-                                       <dd{if $user->getProfileAge() > 1} title="{lang}wcf.user.profileHits.hitsPerDay{/lang}"{/if}>{#$user->profileHits}</dd>
-                               {/if}
-                       {/content}
-               </dl>
-       </section>
-{/hascontent}
-
-{event name='afterStatistics'}
-
 {if !$user->isProtected()}
        {if $followingCount}
                <section class="box">
index c9cd72fa1d978361ad66f5018f15a18fcd56515c..6831fd87875892e65ee398de30399ad916b0256f 100644 (file)
@@ -283,12 +283,12 @@ WCF.Comment.Handler = Class.extend({
                
                if (comment.data('canEdit')) {
                        var $editButton = $('<li><a href="#" class="jsTooltip" title="' + WCF.Language.get('wcf.global.button.edit') + '"><span class="icon icon16 fa-pencil" /> <span class="invisible">' + WCF.Language.get('wcf.global.button.edit') + '</span></a></li>');
-                       $editButton.data('commentID', commentID).appendTo(comment.find('ul.commentOptions:eq(0)')).click($.proxy(this._prepareEdit, this));
+                       $editButton.data('commentID', commentID).appendTo(comment.find('ul.buttonList:eq(0)')).click($.proxy(this._prepareEdit, this));
                }
                
                if (comment.data('canDelete')) {
                        var $deleteButton = $('<li><a href="#" class="jsTooltip" title="' + WCF.Language.get('wcf.global.button.delete') + '"><span class="icon icon16 fa-times" /> <span class="invisible">' + WCF.Language.get('wcf.global.button.delete') + '</span></a></li>');
-                       $deleteButton.data('commentID', commentID).appendTo(comment.find('ul.commentOptions:eq(0)')).click($.proxy(this._delete, this));
+                       $deleteButton.data('commentID', commentID).appendTo(comment.find('ul.buttonList:eq(0)')).click($.proxy(this._delete, this));
                }
        },
        
@@ -317,14 +317,14 @@ WCF.Comment.Handler = Class.extend({
                        var $editButton = $('<li><a href="#" class="jsTooltip" title="' + WCF.Language.get('wcf.global.button.edit') + '"><span class="icon icon16 fa-pencil" /> <span class="invisible">' + WCF.Language.get('wcf.global.button.edit') + '</span></a></li>');
                        
                        var self = this;
-                       $editButton.data('responseID', responseID).appendTo(response.find('ul.commentOptions:eq(0)')).click(function(event) { self._prepareEdit(event, true); });
+                       $editButton.data('responseID', responseID).appendTo(response.find('ul.buttonList:eq(0)')).click(function(event) { self._prepareEdit(event, true); });
                }
                
                if (response.data('canDelete')) {
                        var $deleteButton = $('<li><a href="#" class="jsTooltip" title="' + WCF.Language.get('wcf.global.button.delete') + '"><span class="icon icon16 fa-times" /> <span class="invisible">' + WCF.Language.get('wcf.global.button.delete') + '</span></a></li>');
                        
                        var self = this;
-                       $deleteButton.data('responseID', responseID).appendTo(response.find('ul.commentOptions:eq(0)')).click(function(event) { self._delete(event, true); });
+                       $deleteButton.data('responseID', responseID).appendTo(response.find('ul.buttonList:eq(0)')).click(function(event) { self._delete(event, true); });
                }
        },
        
@@ -917,8 +917,8 @@ WCF.Comment.Like = WCF.Like.extend({
                this._containers[containerID].find('.containerHeadline:eq(0) > h3').append(badge);
                
                if (this._canLike) {
-                       likeButton.appendTo(this._containers[containerID].find('.commentOptions:eq(0)'));
-                       dislikeButton.appendTo(this._containers[containerID].find('.commentOptions:eq(0)'));
+                       likeButton.appendTo(this._containers[containerID].find('ul.buttonList:eq(0)'));
+                       dislikeButton.appendTo(this._containers[containerID].find('ul.buttonList:eq(0)'));
                }
        },
        
@@ -956,8 +956,8 @@ WCF.Comment.Response.Like = WCF.Like.extend({
                this._containers[containerID].find('.containerHeadline:eq(0) > h3').append(badge);
                
                if (this._canLike) {
-                       likeButton.appendTo(this._containers[containerID].find('.commentOptions:eq(0)'));
-                       dislikeButton.appendTo(this._containers[containerID].find('.commentOptions:eq(0)'));
+                       likeButton.appendTo(this._containers[containerID].find('ul.buttonList:eq(0)'));
+                       dislikeButton.appendTo(this._containers[containerID].find('ul.buttonList:eq(0)'));
                }
        },
        
index 0915ea20de4be4af4ae56ecfb42a382d41d5d87c..5778cd2f0644bcb82389a7244bb63d39cfccc98f 100644 (file)
@@ -130,20 +130,20 @@ class UserPage extends AbstractPage {
                // get followers
                $this->followerList = new UserFollowerList();
                $this->followerList->getConditionBuilder()->add('user_follow.followUserID = ?', array($this->userID));
-               $this->followerList->sqlLimit = 8;
+               $this->followerList->sqlLimit = 12;
                $this->followerList->readObjects();
                
                // get following
                $this->followingList = new UserFollowingList();
                $this->followingList->getConditionBuilder()->add('user_follow.userID = ?', array($this->userID));
-               $this->followingList->sqlLimit = 8;
+               $this->followingList->sqlLimit = 12;
                $this->followingList->readObjects();
                
                // get visitors
                if (PROFILE_ENABLE_VISITORS) {
                        $this->visitorList = new UserProfileVisitorList();
                        $this->visitorList->getConditionBuilder()->add('user_profile_visitor.ownerID = ?', array($this->userID));
-                       $this->visitorList->sqlLimit = 8;
+                       $this->visitorList->sqlLimit = 12;
                        $this->visitorList->readObjects();
                }
                
index c6b432fe711edd96064f2f76cf7df4909b680029..2c2428a6847b1f3370ec9b0e72c0914a4171b71b 100644 (file)
@@ -60,7 +60,8 @@
                                }
                                
                                > a {
-                                       padding: 6px;
+                                       display: inline-block;
+                                       padding: 4px 6px;
                                        
                                        > .icon {
                                                color: rgba(0, 0, 0, .5);
index a59b4bdf3cadbb3c629b54add35d59f60eca89ac..2983324464f4d3694087bd71682a04cd23110fae 100644 (file)
@@ -26,7 +26,7 @@
 
 /* boxes with an image */
 @mixin box($imageSize, $margin: 0) {
-       display: flex !important;
+       display: flex;
        
        > :first-child:not(:last-child) {
                flex: 0 0 auto;