Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 11 additions & 40 deletions com.woltlab.wcf/templates/boxUserTrophyList.tpl
Original file line number Diff line number Diff line change
@@ -1,41 +1,12 @@
{if $boxPosition == 'sidebarLeft' || $boxPosition == 'sidebarRight'}
<ol class="sidebarList">
{foreach from=$boxUserTrophyList item=boxUserTrophy}
<li class="sidebarListItem">
<div class="sidebarListItem__avatar">
{unsafe:$boxUserTrophy->getTrophy()->renderTrophy(32)}
</div>
<ol class="containerBoxList trophyCategoryList tripleColumned">
{foreach from=$boxUserTrophyList item=boxUserTrophy}
<li class="box64">
<div>{unsafe:$boxUserTrophy->getTrophy()->renderTrophy(64)}</div>

<div class="sidebarListItem__content">
<h3 class="sidebarListItem__title">
<a href="{$boxUserTrophy->getTrophy()->getLink()}" class="sidebarListItem__link">
{$boxUserTrophy->getTrophy()->getTitle()}
</a>
</h3>
</div>

<div class="sidebarListItem__meta">
<div class="sidebarListItem__meta__author">
{user object=$boxUserTrophy->getUserProfile() tabindex='-1'}
</div>
<div class="sidebarListItem__meta__time">
{time time=$boxUserTrophy->time}
</div>
</div>
</li>
{/foreach}
</ol>
{else}
<ol class="containerBoxList trophyCategoryList tripleColumned">
{foreach from=$boxUserTrophyList item=boxUserTrophy}
<li class="box64">
<div>{@$boxUserTrophy->getTrophy()->renderTrophy(64)}</div>

<div class="sidebarItemTitle">
<h3><a href="{$boxUserTrophy->getTrophy()->getLink()}">{$boxUserTrophy->getTrophy()->getTitle()}</a></h3>
<small>{if !$boxUserTrophy->getDescription()|empty}<p>{@$boxUserTrophy->getDescription()}</p>{/if}<p>{user object=$boxUserTrophy->getUserProfile()} <span class="separatorLeft">{@$boxUserTrophy->time|time}</span></p></small>
</div>
</li>
{/foreach}
</ol>
{/if}
<div class="sidebarItemTitle">
<h3><a href="{$boxUserTrophy->getTrophy()->getLink()}">{$boxUserTrophy->getTrophy()->getTitle()}</a></h3>
<small>{if !$boxUserTrophy->getDescription()|empty}<p>{unsafe:$boxUserTrophy->getDescription()}</p>{/if}<p>{user object=$boxUserTrophy->getUserProfile()} <span class="separatorLeft">{time time=$boxUserTrophy->time}</span></p></small>
</div>
</li>
{/foreach}
</ol>
26 changes: 26 additions & 0 deletions com.woltlab.wcf/templates/boxUserTrophyListSidebar.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<ol class="sidebarList">
{foreach from=$boxUserTrophyList item=boxUserTrophy}
<li class="sidebarListItem">
<div class="sidebarListItem__avatar">
{unsafe:$boxUserTrophy->getTrophy()->renderTrophy(32)}
</div>

<div class="sidebarListItem__content">
<h3 class="sidebarListItem__title">
<a href="{$boxUserTrophy->getTrophy()->getLink()}" class="sidebarListItem__link">
{$boxUserTrophy->getTrophy()->getTitle()}
</a>
</h3>
</div>

<div class="sidebarListItem__meta">
<div class="sidebarListItem__meta__author">
{user object=$boxUserTrophy->getUserProfile() tabindex='-1'}
</div>
<div class="sidebarListItem__meta__time">
{time time=$boxUserTrophy->time}
</div>
</div>
</li>
{/foreach}
</ol>
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ protected function getTemplate()
return WCF::getTPL()->render('wcf', 'boxArticleList', [
'boxArticleList' => $this->objectList,
'boxSortField' => $this->sortField,
'boxPosition' => $this->box->position,
]);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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,
]);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ protected function getTemplate()
{
return WCF::getTPL()->render('wcf', 'boxWhoWasOnline', [
'whoWasOnlineList' => $this->users,
'boxPosition' => $this->box->position,
'whoWasOnlineTimeFormat' => DateUtil::TIME_FORMAT,
]);
}
Expand Down
Loading