Commit | Line | Data |
---|---|---|
b8eab696 AE |
1 | <nav id="topMenu" class="userPanel"> |
2 | <ul class="userPanelItems"> | |
70318665 AE |
3 | <!-- page search --> |
4 | <li class="jsOnly"> | |
5 | <a href="#" id="userPanelSearchButton" class="jsTooltip" title="{lang}wcf.global.search{/lang}"><span class="icon icon32 fa-search"></span> <span>{lang}wcf.global.search{/lang}</span></a> | |
6 | </li> | |
7 | ||
b8eab696 AE |
8 | {if $__wcf->user->userID} |
9 | <!-- user menu --> | |
10 | <li id="userMenu"> | |
6e2b711e | 11 | <a class="jsTooltip" href="{link controller='User' object=$__wcf->user}{/link}" title="{lang}wcf.user.controlPanel{/lang}">{@$__wcf->getUserProfileHandler()->getAvatar()->getImageTag(32)} <span>{lang}wcf.user.userNote{/lang}</span></a> |
b8eab696 AE |
12 | <div class="interactiveDropdown interactiveDropdownStatic interactiveDropdownUserMenu"> |
13 | <div class="interactiveDropdownHeader"> | |
14 | <span class="interactiveDropdownTitle">{lang}wcf.user.controlPanel{/lang}</span> | |
15 | ||
16 | {hascontent} | |
17 | <ul class="interactiveDropdownLinks"> | |
18 | {content} | |
19 | {event name='userMenuLinks'} | |
20 | {/content} | |
21 | </ul> | |
22 | {/hascontent} | |
23 | </div> | |
24 | <div class="interactiveDropdownItemsContainer"> | |
25 | <ul class="interactiveDropdownItems interactiveDropdownItemsUserMenu"> | |
26 | <li> | |
ca1d60e5 | 27 | <div class="box48"> |
95961bdf | 28 | <a href="{link controller='User' object=$__wcf->user}{/link}">{@$__wcf->getUserProfileHandler()->getAvatar()->getImageTag(48)}</a> |
a82bf781 | 29 | |
b8eab696 | 30 | <div class="containerHeadline"> |
ca1d60e5 MW |
31 | <h3> |
32 | <a href="{link controller='User' object=$__wcf->user}{/link}">{$__wcf->user->username}</a> | |
33 | {if MODULE_USER_RANK} | |
b8eab696 AE |
34 | {if $__wcf->getUserProfileHandler()->getUserTitle()} |
35 | <span class="badge userTitleBadge{if $__wcf->getUserProfileHandler()->getRank() && $__wcf->getUserProfileHandler()->getRank()->cssClassName} {@$__wcf->getUserProfileHandler()->getRank()->cssClassName}{/if}">{$__wcf->getUserProfileHandler()->getUserTitle()}</span> | |
36 | {/if} | |
37 | {if $__wcf->getUserProfileHandler()->getRank() && $__wcf->getUserProfileHandler()->getRank()->rankImage} | |
38 | <span class="userRankImage">{@$__wcf->getUserProfileHandler()->getRank()->getImage()}</span> | |
39 | {/if} | |
ca1d60e5 MW |
40 | {/if} |
41 | </h3> | |
b8eab696 | 42 | |
ca1d60e5 | 43 | <ul class="inlineList dotSeparated"> |
b8eab696 AE |
44 | <li><a href="{link controller='User' object=$__wcf->user}{/link}">{lang}wcf.user.myProfile{/lang}</a></li> |
45 | {if $__wcf->getUserProfileHandler()->canEditOwnProfile()}<li><a href="{link controller='User' object=$__wcf->user}editOnInit=true#about{/link}">{lang}wcf.user.editProfile{/lang}</a></li>{/if} | |
46 | {if $__wcf->session->getPermission('admin.general.canUseAcp')}<li><a href="{link isACP=true}{/link}">{lang}wcf.global.acp.short{/lang}</a></li>{/if} | |
47 | </ul> | |
48 | </div> | |
a82bf781 | 49 | </div> |
b8eab696 AE |
50 | </li> |
51 | ||
52 | {event name='userMenuItemsBefore'} | |
53 | ||
54 | {foreach from=$__wcf->getUserMenu()->getMenuItems('') item=menuCategory} | |
b8eab696 | 55 | <li class="interactiveDropdownUserMenuItem"> |
ca1d60e5 MW |
56 | <div class="box48"> |
57 | <div><span class="icon icon48 {@$menuCategory->getIconClassName()}"></span></div> | |
b8eab696 AE |
58 | |
59 | <div class="containerHeadline"> | |
60 | <h3>{lang}{$menuCategory->menuItem}{/lang}</h3> | |
61 | ||
ca1d60e5 | 62 | <ul class="inlineList dotSeparated"> |
b8eab696 AE |
63 | {foreach from=$__wcf->getUserMenu()->getMenuItems($menuCategory->menuItem) item=menuItem} |
64 | <li><a href="{$menuItem->getProcessor()->getLink()}">{@$menuItem}</a></li> | |
65 | {/foreach} | |
66 | </ul> | |
67 | </div> | |
68 | </div> | |
69 | </li> | |
70 | {/foreach} | |
71 | ||
72 | {event name='userMenuItemsAfter'} | |
73 | </ul> | |
74 | </div> | |
75 | <a class="interactiveDropdownShowAll" href="{link controller='Logout'}t={@SECURITY_TOKEN}{/link}" onclick="WCF.Dropdown.Interactive.Handler.close('userMenu'); WCF.System.Confirmation.show('{lang}wcf.user.logout.sure{/lang}', $.proxy(function (action) { if (action == 'confirm') window.location.href = $(this).attr('href'); }, this)); return false;">{lang}wcf.user.logout{/lang}</a> | |
76 | </div> | |
51547f2c | 77 | <script data-relocate="true"> |
51547f2c | 78 | $(function() { |
b8eab696 | 79 | new WCF.User.Panel.UserMenu(); |
320f4a6d | 80 | }); |
51547f2c | 81 | </script> |
b8eab696 AE |
82 | </li> |
83 | ||
b8eab696 AE |
84 | <!-- user notifications --> |
85 | {if !$__hideUserMenu|isset} | |
86 | <li id="userNotifications" data-count="{#$__wcf->getUserNotificationHandler()->getNotificationCount()}"> | |
6e2b711e | 87 | <a class="jsTooltip" href="{link controller='NotificationList'}{/link}" title="{lang}wcf.user.notification.notifications{/lang}"><span class="icon icon32 fa-bell-o"></span> <span>{lang}wcf.user.notification.notifications{/lang}</span>{if $__wcf->getUserNotificationHandler()->getNotificationCount()} <span class="badge badgeUpdate">{#$__wcf->getUserNotificationHandler()->getNotificationCount()}</span>{/if}</a> |
b8eab696 AE |
88 | {if !OFFLINE || $__wcf->session->getPermission('admin.general.canViewPageDuringOfflineMode')} |
89 | <script data-relocate="true"> | |
90 | //<![CDATA[ | |
91 | $(function() { | |
92 | new WCF.User.Panel.Notification({ | |
93 | markAllAsReadConfirmMessage: '{lang}wcf.user.notification.markAllAsConfirmed.confirmMessage{/lang}', | |
94 | noItems: '{lang}wcf.user.notification.noMoreNotifications{/lang}', | |
95 | settingsLink: '{link controller='NotificationSettings' encode=false}{/link}', | |
96 | showAllLink: '{link controller='NotificationList' encode=false}{/link}', | |
97 | title: '{lang}wcf.user.notification.notifications{/lang}' | |
98 | }); | |
99 | }); | |
100 | //]]> | |
101 | </script> | |
320f4a6d | 102 | {/if} |
b8eab696 AE |
103 | </li> |
104 | {/if} | |
105 | {else} | |
d4e8bc05 AE |
106 | {if $__wcf->getLanguage()->getLanguages()|count > 1} |
107 | <li id="pageLanguageContainer"> | |
108 | <script data-relocate="true"> | |
58d7e8f8 | 109 | require(['EventHandler', 'WoltLabSuite/Core/Language/Chooser'], function(EventHandler, LanguageChooser) { |
d4e8bc05 | 110 | var languages = { |
fb062f13 MS |
111 | {implode from=$__wcf->getLanguage()->getLanguages() item=_language} |
112 | '{@$_language->languageID}': { | |
113 | iconPath: '{@$_language->getIconPath()|encodeJS}', | |
114 | languageName: '{@$_language|encodeJS}', | |
115 | languageCode: '{@$_language->languageCode|encodeJS}' | |
d4e8bc05 AE |
116 | } |
117 | {/implode} | |
118 | }; | |
ff110591 | 119 | |
d4e8bc05 | 120 | var callback = function(listItem) { |
ff110591 MW |
121 | var location; |
122 | var languageCode = elData(listItem, 'language-code'); | |
123 | var link = elBySel('link[hreflang="' + languageCode + '"]'); | |
124 | if (link !== null) { | |
125 | location = link.href; | |
126 | } | |
127 | else { | |
128 | location = window.location.toString().replace(/#.*/, '').replace(/(\?|&)l=[0-9]+/g, ''); | |
129 | } | |
d4e8bc05 | 130 | |
ff110591 | 131 | var delimiter = (location.indexOf('?') == -1) ? '?' : '&'; |
d4e8bc05 AE |
132 | window.location = location + delimiter + 'l=' + elData(listItem, 'language-id') + window.location.hash; |
133 | }; | |
134 | ||
51ab1086 | 135 | LanguageChooser.init('pageLanguageContainer', 'pageLanguageID', {@$__wcf->getLanguage()->languageID}, languages, callback); |
d4e8bc05 AE |
136 | EventHandler.add('com.woltlab.wcf.UserMenuMobile', 'more', function(data) { |
137 | if (data.identifier === 'com.woltlab.wcf.language') { | |
138 | callback(data.parent); | |
139 | } | |
140 | }); | |
141 | }); | |
142 | </script> | |
143 | </li> | |
144 | {/if} | |
b8eab696 AE |
145 | {if !$__disableLoginLink|isset} |
146 | <!-- login box --> | |
147 | <li id="userLogin"> | |
148 | <a class="loginLink" href="{link controller='Login'}{/link}">{lang}wcf.user.loginOrRegister{/lang}</a> | |
5ea92119 | 149 | <div id="loginForm" class="loginForm" style="display: none"> |
b8eab696 | 150 | <form method="post" action="{link controller='Login'}{/link}"> |
5ea92119 AE |
151 | <section class="section loginFormLogin"> |
152 | <h2 class="sectionTitle">{lang}wcf.user.login.login{/lang}</h2> | |
b8eab696 AE |
153 | |
154 | <dl> | |
155 | <dt><label for="username">{lang}wcf.user.usernameOrEmail{/lang}</label></dt> | |
156 | <dd> | |
6f2bc235 | 157 | <input type="text" id="username" name="username" value="" required class="long jsDialogAutoFocus"> |
b8eab696 AE |
158 | </dd> |
159 | </dl> | |
160 | ||
b8eab696 AE |
161 | <dl> |
162 | <dt><label for="password">{lang}wcf.user.password{/lang}</label></dt> | |
163 | <dd> | |
0ba63443 | 164 | <input type="password" id="password" name="password" value="" class="long"> |
5ea92119 | 165 | <small><a href="{link controller='LostPassword'}{/link}">{lang}wcf.user.lostPassword{/lang}</a></small> |
b8eab696 AE |
166 | </dd> |
167 | </dl> | |
168 | ||
169 | {if $__wcf->getUserAuthenticationFactory()->getUserAuthentication()->supportsPersistentLogins()} | |
170 | <dl> | |
171 | <dt></dt> | |
5ea92119 AE |
172 | <dd> |
173 | <label for="useCookies"><input type="checkbox" id="useCookies" name="useCookies" value="1" checked> {lang}wcf.user.useCookies{/lang}</label> | |
174 | </dd> | |
b8eab696 AE |
175 | </dl> |
176 | {/if} | |
177 | ||
5ea92119 | 178 | {event name='fields'} |
b8eab696 | 179 | |
5ea92119 AE |
180 | <div class="userLoginButtons"> |
181 | <input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s"> | |
0ba63443 | 182 | <input type="hidden" name="url" value="{$__wcf->session->requestURI}"> |
b8eab696 AE |
183 | {@SECURITY_TOKEN_INPUT_TAG} |
184 | </div> | |
5ea92119 | 185 | </section> |
b8eab696 | 186 | |
5ea92119 AE |
187 | {if !REGISTER_DISABLED} |
188 | <section class="section loginFormRegister"> | |
189 | <h2 class="sectionTitle">{lang}wcf.user.login.register{/lang}</h2> | |
190 | ||
191 | <p>{lang}wcf.user.login.register.teaser{/lang}</p> | |
192 | ||
193 | <div class="userLoginButtons"> | |
194 | <a href="{link controller='Register'}{/link}" class="button loginFormRegisterButton">{lang}wcf.user.login.register.registerNow{/lang}</a> | |
195 | </div> | |
95961bdf | 196 | </section> |
b8eab696 | 197 | {/if} |
5ea92119 AE |
198 | |
199 | {hascontent} | |
200 | <section class="section loginFormThirdPartyLogin"> | |
201 | <h2 class="sectionTitle">{lang}wcf.user.login.3rdParty{/lang}</h2> | |
202 | ||
203 | <dl> | |
204 | <dt></dt> | |
205 | <dd> | |
206 | <ul class="buttonList smallButtons"> | |
207 | {content} | |
208 | {if GITHUB_PUBLIC_KEY !== '' && GITHUB_PRIVATE_KEY !== ''} | |
209 | <li id="githubAuth" class="thirdPartyLogin"> | |
210 | <a href="{link controller='GithubAuth'}{/link}" class="button thirdPartyLoginButton githubLoginButton"><span class="icon icon16 fa-github"></span> <span>{lang}wcf.user.3rdparty.github.login{/lang}</span></a> | |
211 | </li> | |
212 | {/if} | |
213 | ||
214 | {if TWITTER_PUBLIC_KEY !== '' && TWITTER_PRIVATE_KEY !== ''} | |
215 | <li id="twitterAuth" class="thirdPartyLogin"> | |
216 | <a href="{link controller='TwitterAuth'}{/link}" class="button thirdPartyLoginButton twitterLoginButton"><span class="icon icon16 fa-twitter"></span> <span>{lang}wcf.user.3rdparty.twitter.login{/lang}</span></a> | |
217 | </li> | |
218 | {/if} | |
219 | ||
220 | {if FACEBOOK_PUBLIC_KEY !== '' && FACEBOOK_PRIVATE_KEY !== ''} | |
221 | <li id="facebookAuth" class="thirdPartyLogin"> | |
222 | <a href="{link controller='FacebookAuth'}{/link}" class="button thirdPartyLoginButton facebookLoginButton"><span class="icon icon16 fa-facebook"></span> <span>{lang}wcf.user.3rdparty.facebook.login{/lang}</span></a> | |
223 | </li> | |
224 | {/if} | |
225 | ||
226 | {if GOOGLE_PUBLIC_KEY !== '' && GOOGLE_PRIVATE_KEY !== ''} | |
227 | <li id="googleAuth" class="thirdPartyLogin"> | |
228 | <a href="{link controller='GoogleAuth'}{/link}" class="button thirdPartyLoginButton googleLoginButton"><span class="icon icon16 fa-google-plus"></span> <span>{lang}wcf.user.3rdparty.google.login{/lang}</span></a> | |
229 | </li> | |
230 | {/if} | |
231 | ||
232 | {event name='3rdpartyButtons'} | |
233 | {/content} | |
234 | </ul> | |
235 | </dd> | |
236 | </dl> | |
237 | </section> | |
238 | {/hascontent} | |
b8eab696 AE |
239 | </form> |
240 | </div> | |
320f4a6d | 241 | |
b8eab696 AE |
242 | <script data-relocate="true"> |
243 | //<![CDATA[ | |
244 | $(function() { | |
245 | WCF.Language.addObject({ | |
246 | 'wcf.user.button.login': '{lang}wcf.user.button.login{/lang}', | |
247 | 'wcf.user.button.register': '{lang}wcf.user.button.register{/lang}', | |
248 | 'wcf.user.login': '{lang}wcf.user.login{/lang}' | |
249 | }); | |
250 | new WCF.User.Login(true); | |
b2e0e0cd | 251 | }); |
b8eab696 AE |
252 | //]]> |
253 | </script> | |
254 | </li> | |
255 | {/if} | |
b8eab696 AE |
256 | {/if} |
257 | ||
258 | {if !$__hideUserMenu|isset} | |
259 | {if $__wcf->user->userID && $__wcf->session->getPermission('mod.general.canUseModeration')} | |
260 | <li id="outstandingModeration" data-count="{#$__wcf->getModerationQueueManager()->getOutstandingModerationCount()}"> | |
6e2b711e | 261 | <a class="jsTooltip" href="{link controller='ModerationList'}{/link}" title="{lang}wcf.moderation.moderation{/lang}"> |
e2368a74 | 262 | <span class="icon icon32 fa-exclamation-triangle"></span> |
b8eab696 | 263 | <span>{lang}wcf.moderation.moderation{/lang}</span> |
e2368a74 | 264 | {if $__wcf->getModerationQueueManager()->getUnreadModerationCount()}<span class="badge badgeUpdate">{#$__wcf->getModerationQueueManager()->getUnreadModerationCount()}</span>{/if} |
b8eab696 AE |
265 | </a> |
266 | {if !OFFLINE || $__wcf->session->getPermission('admin.general.canViewPageDuringOfflineMode')} | |
267 | <script data-relocate="true"> | |
268 | //<![CDATA[ | |
269 | $(function() { | |
270 | new WCF.User.Panel.Moderation({ | |
271 | deletedContent: '{lang}wcf.moderation.showDeletedContent{/lang}', | |
272 | deletedContentLink: '{link controller='DeletedContentList' encode=false}{/link}', | |
273 | markAllAsReadConfirmMessage: '{lang}wcf.moderation.markAllAsRead.confirmMessage{/lang}', | |
274 | noItems: '{lang}wcf.moderation.noMoreItems{/lang}', | |
275 | showAllLink: '{link controller='ModerationList' encode=false}{/link}', | |
276 | title: '{lang}wcf.moderation.moderation{/lang}' | |
277 | }); | |
278 | }); | |
279 | //]]> | |
280 | </script> | |
281 | {/if} | |
282 | </li> | |
51547f2c | 283 | {/if} |
b8eab696 AE |
284 | |
285 | {event name='menuItems'} | |
286 | {/if} | |
b8eab696 AE |
287 | </ul> |
288 | </nav> |