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> | |
34 | <script type="text/javascript"> | |
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 --> | |
54 | <li> | |
55 | <a class="loginLink" href="{link controller='Login'}{/link}">{lang}wcf.user.loginOrRegister{/lang}</a> | |
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> | |
113 | <dd><label><input type="checkbox" id="useCookies" name="useCookies" value="1" checked="checked" /> {lang}wcf.user.useCookies{/lang}</label></dd> | |
114 | </dl> | |
115 | {/if} | |
116 | ||
117 | {event name='loginFields'} | |
118 | ||
119 | <div class="formSubmit"> | |
120 | <input type="submit" id="loginSubmitButton" name="submitButton" value="{lang}wcf.user.button.login{/lang}" accesskey="s" /> | |
121 | <input type="hidden" name="url" value="{$__wcf->session->requestURI}" /> | |
122 | </div> | |
123 | </fieldset> | |
124 | ||
125 | {if $__3rdPartyButtons|trim} | |
126 | <fieldset> | |
127 | <legend>{lang}wcf.user.login.3rdParty{/lang}</legend> | |
128 | <ul class="buttonGroup" style="text-align: center;"> {* todo: inline CSS *} | |
129 | {@$__3rdPartyButtons} | |
130 | </ul> | |
131 | </fieldset> | |
132 | {/if} | |
133 | </form> | |
134 | </div> | |
135 | ||
136 | <script type="text/javascript"> | |
137 | //<![CDATA[ | |
138 | $(function() { | |
139 | WCF.Language.addObject({ | |
140 | 'wcf.user.button.login': '{lang}wcf.user.button.login{/lang}', | |
141 | 'wcf.user.button.register': '{lang}wcf.user.button.register{/lang}', | |
142 | 'wcf.user.login': '{lang}wcf.user.login{/lang}' | |
143 | }); | |
144 | new WCF.User.Login(true); | |
145 | }); | |
146 | //]]> | |
147 | </script> | |
148 | </li> | |
149 | {/if} | |
150 | <!-- language switcher --> | |
151 | <li id="pageLanguageContainer"> | |
152 | <script type="text/javascript"> | |
153 | //<![CDATA[ | |
154 | $(function() { | |
155 | var $languages = { | |
156 | {implode from=$__wcf->getLanguage()->getLanguages() item=language} | |
157 | '{@$language->languageID}': { | |
158 | iconPath: '{@$language->getIconPath()}', | |
159 | languageName: '{$language}' | |
160 | } | |
161 | {/implode} | |
162 | }; | |
163 | ||
164 | new WCF.Language.Chooser('pageLanguageContainer', 'languageID', {@$__wcf->getLanguage()->languageID}, $languages, function(item) { | |
165 | var $location = window.location.toString().replace(/#.*/, '').replace(/(\?|&)l=[0-9]+/g, ''); | |
166 | var $delimiter = ($location.indexOf('?') == -1) ? '?' : '&'; | |
167 | ||
168 | window.location = $location + $delimiter + 'l=' + item.data('languageID') + window.location.hash; | |
169 | }); | |
170 | }); | |
171 | //]]> | |
172 | </script> | |
173 | </li> | |
174 | {/if} | |
175 | ||
176 | {if !$__hideUserMenu|isset} | |
177 | {event name='menuItems'} | |
178 | {/if} | |
179 | ||
180 | {if $__wcf->user->userID} | |
181 | <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> | |
182 | {/if} |