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"> | |
ca1d60e5 | 6 | <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 |
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 MW |
22 | <div class="box48"> |
23 | <a href="{link controller='User' object=$__wcf->user}{/link}" class="framed">{@$__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()}"> | |
ca1d60e5 | 82 | <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 |
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} | |
101 | {if !$__disableLoginLink|isset} | |
102 | <!-- login box --> | |
103 | <li id="userLogin"> | |
104 | <a class="loginLink" href="{link controller='Login'}{/link}">{lang}wcf.user.loginOrRegister{/lang}</a> | |
105 | <div id="loginForm" style="display: none;"> | |
106 | {capture assign='__3rdPartyButtons'} | |
107 | {if GITHUB_PUBLIC_KEY !== '' && GITHUB_PRIVATE_KEY !== ''} | |
108 | <li id="githubAuth" class="3rdPartyAuth"> | |
ca8bfa53 | 109 | <a href="{link controller='GithubAuth'}{/link}" class="thirdPartyLoginButton githubLoginButton"><span class="icon icon16 fa-github"></span> <span>{lang}wcf.user.3rdparty.github.login{/lang}</span></a> |
b8eab696 AE |
110 | </li> |
111 | {/if} | |
112 | ||
113 | {if TWITTER_PUBLIC_KEY !== '' && TWITTER_PRIVATE_KEY !== ''} | |
114 | <li id="twitterAuth" class="3rdPartyAuth"> | |
f2b50825 | 115 | <a href="{link controller='TwitterAuth'}{/link}" class="thirdPartyLoginButton twitterLoginButton"><span class="icon icon16 fa-twitter"></span> <span>{lang}wcf.user.3rdparty.twitter.login{/lang}</span></a> |
b8eab696 AE |
116 | </li> |
117 | {/if} | |
118 | ||
119 | {if FACEBOOK_PUBLIC_KEY !== '' && FACEBOOK_PRIVATE_KEY !== ''} | |
120 | <li id="facebookAuth" class="3rdPartyAuth"> | |
f2b50825 | 121 | <a href="{link controller='FacebookAuth'}{/link}" class="thirdPartyLoginButton facebookLoginButton"><span class="icon icon16 fa-facebook"></span> <span>{lang}wcf.user.3rdparty.facebook.login{/lang}</span></a> |
b8eab696 AE |
122 | </li> |
123 | {/if} | |
124 | ||
125 | {if GOOGLE_PUBLIC_KEY !== '' && GOOGLE_PRIVATE_KEY !== ''} | |
126 | <li id="googleAuth" class="3rdPartyAuth"> | |
f2b50825 | 127 | <a href="{link controller='GoogleAuth'}{/link}" class="thirdPartyLoginButton googleLoginButton"><span class="icon icon16 fa-google-plus"></span> <span>{lang}wcf.user.3rdparty.google.login{/lang}</span></a> |
b8eab696 AE |
128 | </li> |
129 | {/if} | |
130 | ||
131 | {event name='3rdpartyButtons'} | |
132 | {/capture} | |
320f4a6d | 133 | |
b8eab696 AE |
134 | <form method="post" action="{link controller='Login'}{/link}"> |
135 | <fieldset> | |
136 | {if $__3rdPartyButtons|trim}<legend>{lang}wcf.user.login{/lang}</legend>{/if} | |
137 | ||
138 | <dl> | |
139 | <dt><label for="username">{lang}wcf.user.usernameOrEmail{/lang}</label></dt> | |
140 | <dd> | |
141 | <input type="text" id="username" name="username" value="" required="required" class="long" /> | |
142 | </dd> | |
143 | </dl> | |
144 | ||
145 | {if !REGISTER_DISABLED} | |
146 | <dl> | |
147 | <dt>{lang}wcf.user.login.action{/lang}</dt> | |
148 | <dd> | |
149 | <label><input type="radio" name="action" value="register" /> {lang}wcf.user.login.action.register{/lang}</label> | |
150 | <label><input type="radio" name="action" value="login" checked="checked" /> {lang}wcf.user.login.action.login{/lang}</label> | |
151 | </dd> | |
152 | </dl> | |
153 | {/if} | |
154 | ||
155 | <dl> | |
156 | <dt><label for="password">{lang}wcf.user.password{/lang}</label></dt> | |
157 | <dd> | |
158 | <input type="password" id="password" name="password" value="" class="long" /> | |
159 | </dd> | |
160 | </dl> | |
161 | ||
162 | {if $__wcf->getUserAuthenticationFactory()->getUserAuthentication()->supportsPersistentLogins()} | |
163 | <dl> | |
164 | <dt></dt> | |
165 | <dd><label><input type="checkbox" id="useCookies" name="useCookies" value="1" checked="checked" /> {lang}wcf.user.useCookies{/lang}</label></dd> | |
166 | </dl> | |
167 | {/if} | |
168 | ||
169 | {event name='loginFields'} | |
170 | ||
171 | <div class="formSubmit"> | |
172 | <input type="submit" id="loginSubmitButton" name="submitButton" value="{lang}wcf.user.button.login{/lang}" accesskey="s" /> | |
173 | <a class="button" href="{link controller='LostPassword'}{/link}"><span>{lang}wcf.user.lostPassword{/lang}</span></a> | |
174 | <input type="hidden" name="url" value="{$__wcf->session->requestURI}" /> | |
175 | {@SECURITY_TOKEN_INPUT_TAG} | |
176 | </div> | |
177 | </fieldset> | |
178 | ||
179 | {if $__3rdPartyButtons|trim} | |
180 | <fieldset> | |
181 | <legend>{lang}wcf.user.login.3rdParty{/lang}</legend> | |
182 | <ul class="buttonList smallButtons thirdPartyLogin"> | |
183 | {@$__3rdPartyButtons} | |
184 | </ul> | |
185 | </fieldset> | |
186 | {/if} | |
187 | </form> | |
188 | </div> | |
320f4a6d | 189 | |
b8eab696 AE |
190 | <script data-relocate="true"> |
191 | //<![CDATA[ | |
192 | $(function() { | |
193 | WCF.Language.addObject({ | |
194 | 'wcf.user.button.login': '{lang}wcf.user.button.login{/lang}', | |
195 | 'wcf.user.button.register': '{lang}wcf.user.button.register{/lang}', | |
196 | 'wcf.user.login': '{lang}wcf.user.login{/lang}' | |
197 | }); | |
198 | new WCF.User.Login(true); | |
b2e0e0cd | 199 | }); |
b8eab696 AE |
200 | //]]> |
201 | </script> | |
202 | </li> | |
203 | {/if} | |
204 | {if $__wcf->getLanguage()->getLanguages()|count > 1} | |
205 | <li id="pageLanguageContainer"> | |
206 | <script data-relocate="true"> | |
5717e253 | 207 | require(['EventHandler', 'WoltLab/WCF/Language/Chooser'], function(EventHandler, LanguageChooser) { |
4151d26e MS |
208 | var languages = { |
209 | {implode from=$__wcf->getLanguage()->getLanguages() item=__language} | |
210 | '{@$__language->languageID}': { | |
211 | iconPath: '{@$__language->getIconPath()|encodeJS}', | |
212 | languageName: '{$__language}' | |
b8eab696 AE |
213 | } |
214 | {/implode} | |
215 | }; | |
216 | ||
5717e253 | 217 | var callback = function(listItem) { |
4151d26e MS |
218 | var location = window.location.toString().replace(/#.*/, '').replace(/(\?|&)l=[0-9]+/g, ''); |
219 | var delimiter = (location.indexOf('?') == -1) ? '?' : '&'; | |
b8eab696 | 220 | |
4151d26e | 221 | window.location = location + delimiter + 'l=' + elData(listItem, 'language-id') + window.location.hash; |
5717e253 AE |
222 | }; |
223 | ||
224 | LanguageChooser.init('pageLanguageContainer', 'languageID', {@$__wcf->getLanguage()->languageID}, languages, callback); | |
225 | EventHandler.add('com.woltlab.wcf.UserMenuMobile', 'more', function(data) { | |
226 | if (data.identifier === 'com.woltlab.wcf.language') { | |
227 | callback(data.parent); | |
228 | } | |
b8eab696 AE |
229 | }); |
230 | }); | |
b8eab696 AE |
231 | </script> |
232 | </li> | |
233 | {/if} | |
234 | {/if} | |
235 | ||
236 | {if !$__hideUserMenu|isset} | |
237 | {if $__wcf->user->userID && $__wcf->session->getPermission('mod.general.canUseModeration')} | |
238 | <li id="outstandingModeration" data-count="{#$__wcf->getModerationQueueManager()->getOutstandingModerationCount()}"> | |
ca1d60e5 | 239 | <a class="jsTooltip" href="{link controller='ModerationList'}{/link}" title="{lang}wcf.moderation.moderation{/lang}"> |
e2368a74 | 240 | <span class="icon icon32 fa-exclamation-triangle"></span> |
b8eab696 | 241 | <span>{lang}wcf.moderation.moderation{/lang}</span> |
e2368a74 | 242 | {if $__wcf->getModerationQueueManager()->getUnreadModerationCount()}<span class="badge badgeUpdate">{#$__wcf->getModerationQueueManager()->getUnreadModerationCount()}</span>{/if} |
b8eab696 AE |
243 | </a> |
244 | {if !OFFLINE || $__wcf->session->getPermission('admin.general.canViewPageDuringOfflineMode')} | |
245 | <script data-relocate="true"> | |
246 | //<![CDATA[ | |
247 | $(function() { | |
248 | new WCF.User.Panel.Moderation({ | |
249 | deletedContent: '{lang}wcf.moderation.showDeletedContent{/lang}', | |
250 | deletedContentLink: '{link controller='DeletedContentList' encode=false}{/link}', | |
251 | markAllAsReadConfirmMessage: '{lang}wcf.moderation.markAllAsRead.confirmMessage{/lang}', | |
252 | noItems: '{lang}wcf.moderation.noMoreItems{/lang}', | |
253 | showAllLink: '{link controller='ModerationList' encode=false}{/link}', | |
254 | title: '{lang}wcf.moderation.moderation{/lang}' | |
255 | }); | |
256 | }); | |
257 | //]]> | |
258 | </script> | |
259 | {/if} | |
260 | </li> | |
51547f2c | 261 | {/if} |
b8eab696 AE |
262 | |
263 | {event name='menuItems'} | |
264 | {/if} | |
b8eab696 AE |
265 | </ul> |
266 | </nav> |