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> | |
9543d9fe | 34 | <script data-relocate="true"> |
320f4a6d MW |
35 | //<![CDATA[ |
36 | $(function() { | |
37 | WCF.Language.addObject({ | |
38 | 'wcf.user.notification.count': '{lang}wcf.user.notification.count{/lang}', | |
39 | 'wcf.user.notification.markAllAsConfirmed': '{lang}wcf.user.notification.markAllAsConfirmed{/lang}', | |
40 | 'wcf.user.notification.markAllAsConfirmed.confirmMessage': '{lang}wcf.user.notification.markAllAsConfirmed.confirmMessage{/lang}', | |
41 | 'wcf.user.notification.noMoreNotifications': '{lang}wcf.user.notification.noMoreNotifications{/lang}', | |
42 | 'wcf.user.notification.showAll': '{lang}wcf.user.notification.showAll{/lang}' | |
43 | }); | |
44 | ||
45 | new WCF.Notification.UserPanel('{link controller='NotificationList'}{/link}'); | |
46 | }); | |
47 | //]]> | |
48 | </script> | |
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"> | |
60 | <a href="{link controller='GithubAuth'}{/link}" class="button"><span class="icon icon16 icon-github"></span> <span>{lang}wcf.user.3rdparty.github.login{/lang}</span></a> | |
61 | </li>{* | |
62 | *}{/if}{* | |
63 | ||
64 | *}{if TWITTER_PUBLIC_KEY !== '' && TWITTER_PRIVATE_KEY !== ''}{* | |
65 | *}<li id="twitterAuth" class="3rdPartyAuth"> | |
66 | <a href="{link controller='TwitterAuth'}{/link}" class="button"><span class="icon icon16 icon-twitter"></span> <span>{lang}wcf.user.3rdparty.twitter.login{/lang}</span></a> | |
67 | </li>{* | |
68 | *}{/if}{* | |
69 | ||
70 | *}{if FACEBOOK_PUBLIC_KEY !== '' && FACEBOOK_PRIVATE_KEY !== ''}{* | |
71 | *}<li id="facebookAuth" class="3rdPartyAuth"> | |
72 | <a href="{link controller='FacebookAuth'}{/link}" class="button"><span class="icon icon16 icon-facebook"></span> <span>{lang}wcf.user.3rdparty.facebook.login{/lang}</span></a> | |
73 | </li>{* | |
74 | *}{/if}{* | |
75 | ||
76 | *}{if GOOGLE_PUBLIC_KEY !== '' && GOOGLE_PRIVATE_KEY !== ''}{* | |
77 | *}<li id="googleAuth" class="3rdPartyAuth"> | |
78 | <a href="{link controller='GoogleAuth'}{/link}" class="button"><span class="icon icon16 icon-google-plus"></span> <span>{lang}wcf.user.3rdparty.google.login{/lang}</span></a> | |
79 | </li> | |
80 | {/if} | |
81 | {/capture} | |
82 | ||
83 | <form method="post" action="{link controller='Login'}{/link}"> | |
84 | <fieldset> | |
85 | {if $__3rdPartyButtons|trim}<legend>{lang}wcf.user.login{/lang}</legend>{/if} | |
86 | ||
87 | <dl> | |
88 | <dt><label for="username">{lang}wcf.user.usernameOrEmail{/lang}</label></dt> | |
89 | <dd> | |
90 | <input type="text" id="username" name="username" value="" required="required" class="long" /> | |
91 | </dd> | |
92 | </dl> | |
93 | ||
94 | {if !REGISTER_DISABLED} | |
95 | <dl> | |
96 | <dt>{lang}wcf.user.login.action{/lang}</dt> | |
97 | <dd> | |
98 | <label><input type="radio" name="action" value="register" /> {lang}wcf.user.login.action.register{/lang}</label> | |
99 | <label><input type="radio" name="action" value="login" checked="checked" /> {lang}wcf.user.login.action.login{/lang}</label> | |
100 | </dd> | |
101 | </dl> | |
102 | {/if} | |
103 | ||
104 | <dl> | |
105 | <dt><label for="password">{lang}wcf.user.password{/lang}</label></dt> | |
106 | <dd> | |
107 | <input type="password" id="password" name="password" value="" class="long" /> | |
108 | </dd> | |
109 | </dl> | |
110 | ||
111 | {if $__wcf->getUserAuthenticationFactory()->getUserAuthentication()->supportsPersistentLogins()} | |
112 | <dl> | |
77f70354 | 113 | <dt></dt> |
320f4a6d MW |
114 | <dd><label><input type="checkbox" id="useCookies" name="useCookies" value="1" checked="checked" /> {lang}wcf.user.useCookies{/lang}</label></dd> |
115 | </dl> | |
116 | {/if} | |
117 | ||
118 | {event name='loginFields'} | |
119 | ||
120 | <div class="formSubmit"> | |
121 | <input type="submit" id="loginSubmitButton" name="submitButton" value="{lang}wcf.user.button.login{/lang}" accesskey="s" /> | |
122 | <input type="hidden" name="url" value="{$__wcf->session->requestURI}" /> | |
123 | </div> | |
124 | </fieldset> | |
125 | ||
126 | {if $__3rdPartyButtons|trim} | |
127 | <fieldset> | |
128 | <legend>{lang}wcf.user.login.3rdParty{/lang}</legend> | |
025df23f | 129 | <ul class="buttonGroup thirdPartyLogin"> |
320f4a6d MW |
130 | {@$__3rdPartyButtons} |
131 | </ul> | |
132 | </fieldset> | |
133 | {/if} | |
134 | </form> | |
135 | </div> | |
136 | ||
9543d9fe | 137 | <script data-relocate="true"> |
320f4a6d MW |
138 | //<![CDATA[ |
139 | $(function() { | |
140 | WCF.Language.addObject({ | |
141 | 'wcf.user.button.login': '{lang}wcf.user.button.login{/lang}', | |
142 | 'wcf.user.button.register': '{lang}wcf.user.button.register{/lang}', | |
143 | 'wcf.user.login': '{lang}wcf.user.login{/lang}' | |
144 | }); | |
145 | new WCF.User.Login(true); | |
146 | }); | |
147 | //]]> | |
148 | </script> | |
149 | </li> | |
150 | {/if} | |
edf7add2 MW |
151 | {if $__wcf->getLanguage()->getLanguages()|count > 1} |
152 | <li id="pageLanguageContainer"> | |
9543d9fe | 153 | <script data-relocate="true"> |
edf7add2 MW |
154 | //<![CDATA[ |
155 | $(function() { | |
156 | var $languages = { | |
157 | {implode from=$__wcf->getLanguage()->getLanguages() item=language} | |
158 | '{@$language->languageID}': { | |
159 | iconPath: '{@$language->getIconPath()}', | |
160 | languageName: '{$language}' | |
161 | } | |
162 | {/implode} | |
163 | }; | |
320f4a6d | 164 | |
edf7add2 MW |
165 | new WCF.Language.Chooser('pageLanguageContainer', 'languageID', {@$__wcf->getLanguage()->languageID}, $languages, function(item) { |
166 | var $location = window.location.toString().replace(/#.*/, '').replace(/(\?|&)l=[0-9]+/g, ''); | |
167 | var $delimiter = ($location.indexOf('?') == -1) ? '?' : '&'; | |
168 | ||
169 | window.location = $location + $delimiter + 'l=' + item.data('languageID') + window.location.hash; | |
170 | }); | |
320f4a6d | 171 | }); |
edf7add2 MW |
172 | //]]> |
173 | </script> | |
174 | </li> | |
175 | {/if} | |
320f4a6d MW |
176 | {/if} |
177 | ||
178 | {if !$__hideUserMenu|isset} | |
fc69b61d MW |
179 | {if $__wcf->user->userID && $__wcf->session->getPermission('mod.general.canUseModeration')} |
180 | <li id="outstandingModeration" data-count="{#$__wcf->getModerationQueueManager()->getOutstandingModerationCount()}"> | |
181 | <a href="{link controller='ModerationList'}{/link}"> | |
182 | <span class="icon icon16 icon-warning-sign"></span> | |
183 | <span>{lang}wcf.moderation.moderation{/lang}</span> | |
184 | {if $__wcf->getModerationQueueManager()->getOutstandingModerationCount()}<span class="badge badgeInverse">{#$__wcf->getModerationQueueManager()->getOutstandingModerationCount()}</span>{/if} | |
185 | </a> | |
9543d9fe AE |
186 | <script data-relocate="true" src="{@$__wcf->getPath()}js/WCF.Moderation{if !ENABLE_DEBUG_MODE}.min{/if}.js?v={@$__wcfVersion}"></script> |
187 | <script data-relocate="true"> | |
fc69b61d MW |
188 | //<![CDATA[ |
189 | $(function() { | |
190 | WCF.Language.addObject({ | |
191 | 'wcf.moderation.noMoreItems': '{lang}wcf.moderation.noMoreItems{/lang}', | |
07d8203e MW |
192 | 'wcf.moderation.showAll': '{lang}wcf.moderation.showAll{/lang}', |
193 | 'wcf.moderation.showDeletedContent': '{lang}wcf.moderation.showDeletedContent{/lang}' | |
fc69b61d MW |
194 | }); |
195 | ||
07d8203e | 196 | new WCF.Moderation.UserPanel('{link controller='ModerationList'}{/link}', '{link controller='DeletedContentList'}{/link}'); |
fc69b61d MW |
197 | }); |
198 | //]]> | |
199 | </script> | |
200 | </li> | |
201 | {/if} | |
202 | ||
320f4a6d MW |
203 | {event name='menuItems'} |
204 | {/if} | |
205 | ||
206 | {if $__wcf->user->userID} | |
207 | <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> | |
208 | {/if} |