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} | |
d4e8bc05 AE |
101 | {if $__wcf->getLanguage()->getLanguages()|count > 1} |
102 | <li id="pageLanguageContainer"> | |
103 | <script data-relocate="true"> | |
104 | require(['EventHandler', 'WoltLab/WCF/Language/Chooser'], function(EventHandler, LanguageChooser) { | |
105 | var languages = { | |
106 | {implode from=$__wcf->getLanguage()->getLanguages() item=__language} | |
107 | '{@$__language->languageID}': { | |
108 | iconPath: '{@$__language->getIconPath()|encodeJS}', | |
109 | languageName: '{$__language}' | |
110 | } | |
111 | {/implode} | |
112 | }; | |
113 | ||
114 | var callback = function(listItem) { | |
115 | var location = window.location.toString().replace(/#.*/, '').replace(/(\?|&)l=[0-9]+/g, ''); | |
116 | var delimiter = (location.indexOf('?') == -1) ? '?' : '&'; | |
117 | ||
118 | window.location = location + delimiter + 'l=' + elData(listItem, 'language-id') + window.location.hash; | |
119 | }; | |
120 | ||
121 | LanguageChooser.init('pageLanguageContainer', 'languageID', {@$__wcf->getLanguage()->languageID}, languages, callback); | |
122 | EventHandler.add('com.woltlab.wcf.UserMenuMobile', 'more', function(data) { | |
123 | if (data.identifier === 'com.woltlab.wcf.language') { | |
124 | callback(data.parent); | |
125 | } | |
126 | }); | |
127 | }); | |
128 | </script> | |
129 | </li> | |
130 | {/if} | |
b8eab696 AE |
131 | {if !$__disableLoginLink|isset} |
132 | <!-- login box --> | |
133 | <li id="userLogin"> | |
134 | <a class="loginLink" href="{link controller='Login'}{/link}">{lang}wcf.user.loginOrRegister{/lang}</a> | |
135 | <div id="loginForm" style="display: none;"> | |
136 | {capture assign='__3rdPartyButtons'} | |
137 | {if GITHUB_PUBLIC_KEY !== '' && GITHUB_PRIVATE_KEY !== ''} | |
138 | <li id="githubAuth" class="3rdPartyAuth"> | |
ca8bfa53 | 139 | <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 |
140 | </li> |
141 | {/if} | |
142 | ||
143 | {if TWITTER_PUBLIC_KEY !== '' && TWITTER_PRIVATE_KEY !== ''} | |
144 | <li id="twitterAuth" class="3rdPartyAuth"> | |
f2b50825 | 145 | <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 |
146 | </li> |
147 | {/if} | |
148 | ||
149 | {if FACEBOOK_PUBLIC_KEY !== '' && FACEBOOK_PRIVATE_KEY !== ''} | |
150 | <li id="facebookAuth" class="3rdPartyAuth"> | |
f2b50825 | 151 | <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 |
152 | </li> |
153 | {/if} | |
154 | ||
155 | {if GOOGLE_PUBLIC_KEY !== '' && GOOGLE_PRIVATE_KEY !== ''} | |
156 | <li id="googleAuth" class="3rdPartyAuth"> | |
f2b50825 | 157 | <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 |
158 | </li> |
159 | {/if} | |
160 | ||
161 | {event name='3rdpartyButtons'} | |
162 | {/capture} | |
320f4a6d | 163 | |
b8eab696 AE |
164 | <form method="post" action="{link controller='Login'}{/link}"> |
165 | <fieldset> | |
166 | {if $__3rdPartyButtons|trim}<legend>{lang}wcf.user.login{/lang}</legend>{/if} | |
167 | ||
168 | <dl> | |
169 | <dt><label for="username">{lang}wcf.user.usernameOrEmail{/lang}</label></dt> | |
170 | <dd> | |
171 | <input type="text" id="username" name="username" value="" required="required" class="long" /> | |
172 | </dd> | |
173 | </dl> | |
174 | ||
175 | {if !REGISTER_DISABLED} | |
176 | <dl> | |
177 | <dt>{lang}wcf.user.login.action{/lang}</dt> | |
178 | <dd> | |
179 | <label><input type="radio" name="action" value="register" /> {lang}wcf.user.login.action.register{/lang}</label> | |
180 | <label><input type="radio" name="action" value="login" checked="checked" /> {lang}wcf.user.login.action.login{/lang}</label> | |
181 | </dd> | |
182 | </dl> | |
183 | {/if} | |
184 | ||
185 | <dl> | |
186 | <dt><label for="password">{lang}wcf.user.password{/lang}</label></dt> | |
187 | <dd> | |
188 | <input type="password" id="password" name="password" value="" class="long" /> | |
189 | </dd> | |
190 | </dl> | |
191 | ||
192 | {if $__wcf->getUserAuthenticationFactory()->getUserAuthentication()->supportsPersistentLogins()} | |
193 | <dl> | |
194 | <dt></dt> | |
195 | <dd><label><input type="checkbox" id="useCookies" name="useCookies" value="1" checked="checked" /> {lang}wcf.user.useCookies{/lang}</label></dd> | |
196 | </dl> | |
197 | {/if} | |
198 | ||
199 | {event name='loginFields'} | |
200 | ||
201 | <div class="formSubmit"> | |
202 | <input type="submit" id="loginSubmitButton" name="submitButton" value="{lang}wcf.user.button.login{/lang}" accesskey="s" /> | |
203 | <a class="button" href="{link controller='LostPassword'}{/link}"><span>{lang}wcf.user.lostPassword{/lang}</span></a> | |
204 | <input type="hidden" name="url" value="{$__wcf->session->requestURI}" /> | |
205 | {@SECURITY_TOKEN_INPUT_TAG} | |
206 | </div> | |
207 | </fieldset> | |
208 | ||
209 | {if $__3rdPartyButtons|trim} | |
210 | <fieldset> | |
211 | <legend>{lang}wcf.user.login.3rdParty{/lang}</legend> | |
212 | <ul class="buttonList smallButtons thirdPartyLogin"> | |
213 | {@$__3rdPartyButtons} | |
214 | </ul> | |
215 | </fieldset> | |
216 | {/if} | |
217 | </form> | |
218 | </div> | |
320f4a6d | 219 | |
b8eab696 AE |
220 | <script data-relocate="true"> |
221 | //<![CDATA[ | |
222 | $(function() { | |
223 | WCF.Language.addObject({ | |
224 | 'wcf.user.button.login': '{lang}wcf.user.button.login{/lang}', | |
225 | 'wcf.user.button.register': '{lang}wcf.user.button.register{/lang}', | |
226 | 'wcf.user.login': '{lang}wcf.user.login{/lang}' | |
227 | }); | |
228 | new WCF.User.Login(true); | |
b2e0e0cd | 229 | }); |
b8eab696 AE |
230 | //]]> |
231 | </script> | |
232 | </li> | |
233 | {/if} | |
b8eab696 AE |
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> |