From 929f7e477776a3201339b6252408ec7f60db35f2 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Sat, 16 Jan 2016 13:10:56 +0100 Subject: [PATCH] Style overhaul (WIP) * container list overhaul * comment list overhaul * user profile overhaul * some minor tweaks --- .../templates/__commentJavaScript.tpl | 2 +- .../templates/authorSidebarBox.tpl | 4 +- com.woltlab.wcf/templates/commentList.tpl | 16 ++--- .../templates/commentResponseList.tpl | 10 +-- .../templates/dashboardBoxSignedInAs.tpl | 4 +- .../templates/moderationReport.tpl | 2 +- .../templates/recentActivityListItem.tpl | 7 +- .../templates/searchResultList.tpl | 22 +++--- com.woltlab.wcf/templates/team.tpl | 12 ++-- .../templates/userBirthdayList.tpl | 4 +- com.woltlab.wcf/templates/userInformation.tpl | 4 +- .../templates/userInformationHeadline.tpl | 23 ++++--- .../templates/userInformationStatistics.tpl | 24 +++---- .../templates/userProfileLikeItem.tpl | 7 +- com.woltlab.wcf/templates/userSidebar.tpl | 24 +++---- com.woltlab.wcf/templates/usersOnlineList.tpl | 32 +++++---- .../files/acp/templates/pageHeaderUser.tpl | 36 ++++++---- wcfsetup/install/files/js/WCF.Comment.js | 20 ++++-- wcfsetup/install/files/style/element/dl.scss | 2 - .../install/files/style/element/list.scss | 38 ++++------- .../files/style/layout/containerList.scss | 68 +++++++++++++++---- .../install/files/style/layout/content.scss | 28 ++++++-- .../install/files/style/layout/global.scss | 22 ++++-- .../install/files/style/layout/sidebar.scss | 20 ++++++ wcfsetup/install/files/style/ui/comment.scss | 62 ++++++++++++++--- wcfsetup/install/files/style/ui/message.scss | 4 +- wcfsetup/install/files/style/ui/tabMenu.scss | 12 +++- .../install/files/style/ui/userProfile.scss | 35 ++++++++-- 28 files changed, 365 insertions(+), 179 deletions(-) diff --git a/com.woltlab.wcf/templates/__commentJavaScript.tpl b/com.woltlab.wcf/templates/__commentJavaScript.tpl index 9c4e728b3e..3ebedce8ff 100644 --- a/com.woltlab.wcf/templates/__commentJavaScript.tpl +++ b/com.woltlab.wcf/templates/__commentJavaScript.tpl @@ -14,7 +14,7 @@ 'wcf.moderation.report.success': '{lang}wcf.moderation.report.success{/lang}' }); - new {if $commentHandlerClass|isset}{@$commentHandlerClass}{else}WCF.Comment.Handler{/if}('{$commentContainerID}', '{@$__wcf->getUserProfileHandler()->getAvatar()->getImageTag(32)}'); + new {if $commentHandlerClass|isset}{@$commentHandlerClass}{else}WCF.Comment.Handler{/if}('{$commentContainerID}', '{@$__wcf->getUserProfileHandler()->getAvatar()->getImageTag(48)}', '{@$__wcf->getUserProfileHandler()->getAvatar()->getImageTag(32)}'); {if MODULE_LIKE && $commentList->getCommentManager()->supportsLike() && $__wcf->getSession()->getPermission('user.like.canViewLike')} new WCF.Comment.Like({if $__wcf->getUser()->userID && $__wcf->getSession()->getPermission('user.like.canLike')}1{else}0{/if}, {@LIKE_ENABLE_DISLIKE}, false, {@LIKE_ALLOW_FOR_OWN_CONTENT}); new WCF.Comment.Response.Like({if $__wcf->getUser()->userID && $__wcf->getSession()->getPermission('user.like.canLike')}1{else}0{/if}, {@LIKE_ENABLE_DISLIKE}, false, {@LIKE_ALLOW_FOR_OWN_CONTENT}); diff --git a/com.woltlab.wcf/templates/authorSidebarBox.tpl b/com.woltlab.wcf/templates/authorSidebarBox.tpl index ed99f9e70a..03f648b464 100644 --- a/com.woltlab.wcf/templates/authorSidebarBox.tpl +++ b/com.woltlab.wcf/templates/authorSidebarBox.tpl @@ -18,7 +18,9 @@ {if $userProfile->userID} - {include file='userInformationStatistics' user=$userProfile __userStatsClassname='dataList'} +
+ {include file='userInformationStatistics'} +
{/if} diff --git a/com.woltlab.wcf/templates/commentList.tpl b/com.woltlab.wcf/templates/commentList.tpl index 29947da77d..4a7e860256 100644 --- a/com.woltlab.wcf/templates/commentList.tpl +++ b/com.woltlab.wcf/templates/commentList.tpl @@ -1,13 +1,13 @@ {if !$commentManager|isset}{assign var='commentManager' value=$commentList->getCommentManager()}{/if} {foreach from=$commentList item=comment}
  • -
    +
    {if $comment->userID} - - {@$comment->getUserProfile()->getAvatar()->getImageTag(32)} + + {@$comment->getUserProfile()->getAvatar()->getImageTag(48)} {else} - {@$comment->getUserProfile()->getAvatar()->getImageTag(32)} + {@$comment->getUserProfile()->getAvatar()->getImageTag(48)} {/if}
    @@ -20,14 +20,14 @@ {$comment->username} {/if} - - {@$comment->time|time} + {@$comment->time|time}
    -

    {@$comment->getFormattedMessage()}

    +
    {@$comment->getFormattedMessage()}
    {if $comment|count} -
      +
        {include file='commentResponseList' responseList=$comment}
      {/if} diff --git a/com.woltlab.wcf/templates/commentResponseList.tpl b/com.woltlab.wcf/templates/commentResponseList.tpl index 86fde39341..fe86d2fb19 100644 --- a/com.woltlab.wcf/templates/commentResponseList.tpl +++ b/com.woltlab.wcf/templates/commentResponseList.tpl @@ -2,11 +2,11 @@
    • {if $response->userID} - + {@$response->getUserProfile()->getAvatar()->getImageTag(32)} {else} - {@$response->getUserProfile()->getAvatar()->getImageTag(32)} + {@$response->getUserProfile()->getAvatar()->getImageTag(32)} {/if}
      @@ -18,14 +18,14 @@ {$response->username} {/if} - - {@$response->time|time} + {@$response->time|time}
      -

      {@$response->getFormattedMessage()}

      +
      {@$response->getFormattedMessage()}
      - {include file='userInformationStatistics' user=$__wcf->user} +
      + {include file='userInformationStatistics' user=$__wcf->user} +
    \ No newline at end of file diff --git a/com.woltlab.wcf/templates/moderationReport.tpl b/com.woltlab.wcf/templates/moderationReport.tpl index fb63e5fae2..1d1d3cfd4f 100644 --- a/com.woltlab.wcf/templates/moderationReport.tpl +++ b/com.woltlab.wcf/templates/moderationReport.tpl @@ -109,7 +109,7 @@ {lang}wcf.user.guest{/lang} {/if} - - {@$queue->time|time} + {@$queue->time|time} diff --git a/com.woltlab.wcf/templates/recentActivityListItem.tpl b/com.woltlab.wcf/templates/recentActivityListItem.tpl index 90cdcac869..34f36fb4e8 100644 --- a/com.woltlab.wcf/templates/recentActivityListItem.tpl +++ b/com.woltlab.wcf/templates/recentActivityListItem.tpl @@ -5,8 +5,11 @@
    -

    {$event->getUserProfile()->username} - {@$event->time|time}

    -

    {@$event->getTitle()}

    +

    + {$event->getUserProfile()->username} + {@$event->time|time} +

    +

    {@$event->getTitle()}

    {lang}wcf.user.recentActivity.{@$event->getObjectTypeName()}{/lang}
    diff --git a/com.woltlab.wcf/templates/searchResultList.tpl b/com.woltlab.wcf/templates/searchResultList.tpl index f31f855b35..7129b03eda 100644 --- a/com.woltlab.wcf/templates/searchResultList.tpl +++ b/com.woltlab.wcf/templates/searchResultList.tpl @@ -18,23 +18,23 @@

    {$message->getSubject()}

    {if $message->getUserProfile() || $message->getTime() || $message->getContainerTitle()} -

    +

    {/if} {lang}wcf.search.object.{@$message->getObjectTypeName()}{/lang}
    diff --git a/com.woltlab.wcf/templates/team.tpl b/com.woltlab.wcf/templates/team.tpl index 45e8bbcdf1..76874d044d 100644 --- a/com.woltlab.wcf/templates/team.tpl +++ b/com.woltlab.wcf/templates/team.tpl @@ -51,12 +51,12 @@ {foreach from=$objects->getTeams() item=team} -
    -
    -

    {$team->groupName|language} {#$team->getMembers()|count}

    -

    {$team->groupDescription|language}

    -
    - +
    +
    +

    {$team->groupName|language} {#$team->getMembers()|count}

    + {$team->groupDescription|language} +
    +
      {foreach from=$team->getMembers() item=user} {include file='userListItem'} diff --git a/com.woltlab.wcf/templates/userBirthdayList.tpl b/com.woltlab.wcf/templates/userBirthdayList.tpl index 7a685ec80c..cc83d40278 100644 --- a/com.woltlab.wcf/templates/userBirthdayList.tpl +++ b/com.woltlab.wcf/templates/userBirthdayList.tpl @@ -23,7 +23,9 @@ {include file='userInformationButtons'} - {include file='userInformationStatistics'} +
      + {include file='userInformationStatistics'} +
      diff --git a/com.woltlab.wcf/templates/userInformation.tpl b/com.woltlab.wcf/templates/userInformation.tpl index 62f416322a..03c080ee1b 100644 --- a/com.woltlab.wcf/templates/userInformation.tpl +++ b/com.woltlab.wcf/templates/userInformation.tpl @@ -2,4 +2,6 @@ {include file='userInformationButtons'} -{include file='userInformationStatistics'} +
      + {include file='userInformationStatistics'} +
      diff --git a/com.woltlab.wcf/templates/userInformationHeadline.tpl b/com.woltlab.wcf/templates/userInformationHeadline.tpl index d11fb4e34a..9e116b1796 100644 --- a/com.woltlab.wcf/templates/userInformationHeadline.tpl +++ b/com.woltlab.wcf/templates/userInformationHeadline.tpl @@ -1,13 +1,16 @@ -{$user->username}{if $user->banned} {/if} -{if MODULE_USER_RANK} - {if $user->getUserTitle()} - {$user->getUserTitle()} - {/if} - {if $user->getRank() && $user->getRank()->rankImage} - {@$user->getRank()->getImage()} - {/if} -{/if} -
        +
        +

        {$user->username}{if $user->banned} {/if} + {if MODULE_USER_RANK} + {if $user->getUserTitle()} + {$user->getUserTitle()} + {/if} + {if $user->getRank() && $user->getRank()->rankImage} + {@$user->getRank()->getImage()} + {/if} + {/if} +

        +
        +
          {if $user->isAccessible('canViewProfile')} {if $user->isVisibleOption('gender') && $user->gender}
        • {lang}wcf.user.gender.{if $user->gender == 1}male{else}female{/if}{/lang}
        • {/if} {if $user->isVisibleOption('birthday') && $user->getAge()}
        • {@$user->getAge()}
        • {/if} diff --git a/com.woltlab.wcf/templates/userInformationStatistics.tpl b/com.woltlab.wcf/templates/userInformationStatistics.tpl index e26cac5a71..08ea41fd8b 100644 --- a/com.woltlab.wcf/templates/userInformationStatistics.tpl +++ b/com.woltlab.wcf/templates/userInformationStatistics.tpl @@ -1,13 +1,11 @@ -
          - {event name='statistics'} - - {if MODULE_LIKE && $user->likesReceived} -
          {lang}wcf.like.likesReceived{/lang}
          -
          {#$user->likesReceived}
          - {/if} - - {if $user->activityPoints} -
          {lang}wcf.user.activityPoint{/lang}
          -
          {#$user->activityPoints}
          - {/if} -
          \ No newline at end of file +{event name='statistics'} + +{if MODULE_LIKE && $user->likesReceived} +
          {lang}wcf.like.likesReceived{/lang}
          +
          {#$user->likesReceived}
          +{/if} + +{if $user->activityPoints} +
          {lang}wcf.user.activityPoint{/lang}
          +
          {#$user->activityPoints}
          +{/if} diff --git a/com.woltlab.wcf/templates/userProfileLikeItem.tpl b/com.woltlab.wcf/templates/userProfileLikeItem.tpl index 5550bb525a..bd2e8e5ce1 100644 --- a/com.woltlab.wcf/templates/userProfileLikeItem.tpl +++ b/com.woltlab.wcf/templates/userProfileLikeItem.tpl @@ -5,8 +5,11 @@
          -

          {$like->getUserProfile()->username} - {@$like->time|time}

          -

          {@$like->getTitle()}

          +

          + {$like->getUserProfile()->username} + {@$like->time|time} +

          +

          {@$like->getTitle()}

          {lang}wcf.like.objectType.{@$like->getObjectTypeName()}{/lang}
          diff --git a/com.woltlab.wcf/templates/userSidebar.tpl b/com.woltlab.wcf/templates/userSidebar.tpl index e642c81b63..17ac5f44be 100644 --- a/com.woltlab.wcf/templates/userSidebar.tpl +++ b/com.woltlab.wcf/templates/userSidebar.tpl @@ -115,11 +115,11 @@ {if !$user->isProtected()} {if $followingCount} -
          -

          {lang}wcf.user.profile.following{/lang} {#$followingCount}

          +
          +

          {lang}wcf.user.profile.following{/lang} {#$followingCount}

          -
          -
            +
            +
              {foreach from=$following item=followingUser}
            • {@$followingUser->getAvatar()->getImageTag(48)}
            • {/foreach} @@ -133,11 +133,11 @@ {/if} {if $followerCount} -
              -

              {lang}wcf.user.profile.followers{/lang} {#$followerCount}

              +
              +

              {lang}wcf.user.profile.followers{/lang} {#$followerCount}

              -
              -
                +
                +
                  {foreach from=$followers item=follower}
                • {@$follower->getAvatar()->getImageTag(48)}
                • {/foreach} @@ -151,11 +151,11 @@ {/if} {if $visitorCount} -
                  -

                  {lang}wcf.user.profile.visitors{/lang} {#$visitorCount}

                  +
                  +

                  {lang}wcf.user.profile.visitors{/lang} {#$visitorCount}

                  -
                  -
                    +
                    +
                      {foreach from=$visitors item=visitor}
                    • {@$visitor->getAvatar()->getImageTag(48)}
                    • {/foreach} diff --git a/com.woltlab.wcf/templates/usersOnlineList.tpl b/com.woltlab.wcf/templates/usersOnlineList.tpl index 0eb0fade18..d9410e17f9 100644 --- a/com.woltlab.wcf/templates/usersOnlineList.tpl +++ b/com.woltlab.wcf/templates/usersOnlineList.tpl @@ -98,13 +98,13 @@ {foreach from=$objects item=user} {capture assign=locationData}

                      - {if $user->getLocation()}{@$user->getLocation()}{else}{lang}wcf.user.usersOnline.location.unknown{/lang}{/if} - {@$user->lastActivityTime|time} + {if $user->getLocation()}{@$user->getLocation()}{else}{lang}wcf.user.usersOnline.location.unknown{/lang}{/if} {@$user->lastActivityTime|time}

                      {/capture} {capture assign=sessionData} {if $__wcf->session->getPermission('admin.user.canViewIpAddress')} -
                      +
                      {lang}wcf.user.usersOnline.ipAddress{/lang}
                      {$user->getFormattedIPAddress()|truncate:30}
                      @@ -124,17 +124,19 @@ {@$user->getAvatar()->getImageTag(48)}
                      - {@$user->getFormattedUsername()} - {if MODULE_USER_RANK} - {if $user->getUserTitle()} - {$user->getUserTitle()} - {/if} - {if $user->getRank() && $user->getRank()->rankImage} - {@$user->getRank()->getImage()} - {/if} - {/if} - - {@$locationData} +
                      +

                      {@$user->getFormattedUsername()} + {if MODULE_USER_RANK} + {if $user->getUserTitle()} + {$user->getUserTitle()} + {/if} + {if $user->getRank() && $user->getRank()->rankImage} + {@$user->getRank()->getImage()} + {/if} + {/if} +

                      + {@$locationData} +
                      {@$sessionData} @@ -150,7 +152,7 @@ {capture append=robotsOnlineList}
                    • -

                      +
                      @@ -170,7 +172,7 @@ {capture append=guestsOnlineList}
                    • -

                      +
                      diff --git a/wcfsetup/install/files/acp/templates/pageHeaderUser.tpl b/wcfsetup/install/files/acp/templates/pageHeaderUser.tpl index 329db54f37..844a407213 100644 --- a/wcfsetup/install/files/acp/templates/pageHeaderUser.tpl +++ b/wcfsetup/install/files/acp/templates/pageHeaderUser.tpl @@ -2,16 +2,32 @@
                        {if $__wcf->user->userID} -
                      • - {* TODO *} - {*@$__wcf->getUserProfileHandler()->getAvatar()->getImageTag(32)*} {lang}wcf.user.userNote{/lang} +
                      • -
                      • - {if PACKAGE_ID}