Commit | Line | Data |
---|---|---|
320f4a6d MW |
1 | {include file='documentHeader'} |
2 | ||
3 | <head> | |
4 | <title>{lang}wcf.user.profile{/lang} - {lang}wcf.user.members{/lang} - {PAGE_TITLE|language}</title> | |
5 | ||
6 | {include file='headInclude'} | |
7 | ||
8 | <link rel="canonical" href="{link controller='User' object=$user}{/link}" /> | |
ccef3486 | 9 | |
647741fd MW |
10 | <script data-relocate="true" src="{@$__wcf->getPath()}js/WCF.Moderation{if !ENABLE_DEBUG_MODE}.min{/if}.js?v={@$__wcfVersion}"></script> |
11 | <script data-relocate="true" src="{@$__wcf->getPath()}js/WCF.User{if !ENABLE_DEBUG_MODE}.min{/if}.js?v={@$__wcfVersion}"></script> | |
320f4a6d | 12 | {event name='javascriptInclude'} |
9543d9fe | 13 | <script data-relocate="true"> |
320f4a6d MW |
14 | //<![CDATA[ |
15 | $(function() { | |
16 | {if $__wcf->getUser()->userID && $__wcf->getUser()->userID != $user->userID} | |
17 | WCF.Language.addObject({ | |
18 | 'wcf.user.activityPoint': '{lang}wcf.user.activityPoint{/lang}', | |
19 | 'wcf.user.button.follow': '{lang}wcf.user.button.follow{/lang}', | |
20 | 'wcf.user.button.unfollow': '{lang}wcf.user.button.unfollow{/lang}', | |
21 | 'wcf.user.button.ignore': '{lang}wcf.user.button.ignore{/lang}', | |
22 | 'wcf.user.button.unignore': '{lang}wcf.user.button.unignore{/lang}' | |
23 | }); | |
24 | ||
25 | {if !$user->getPermission('user.profile.cannotBeIgnored')} | |
26 | new WCF.User.Profile.IgnoreUser({@$user->userID}, {if $__wcf->getUserProfileHandler()->isIgnoredUser($user->userID)}true{else}false{/if}); | |
27 | {/if} | |
28 | ||
29 | new WCF.User.Profile.Follow({@$user->userID}, {if $__wcf->getUserProfileHandler()->isFollowing($user->userID)}true{else}false{/if}); | |
30 | {/if} | |
31 | ||
32 | new WCF.User.Profile.TabMenu({@$user->userID}); | |
33 | ||
34 | WCF.TabMenu.init(); | |
35 | ||
36 | {if $user->canEdit() || ($__wcf->getUser()->userID == $user->userID && $user->canEditOwnProfile())} | |
37 | WCF.Language.addObject({ | |
38 | 'wcf.user.editProfile': '{lang}wcf.user.editProfile{/lang}', | |
39 | }); | |
40 | ||
41 | new WCF.User.Profile.Editor({@$user->userID}, {if $editOnInit}true{else}false{/if}); | |
42 | {/if} | |
43 | ||
44 | {if $user->activityPoints} | |
45 | WCF.Language.addObject({ | |
46 | 'wcf.user.activityPoint': '{lang}wcf.user.activityPoint{/lang}' | |
47 | }); | |
48 | ||
49 | WCF.User.Profile.ActivityPointList.init(); | |
50 | {/if} | |
51 | ||
52 | {if $followingCount > 10} | |
53 | var $followingList = null; | |
54 | $('#followingAll').click(function() { | |
55 | if ($followingList === null) { | |
50920dbb | 56 | $followingList = new WCF.User.List('wcf\\data\\user\\follow\\UserFollowingAction', $('#followingAll').parents('fieldset').children('legend').text().replace(/ \d+$/, ''), { userID: {@$user->userID} }); |
320f4a6d MW |
57 | } |
58 | ||
59 | $followingList.open(); | |
60 | }); | |
61 | {/if} | |
62 | {if $followerCount > 10} | |
63 | var $followerList = null; | |
64 | $('#followerAll').click(function() { | |
65 | if ($followerList === null) { | |
50920dbb | 66 | $followerList = new WCF.User.List('wcf\\data\\user\\follow\\UserFollowAction', $('#followerAll').parents('fieldset').children('legend').text().replace(/ \d+$/, ''), { userID: {@$user->userID} }); |
320f4a6d MW |
67 | } |
68 | ||
69 | $followerList.open(); | |
70 | }); | |
71 | {/if} | |
72 | {if $visitorCount > 10} | |
73 | var $visitorList = null; | |
74 | $('#visitorAll').click(function() { | |
75 | if ($visitorList === null) { | |
50920dbb | 76 | $visitorList = new WCF.User.List('wcf\\data\\user\\profile\\visitor\\UserProfileVisitorAction', $('#visitorAll').parents('fieldset').children('legend').text().replace(/ \d+$/, ''), { userID: {@$user->userID} }); |
320f4a6d MW |
77 | } |
78 | ||
79 | $visitorList.open(); | |
80 | }); | |
81 | {/if} | |
82 | ||
dbe622ad | 83 | {if $isAccessible && $__wcf->user->userID != $user->userID} |
57f097e8 MS |
84 | WCF.Language.addObject({ |
85 | 'wcf.user.ban': '{lang}wcf.user.ban{/lang}', | |
86 | 'wcf.user.ban.confirmMessage': '{lang}wcf.user.ban.confirmMessage{/lang}', | |
87 | 'wcf.user.ban.reason.description': '{lang}wcf.user.ban.reason.description{/lang}', | |
88 | 'wcf.user.unban': '{lang}wcf.user.unban{/lang}', | |
89 | 'wcf.user.disableAvatar': '{lang}wcf.user.disableAvatar{/lang}', | |
90 | 'wcf.user.disableAvatar.confirmMessage': '{lang}wcf.user.disableAvatar.confirmMessage{/lang}', | |
91 | 'wcf.user.disableSignature': '{lang}wcf.user.disableSignature{/lang}', | |
92 | 'wcf.user.disableSignature.confirmMessage': '{lang}wcf.user.disableSignature.confirmMessage{/lang}', | |
93 | 'wcf.user.edit': '{lang}wcf.user.edit{/lang}', | |
94 | 'wcf.user.enableAvatar': '{lang}wcf.user.enableAvatar{/lang}', | |
95 | 'wcf.user.enableSignature': '{lang}wcf.user.enableSignature{/lang}' | |
96 | }); | |
97 | ||
98 | var $userInlineEditor = new WCF.User.InlineEditor('.userHeadline'); | |
99 | $userInlineEditor.setPermissions({ | |
100 | canBanUser: {if $__wcf->session->getPermission('admin.user.canBanUser')}true{else}false{/if}, | |
101 | canDisableAvatar: {if $__wcf->session->getPermission('admin.user.canDisableAvatar')}true{else}false{/if}, | |
102 | canDisableSignature: {if $__wcf->session->getPermission('admin.user.canDisableSignature')}true{else}false{/if}, | |
103 | canEditUser: {if $__wcf->session->getPermission('admin.general.canUseAcp') && $__wcf->session->getPermission('admin.user.canEditUser')}true{else}false{/if} | |
104 | }); | |
105 | {/if} | |
106 | ||
647741fd MW |
107 | WCF.Language.addObject({ |
108 | 'wcf.moderation.report.reportContent': '{lang}wcf.user.profile.report{/lang}', | |
109 | 'wcf.moderation.report.success': '{lang}wcf.moderation.report.success{/lang}' | |
110 | }); | |
111 | new WCF.Moderation.Report.Content('com.woltlab.wcf.user', '.jsReportUser'); | |
ccef3486 | 112 | |
320f4a6d MW |
113 | {event name='javascriptInit'} |
114 | }); | |
115 | //]]> | |
116 | </script> | |
117 | ||
118 | <noscript> | |
119 | <style type="text/css"> | |
120 | #profileContent > .tabMenu > ul > li:not(:first-child) { | |
121 | display: none !important; | |
122 | } | |
123 | ||
124 | #profileContent > .tabMenuContent:not(:first-of-type) { | |
125 | display: none !important; | |
126 | } | |
127 | </style> | |
128 | </noscript> | |
129 | </head> | |
130 | ||
131 | <body id="tpl{$templateName|ucfirst}"> | |
132 | ||
133 | {include file='userSidebar' assign='sidebar'} | |
134 | ||
135 | {include file='header' sidebarOrientation='left'} | |
136 | ||
57f097e8 MS |
137 | <header class="boxHeadline userHeadline" |
138 | {if $isAccessible} | |
139 | data-object-id="{@$user->userID}" | |
140 | {if $__wcf->session->getPermission('admin.user.canBanUser')} | |
141 | data-banned="{@$user->banned}" | |
142 | {/if} | |
143 | {if $__wcf->session->getPermission('admin.user.canDisableAvatar')} | |
144 | data-disable-avatar="{@$user->disableAvatar}" | |
145 | {/if} | |
146 | {if $__wcf->session->getPermission('admin.user.canDisableSignature')} | |
147 | data-disable-signature="{@$user->disableSignature}" | |
148 | {/if} | |
149 | {/if} | |
150 | > | |
320f4a6d MW |
151 | <span class="framed invisible">{@$user->getAvatar()->getImageTag(48)}</span> |
152 | ||
153 | <h1>{$user->username}{if MODULE_USER_RANK && $user->getUserTitle()} <span class="badge userTitleBadge{if $user->getRank() && $user->getRank()->cssClassName} {@$user->getRank()->cssClassName}{/if}">{$user->getUserTitle()}</span>{/if}</h1> | |
154 | ||
155 | <ul class="dataList"> | |
156 | {if $user->gender}<li>{lang}wcf.user.gender.{if $user->gender == 1}male{else}female{/if}{/lang}</li>{/if} | |
157 | {if $user->getAge()}<li>{@$user->getAge()}</li>{/if} | |
158 | {if $user->location}<li>{lang}wcf.user.membersList.location{/lang}</li>{/if} | |
159 | {if $user->getOldUsername()}<li>{lang}wcf.user.profile.oldUsername{/lang}</li>{/if} | |
160 | <li>{lang}wcf.user.membersList.registrationDate{/lang}</li> | |
161 | {event name='userDataRow1'} | |
162 | </ul> | |
163 | {if $user->canViewOnlineStatus() && $user->getLastActivityTime()} | |
164 | <dl class="plain inlineDataList"> | |
165 | <dt>{lang}wcf.user.usersOnline.lastActivity{/lang}</dt> | |
166 | <dd>{@$user->getLastActivityTime()|time}{if $user->getCurrentLocation()}, {@$user->getCurrentLocation()}{/if}</dd> | |
167 | {event name='userDataRow2'} | |
168 | </dl> | |
169 | {/if} | |
170 | <nav class="jsMobileNavigation buttonGroupNavigation"> | |
28283ef7 MW |
171 | <ul id="profileButtonContainer" class="buttonGroup"> |
172 | {hascontent} | |
173 | <li class="dropdown"> | |
174 | <a class="button dropdownToggle jsTooltip" title="{lang}wcf.user.searchUserContent{/lang}"><span class="icon icon16 icon-search"></span> <span class="invisible">{lang}wcf.user.searchUserContent{/lang}</span></a> | |
175 | <ul class="dropdownMenu"> | |
176 | {content} | |
177 | {event name='quickSearchItems'} | |
178 | {/content} | |
179 | </ul> | |
180 | </li> | |
181 | {/hascontent} | |
57f097e8 | 182 | |
647741fd | 183 | <li class="jsReportUser jsOnly" data-object-id="{@$user->userID}"><a title="{lang}wcf.user.profile.report{/lang}" class="button jsTooltip"><span class="icon icon16 icon-warning-sign"></span> <span class="invisible">{lang}wcf.user.profile.report{/lang}</span></a></li> |
ccef3486 | 184 | |
57f097e8 MS |
185 | {if $user->userID != $__wcf->user->userID && $user->isAccessible('canViewEmailAddress')} |
186 | <li><a class="button jsTooltip" href="mailto:{@$user->getEncodedEmail()}" title="{lang}wcf.user.button.mail{/lang}"><span class="icon icon16 icon-envelope-alt"></span> <span class="invisible">{lang}wcf.user.button.mail{/lang}</span></a></li>{elseif $user->isAccessible('canMail') && $__wcf->session->getPermission('user.profile.canMail')}<li><a class="button jsTooltip" href="{link controller='Mail' object=$user}{/link}" title="{lang}wcf.user.button.mail{/lang}"><span class="icon icon16 icon-envelope-alt"></span> <span class="invisible">{lang}wcf.user.button.mail{/lang}</span></a></li> | |
187 | {/if} | |
188 | ||
28283ef7 | 189 | {event name='buttons'} |
57f097e8 | 190 | |
dbe622ad | 191 | {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.general.canUseAcp') && $__wcf->session->getPermission('admin.user.canEditUser')))} |
57f097e8 MS |
192 | <li class="dropdown"> |
193 | {* todo: better icon? *} | |
194 | <a href="{link controller='UserEdit' object=$user isACP=true}{/link}" class="button jsTooltip jsUserInlineEditor" title="{lang}wcf.user.moderate{/lang}"><span class="icon icon16 icon-lock"></span> <span class="invisible">{lang}{lang}wcf.acp.user.edit{/lang}{/lang}</span></a> | |
195 | <ul class="dropdownMenu"></ul> | |
196 | </li> | |
197 | {/if} | |
28283ef7 | 198 | </ul> |
320f4a6d MW |
199 | </nav> |
200 | </header> | |
201 | ||
202 | {include file='userNotice'} | |
203 | ||
204 | <div class="contentNavigation"> | |
205 | {hascontent} | |
206 | <nav> | |
207 | <ul> | |
208 | {content} | |
209 | {event name='contentNavigationButtons'} | |
210 | {/content} | |
211 | </ul> | |
212 | </nav> | |
213 | {/hascontent} | |
214 | </div> | |
215 | ||
216 | <section id="profileContent" class="marginTop tabMenuContainer" data-active="{$__wcf->getUserProfileMenu()->getActiveMenuItem()->getIdentifier()}"> | |
217 | <nav class="tabMenu"> | |
218 | <ul> | |
219 | {foreach from=$__wcf->getUserProfileMenu()->getMenuItems() item=menuItem} | |
220 | {if $menuItem->getContentManager()->isVisible($userID)} | |
221 | <li><a href="{$__wcf->getAnchor($menuItem->getIdentifier())}">{lang}wcf.user.profile.menu.{@$menuItem->menuItem}{/lang}</a></li> | |
222 | {/if} | |
223 | {/foreach} | |
224 | </ul> | |
225 | </nav> | |
226 | ||
227 | {foreach from=$__wcf->getUserProfileMenu()->getMenuItems() item=menuItem} | |
228 | {if $menuItem->getContentManager()->isVisible($userID)} | |
229 | <div id="{$menuItem->getIdentifier()}" class="container tabMenuContent" data-menu-item="{$menuItem->menuItem}"> | |
230 | {if $menuItem === $__wcf->getUserProfileMenu()->getActiveMenuItem()} | |
231 | {@$profileContent} | |
232 | {/if} | |
233 | </div> | |
234 | {/if} | |
235 | {/foreach} | |
236 | </section> | |
237 | ||
238 | {include file='footer'} | |
239 | ||
240 | </body> | |
241 | </html> |