-<ul class="sidebarItemList">
- {foreach from=$boxUsers item=boxUser}
- <li class="box24">
- {user object=$boxUser type='avatar24' ariaHidden='true' tabindex='-1'}
-
- <div class="sidebarItemTitle">
- <h3>{user object=$boxUser}</h3>
- {capture assign='__boxUserLanguageItem'}{lang __optional=true}wcf.user.boxList.description.{$boxSortField}{/lang}{/capture}
- {if $__boxUserLanguageItem}
- <small>{@$__boxUserLanguageItem}</small>
- {/if}
- </div>
- </li>
+<div class="userCardList">
+ {foreach from=$boxUsers item=user}
+ {include file='userCard'}
{/foreach}
-</ul>
+</div>
--- /dev/null
+<ul class="sidebarItemList">
+ {foreach from=$boxUsers item=boxUser}
+ <li class="box24">
+ {user object=$boxUser type='avatar24' ariaHidden='true' tabindex='-1'}
+
+ <div class="sidebarItemTitle">
+ <h3>{user object=$boxUser}</h3>
+ {capture assign='__boxUserLanguageItem'}{lang __optional=true}wcf.user.boxList.description.{$boxSortField}{/lang}{/capture}
+ {if $__boxUserLanguageItem}
+ <small>{@$__boxUserLanguageItem}</small>
+ {/if}
+ </div>
+ </li>
+ {/foreach}
+</ul>
*/
protected $conditionDefinition = 'com.woltlab.wcf.box.userList.condition';
+ /**
+ * @inheritDoc
+ */
+ protected static $supportedPositions = ['contentTop', 'contentBottom', 'sidebarLeft', 'sidebarRight'];
+
/**
* @inheritDoc
*/
*/
protected function getTemplate()
{
+ $templateName = 'boxUserList';
+ if ($this->getBox()->position == 'sidebarLeft' || $this->getBox()->position == 'sidebarRight') {
+ $templateName = 'boxUserListSidebar';
+ }
+
$userProfiles = [];
if ($this->userIDs !== null) {
$userProfiles = UserProfileRuntimeCache::getInstance()->getObjects($this->userIDs);
DatabaseObject::sort($userProfiles, $this->sortField, $this->sortOrder);
}
- return WCF::getTPL()->fetch('boxUserList', 'wcf', [
+ return WCF::getTPL()->fetch($templateName, 'wcf', [
'boxUsers' => $this->userIDs !== null ? $userProfiles : $this->objectList->getObjects(),
'boxSortField' => $this->box->sortField,
], true);