##// END OF EJS Templates
merge the two context menu bar stripes - save some vertical space
Mads Kiilerich -
r3612:a8373e8f beta
parent child Browse files
Show More
@@ -1,352 +1,342
1 1 /**
2 2 * Stylesheets for the context bar
3 3 */
4 4
5 5 #quick .repo_switcher { background-image: url("../images/icons/database.png"); }
6 6 #quick .journal { background-image: url("../images/icons/book.png"); }
7 7 #quick .search { background-image: url("../images/icons/search_16.png"); }
8 8 #quick .admin { background-image: url("../images/icons/cog_edit.png"); }
9 9
10 10 #context-bar a.follow { background-image: url("../images/icons/heart.png"); }
11 11 #context-bar a.following { background-image: url("../images/icons/heart_delete.png"); }
12 12 #context-bar a.fork { background-image: url("../images/icons/arrow_divide.png"); }
13 13 #context-bar a.summary { background-image: url("../images/icons/clipboard_16.png"); }
14 14 #context-bar a.changelogs { background-image: url("../images/icons/time.png"); }
15 15 #context-bar a.files { background-image: url("../images/icons/file.png"); }
16 16 #context-bar a.switch-to { background-image: url("../images/icons/arrow_switch.png"); }
17 17 #context-bar a.options { background-image: url("../images/icons/table_gear.png"); }
18 18 #context-bar a.forks { background-image: url("../images/icons/arrow_divide.png"); }
19 19 #context-bar a.pull-request { background-image: url("../images/icons/arrow_join.png"); }
20 20 #context-bar a.branches { background-image: url("../images/icons/arrow_branch.png"); }
21 21 #context-bar a.tags { background-image: url("../images/icons/tag_blue.png"); }
22 22 #context-bar a.bookmarks { background-image: url("../images/icons/tag_green.png"); }
23 23 #context-bar a.settings { background-image: url("../images/icons/cog.png"); }
24 24 #context-bar a.shortlog { background-image: url("../images/icons/time.png"); }
25 25 #context-bar a.search { background-image: url("../images/icons/search_16.png"); }
26 26 #context-bar a.admin { background-image: url("../images/icons/cog_edit.png"); }
27 27
28 28 #context-bar a.journal { background-image: url("../images/icons/book.png"); }
29 29 #context-bar a.repos { background-image: url("../images/icons/database_edit.png"); }
30 30 #context-bar a.repos_groups { background-image: url("../images/icons/database_link.png"); }
31 31 #context-bar a.users { background-image: url("../images/icons/user_edit.png"); }
32 32 #context-bar a.groups { background-image: url("../images/icons/group_edit.png"); }
33 33 #context-bar a.permissions { background-image: url("../images/icons/key.png"); }
34 34 #context-bar a.ldap { background-image: url("../images/icons/server_key.png"); }
35 35 #context-bar a.defaults { background-image: url("../images/icons/wrench.png"); }
36 36 #context-bar a.settings { background-image: url("../images/icons/cog_edit.png"); }
37 37 #context-bar a.compare_request { background-image: url('../images/icons/arrow_inout.png')}
38 38 #context-bar a.locking_del { background-image: url('../images/icons/lock_delete.png')}
39 39 #context-bar a.locking_add { background-image: url('../images/icons/lock_add.png')}
40 40
41 41 #content #context-bar {
42 42 position: relative;
43 background-color: #003B76 !important;
44 padding: 0px;
45 43 overflow: visible;
44 background-color: #336699;
45 border-top: 1px solid #517da8;
46 border-bottom: 1px solid #003162;
47 padding: 0 5px;
48 min-height: 36px;
46 49 }
47 50
48 51 #header #header-inner #quick a,
49 52 #content #context-bar,
50 53 #content #context-bar a {
51 54 color: #FFFFFF;
52 55 }
53 56
54 57 #header #header-inner #quick a:hover,
55 58 #content #context-bar a:hover {
56 59 text-decoration: none;
57 60 }
58 61
59 62 #content #context-bar .icon {
60 63 display: inline-block;
61 64 width: 16px;
62 65 height: 16px;
63 66 vertical-align: text-bottom;
64 67 }
65 68
66 69 ul.horizontal-list {
67 70 display: block;
68 71 }
69 72
70 73 ul.horizontal-list > li {
71 74 float: left;
72 75 position: relative;
73 76 }
74 77
75 78 #header #header-inner #quick ul,
76 79 ul.horizontal-list > li ul {
77 80 position: absolute;
78 81 display: none;
79 82 right: 0;
80 83 z-index: 999;
81 84 }
82 85
83 86 #header #header-inner #quick li:hover > ul,
84 87 ul.horizontal-list li:hover > ul {
85 88 display: block;
86 89 }
87 90
88 91 #header #header-inner #quick li ul li,
89 92 ul.horizontal-list ul li {
90 93 position: relative;
91 94 border-bottom: 1px solid rgba(0,0,0,0.1);
92 95 border-top: 1px solid rgba(255,255,255,0.1);
93 96 }
94 97
95 98 ul.horizontal-list > li ul ul {
96 99 position: absolute;
97 100 right: 100%;
98 101 top: -1px;
99 102 min-width: 200px;
100 103 max-height: 400px;
101 104 overflow-x: hidden;
102 105 overflow-y: auto;
103 106 }
104 107
105 108 #header #header-inner #quick ul a,
106 109 ul.horizontal-list li a {
107 110 white-space: nowrap;
108 111 }
109 112
110 113 #breadcrumbs {
111 114 float: left;
112 padding: 5px 0;
115 padding: 3px 0 5px 0;
113 116 padding-left: 5px;
114 117 font-weight: bold;
115 118 font-size: 14px;
116 119 }
117 120
118 121 #breadcrumbs span {
119 122 font-weight: bold;
120 123 font-size: 1.8em;
121 124 }
122 125
123 #context-top {
124 position: relative;
125 overflow: hidden;
126 border-bottom: 1px solid #003162;
127 padding: 5px;
128 }
129
130 126 #header #header-inner #quick ul,
131 127 #revision-changer,
132 128 #context-pages,
133 129 #context-pages ul {
134 130 background: #3b6998; /* Old browsers */
135 131 background: -moz-linear-gradient(top, #4574a2 0%, #2f5d8b 100%); /* FF3.6+ */
136 132 background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#4574a2), color-stop(100%,#2f5d8b)); /* Chrome,Safari4+ */
137 133 background: -webkit-linear-gradient(top, #4574a2 0%, #2f5d8b 100%); /* Chrome10+,Safari5.1+ */
138 134 background: -o-linear-gradient(top, #4574a2 0%, #2f5d8b 100%); /* Opera 11.10+ */
139 135 background: -ms-linear-gradient(top, #4574a2 0%, #2f5d8b 100%); /* IE10+ */
140 136 background: linear-gradient(to bottom, #4574a2 0%, #2f5d8b 100%); /* W3C */
141 137 /*Filter on IE will also use overflow:hidden implicitly, and that would clip our inner menus.*/
142 138 /*filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4574a2', endColorstr='#2f5d8b',GradientType=0 ); /* IE6-9 */*/
143 139 }
144 140
145 141 #header #header-inner #quick a,
146 142 #context-actions a,
147 143 #context-pages a {
148 144 background-repeat: no-repeat;
149 145 background-position: 10px 50%;
150 146 padding-left: 30px;
151 147 }
152 148
153 149 #quick a,
154 150 #context-pages ul ul a {
155 151 padding-left: 10px;
156 152 }
157 153
158 154 ul#context-actions {
159 155 display: inline-block;
160 156 float: right;
161 157 border-radius: 4px;
162 158 background-image: linear-gradient(top, #4574a2 0%, #2f5d8b 100%);
163 159 }
164 160
165 161 #content ul#context-actions li {
166 162 padding: 0px;
167 163 border-right: 1px solid rgba(0,0,0,0.1);
168 164 border-left: 1px solid rgba(255,255,255,0.1);
169 165 }
170 166
171 167 #context-actions a {
172 168 display: block;
173 169 cursor: pointer;
174 170 background: none;
175 171 border: none;
176 172 margin: 0px;
177 173 height: auto;
178 174 padding: 10px 10px 10px 30px;
179 175 background-repeat: no-repeat;
180 176 background-position: 10px 50%;
181 177 font-size: 1em;
182 178 }
183 179
184 180 #context-actions a {
185 181 padding: 11px 10px 12px 30px;
186 182 }
187 183
188 184 #header #header-inner #quick li:hover,
189 185 #revision-changer:hover,
190 186 #context-pages li:hover,
191 187 #context-actions li:hover,
192 188 #content #context-actions li:hover,
193 189 #header #header-inner #quick li.current,
194 190 #context-pages li.current {
195 191 background: #6388ad; /* Old browsers */
196 192 background: -moz-linear-gradient(top, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 100%); /* FF3.6+ */
197 193 background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,0.1)), color-stop(100%,rgba(255,255,255,0))); /* Chrome,Safari4+ */
198 194 background: -webkit-linear-gradient(top, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 100%); /* Chrome10+,Safari5.1+ */
199 195 background: -o-linear-gradient(top, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 100%); /* Opera 11.10+ */
200 196 background: -ms-linear-gradient(top, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 100%); /* IE10+ */
201 197 background: linear-gradient(to bottom, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 100%); /* W3C */
202 198 /*filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#88bfe8', endColorstr='#70b0e0',GradientType=0 ); /* IE6-9 */*/
203 199 }
204 200
205 201
206 202 #content #context-actions li:first-child {
207 203 border-left: none;
208 204 border-radius: 4px 0 0px 4px;
209 205 }
210 206
211 207 #content #context-actions li:last-child {
212 208 border-right: none;
213 209 border-radius: 0 4px 4px 0;
214 210 }
215 211
216 212 #content #context-actions .icon {
217 213 margin: auto;
218 214 margin-bottom: 5px;
219 215 display: block;
220 216 clear: both;
221 217 float: none;
222 218 }
223 219
224 220 #content #context-pages .follow .show-following,
225 221 #content #context-pages .following .show-follow {
226 222 display: none;
227 223 }
228 224
229 #context-state {
230 background-color: #336699;
231 border-top: 1px solid #517da8;
232 min-height: 36px;
233 }
234
235 225 #context-pages {
236 226 float: right;
237 227 border-left: 1px solid rgba(0,0,0,0.1);
238 228 }
239 229
240 230 #context-pages li.current {
241 231 background: #535353; /* Old browsers */
242 232 background: -moz-linear-gradient(top, #5d5d5d 0%, #484848 100%); /* FF3.6+ */
243 233 background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#5d5d5d), color-stop(100%,#484848)); /* Chrome,Safari4+ */
244 234 background: -webkit-linear-gradient(top, #5d5d5d 0%, #484848 100%); /* Chrome10+,Safari5.1+ */
245 235 background: -o-linear-gradient(top, #5d5d5d 0%, #484848 100%); /* Opera 11.10+ */
246 236 background: -ms-linear-gradient(top, #5d5d5d 0%, #484848 100%); /* IE10+ */
247 237 background: linear-gradient(to bottom, #5d5d5d 0%, #484848 100%); /* W3C */
248 238 }
249 239
250 240 #content #context-pages .icon {
251 241 margin-right: 5px;
252 242 }
253 243
254 244 #header #header-inner #quick li,
255 245 #content #context-pages li {
256 246 border-right: 1px solid rgba(0,0,0,0.1);
257 247 border-left: 1px solid rgba(255,255,255,0.1);
258 248 padding: 0;
259 249 }
260 250 #header #header-inner #quick li:last-child,
261 251 #content #context-pages li:last-child {
262 252 border-right: none;
263 253 }
264 254
265 255 #header #header-inner #quick > li:first-child {
266 256 border-left: none;
267 257 }
268 258
269 259 #header #header-inner #quick > li:first-child > a {
270 260 border-radius: 4px 0 0 4px;
271 261 }
272 262
273 263 #header #header-inner #quick a,
274 264 #context-pages a,
275 265 #context-pages .admin_menu a {
276 266 display: block;
277 267 padding: 0px 10px 1px 30px;
278 268 padding-left: 30px;
279 269 line-height: 35px;
280 270 }
281 271
282 272 #header #header-inner #quick a.thin,
283 273 #context-pages a.thin,
284 274 #context-pages .admin_menu a.thin {
285 275 line-height: 28px !important;
286 276 }
287 277
288 278 #header #header-inner #quick a#quick_login_link {
289 279 padding-left: 0px;
290 280 }
291 281
292 282 #header #header-inner #quick a {
293 283 overflow: hidden;
294 284 }
295 285 #quick a.childs:after,
296 286 #revision-changer:before,
297 287 #context-pages a.childs:after,
298 288 #context-pages a.dropdown:after {
299 289 content: ' \25BE';
300 290 }
301 291 #context-pages a.childs {
302 292 padding-right: 30px;
303 293 }
304 294 #context-pages a.childs:after {
305 295 position: absolute;
306 296 float: right;
307 297 padding-left: 5px;
308 298 padding-right: 5px;
309 299 }
310 300
311 301 #revision-changer:before {
312 302 position: absolute;
313 303 top: 0px;
314 304 right: 0px;
315 305 border-right: 1px solid rgba(0,0,0,0.1);
316 306 height: 25px;
317 307 padding-top: 10px;
318 308 padding-right: 10px;
319 309 }
320 310
321 311 #context-pages li:last-child a {
322 312 padding-right: 10px;
323 313 }
324 314
325 315 #context-bar #revision-changer {
326 316 position: relative;
327 317 cursor: pointer;
328 318 border: none;
329 319 padding: 0;
330 320 margin: 0;
331 321 color: #FFFFFF;
332 322 font-size: 0.85em;
333 323 padding: 2px 15px;
334 324 padding-bottom: 3px;
335 325 padding-right: 30px;
336 326 border-right: 1px solid rgba(255,255,255,0.1);
337 327 }
338 328
339 329 #revision-changer .branch-name,
340 330 #revision-changer .revision {
341 331 display: block;
342 332 text-align: center;
343 333 line-height: 1.5em;
344 334 }
345 335
346 336 #revision-changer .branch-name {
347 337 font-weight: bold;
348 338 }
349 339
350 340 #revision-changer .revision {
351 341 text-transform: uppercase;
352 342 }
@@ -1,345 +1,341
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="root.html"/>
3 3
4 4 <!-- HEADER -->
5 5 <div id="header-dd"></div>
6 6 <div id="header">
7 7 <div id="header-inner" class="title">
8 8 <div id="logo">
9 9 <h1><a href="${h.url('home')}">${c.rhodecode_name}</a></h1>
10 10 </div>
11 11 <!-- MENU -->
12 12 ${self.page_nav()}
13 13 <!-- END MENU -->
14 14 ${self.body()}
15 15 </div>
16 16 </div>
17 17 <!-- END HEADER -->
18 18
19 19 <!-- CONTENT -->
20 20 <div id="content">
21 21 <div class="flash_msg">
22 22 <% messages = h.flash.pop_messages() %>
23 23 % if messages:
24 24 <ul id="flash-messages">
25 25 % for message in messages:
26 26 <li class="${message.category}_msg">${message}</li>
27 27 % endfor
28 28 </ul>
29 29 % endif
30 30 </div>
31 31 <div id="main">
32 32 ${next.main()}
33 33 </div>
34 34 </div>
35 35 <!-- END CONTENT -->
36 36
37 37 <!-- FOOTER -->
38 38 <div id="footer">
39 39 <div id="footer-inner" class="title">
40 40 <div>
41 41 <p class="footer-link">
42 42 <a href="${h.url('bugtracker')}">${_('Submit a bug')}</a>
43 43 </p>
44 44 <p class="footer-link-right">
45 45 <a href="${h.url('rhodecode_official')}">RhodeCode${'-%s' % c.rhodecode_instanceid if c.rhodecode_instanceid else ''}</a>
46 46 ${c.rhodecode_version} &copy; 2010-${h.datetime.today().year} by Marcin Kuzminski
47 47 </p>
48 48 </div>
49 49 </div>
50 50 </div>
51 51 <!-- END FOOTER -->
52 52
53 53 ### MAKO DEFS ###
54 54 <%def name="breadcrumbs()">
55 55 <div class="breadcrumbs">
56 56 ${self.breadcrumbs_links()}
57 57 </div>
58 58 </%def>
59 59
60 60 <%def name="context_bar(current)">
61 61 ${repo_context_bar(current)}
62 62 </%def>
63 63
64 64 <%def name="admin_menu()">
65 65 <ul class="admin_menu">
66 66 <li>${h.link_to(_('admin journal'),h.url('admin_home'),class_='journal ')}</li>
67 67 <li>${h.link_to(_('repositories'),h.url('repos'),class_='repos')}</li>
68 68 <li>${h.link_to(_('repository groups'),h.url('repos_groups'),class_='repos_groups')}</li>
69 69 <li>${h.link_to(_('users'),h.url('users'),class_='users')}</li>
70 70 <li>${h.link_to(_('user groups'),h.url('users_groups'),class_='groups')}</li>
71 71 <li>${h.link_to(_('permissions'),h.url('edit_permission',id='default'),class_='permissions')}</li>
72 72 <li>${h.link_to(_('ldap'),h.url('ldap_home'),class_='ldap')}</li>
73 73 <li>${h.link_to(_('defaults'),h.url('defaults'),class_='defaults')}</li>
74 74 <li class="last">${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}</li>
75 75 </ul>
76 76 </%def>
77 77
78 78 <%def name="admin_menu_simple()">
79 79 <ul>
80 80 <li>${h.link_to(_('repository groups'),h.url('repos_groups'),class_='repos_groups')}</li>
81 81 </ul>
82 82 </%def>
83 83
84 84 <%def name="repo_context_bar(current=None)">
85 85 <%
86 86 def follow_class():
87 87 if c.repository_following:
88 88 return h.literal('following')
89 89 else:
90 90 return h.literal('follow')
91 91 %>
92 92 <%
93 93 def is_current(selected):
94 94 if selected == current:
95 95 return h.literal('class="current"')
96 96 %>
97 97
98 98 <!--- CONTEXT BAR -->
99 99 <div id="context-bar" class="box">
100 <div id="context-top">
101 100 <div id="breadcrumbs">
102 101 ${h.link_to(_(u'Repositories'),h.url('home'))}
103 102 &raquo;
104 103 ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)}
105 104 </div>
106 </div>
107 <div id="context-state">
108 105 <ul id="context-pages" class="horizontal-list">
109 106 <li ${is_current('summary')}><a href="${h.url('summary_home', repo_name=c.repo_name)}" class="summary">${_('Summary')}</a></li>
110 107 <li ${is_current('changelog')}><a href="${h.url('changelog_home', repo_name=c.repo_name)}" class="changelogs">${_('Changelog')}</a></li>
111 108 <li ${is_current('files')}><a href="${h.url('files_home', repo_name=c.repo_name)}" class="files"></span>${_('Files')}</a></li>
112 109 <li ${is_current('switch-to')}>
113 110 <a href="#" id="branch_tag_switcher_2" class="dropdown switch-to"></span>${_('Switch To')}</a>
114 111 <ul id="switch_to_list_2" class="switch_to submenu">
115 112 <li><a href="#">${_('loading...')}</a></li>
116 113 </ul>
117 114 </li>
118 115 <li ${is_current('options')}>
119 116 <a href="#" class="dropdown options"></span>${_('Options')}</a>
120 117 <ul>
121 118 %if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
122 119 %if h.HasPermissionAll('hg.admin')('access settings on repository'):
123 120 <li>${h.link_to(_('Settings'),h.url('edit_repo',repo_name=c.repo_name),class_='settings')}</li>
124 121 %else:
125 122 <li>${h.link_to(_('Settings'),h.url('repo_settings_home',repo_name=c.repo_name),class_='settings')}</li>
126 123 %endif
127 124 %endif
128 125 %if c.rhodecode_db_repo.fork:
129 126 <li>${h.link_to(_('Compare fork'),h.url('compare_url',repo_name=c.rhodecode_db_repo.fork.repo_name,org_ref_type='branch',org_ref='default',other_repo=c.repo_name,other_ref_type='branch',other_ref=request.GET.get('branch') or 'default'),class_='compare_request')}</li>
130 127 %endif
131 128 <li>${h.link_to(_('Lightweight changelog'),h.url('shortlog_home',repo_name=c.repo_name),class_='shortlog')}</li>
132 129 <li>${h.link_to(_('Search'),h.url('search_repo',repo_name=c.repo_name),class_='search')}</li>
133 130
134 131 %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name) and c.rhodecode_db_repo.enable_locking:
135 132 %if c.rhodecode_db_repo.locked[0]:
136 133 <li>${h.link_to(_('Unlock'), h.url('toggle_locking',repo_name=c.repo_name),class_='locking_del')}</li>
137 134 %else:
138 135 <li>${h.link_to(_('Lock'), h.url('toggle_locking',repo_name=c.repo_name),class_='locking_add')}</li>
139 136 %endif
140 137 %endif
141 138 ## TODO: this check feels wrong, it would be better to have a check for permissions
142 139 ## also it feels like a job for the controller
143 140 %if c.rhodecode_user.username != 'default':
144 141 <li>
145 142 <a class="${follow_class()}" onclick="javascript:toggleFollowingRepo(this,${c.rhodecode_db_repo.repo_id},'${str(h.get_token())}');">
146 143 <span class="show-follow">${_('Follow')}</span>
147 144 <span class="show-following">${_('Unfollow')}</span>
148 145 </a>
149 146 </li>
150 147 <li><a href="${h.url('repo_fork_home',repo_name=c.repo_name)}" class="fork">${_('Fork')}</a></li>
151 148 %if h.is_hg(c.rhodecode_repo):
152 149 <li><a href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="pull-request">${_('Create Pull Request')}</a></li>
153 150 %endif
154 151 %endif
155 152 </ul>
156 153 </li>
157 154 <li ${is_current('showpullrequest')}>
158 155 <a href="${h.url('pullrequest_show_all',repo_name=c.repo_name)}" title="${_('Show Pull Requests')}" class="pull-request">${_('Pull Requests')}
159 156 %if c.repository_pull_requests:
160 157 <span>${c.repository_pull_requests}</span>
161 158 %endif
162 159 </a>
163 160 </li>
164 161 </ul>
165 162 </div>
166 </div>
167 163 <script type="text/javascript">
168 164 YUE.on('branch_tag_switcher_2','mouseover',function(){
169 165 var loaded = YUD.hasClass('branch_tag_switcher_2','loaded');
170 166 if(!loaded){
171 167 YUD.addClass('branch_tag_switcher_2','loaded');
172 168 ypjax("${h.url('branch_tag_switcher',repo_name=c.repo_name)}",'switch_to_list_2',
173 169 function(o){},
174 170 function(o){YUD.removeClass('branch_tag_switcher_2','loaded');}
175 171 ,null);
176 172 }
177 173 return false;
178 174 });
179 175 </script>
180 176 <!--- END CONTEXT BAR -->
181 177 </%def>
182 178
183 179 <%def name="usermenu()">
184 180 ## USER MENU
185 181 <li>
186 182 <a class="menu_link childs" id="quick_login_link">
187 183 <span class="icon">
188 184 <img src="${h.gravatar_url(c.rhodecode_user.email,20)}" alt="avatar">
189 185 </span>
190 186 %if c.rhodecode_user.username != 'default':
191 187 <span class="menu_link_user">${c.rhodecode_user.username}</span>
192 188 %if c.unread_notifications != 0:
193 189 <span class="menu_link_notifications">${c.unread_notifications}</span>
194 190 %endif
195 191 %else:
196 192 <span>${_('Not logged in')}</span>
197 193 %endif
198 194 </a>
199 195
200 196 <div class="user-menu">
201 197 <div id="quick_login">
202 198 %if c.rhodecode_user.username == 'default':
203 199 <h4>${_('Login to your account')}</h4>
204 200 ${h.form(h.url('login_home',came_from=h.url.current()))}
205 201 <div class="form">
206 202 <div class="fields">
207 203 <div class="field">
208 204 <div class="label">
209 205 <label for="username">${_('Username')}:</label>
210 206 </div>
211 207 <div class="input">
212 208 ${h.text('username',class_='focus')}
213 209 </div>
214 210
215 211 </div>
216 212 <div class="field">
217 213 <div class="label">
218 214 <label for="password">${_('Password')}:</label>
219 215 </div>
220 216 <div class="input">
221 217 ${h.password('password',class_='focus')}
222 218 </div>
223 219
224 220 </div>
225 221 <div class="buttons">
226 222 <div class="password_forgoten">${h.link_to(_('Forgot password ?'),h.url('reset_password'))}</div>
227 223 <div class="register">
228 224 %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')():
229 225 ${h.link_to(_("Don't have an account ?"),h.url('register'))}
230 226 %endif
231 227 </div>
232 228 <div class="submit">
233 229 ${h.submit('sign_in',_('Log In'),class_="ui-btn xsmall")}
234 230 </div>
235 231 </div>
236 232 </div>
237 233 </div>
238 234 ${h.end_form()}
239 235 %else:
240 236 <div class="links_left">
241 237 <div class="full_name">${c.rhodecode_user.full_name_or_username}</div>
242 238 <div class="email">${c.rhodecode_user.email}</div>
243 239 <div class="big_gravatar"><img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,48)}" /></div>
244 240 ##<div class="notifications"><a href="${h.url('notifications')}">${_('Notifications')}</a></div>
245 241 <div class="unread"><a href="${h.url('notifications')}">${_('Unread notifications')}: ${c.unread_notifications}</a></div>
246 242 </div>
247 243 <div class="links_right">
248 244 <ol class="links">
249 245 ##<li>${h.link_to(_(u'Home'),h.url('home'))}</li>
250 246 <li>${h.link_to(_(u'Journal'),h.url('journal'))}</li>
251 247 <li>${h.link_to(_(u'My account'),h.url('admin_settings_my_account'))}</li>
252 248 <li class="logout">${h.link_to(_(u'Log Out'),h.url('logout_home'))}</li>
253 249 </ol>
254 250 </div>
255 251 %endif
256 252 </div>
257 253 </div>
258 254
259 255 </li>
260 256 </%def>
261 257
262 258 <%def name="menu(current=None)">
263 259 <%
264 260 def is_current(selected):
265 261 if selected == current:
266 262 return h.literal('class="current"')
267 263 %>
268 264 <ul id="quick" class="horizontal-list">
269 265 <!-- repo switcher -->
270 266 <li ${is_current('repositories')}>
271 267 <a class="menu_link repo_switcher childs" id="repo_switcher" title="${_('Switch repository')}" href="${h.url('home')}">
272 268 ${_('Repositories')}
273 269 </a>
274 270 <ul id="repo_switcher_list" class="repo_switcher">
275 271 <li>
276 272 <a href="#">${_('loading...')}</a>
277 273 </li>
278 274 </ul>
279 275 </li>
280 276 ##ROOT MENU
281 277 %if c.rhodecode_user.username != 'default':
282 278 <li ${is_current('journal')}>
283 279 <a class="menu_link journal" title="${_('Show recent activity')}" href="${h.url('journal')}">
284 280 ${_('Journal')}
285 281 </a>
286 282 </li>
287 283 %else:
288 284 <li ${is_current('journal')}>
289 285 <a class="menu_link journal" title="${_('Public journal')}" href="${h.url('public_journal')}">
290 286 ${_('Public journal')}
291 287 </a>
292 288 </li>
293 289 %endif
294 290 <li ${is_current('search')}>
295 291 <a class="menu_link search" title="${_('Search in repositories')}" href="${h.url('search')}">
296 292 ${_('Search')}
297 293 </a>
298 294 </li>
299 295 % if h.HasPermissionAll('hg.admin')('access admin main page'):
300 296 <li ${is_current('admin')}>
301 297 <a class="menu_link admin childs" title="${_('Admin')}" href="${h.url('admin_home')}">
302 298 ${_('Admin')}
303 299 </a>
304 300 ${admin_menu()}
305 301 </li>
306 302 % elif c.rhodecode_user.groups_admin:
307 303 <li ${is_current('admin')}>
308 304 <a class="menu_link admin childs" title="${_('Admin')}" href="${h.url('admin_home')}">
309 305 ${_('Admin')}
310 306 </a>
311 307 ${admin_menu_simple()}
312 308 </li>
313 309 % endif
314 310 ${usermenu()}
315 311 <script type="text/javascript">
316 312 YUE.on('repo_switcher','mouseover',function(){
317 313 var target = 'q_filter_rs';
318 314 var qfilter_activate = function(){
319 315 var nodes = YUQ('ul#repo_switcher_list li a.repo_name');
320 316 var func = function(node){
321 317 return node.parentNode;
322 318 }
323 319 q_filter(target,nodes,func);
324 320 }
325 321
326 322 var loaded = YUD.hasClass('repo_switcher','loaded');
327 323 if(!loaded){
328 324 YUD.addClass('repo_switcher','loaded');
329 325 ypjax("${h.url('repo_switcher')}",'repo_switcher_list',
330 326 function(o){qfilter_activate();YUD.get(target).focus()},
331 327 function(o){YUD.removeClass('repo_switcher','loaded');}
332 328 ,null);
333 329 }else{
334 330 YUD.get(target).focus();
335 331 }
336 332 return false;
337 333 });
338 334
339 335 YUE.on('header-dd', 'click',function(e){
340 336 YUD.addClass('header-inner', 'hover');
341 337 YUD.addClass('content', 'hover');
342 338 });
343 339
344 340 </script>
345 341 </%def>
General Comments 0
You need to be logged in to leave comments. Login now