diff --git a/com.woltlab.wcf/templates/boxUserTrophyList.tpl b/com.woltlab.wcf/templates/boxUserTrophyList.tpl index ddb1c838ac3..e4f15c54b4f 100644 --- a/com.woltlab.wcf/templates/boxUserTrophyList.tpl +++ b/com.woltlab.wcf/templates/boxUserTrophyList.tpl @@ -1,41 +1,12 @@ -{if $boxPosition == 'sidebarLeft' || $boxPosition == 'sidebarRight'} -
    - {foreach from=$boxUserTrophyList item=boxUserTrophy} -
  1. -
    - {unsafe:$boxUserTrophy->getTrophy()->renderTrophy(32)} -
    +
      + {foreach from=$boxUserTrophyList item=boxUserTrophy} +
    1. +
      {unsafe:$boxUserTrophy->getTrophy()->renderTrophy(64)}
      - - -
      -
      - {user object=$boxUserTrophy->getUserProfile() tabindex='-1'} -
      -
      - {time time=$boxUserTrophy->time} -
      -
      -
    2. - {/foreach} -
    -{else} -
      - {foreach from=$boxUserTrophyList item=boxUserTrophy} -
    1. -
      {@$boxUserTrophy->getTrophy()->renderTrophy(64)}
      - -
      -

      {$boxUserTrophy->getTrophy()->getTitle()}

      - {if !$boxUserTrophy->getDescription()|empty}

      {@$boxUserTrophy->getDescription()}

      {/if}

      {user object=$boxUserTrophy->getUserProfile()} {@$boxUserTrophy->time|time}

      -
      -
    2. - {/foreach} -
    -{/if} +
    +

    {$boxUserTrophy->getTrophy()->getTitle()}

    + {if !$boxUserTrophy->getDescription()|empty}

    {unsafe:$boxUserTrophy->getDescription()}

    {/if}

    {user object=$boxUserTrophy->getUserProfile()} {time time=$boxUserTrophy->time}

    +
    +
  2. + {/foreach} +
diff --git a/com.woltlab.wcf/templates/boxUserTrophyListSidebar.tpl b/com.woltlab.wcf/templates/boxUserTrophyListSidebar.tpl new file mode 100644 index 00000000000..272fb5bef21 --- /dev/null +++ b/com.woltlab.wcf/templates/boxUserTrophyListSidebar.tpl @@ -0,0 +1,26 @@ +
    + {foreach from=$boxUserTrophyList item=boxUserTrophy} +
  1. +
    + {unsafe:$boxUserTrophy->getTrophy()->renderTrophy(32)} +
    + + + +
    +
    + {user object=$boxUserTrophy->getUserProfile() tabindex='-1'} +
    +
    + {time time=$boxUserTrophy->time} +
    +
    +
  2. + {/foreach} +
diff --git a/wcfsetup/install/files/lib/system/box/ArticleListBoxController.class.php b/wcfsetup/install/files/lib/system/box/ArticleListBoxController.class.php index 542a5227272..f940e86666f 100644 --- a/wcfsetup/install/files/lib/system/box/ArticleListBoxController.class.php +++ b/wcfsetup/install/files/lib/system/box/ArticleListBoxController.class.php @@ -94,7 +94,6 @@ protected function getTemplate() return WCF::getTPL()->render('wcf', 'boxArticleList', [ 'boxArticleList' => $this->objectList, 'boxSortField' => $this->sortField, - 'boxPosition' => $this->box->position, ]); } } diff --git a/wcfsetup/install/files/lib/system/box/UserTrophyListBoxController.class.php b/wcfsetup/install/files/lib/system/box/UserTrophyListBoxController.class.php index 8b80b22b50b..f1963413bd5 100644 --- a/wcfsetup/install/files/lib/system/box/UserTrophyListBoxController.class.php +++ b/wcfsetup/install/files/lib/system/box/UserTrophyListBoxController.class.php @@ -150,9 +150,13 @@ public function getTemplate() UserProfileRuntimeCache::getInstance()->cacheObjectIDs(\array_unique($userIDs)); - return WCF::getTPL()->render('wcf', 'boxUserTrophyList', [ + $templateName = match ($this->getBox()->position) { + 'sidebarLeft', 'sidebarRight' => 'boxUserTrophyListSidebar', + default => 'boxUserTrophyList', + }; + + return WCF::getTPL()->render('wcf', $templateName, [ 'boxUserTrophyList' => $this->objectList, - 'boxPosition' => $this->box->position, ]); } } diff --git a/wcfsetup/install/files/lib/system/box/WhoWasOnlineBoxController.class.php b/wcfsetup/install/files/lib/system/box/WhoWasOnlineBoxController.class.php index 0ee2f822a68..3ffd2e77faf 100644 --- a/wcfsetup/install/files/lib/system/box/WhoWasOnlineBoxController.class.php +++ b/wcfsetup/install/files/lib/system/box/WhoWasOnlineBoxController.class.php @@ -64,7 +64,6 @@ protected function getTemplate() { return WCF::getTPL()->render('wcf', 'boxWhoWasOnline', [ 'whoWasOnlineList' => $this->users, - 'boxPosition' => $this->box->position, 'whoWasOnlineTimeFormat' => DateUtil::TIME_FORMAT, ]); }