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