|
4 | 4 | {event name='javascriptInclude'} |
5 | 5 | <script data-relocate="true"> |
6 | 6 | {if $__wcf->getUser()->userID && $__wcf->getUser()->userID != $user->userID} |
7 | | - require(['Language', 'WoltLabSuite/Core/Ui/User/Editor', 'WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Ignore', 'WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Follow'], function(Language, UiUserEditor, UiUserProfileMenuItemIgnore, UiUserProfileMenuItemFollow) { |
| 7 | + require(['Language', 'WoltLabSuite/Core/Ui/User/Editor'], function(Language, UiUserEditor) { |
8 | 8 | Language.addObject({ |
9 | 9 | 'wcf.acp.user.disable': '{jslang}wcf.acp.user.disable{/jslang}', |
10 | 10 | 'wcf.acp.user.enable': '{jslang}wcf.acp.user.enable{/jslang}', |
|
15 | 15 | 'wcf.user.ban.expires.description': '{jslang}wcf.user.ban.expires.description{/jslang}', |
16 | 16 | 'wcf.user.ban.neverExpires': '{jslang}wcf.user.ban.neverExpires{/jslang}', |
17 | 17 | 'wcf.user.ban.reason.description': '{jslang}wcf.user.ban.reason.description{/jslang}', |
18 | | - 'wcf.user.button.follow': '{jslang}wcf.user.button.follow{/jslang}', |
19 | | - 'wcf.user.button.unfollow': '{jslang}wcf.user.button.unfollow{/jslang}', |
20 | | - 'wcf.user.button.ignore': '{jslang}wcf.user.button.ignore{/jslang}', |
21 | | - 'wcf.user.button.unignore': '{jslang}wcf.user.button.unignore{/jslang}', |
22 | 18 | 'wcf.user.disableAvatar': '{jslang}wcf.user.disableAvatar{/jslang}', |
23 | 19 | 'wcf.user.disableAvatar.confirmMessage': '{jslang}wcf.user.disableAvatar.confirmMessage{/jslang}', |
24 | 20 | 'wcf.user.disableAvatar.expires': '{jslang}wcf.user.disableAvatar.expires{/jslang}', |
|
44 | 40 | {if $isAccessible} |
45 | 41 | UiUserEditor.init(); |
46 | 42 | {/if} |
47 | | - |
48 | | - {if !$user->getPermission('user.profile.cannotBeIgnored') || $__wcf->getUserProfileHandler()->isIgnoredUser($user->userID)} |
49 | | - new UiUserProfileMenuItemIgnore({@$user->userID}, {if $__wcf->getUserProfileHandler()->isIgnoredUser($user->userID)}true{else}false{/if}); |
50 | | - {/if} |
51 | | - |
52 | | - {if !$user->isIgnoredUser($__wcf->user->userID)} |
53 | | - new UiUserProfileMenuItemFollow({@$user->userID}, {if $__wcf->getUserProfileHandler()->isFollowing($user->userID)}true{else}false{/if}); |
54 | | - {/if} |
55 | 43 | }); |
56 | 44 | {/if} |
57 | 45 |
|
|
93 | 81 | </noscript> |
94 | 82 | {/capture} |
95 | 83 |
|
96 | | -{capture assign='contentHeader'} |
97 | | - <header class="contentHeader userProfileUser userProfileUserWithCoverPhoto" data-object-id="{@$user->userID}"{if $isAccessible} |
98 | | - {if $__wcf->session->getPermission('admin.user.canBanUser')} |
99 | | - data-banned="{@$user->banned}" |
100 | | - {/if} |
101 | | - {if $__wcf->session->getPermission('admin.user.canDisableAvatar')} |
102 | | - data-disable-avatar="{@$user->disableAvatar}" |
103 | | - {/if} |
104 | | - {if $__wcf->session->getPermission('admin.user.canDisableSignature')} |
105 | | - data-disable-signature="{@$user->disableSignature}" |
106 | | - {/if} |
107 | | - {if $__wcf->session->getPermission('admin.user.canDisableCoverPhoto')} |
108 | | - data-disable-cover-photo="{@$user->disableCoverPhoto}" |
109 | | - {/if} |
110 | | - {if $__wcf->session->getPermission('admin.user.canEnableUser')} |
111 | | - data-is-disabled="{if $user->activationCode}true{else}false{/if}" |
112 | | - {/if} |
113 | | - {/if}> |
114 | | - <div class="userProfileCoverPhoto" style="background-image: url({$user->getCoverPhoto()->getURL()})"> |
115 | | - {if ($user->userID == $__wcf->user->userID || $user->canEdit()) && ($__wcf->getSession()->getPermission('user.profile.coverPhoto.canUploadCoverPhoto') || $user->coverPhotoHash)} |
116 | | - <div class="userProfileManageCoverPhoto dropdown jsOnly"> |
117 | | - <a href="#" class="button small dropdownToggle">{icon name='pencil'} {lang}wcf.user.coverPhoto.edit{/lang}</a> |
118 | | - <ul class="dropdownMenu"> |
119 | | - {if $__wcf->getSession()->getPermission('user.profile.coverPhoto.canUploadCoverPhoto')} |
120 | | - <li><a href="#" class="jsButtonUploadCoverPhoto jsStaticDialog" data-dialog-id="userProfileCoverPhotoUpload">{lang}wcf.user.coverPhoto.upload{/lang}</a></li> |
121 | | - {/if} |
122 | | - <li{if !$user->coverPhotoHash} style="display:none;"{/if}><a href="#" class="jsButtonDeleteCoverPhoto">{lang}wcf.user.coverPhoto.delete{/lang}</a></li> |
123 | | - </ul> |
124 | | - </div> |
125 | | - {/if} |
126 | | - </div> |
127 | | - <div class="contentHeaderIcon"> |
128 | | - {if $user->userID == $__wcf->user->userID} |
129 | | - <a href="{link controller='AvatarEdit'}{/link}" class="jsTooltip" title="{lang}wcf.user.avatar.edit{/lang}">{@$user->getAvatar()->getImageTag(128)}</a> |
130 | | - {else} |
131 | | - <span>{@$user->getAvatar()->getImageTag(128)}</span> |
132 | | - {/if} |
133 | | - {if $user->isOnline()}<span class="badge green badgeOnline">{lang}wcf.user.online{/lang}</span>{/if} |
134 | | - </div> |
135 | | - |
136 | | - <div class="contentHeaderTitle"> |
137 | | - <h1 class="contentTitle"> |
138 | | - <span class="userProfileUsername">{$user->username}</span> |
139 | | - {if $user->banned} |
140 | | - <span class="jsTooltip jsUserBanned" title="{lang}wcf.user.banned{/lang}"> |
141 | | - {icon size=24 name='lock'} |
142 | | - </span> |
143 | | - {/if} |
144 | | - {if MODULE_USER_RANK} |
145 | | - {if $user->getUserTitle()} |
146 | | - <span class="badge userTitleBadge{if $user->getRank() && $user->getRank()->cssClassName} {@$user->getRank()->cssClassName}{/if}">{$user->getUserTitle()}</span> |
147 | | - {/if} |
148 | | - {if $user->getRank() && $user->getRank()->rankImage} |
149 | | - <span class="userRankImage">{@$user->getRank()->getImage()}</span> |
150 | | - {/if} |
151 | | - {/if} |
152 | | - |
153 | | - {event name='afterContentTitle'} |
154 | | - </h1> |
155 | | - |
156 | | - <div class="contentHeaderDescription"> |
157 | | - {if MODULE_TROPHY && $__wcf->session->getPermission('user.profile.trophy.canSeeTrophies') && ($user->isAccessible('canViewTrophies') || $user->userID == $__wcf->session->userID) && $specialTrophyCount} |
158 | | - <div class="specialTrophyUserContainer"> |
159 | | - <ul> |
160 | | - {foreach from=$user->getSpecialTrophies() item=trophy} |
161 | | - <li><a href="{@$trophy->getLink()}">{@$trophy->renderTrophy(32, true)}</a></li> |
162 | | - {/foreach} |
163 | | - {if $user->trophyPoints > $specialTrophyCount} |
164 | | - <li><a href="#" class="jsTooltip userTrophyOverlayList" data-user-id="{$user->userID}" title="{lang}wcf.user.trophy.showTrophies{/lang}" role="button">{lang trophyCount=$user->trophyPoints-$specialTrophyCount}wcf.user.trophy.showMoreTrophies{/lang}</a></li> |
165 | | - {/if} |
166 | | - </ul> |
167 | | - </div> |
168 | | - {/if} |
169 | | - <ul class="inlineList commaSeparated"> |
170 | | - {if !$user->isProtected()} |
171 | | - {if $user->isVisibleOption('gender') && $user->gender}<li>{$user->getFormattedUserOption('gender')}</li>{/if} |
172 | | - {if $user->isVisibleOption('birthday') && $user->getAge()}<li>{@$user->getAge()}</li>{/if} |
173 | | - {if $user->isVisibleOption('location') && $user->location}<li>{lang}wcf.user.membersList.location{/lang}</li>{/if} |
174 | | - {/if} |
175 | | - {if $user->getOldUsername()}<li>{lang}wcf.user.profile.oldUsername{/lang}</li>{/if} |
176 | | - <li>{lang}wcf.user.membersList.registrationDate{/lang}</li> |
177 | | - {event name='userDataRow1'} |
178 | | - </ul> |
179 | | - |
180 | | - {hascontent} |
181 | | - <ul class="inlineList commaSeparated"> |
182 | | - {content} |
183 | | - {if $user->canViewOnlineStatus() && $user->getLastActivityTime()} |
184 | | - <li>{lang}wcf.user.usersOnline.lastActivity{/lang}: {@$user->getLastActivityTime()|time}</li> |
185 | | - {if $user->getCurrentLocation()}<li>{@$user->getCurrentLocation()}</li>{/if} |
186 | | - {/if} |
187 | | - {if $__wcf->session->getPermission('admin.user.canViewIpAddress') && $user->registrationIpAddress} |
188 | | - <li>{lang}wcf.user.registrationIpAddress{/lang}: <span class="userRegistrationIpAddress">{@$user->getRegistrationIpAddress()|ipSearch}</span></li> |
189 | | - {/if} |
190 | | - {/content} |
191 | | - </ul> |
192 | | - {/hascontent} |
193 | | - |
194 | | - <dl class="plain inlineDataList"> |
195 | | - {include file='userInformationStatistics'} |
196 | | - |
197 | | - {if $user->profileHits} |
198 | | - <dt{if $user->getProfileAge() > 1} title="{lang}wcf.user.profileHits.hitsPerDay{/lang}"{/if}>{lang}wcf.user.profileHits{/lang}</dt> |
199 | | - <dd>{#$user->profileHits}</dd> |
200 | | - {/if} |
201 | | - </dl> |
202 | | - </div> |
203 | | - </div> |
204 | | - |
205 | | - {hascontent} |
206 | | - <nav class="contentHeaderNavigation"> |
207 | | - <ul class="userProfileButtonContainer"> |
208 | | - {content} |
209 | | - {if $user->canEdit() || ($__wcf->getUser()->userID == $user->userID && $user->canEditOwnProfile())} |
210 | | - <li><a href="#" class="jsButtonEditProfile button buttonPrimary">{icon name='pencil'} <span>{lang}wcf.user.editProfile{/lang}</span></a></li> |
211 | | - {/if} |
212 | | - |
213 | | - {event name='contentHeaderNavigation'} |
214 | | - {/content} |
215 | | - </ul> |
216 | | - </nav> |
217 | | - {/hascontent} |
218 | | - </header> |
| 84 | +{capture assign='beforeMaincontent'} |
| 85 | + <div class="layoutBoundary"> |
| 86 | + {unsafe:$userProfileHeaderView} |
| 87 | + </div> |
219 | 88 | {/capture} |
220 | 89 |
|
221 | 90 | {include file='userSidebar' assign='sidebarRight'} |
222 | 91 |
|
223 | | -{capture assign='__menuSearch'} |
224 | | - {event name='menuSearch'} |
225 | | - {* DEPRECATED *}{event name='quickSearchItems'} |
226 | | -{/capture} |
227 | | -{assign var='__menuSearch' value=$__menuSearch|trim} |
228 | | - |
229 | | -{capture assign='__menuManagement'} |
230 | | - {event name='menuManagement'} |
231 | | - {if $isAccessible && $__wcf->user->userID != $user->userID && ($__wcf->session->getPermission('admin.user.canBanUser') || $__wcf->session->getPermission('admin.user.canDisableAvatar') || $__wcf->session->getPermission('admin.user.canDisableSignature') || $__wcf->session->getPermission('admin.user.canEnableUser') || ($__wcf->session->getPermission('admin.general.canUseAcp') && $__wcf->session->getPermission('admin.user.canEditUser')){event name='moderationDropdownPermissions'})} |
232 | | - {if $__wcf->session->getPermission('admin.user.canBanUser')}<li><a href="#" class="jsButtonUserBan">{lang}wcf.user.{if $user->banned}un{/if}ban{/lang}</a></li>{/if} |
233 | | - {if $__wcf->session->getPermission('admin.user.canDisableAvatar')}<li><a href="#" class="jsButtonUserDisableAvatar">{lang}wcf.user.{if $user->disableAvatar}enable{else}disable{/if}Avatar{/lang}</a></li>{/if} |
234 | | - {if $__wcf->session->getPermission('admin.user.canDisableSignature')}<li><a href="#" class="jsButtonUserDisableSignature">{lang}wcf.user.{if $user->disableSignature}enable{else}disable{/if}Signature{/lang}</a></li>{/if} |
235 | | - {if $__wcf->session->getPermission('admin.user.canDisableCoverPhoto')}<li><a href="#" class="jsButtonUserDisableCoverPhoto">{lang}wcf.user.{if $user->disableCoverPhoto}enable{else}disable{/if}CoverPhoto{/lang}</a></li>{/if} |
236 | | - {if $__wcf->session->getPermission('admin.user.canEnableUser')}<li><a href="#" class="jsButtonUserEnable">{lang}wcf.acp.user.{if $user->pendingActivation()}enable{else}disable{/if}{/lang}</a></li>{/if} |
237 | | - |
238 | | - {if $__wcf->session->getPermission('admin.general.canUseAcp') && $__wcf->session->getPermission('admin.user.canEditUser')}<li><a href="{link controller='UserEdit' object=$user isACP=true}{/link}" class="jsUserInlineEditor">{lang}wcf.user.edit{/lang}</a></li>{/if} |
239 | | - {/if} |
240 | | -{/capture} |
241 | | -{assign var='__menuManagement' value=$__menuManagement|trim} |
242 | | - |
243 | | -{capture assign='contentInteractionButtons'} |
244 | | - {if $__menuSearch} |
245 | | - <div class="contentInteractionButton dropdown jsOnly"> |
246 | | - <button type="button" class="button small dropdownToggle">{icon name='magnifying-glass'} <span>{lang}wcf.user.searchUserContent{/lang}</span></button> |
247 | | - <ul class="dropdownMenu userProfileButtonMenu" data-menu="search"> |
248 | | - {@$__menuSearch} |
249 | | - </ul> |
250 | | - </div> |
251 | | - {/if} |
252 | | - {if $__menuManagement} |
253 | | - <div class="contentInteractionButton dropdown jsOnly"> |
254 | | - <button type="button" class="button small dropdownToggle">{icon name='gear'} <span>{lang}wcf.user.profile.management{/lang}</span></button> |
255 | | - <ul class="dropdownMenu userProfileButtonMenu" data-menu="management"> |
256 | | - {@$__menuManagement} |
257 | | - </ul> |
258 | | - </div> |
259 | | - {/if} |
260 | | -{/capture} |
261 | | - |
262 | | -{capture assign='contentInteractionDropdownItems'} |
263 | | - {* DEPRECATED *}{event name='menuCustomization'} |
264 | | - {event name='menuInteraction'} |
265 | | - |
266 | | - {if $user->userID != $__wcf->user->userID} |
267 | | - {if $user->isAccessible('canViewEmailAddress') || $__wcf->session->getPermission('admin.user.canEditMailAddress')} |
268 | | - <li><a href="mailto:{@$user->getEncodedEmail()}">{lang}wcf.user.button.mail{/lang}</a></li> |
269 | | - {/if} |
270 | | - {/if} |
271 | | - |
272 | | - {if $user->userID != $__wcf->user->userID && $__wcf->session->getPermission('user.profile.canReportContent')} |
273 | | - <li> |
274 | | - <a |
275 | | - href="#" |
276 | | - role="button" |
277 | | - data-report-content="com.woltlab.wcf.user" |
278 | | - data-object-id="{$user->userID}" |
279 | | - > |
280 | | - {lang}wcf.user.profile.report{/lang} |
281 | | - </a> |
282 | | - </li> |
283 | | - {/if} |
284 | | -{/capture} |
285 | | - |
286 | 92 | {include file='header'} |
287 | 93 |
|
288 | 94 | {if !$user->isProtected()} |
|
0 commit comments