Commit | Line | Data |
---|---|---|
320f4a6d MW |
1 | {if $__wcf->user->userID} |
2 | <!-- user menu --> | |
3 | <li id="userMenu" class="dropdown"> | |
4 | <a class="dropdownToggle framed" data-toggle="userMenu" href="{link controller='User' object=$__wcf->user}{/link}">{@$__wcf->getUserProfileHandler()->getAvatar()->getImageTag(24)} <span>{lang}wcf.user.userNote{/lang}</span></a> | |
5 | <ul class="dropdownMenu"> | |
6 | <li><a href="{link controller='User' object=$__wcf->user}{/link}" class="box32"> | |
7 | <div class="framed">{@$__wcf->getUserProfileHandler()->getAvatar()->getImageTag(32)}</div> | |
8 | ||
9 | <div class="containerHeadline"> | |
10 | <h3>{$__wcf->user->username}</h3> | |
11 | <small>{lang}wcf.user.myProfile{/lang}</small> | |
12 | </div> | |
13 | </a></li> | |
14 | {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} | |
15 | <li><a href="{link controller='Settings'}{/link}">{lang}wcf.user.menu.settings{/lang}</a></li> | |
16 | ||
17 | {event name='userMenuItems'} | |
18 | ||
19 | {if $__wcf->session->getPermission('admin.general.canUseAcp')} | |
20 | <li class="dropdownDivider"></li> | |
21 | <li><a href="{link isACP=true}{/link}">{lang}wcf.global.acp.short{/lang}</a></li> | |
22 | {/if} | |
23 | <li class="dropdownDivider"></li> | |
24 | <li><a href="{link controller='Logout'}t={@SECURITY_TOKEN}{/link}" onclick="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></li> | |
25 | </ul> | |
26 | </li> | |
27 | ||
28 | <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> | |
29 | ||
30 | <!-- user notifications --> | |
31 | {if !$__hideUserMenu|isset} | |
32 | <li id="userNotifications" data-count="{#$__wcf->getUserNotificationHandler()->getNotificationCount()}"> | |
33 | <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 |
34 | {if !OFFLINE || $__wcf->session->getPermission('admin.general.canViewPageDuringOfflineMode')} |
35 | <script data-relocate="true"> | |
36 | //<![CDATA[ | |
37 | $(function() { | |
0d42c1c1 AE |
38 | new WCF.User.Panel.Notification({ |
39 | markAllAsReadConfirmMessage: '{lang}wcf.user.notification.markAllAsConfirmed.confirmMessage{/lang}', | |
40 | noItems: '{lang}wcf.user.notification.noMoreNotifications{/lang}', | |
41 | settingsLink: '{link controller='NotificationSettings' encode=false}{/link}', | |
42 | showAllLink: '{link controller='NotificationList' encode=false}{/link}', | |
43 | title: '{lang}wcf.user.notification.notifications{/lang}' | |
51547f2c | 44 | }); |
320f4a6d | 45 | }); |
51547f2c AE |
46 | //]]> |
47 | </script> | |
48 | {/if} | |
320f4a6d MW |
49 | </li> |
50 | {/if} | |
51 | {else} | |
52 | {if !$__disableLoginLink|isset} | |
53 | <!-- login box --> | |
253c1a5b | 54 | <li id="userLogin"> |
c1693262 | 55 | <a class="loginLink" href="{link controller='Login'}{/link}">{lang}wcf.user.loginOrRegister{/lang}</a> |
320f4a6d MW |
56 | <div id="loginForm" style="display: none;"> |
57 | {capture assign='__3rdPartyButtons'} | |
58 | {if GITHUB_PUBLIC_KEY !== '' && GITHUB_PRIVATE_KEY !== ''} | |
59 | <li id="githubAuth" class="3rdPartyAuth"> | |
8eef36ed | 60 | <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 |
61 | </li> |
62 | {/if} | |
320f4a6d | 63 | |
28283ef7 MW |
64 | {if TWITTER_PUBLIC_KEY !== '' && TWITTER_PRIVATE_KEY !== ''} |
65 | <li id="twitterAuth" class="3rdPartyAuth"> | |
8eef36ed | 66 | <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 |
67 | </li> |
68 | {/if} | |
320f4a6d | 69 | |
28283ef7 MW |
70 | {if FACEBOOK_PUBLIC_KEY !== '' && FACEBOOK_PRIVATE_KEY !== ''} |
71 | <li id="facebookAuth" class="3rdPartyAuth"> | |
8eef36ed | 72 | <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 |
73 | </li> |
74 | {/if} | |
320f4a6d | 75 | |
28283ef7 MW |
76 | {if GOOGLE_PUBLIC_KEY !== '' && GOOGLE_PRIVATE_KEY !== ''} |
77 | <li id="googleAuth" class="3rdPartyAuth"> | |
8eef36ed | 78 | <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 |
79 | </li> |
80 | {/if} | |
17729c4f MW |
81 | |
82 | {event name='3rdpartyButtons'} | |
320f4a6d MW |
83 | {/capture} |
84 | ||
85 | <form method="post" action="{link controller='Login'}{/link}"> | |
86 | <fieldset> | |
87 | {if $__3rdPartyButtons|trim}<legend>{lang}wcf.user.login{/lang}</legend>{/if} | |
88 | ||
89 | <dl> | |
90 | <dt><label for="username">{lang}wcf.user.usernameOrEmail{/lang}</label></dt> | |
91 | <dd> | |
92 | <input type="text" id="username" name="username" value="" required="required" class="long" /> | |
93 | </dd> | |
94 | </dl> | |
95 | ||
96 | {if !REGISTER_DISABLED} | |
97 | <dl> | |
98 | <dt>{lang}wcf.user.login.action{/lang}</dt> | |
99 | <dd> | |
100 | <label><input type="radio" name="action" value="register" /> {lang}wcf.user.login.action.register{/lang}</label> | |
101 | <label><input type="radio" name="action" value="login" checked="checked" /> {lang}wcf.user.login.action.login{/lang}</label> | |
102 | </dd> | |
103 | </dl> | |
104 | {/if} | |
105 | ||
106 | <dl> | |
107 | <dt><label for="password">{lang}wcf.user.password{/lang}</label></dt> | |
108 | <dd> | |
109 | <input type="password" id="password" name="password" value="" class="long" /> | |
110 | </dd> | |
111 | </dl> | |
112 | ||
113 | {if $__wcf->getUserAuthenticationFactory()->getUserAuthentication()->supportsPersistentLogins()} | |
114 | <dl> | |
77f70354 | 115 | <dt></dt> |
320f4a6d MW |
116 | <dd><label><input type="checkbox" id="useCookies" name="useCookies" value="1" checked="checked" /> {lang}wcf.user.useCookies{/lang}</label></dd> |
117 | </dl> | |
118 | {/if} | |
119 | ||
120 | {event name='loginFields'} | |
121 | ||
122 | <div class="formSubmit"> | |
123 | <input type="submit" id="loginSubmitButton" name="submitButton" value="{lang}wcf.user.button.login{/lang}" accesskey="s" /> | |
8a3f83e8 | 124 | <a class="button" href="{link controller='LostPassword'}{/link}"><span>{lang}wcf.user.lostPassword{/lang}</span></a> |
320f4a6d | 125 | <input type="hidden" name="url" value="{$__wcf->session->requestURI}" /> |
ee629b22 | 126 | {@SECURITY_TOKEN_INPUT_TAG} |
320f4a6d MW |
127 | </div> |
128 | </fieldset> | |
129 | ||
130 | {if $__3rdPartyButtons|trim} | |
131 | <fieldset> | |
132 | <legend>{lang}wcf.user.login.3rdParty{/lang}</legend> | |
8eef36ed | 133 | <ul class="buttonList smallButtons thirdPartyLogin"> |
320f4a6d MW |
134 | {@$__3rdPartyButtons} |
135 | </ul> | |
136 | </fieldset> | |
137 | {/if} | |
138 | </form> | |
139 | </div> | |
140 | ||
9543d9fe | 141 | <script data-relocate="true"> |
320f4a6d MW |
142 | //<![CDATA[ |
143 | $(function() { | |
144 | WCF.Language.addObject({ | |
145 | 'wcf.user.button.login': '{lang}wcf.user.button.login{/lang}', | |
146 | 'wcf.user.button.register': '{lang}wcf.user.button.register{/lang}', | |
147 | 'wcf.user.login': '{lang}wcf.user.login{/lang}' | |
148 | }); | |
149 | new WCF.User.Login(true); | |
150 | }); | |
151 | //]]> | |
152 | </script> | |
153 | </li> | |
154 | {/if} | |
edf7add2 MW |
155 | {if $__wcf->getLanguage()->getLanguages()|count > 1} |
156 | <li id="pageLanguageContainer"> | |
9543d9fe | 157 | <script data-relocate="true"> |
edf7add2 MW |
158 | //<![CDATA[ |
159 | $(function() { | |
160 | var $languages = { | |
161 | {implode from=$__wcf->getLanguage()->getLanguages() item=language} | |
162 | '{@$language->languageID}': { | |
163 | iconPath: '{@$language->getIconPath()}', | |
164 | languageName: '{$language}' | |
165 | } | |
166 | {/implode} | |
167 | }; | |
320f4a6d | 168 | |
edf7add2 MW |
169 | new WCF.Language.Chooser('pageLanguageContainer', 'languageID', {@$__wcf->getLanguage()->languageID}, $languages, function(item) { |
170 | var $location = window.location.toString().replace(/#.*/, '').replace(/(\?|&)l=[0-9]+/g, ''); | |
171 | var $delimiter = ($location.indexOf('?') == -1) ? '?' : '&'; | |
172 | ||
173 | window.location = $location + $delimiter + 'l=' + item.data('languageID') + window.location.hash; | |
174 | }); | |
320f4a6d | 175 | }); |
edf7add2 MW |
176 | //]]> |
177 | </script> | |
178 | </li> | |
179 | {/if} | |
320f4a6d MW |
180 | {/if} |
181 | ||
182 | {if !$__hideUserMenu|isset} | |
fc69b61d MW |
183 | {if $__wcf->user->userID && $__wcf->session->getPermission('mod.general.canUseModeration')} |
184 | <li id="outstandingModeration" data-count="{#$__wcf->getModerationQueueManager()->getOutstandingModerationCount()}"> | |
185 | <a href="{link controller='ModerationList'}{/link}"> | |
186 | <span class="icon icon16 icon-warning-sign"></span> | |
187 | <span>{lang}wcf.moderation.moderation{/lang}</span> | |
6552b644 | 188 | {if $__wcf->getModerationQueueManager()->getUnreadModerationCount()}<span class="badge badgeInverse">{#$__wcf->getModerationQueueManager()->getUnreadModerationCount()}</span>{/if} |
fc69b61d | 189 | </a> |
51547f2c | 190 | {if !OFFLINE || $__wcf->session->getPermission('admin.general.canViewPageDuringOfflineMode')} |
51547f2c AE |
191 | <script data-relocate="true"> |
192 | //<![CDATA[ | |
193 | $(function() { | |
194 | WCF.Language.addObject({ | |
195 | 'wcf.moderation.noMoreItems': '{lang}wcf.moderation.noMoreItems{/lang}', | |
196 | 'wcf.moderation.showAll': '{lang}wcf.moderation.showAll{/lang}', | |
197 | 'wcf.moderation.showDeletedContent': '{lang}wcf.moderation.showDeletedContent{/lang}' | |
198 | }); | |
199 | ||
7b5e9bab | 200 | new WCF.Moderation.UserPanel('{link controller='ModerationList' encode=false}{/link}', '{link controller='DeletedContentList' encode=false}{/link}'); |
fc69b61d | 201 | }); |
51547f2c AE |
202 | //]]> |
203 | </script> | |
204 | {/if} | |
fc69b61d MW |
205 | </li> |
206 | {/if} | |
207 | ||
320f4a6d MW |
208 | {event name='menuItems'} |
209 | {/if} | |
210 | ||
211 | {if $__wcf->user->userID} | |
212 | <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> | |
213 | {/if} |