Commit | Line | Data |
---|---|---|
320f4a6d MW |
1 | {if $__wcf->user->userID} |
2 | <!-- user menu --> | |
28c5a05a AE |
3 | <li id="userMenu"> |
4 | <a class="framed" href="{link controller='User' object=$__wcf->user}{/link}">{@$__wcf->getUserProfileHandler()->getAvatar()->getImageTag(24)} <span>{lang}wcf.user.userNote{/lang}</span></a> | |
5 | <div class="interactiveDropdown interactiveDropdownStatic interactiveDropdownUserMenu"> | |
6 | <div class="interactiveDropdownHeader"> | |
a82bf781 AE |
7 | <span class="interactiveDropdownTitle">{lang}wcf.user.controlPanel{/lang}</span> |
8 | ||
28c5a05a AE |
9 | {hascontent} |
10 | <ul class="interactiveDropdownLinks"> | |
11 | {content} | |
12 | {event name='userMenuLinks'} | |
13 | {/content} | |
14 | </ul> | |
15 | {/hascontent} | |
16 | </div> | |
17 | <div class="interactiveDropdownItemsContainer"> | |
18 | <ul class="interactiveDropdownItems interactiveDropdownItemsUserMenu"> | |
19 | <li> | |
a82bf781 | 20 | <div class="box64"> |
a8d22bf3 | 21 | <a href="{link controller='User' object=$__wcf->user}{/link}" class="framed">{@$__wcf->getUserProfileHandler()->getAvatar()->getImageTag(64)}</a> |
28c5a05a AE |
22 | |
23 | <div class="containerHeadline"> | |
a82bf781 | 24 | <h3><a href="{link controller='User' object=$__wcf->user}{/link}">{$__wcf->user->username}</a></h3> |
071007ed MW |
25 | {if MODULE_USER_RANK} |
26 | <p> | |
27 | {if $__wcf->getUserProfileHandler()->getUserTitle()} | |
28 | <span class="badge userTitleBadge{if $__wcf->getUserProfileHandler()->getRank() && $__wcf->getUserProfileHandler()->getRank()->cssClassName} {@$__wcf->getUserProfileHandler()->getRank()->cssClassName}{/if}">{$__wcf->getUserProfileHandler()->getUserTitle()}</span> | |
29 | {/if} | |
30 | {if $__wcf->getUserProfileHandler()->getRank() && $__wcf->getUserProfileHandler()->getRank()->rankImage} | |
31 | <span class="userRankImage">{@$__wcf->getUserProfileHandler()->getRank()->getImage()}</span> | |
32 | {/if} | |
33 | </p> | |
34 | {/if} | |
a82bf781 AE |
35 | |
36 | <ul class="interactiveDropdownUserMenuLinkList"> | |
37 | <li><a href="{link controller='User' object=$__wcf->user}{/link}">{lang}wcf.user.myProfile{/lang}</a></li> | |
38 | {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} | |
39 | {if $__wcf->session->getPermission('admin.general.canUseAcp')}<li><a href="{link isACP=true}{/link}">{lang}wcf.global.acp.short{/lang}</a></li>{/if} | |
40 | </ul> | |
28c5a05a | 41 | </div> |
a82bf781 | 42 | </div> |
28c5a05a | 43 | </li> |
28c5a05a | 44 | |
d8b77c5e AE |
45 | {event name='userMenuItemsBefore'} |
46 | ||
a82bf781 | 47 | {foreach from=$__wcf->getUserMenu()->getMenuItems('') item=menuCategory} |
28c5a05a | 48 | <li class="dropdownDivider"></li> |
a82bf781 AE |
49 | <li class="interactiveDropdownUserMenuItem"> |
50 | <div class="box32"> | |
51 | <div><span class="icon icon32 {@$menuCategory->getIconClassName()}"></span></div> | |
52 | ||
53 | <div class="containerHeadline"> | |
54 | <h3>{lang}{$menuCategory->menuItem}{/lang}</h3> | |
55 | ||
56 | <ul class="interactiveDropdownUserMenuLinkList"> | |
57 | {foreach from=$__wcf->getUserMenu()->getMenuItems($menuCategory->menuItem) item=menuItem} | |
58 | <li><a href="{$menuItem->getProcessor()->getLink()}">{@$menuItem}</a></li> | |
59 | {/foreach} | |
60 | </ul> | |
61 | </div> | |
62 | </div> | |
11ac8d47 | 63 | </li> |
a82bf781 | 64 | {/foreach} |
d8b77c5e AE |
65 | |
66 | {event name='userMenuItemsAfter'} | |
28c5a05a AE |
67 | </ul> |
68 | </div> | |
2a61e7b1 | 69 | <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> |
28c5a05a AE |
70 | </div> |
71 | <script data-relocate="true"> | |
72 | $(function() { | |
73 | new WCF.User.Panel.UserMenu(); | |
74 | }); | |
75 | </script> | |
11ac8d47 | 76 | </li> |
320f4a6d MW |
77 | |
78 | <li><a href="{link controller='Settings'}{/link}" class="noJsOnly" style="display: none"><span class="icon icon16 icon-cogs"></span> <span>{lang}wcf.user.menu.settings{/lang}</span></a></li> | |
79 | ||
80 | <!-- user notifications --> | |
81 | {if !$__hideUserMenu|isset} | |
82 | <li id="userNotifications" data-count="{#$__wcf->getUserNotificationHandler()->getNotificationCount()}"> | |
83 | <a href="{link controller='NotificationList'}{/link}"><span class="icon icon16 icon-bell-alt"></span> <span>{lang}wcf.user.notification.notifications{/lang}</span>{if $__wcf->getUserNotificationHandler()->getNotificationCount()} <span class="badge badgeInverse">{#$__wcf->getUserNotificationHandler()->getNotificationCount()}</span>{/if}</a> | |
51547f2c AE |
84 | {if !OFFLINE || $__wcf->session->getPermission('admin.general.canViewPageDuringOfflineMode')} |
85 | <script data-relocate="true"> | |
86 | //<![CDATA[ | |
87 | $(function() { | |
0d42c1c1 AE |
88 | new WCF.User.Panel.Notification({ |
89 | markAllAsReadConfirmMessage: '{lang}wcf.user.notification.markAllAsConfirmed.confirmMessage{/lang}', | |
90 | noItems: '{lang}wcf.user.notification.noMoreNotifications{/lang}', | |
91 | settingsLink: '{link controller='NotificationSettings' encode=false}{/link}', | |
92 | showAllLink: '{link controller='NotificationList' encode=false}{/link}', | |
93 | title: '{lang}wcf.user.notification.notifications{/lang}' | |
51547f2c | 94 | }); |
320f4a6d | 95 | }); |
51547f2c AE |
96 | //]]> |
97 | </script> | |
98 | {/if} | |
320f4a6d MW |
99 | </li> |
100 | {/if} | |
101 | {else} | |
102 | {if !$__disableLoginLink|isset} | |
103 | <!-- login box --> | |
253c1a5b | 104 | <li id="userLogin"> |
c1693262 | 105 | <a class="loginLink" href="{link controller='Login'}{/link}">{lang}wcf.user.loginOrRegister{/lang}</a> |
320f4a6d MW |
106 | <div id="loginForm" style="display: none;"> |
107 | {capture assign='__3rdPartyButtons'} | |
108 | {if GITHUB_PUBLIC_KEY !== '' && GITHUB_PRIVATE_KEY !== ''} | |
109 | <li id="githubAuth" class="3rdPartyAuth"> | |
8eef36ed | 110 | <a href="{link controller='GithubAuth'}{/link}" class="thirdPartyLoginButton githubLoginButton"><span class="icon icon16 icon-github"></span> <span>{lang}wcf.user.3rdparty.github.login{/lang}</span></a> |
28283ef7 MW |
111 | </li> |
112 | {/if} | |
320f4a6d | 113 | |
28283ef7 MW |
114 | {if TWITTER_PUBLIC_KEY !== '' && TWITTER_PRIVATE_KEY !== ''} |
115 | <li id="twitterAuth" class="3rdPartyAuth"> | |
8eef36ed | 116 | <a href="{link controller='TwitterAuth'}{/link}" class="thirdPartyLoginButton twitterLoginButton"><span class="icon icon16 icon-twitter"></span> <span>{lang}wcf.user.3rdparty.twitter.login{/lang}</span></a> |
28283ef7 MW |
117 | </li> |
118 | {/if} | |
320f4a6d | 119 | |
28283ef7 MW |
120 | {if FACEBOOK_PUBLIC_KEY !== '' && FACEBOOK_PRIVATE_KEY !== ''} |
121 | <li id="facebookAuth" class="3rdPartyAuth"> | |
8eef36ed | 122 | <a href="{link controller='FacebookAuth'}{/link}" class="thirdPartyLoginButton facebookLoginButton"><span class="icon icon16 icon-facebook"></span> <span>{lang}wcf.user.3rdparty.facebook.login{/lang}</span></a> |
28283ef7 MW |
123 | </li> |
124 | {/if} | |
320f4a6d | 125 | |
28283ef7 MW |
126 | {if GOOGLE_PUBLIC_KEY !== '' && GOOGLE_PRIVATE_KEY !== ''} |
127 | <li id="googleAuth" class="3rdPartyAuth"> | |
8eef36ed | 128 | <a href="{link controller='GoogleAuth'}{/link}" class="thirdPartyLoginButton googleLoginButton"><span class="icon icon16 icon-google-plus"></span> <span>{lang}wcf.user.3rdparty.google.login{/lang}</span></a> |
320f4a6d MW |
129 | </li> |
130 | {/if} | |
17729c4f MW |
131 | |
132 | {event name='3rdpartyButtons'} | |
320f4a6d MW |
133 | {/capture} |
134 | ||
135 | <form method="post" action="{link controller='Login'}{/link}"> | |
136 | <fieldset> | |
137 | {if $__3rdPartyButtons|trim}<legend>{lang}wcf.user.login{/lang}</legend>{/if} | |
138 | ||
139 | <dl> | |
140 | <dt><label for="username">{lang}wcf.user.usernameOrEmail{/lang}</label></dt> | |
141 | <dd> | |
142 | <input type="text" id="username" name="username" value="" required="required" class="long" /> | |
143 | </dd> | |
144 | </dl> | |
145 | ||
146 | {if !REGISTER_DISABLED} | |
147 | <dl> | |
148 | <dt>{lang}wcf.user.login.action{/lang}</dt> | |
149 | <dd> | |
150 | <label><input type="radio" name="action" value="register" /> {lang}wcf.user.login.action.register{/lang}</label> | |
151 | <label><input type="radio" name="action" value="login" checked="checked" /> {lang}wcf.user.login.action.login{/lang}</label> | |
152 | </dd> | |
153 | </dl> | |
154 | {/if} | |
155 | ||
156 | <dl> | |
157 | <dt><label for="password">{lang}wcf.user.password{/lang}</label></dt> | |
158 | <dd> | |
159 | <input type="password" id="password" name="password" value="" class="long" /> | |
160 | </dd> | |
161 | </dl> | |
162 | ||
163 | {if $__wcf->getUserAuthenticationFactory()->getUserAuthentication()->supportsPersistentLogins()} | |
164 | <dl> | |
77f70354 | 165 | <dt></dt> |
320f4a6d MW |
166 | <dd><label><input type="checkbox" id="useCookies" name="useCookies" value="1" checked="checked" /> {lang}wcf.user.useCookies{/lang}</label></dd> |
167 | </dl> | |
168 | {/if} | |
169 | ||
170 | {event name='loginFields'} | |
171 | ||
172 | <div class="formSubmit"> | |
173 | <input type="submit" id="loginSubmitButton" name="submitButton" value="{lang}wcf.user.button.login{/lang}" accesskey="s" /> | |
8a3f83e8 | 174 | <a class="button" href="{link controller='LostPassword'}{/link}"><span>{lang}wcf.user.lostPassword{/lang}</span></a> |
320f4a6d | 175 | <input type="hidden" name="url" value="{$__wcf->session->requestURI}" /> |
ee629b22 | 176 | {@SECURITY_TOKEN_INPUT_TAG} |
320f4a6d MW |
177 | </div> |
178 | </fieldset> | |
179 | ||
180 | {if $__3rdPartyButtons|trim} | |
181 | <fieldset> | |
182 | <legend>{lang}wcf.user.login.3rdParty{/lang}</legend> | |
8eef36ed | 183 | <ul class="buttonList smallButtons thirdPartyLogin"> |
320f4a6d MW |
184 | {@$__3rdPartyButtons} |
185 | </ul> | |
186 | </fieldset> | |
187 | {/if} | |
188 | </form> | |
189 | </div> | |
190 | ||
9543d9fe | 191 | <script data-relocate="true"> |
320f4a6d MW |
192 | //<![CDATA[ |
193 | $(function() { | |
194 | WCF.Language.addObject({ | |
195 | 'wcf.user.button.login': '{lang}wcf.user.button.login{/lang}', | |
196 | 'wcf.user.button.register': '{lang}wcf.user.button.register{/lang}', | |
197 | 'wcf.user.login': '{lang}wcf.user.login{/lang}' | |
198 | }); | |
199 | new WCF.User.Login(true); | |
200 | }); | |
201 | //]]> | |
202 | </script> | |
203 | </li> | |
204 | {/if} | |
edf7add2 MW |
205 | {if $__wcf->getLanguage()->getLanguages()|count > 1} |
206 | <li id="pageLanguageContainer"> | |
9543d9fe | 207 | <script data-relocate="true"> |
edf7add2 MW |
208 | //<![CDATA[ |
209 | $(function() { | |
210 | var $languages = { | |
211 | {implode from=$__wcf->getLanguage()->getLanguages() item=language} | |
212 | '{@$language->languageID}': { | |
213 | iconPath: '{@$language->getIconPath()}', | |
214 | languageName: '{$language}' | |
215 | } | |
216 | {/implode} | |
217 | }; | |
320f4a6d | 218 | |
edf7add2 MW |
219 | new WCF.Language.Chooser('pageLanguageContainer', 'languageID', {@$__wcf->getLanguage()->languageID}, $languages, function(item) { |
220 | var $location = window.location.toString().replace(/#.*/, '').replace(/(\?|&)l=[0-9]+/g, ''); | |
221 | var $delimiter = ($location.indexOf('?') == -1) ? '?' : '&'; | |
222 | ||
223 | window.location = $location + $delimiter + 'l=' + item.data('languageID') + window.location.hash; | |
224 | }); | |
320f4a6d | 225 | }); |
edf7add2 MW |
226 | //]]> |
227 | </script> | |
228 | </li> | |
229 | {/if} | |
320f4a6d MW |
230 | {/if} |
231 | ||
232 | {if !$__hideUserMenu|isset} | |
fc69b61d MW |
233 | {if $__wcf->user->userID && $__wcf->session->getPermission('mod.general.canUseModeration')} |
234 | <li id="outstandingModeration" data-count="{#$__wcf->getModerationQueueManager()->getOutstandingModerationCount()}"> | |
235 | <a href="{link controller='ModerationList'}{/link}"> | |
236 | <span class="icon icon16 icon-warning-sign"></span> | |
237 | <span>{lang}wcf.moderation.moderation{/lang}</span> | |
6552b644 | 238 | {if $__wcf->getModerationQueueManager()->getUnreadModerationCount()}<span class="badge badgeInverse">{#$__wcf->getModerationQueueManager()->getUnreadModerationCount()}</span>{/if} |
fc69b61d | 239 | </a> |
51547f2c | 240 | {if !OFFLINE || $__wcf->session->getPermission('admin.general.canViewPageDuringOfflineMode')} |
51547f2c AE |
241 | <script data-relocate="true"> |
242 | //<![CDATA[ | |
243 | $(function() { | |
b2e0e0cd AE |
244 | new WCF.User.Panel.Moderation({ |
245 | deletedContent: '{lang}wcf.moderation.showDeletedContent{/lang}', | |
246 | deletedContentLink: '{link controller='DeletedContentList' encode=false}{/link}', | |
247 | markAllAsReadConfirmMessage: '{lang}wcf.moderation.markAllAsRead.confirmMessage{/lang}', | |
248 | noItems: '{lang}wcf.moderation.noMoreItems{/lang}', | |
e2c010a8 | 249 | showAllLink: '{link controller='ModerationList' encode=false}{/link}', |
b2e0e0cd AE |
250 | title: '{lang}wcf.moderation.moderation{/lang}' |
251 | }); | |
fc69b61d | 252 | }); |
51547f2c AE |
253 | //]]> |
254 | </script> | |
255 | {/if} | |
fc69b61d MW |
256 | </li> |
257 | {/if} | |
258 | ||
320f4a6d MW |
259 | {event name='menuItems'} |
260 | {/if} | |
261 | ||
262 | {if $__wcf->user->userID} | |
263 | <li><a href="{link controller='Logout'}t={@SECURITY_TOKEN}{/link}" class="noJsOnly" style="display: none"><span class="icon icon16 icon-signout"></span> <span>{lang}wcf.user.logout{/lang}</span></a></li> | |
264 | {/if} |