Merge branch 'next' into next-lantia
[GitHub/WoltLab/WCF.git] / com.woltlab.wcf / templates / messageSidebar.tpl
1 {if !$__messageSidebarJavascript|isset}
2 {assign var=__messageSidebarJavascript value=true}
3 {/if}
4
5 <aside class="messageSidebar{if MESSAGE_SIDEBAR_ENABLE_ONLINE_STATUS && $userProfile->isOnline()} userOnline{/if} {if $userProfile->userID}member{else}guest{/if}"{if $userProfile->userID} itemscope itemtype="http://data-vocabulary.org/Person"{/if}>
6 <div class="messageAuthor">
7 {if $userProfile->userID}
8 {assign var='username' value=$userProfile->username}
9
10 {if MESSAGE_SIDEBAR_ENABLE_AVATAR}
11 {if $userProfile->getAvatar()}
12 <div class="userAvatar">
13 {capture assign='__userAvatar'}{@$userProfile->getAvatar()->getImageTag(128)}{/capture}
14 <a href="{link controller='User' object=$userProfile->getDecoratedObject()}{/link}" class="framed">{@'<img'|str_replace:'<img itemprop="photo"':$__userAvatar}</a>
15
16 {* @TODO *}
17 {*if MESSAGE_SIDEBAR_ENABLE_ONLINE_STATUS && $userProfile->isOnline()}<span class="badge green badgeOnline" title="{lang}wcf.user.online.title{/lang}">{lang}wcf.user.online{/lang}</span>{/if*}
18 </div>
19 {/if}
20 {/if}
21
22 <p class="messageAuthorContainer">
23 <a href="{link controller='User' object=$userProfile->getDecoratedObject()}{/link}" class="username userLink" data-user-id="{@$userProfile->userID}" rel="author">
24 <span itemprop="name">{if MESSAGE_SIDEBAR_ENABLE_USER_ONLINE_MARKING}{@$userProfile->getFormattedUsername()}{else}{$username}{/if}</span>
25 </a>
26 {if $userProfile->banned}<span class="icon icon16 fa-lock jsTooltip jsUserBanned" title="{lang user=$userProfile}wcf.user.banned{/lang}"></span>{/if}
27
28 {event name='header'}
29 </p>
30
31 {if MODULE_USER_RANK && MESSAGE_SIDEBAR_ENABLE_RANK}
32 {if $userProfile->getUserTitle()}
33 <div class="userTitle">
34 <p class="badge userTitleBadge{if $userProfile->getRank() && $userProfile->getRank()->cssClassName} {@$userProfile->getRank()->cssClassName}{/if}" itemprop="title">{$userProfile->getUserTitle()}</p>
35 </div>
36 {/if}
37 {if $userProfile->getRank() && $userProfile->getRank()->rankImage}
38 <div class="userRank">{@$userProfile->getRank()->getImage()}</div>
39 {/if}
40 {/if}
41 {else}
42 <p class="messageAuthor">
43 <span class="username">{$userProfile->username}</span>
44
45 <div class="userTitle">
46 <p class="badge">{lang}wcf.user.guest{/lang}</p>
47 </div>
48
49 {event name='header'}
50 </p>
51 {/if}
52 </div>
53
54 {event name='beforeCredits'}
55
56 {if $userProfile->userID}
57 {hascontent}
58 <div class="userCredits">
59 <dl class="plain dataList">
60 {content}
61 {if MODULE_LIKE && MESSAGE_SIDEBAR_ENABLE_LIKES_RECEIVED && $userProfile->likesReceived}
62 <dt><a href="{link controller='User' object=$userProfile}{/link}#likes" class="jsTooltip" title="{lang user=$userProfile}wcf.like.showLikesReceived{/lang}">{lang}wcf.like.likesReceived{/lang}</a></dt>
63 <dd>{#$userProfile->likesReceived}</dd>
64 {/if}
65
66 {if MESSAGE_SIDEBAR_ENABLE_ACTIVITY_POINTS && $userProfile->activityPoints}
67 <dt><a href="#" class="activityPointsDisplay jsTooltip" title="{lang user=$userProfile}wcf.user.activityPoint.showActivityPoints{/lang}" data-user-id="{@$userProfile->userID}">{lang}wcf.user.activityPoint{/lang}</a></dt>
68 <dd>{#$userProfile->activityPoints}</dd>
69 {/if}
70 {event name='userCredits'}
71 {if MESSAGE_SIDEBAR_USER_OPTIONS && $userProfile->isAccessible('canViewProfile')}
72 {assign var='__sidebarUserOptions' value=','|explode:MESSAGE_SIDEBAR_USER_OPTIONS}
73 {foreach from=$__sidebarUserOptions item='__sidebarUserOption'}
74 {if $userProfile->getUserOption($__sidebarUserOption)}
75 {assign var='__formattedUserOption' value=$userProfile->getFormattedUserOption($__sidebarUserOption)}
76 {if $__formattedUserOption}
77 <dt>{lang}wcf.user.option.{$__sidebarUserOption}{/lang}</dt>
78 <dd{if $__sidebarUserOption == 'location'} itemprop="locality"{/if}>{@$__formattedUserOption}</dd>
79 {/if}
80 {/if}
81 {/foreach}
82 {/if}
83 {/content}
84 </dl>
85 </div>
86 {/hascontent}
87 {/if}
88
89 {event name='afterCredits'}
90 </aside>