Show More
@@ -1,364 +1,356 | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="root.html"/> |
|
3 | 3 | |
|
4 | 4 | <!-- HEADER --> |
|
5 | 5 | <div id="header"> |
|
6 | 6 | <div id="header-inner" class="title hover"> |
|
7 | 7 | <div id="logo"> |
|
8 | 8 | <h1><a href="${h.url('home')}">${c.rhodecode_name}</a></h1> |
|
9 | 9 | </div> |
|
10 | 10 | <!-- MENU --> |
|
11 | 11 | ${self.page_nav()} |
|
12 | 12 | <!-- END MENU --> |
|
13 | 13 | ${self.body()} |
|
14 | 14 | </div> |
|
15 | 15 | </div> |
|
16 | 16 | <!-- END HEADER --> |
|
17 | 17 | |
|
18 | 18 | <!-- CONTENT --> |
|
19 | 19 | <div id="content"> |
|
20 | 20 | <div class="flash_msg"> |
|
21 | 21 | <% messages = h.flash.pop_messages() %> |
|
22 | 22 | % if messages: |
|
23 | 23 | <ul id="flash-messages"> |
|
24 | 24 | % for message in messages: |
|
25 | 25 | <li class="${message.category}_msg">${message}</li> |
|
26 | 26 | % endfor |
|
27 | 27 | </ul> |
|
28 | 28 | % endif |
|
29 | 29 | </div> |
|
30 | 30 | <div id="main"> |
|
31 | 31 | ${next.main()} |
|
32 | 32 | </div> |
|
33 | 33 | </div> |
|
34 | 34 | <!-- END CONTENT --> |
|
35 | 35 | |
|
36 | 36 | <!-- FOOTER --> |
|
37 | 37 | <div id="footer"> |
|
38 | 38 | <div id="footer-inner" class="title"> |
|
39 | 39 | <div> |
|
40 | 40 | <p class="footer-link"> |
|
41 | 41 | <a href="${h.url('bugtracker')}">${_('Submit a bug')}</a> |
|
42 | 42 | </p> |
|
43 | 43 | <p class="footer-link-right"> |
|
44 | 44 | <a href="${h.url('rhodecode_official')}">RhodeCode${'-%s' % c.rhodecode_instanceid if c.rhodecode_instanceid else ''}</a> |
|
45 | 45 | ${c.rhodecode_version} © 2010-${h.datetime.today().year} by Marcin Kuzminski |
|
46 | 46 | </p> |
|
47 | 47 | </div> |
|
48 | 48 | </div> |
|
49 | 49 | </div> |
|
50 | 50 | <!-- END FOOTER --> |
|
51 | 51 | |
|
52 | 52 | ### MAKO DEFS ### |
|
53 | 53 | <%def name="page_nav()"> |
|
54 | 54 | ${self.menu()} |
|
55 | 55 | </%def> |
|
56 | 56 | |
|
57 | 57 | <%def name="breadcrumbs()"> |
|
58 | 58 | <div class="breadcrumbs"> |
|
59 | 59 | ${self.breadcrumbs_links()} |
|
60 | 60 | </div> |
|
61 | 61 | </%def> |
|
62 | 62 | |
|
63 | 63 | <%def name="usermenu()"> |
|
64 | 64 | ## USER MENU |
|
65 | 65 | <li> |
|
66 | 66 | <a class="menu_link" id="quick_login_link"> |
|
67 | 67 | <span class="icon" style="padding:5px 5px 0px 5px"> |
|
68 | 68 | <img src="${h.gravatar_url(c.rhodecode_user.email,20)}" alt="avatar"> |
|
69 | 69 | </span> |
|
70 | 70 | %if c.rhodecode_user.username != 'default': |
|
71 | 71 | <span class="menu_link_user">${c.rhodecode_user.username}</span> |
|
72 | 72 | %if c.unread_notifications != 0: |
|
73 | 73 | <span class="menu_link_notifications">${c.unread_notifications}</span> |
|
74 | 74 | %endif |
|
75 | 75 | %else: |
|
76 | 76 | <span>${_('Not logged in')}</span> |
|
77 | 77 | %endif |
|
78 | 78 | </a> |
|
79 | 79 | |
|
80 | 80 | <div class="user-menu"> |
|
81 | 81 | <div id="quick_login"> |
|
82 | 82 | %if c.rhodecode_user.username == 'default': |
|
83 | 83 | <h4>${_('Login to your account')}</h4> |
|
84 | 84 | ${h.form(h.url('login_home',came_from=h.url.current()))} |
|
85 | 85 | <div class="form"> |
|
86 | 86 | <div class="fields"> |
|
87 | 87 | <div class="field"> |
|
88 | 88 | <div class="label"> |
|
89 | 89 | <label for="username">${_('Username')}:</label> |
|
90 | 90 | </div> |
|
91 | 91 | <div class="input"> |
|
92 | 92 | ${h.text('username',class_='focus',size=40)} |
|
93 | 93 | </div> |
|
94 | 94 | |
|
95 | 95 | </div> |
|
96 | 96 | <div class="field"> |
|
97 | 97 | <div class="label"> |
|
98 | 98 | <label for="password">${_('Password')}:</label> |
|
99 | 99 | </div> |
|
100 | 100 | <div class="input"> |
|
101 | 101 | ${h.password('password',class_='focus',size=40)} |
|
102 | 102 | </div> |
|
103 | 103 | |
|
104 | 104 | </div> |
|
105 | 105 | <div class="buttons"> |
|
106 | 106 | <div class="password_forgoten">${h.link_to(_('Forgot password ?'),h.url('reset_password'))}</div> |
|
107 | 107 | <div class="register"> |
|
108 | 108 | %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')(): |
|
109 | 109 | ${h.link_to(_("Don't have an account ?"),h.url('register'))} |
|
110 | 110 | %endif |
|
111 | 111 | </div> |
|
112 | 112 | <div class="submit"> |
|
113 | 113 | ${h.submit('sign_in',_('Log In'),class_="ui-btn xsmall")} |
|
114 | 114 | </div> |
|
115 | 115 | </div> |
|
116 | 116 | </div> |
|
117 | 117 | </div> |
|
118 | 118 | ${h.end_form()} |
|
119 | 119 | %else: |
|
120 | 120 | <div class="links_left"> |
|
121 | 121 | <div class="full_name">${c.rhodecode_user.full_name_or_username}</div> |
|
122 | 122 | <div class="email">${c.rhodecode_user.email}</div> |
|
123 | 123 | <div class="big_gravatar"><img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,48)}" /></div> |
|
124 | 124 | <div class="inbox"><a href="${h.url('notifications')}">${_('Inbox')}: ${c.unread_notifications}</a></div> |
|
125 | 125 | </div> |
|
126 | 126 | <div class="links_right"> |
|
127 | 127 | <ol class="links"> |
|
128 | 128 | <li>${h.link_to(_(u'Home'),h.url('home'))}</li> |
|
129 | 129 | <li>${h.link_to(_(u'Journal'),h.url('journal'))}</li> |
|
130 | 130 | <li>${h.link_to(_(u'My account'),h.url('admin_settings_my_account'))}</li> |
|
131 | 131 | <li class="logout">${h.link_to(_(u'Log Out'),h.url('logout_home'))}</li> |
|
132 | 132 | </ol> |
|
133 | 133 | </div> |
|
134 | 134 | %endif |
|
135 | 135 | </div> |
|
136 | 136 | </div> |
|
137 | 137 | |
|
138 | 138 | </li> |
|
139 | 139 | </%def> |
|
140 | 140 | |
|
141 | 141 | <%def name="menu(current=None)"> |
|
142 | 142 | <% |
|
143 | 143 | def is_current(selected): |
|
144 | 144 | if selected == current: |
|
145 | 145 | return h.literal('class="current"') |
|
146 | 146 | %> |
|
147 | 147 | <ul id="quick"> |
|
148 | 148 | <!-- repo switcher --> |
|
149 | 149 | <li> |
|
150 | 150 | <a class="menu_link" id="repo_switcher" title="${_('Switch repository')}" href="#"> |
|
151 | 151 | <span class="icon"> |
|
152 | 152 | <img src="${h.url('/images/icons/database.png')}" alt="${_('Products')}" /> |
|
153 | 153 | </span> |
|
154 | 154 | <span>${_('Repositories')}</span> |
|
155 | 155 | </a> |
|
156 | 156 | <ul id="repo_switcher_list" class="repo_switcher"> |
|
157 | 157 | <li> |
|
158 | 158 | <a href="#">${_('loading...')}</a> |
|
159 | 159 | </li> |
|
160 | 160 | </ul> |
|
161 | 161 | </li> |
|
162 | 162 | ## we render this menu only not for those pages |
|
163 | 163 | %if current not in ['home','admin', 'search', 'journal']: |
|
164 | 164 | ##REGULAR MENU |
|
165 | 165 | <li ${is_current('summary')}> |
|
166 | 166 | <a class="menu_link" title="${_('Summary')}" href="${h.url('summary_home',repo_name=c.repo_name)}"> |
|
167 | 167 | <span class="icon"> |
|
168 | 168 | <img src="${h.url('/images/icons/clipboard_16.png')}" alt="${_('Summary')}" /> |
|
169 | 169 | </span> |
|
170 | 170 | <span>${_('Summary')}</span> |
|
171 | 171 | </a> |
|
172 | 172 | </li> |
|
173 | 173 | <li ${is_current('changelog')}> |
|
174 | 174 | <a class="menu_link" title="${_('Changelog')}" href="${h.url('changelog_home',repo_name=c.repo_name)}"> |
|
175 | 175 | <span class="icon"> |
|
176 | 176 | <img src="${h.url('/images/icons/time.png')}" alt="${_('Changelog')}" /> |
|
177 | 177 | </span> |
|
178 | 178 | <span>${_('Changelog')}</span> |
|
179 | 179 | </a> |
|
180 | 180 | </li> |
|
181 | 181 | <li ${is_current('switch_to')}> |
|
182 | 182 | <a class="menu_link" id="branch_tag_switcher" title="${_('Switch to')}" href="#"> |
|
183 | 183 | <span class="icon"> |
|
184 | 184 | <img src="${h.url('/images/icons/arrow_switch.png')}" alt="${_('Switch to')}" /> |
|
185 | 185 | </span> |
|
186 | 186 | <span>${_('Switch to')}</span> |
|
187 | 187 | </a> |
|
188 | 188 | <ul id="switch_to_list" class="switch_to"> |
|
189 | 189 | <li><a href="#">${_('loading...')}</a></li> |
|
190 | 190 | </ul> |
|
191 | 191 | </li> |
|
192 | 192 | <li ${is_current('files')}> |
|
193 | 193 | <a class="menu_link" title="${_('Files')}" href="${h.url('files_home',repo_name=c.repo_name)}"> |
|
194 | 194 | <span class="icon"> |
|
195 | 195 | <img src="${h.url('/images/icons/file.png')}" alt="${_('Files')}" /> |
|
196 | 196 | </span> |
|
197 | 197 | <span>${_('Files')}</span> |
|
198 | 198 | </a> |
|
199 | 199 | </li> |
|
200 | 200 | <li ${is_current('options')}> |
|
201 | 201 | <a class="menu_link" title="${_('Options')}" href="#"> |
|
202 | 202 | <span class="icon"> |
|
203 | 203 | <img src="${h.url('/images/icons/table_gear.png')}" alt="${_('Admin')}" /> |
|
204 | 204 | </span> |
|
205 | 205 | <span>${_('Options')}</span> |
|
206 | 206 | </a> |
|
207 | 207 | <ul> |
|
208 | 208 | %if h.HasRepoPermissionAll('repository.admin')(c.repo_name): |
|
209 | 209 | %if h.HasPermissionAll('hg.admin')('access settings on repository'): |
|
210 | 210 | <li>${h.link_to(_('repository settings'),h.url('edit_repo',repo_name=c.repo_name),class_='settings')}</li> |
|
211 | 211 | %else: |
|
212 | 212 | <li>${h.link_to(_('repository settings'),h.url('repo_settings_home',repo_name=c.repo_name),class_='settings')}</li> |
|
213 | 213 | %endif |
|
214 | 214 | %endif |
|
215 | 215 | |
|
216 | 216 | <li>${h.link_to(_('fork'),h.url('repo_fork_home',repo_name=c.repo_name),class_='fork')}</li> |
|
217 | 217 | %if h.is_hg(c.rhodecode_repo): |
|
218 | 218 | <li>${h.link_to(_('open new pull request'),h.url('pullrequest_home',repo_name=c.repo_name),class_='pull_request')}</li> |
|
219 | 219 | %endif |
|
220 | 220 | %if c.rhodecode_db_repo.fork: |
|
221 | 221 | <li>${h.link_to(_('compare fork'),h.url('compare_url',repo_name=c.repo_name,org_ref_type='branch',org_ref=request.GET.get('branch') or 'default',other_ref_type='branch',other_ref='default',repo=c.rhodecode_db_repo.fork.repo_name),class_='compare_request')}</li> |
|
222 | 222 | %endif |
|
223 | 223 | <li>${h.link_to(_('search'),h.url('search_repo',search_repo=c.repo_name),class_='search')}</li> |
|
224 | 224 | |
|
225 | 225 | %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name) and c.rhodecode_db_repo.enable_locking: |
|
226 | 226 | %if c.rhodecode_db_repo.locked[0]: |
|
227 | 227 | <li>${h.link_to(_('unlock'), h.url('toggle_locking',repo_name=c.repo_name),class_='locking_del')}</li> |
|
228 | 228 | %else: |
|
229 | 229 | <li>${h.link_to(_('lock'), h.url('toggle_locking',repo_name=c.repo_name),class_='locking_add')}</li> |
|
230 | 230 | %endif |
|
231 | 231 | %endif |
|
232 | 232 | |
|
233 | 233 | % if h.HasPermissionAll('hg.admin')('access admin main page'): |
|
234 | 234 | <li> |
|
235 | 235 | ${h.link_to(_('admin'),h.url('admin_home'),class_='admin')} |
|
236 | 236 | <%def name="admin_menu()"> |
|
237 | 237 | <ul> |
|
238 | 238 | <li>${h.link_to(_('journal'),h.url('admin_home'),class_='journal')}</li> |
|
239 | 239 | <li>${h.link_to(_('repositories'),h.url('repos'),class_='repos')}</li> |
|
240 | 240 | <li>${h.link_to(_('repositories groups'),h.url('repos_groups'),class_='repos_groups')}</li> |
|
241 | 241 | <li>${h.link_to(_('users'),h.url('users'),class_='users')}</li> |
|
242 | 242 | <li>${h.link_to(_('users groups'),h.url('users_groups'),class_='groups')}</li> |
|
243 | 243 | <li>${h.link_to(_('permissions'),h.url('edit_permission',id='default'),class_='permissions')}</li> |
|
244 | 244 | <li>${h.link_to(_('ldap'),h.url('ldap_home'),class_='ldap')}</li> |
|
245 | 245 | <li>${h.link_to(_('defaults'),h.url('defaults'),class_='defaults')}</li> |
|
246 | 246 | <li class="last">${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}</li> |
|
247 | 247 | </ul> |
|
248 | 248 | </%def> |
|
249 | 249 | ## ADMIN MENU |
|
250 | 250 | ${admin_menu()} |
|
251 | 251 | </li> |
|
252 | 252 | % endif |
|
253 | 253 | </ul> |
|
254 | 254 | </li> |
|
255 | 255 | <li> |
|
256 | 256 | <a class="menu_link" title="${_('Followers')}" href="${h.url('repo_followers_home',repo_name=c.repo_name)}"> |
|
257 | 257 | <span class="icon_short"> |
|
258 | 258 | <img src="${h.url('/images/icons/heart.png')}" alt="${_('Followers')}" /> |
|
259 | 259 | </span> |
|
260 | 260 | <span id="current_followers_count" class="short">${c.repository_followers}</span> |
|
261 | 261 | </a> |
|
262 | 262 | </li> |
|
263 | 263 | <li> |
|
264 | 264 | <a class="menu_link" title="${_('Forks')}" href="${h.url('repo_forks_home',repo_name=c.repo_name)}"> |
|
265 | 265 | <span class="icon_short"> |
|
266 | 266 | <img src="${h.url('/images/icons/arrow_divide.png')}" alt="${_('Forks')}" /> |
|
267 | 267 | </span> |
|
268 | 268 | <span class="short">${c.repository_forks}</span> |
|
269 | 269 | </a> |
|
270 | 270 | </li> |
|
271 | 271 | <li> |
|
272 | 272 | <a class="menu_link" title="${_('Pull requests')}" href="${h.url('pullrequest_show_all',repo_name=c.repo_name)}"> |
|
273 | 273 | <span class="icon_short"> |
|
274 | 274 | <img src="${h.url('/images/icons/arrow_join.png')}" alt="${_('Pull requests')}" /> |
|
275 | 275 | </span> |
|
276 | 276 | <span class="short">${c.repository_pull_requests}</span> |
|
277 | 277 | </a> |
|
278 | 278 | </li> |
|
279 | 279 | ${usermenu()} |
|
280 | 280 | <script type="text/javascript"> |
|
281 | 281 | YUE.on('branch_tag_switcher','mouseover',function(){ |
|
282 | 282 | var loaded = YUD.hasClass('branch_tag_switcher','loaded'); |
|
283 | 283 | if(!loaded){ |
|
284 | 284 | YUD.addClass('branch_tag_switcher','loaded'); |
|
285 | 285 | ypjax("${h.url('branch_tag_switcher',repo_name=c.repo_name)}",'switch_to_list', |
|
286 | 286 | function(o){}, |
|
287 | 287 | function(o){YUD.removeClass('branch_tag_switcher','loaded');} |
|
288 | 288 | ,null); |
|
289 | 289 | } |
|
290 | 290 | return false; |
|
291 | 291 | }); |
|
292 | 292 | </script> |
|
293 | 293 | %else: |
|
294 | 294 | ##ROOT MENU |
|
295 | <li ${is_current('home')}> | |
|
296 | <a class="menu_link" title="${_('Home')}" href="${h.url('home')}"> | |
|
297 | <span class="icon"> | |
|
298 | <img src="${h.url('/images/icons/home_16.png')}" alt="${_('Home')}" /> | |
|
299 | </span> | |
|
300 | <span>${_('Home')}</span> | |
|
301 | </a> | |
|
302 | </li> | |
|
303 | 295 | %if c.rhodecode_user.username != 'default': |
|
304 | 296 | <li ${is_current('journal')}> |
|
305 | 297 | <a class="menu_link" title="${_('Journal')}" href="${h.url('journal')}"> |
|
306 | 298 | <span class="icon"> |
|
307 | 299 | <img src="${h.url('/images/icons/book.png')}" alt="${_('Journal')}" /> |
|
308 | 300 | </span> |
|
309 | 301 | <span>${_('Journal')}</span> |
|
310 | 302 | </a> |
|
311 | 303 | </li> |
|
312 | 304 | %else: |
|
313 | 305 | <li ${is_current('journal')}> |
|
314 | 306 | <a class="menu_link" title="${_('Public journal')}" href="${h.url('public_journal')}"> |
|
315 | 307 | <span class="icon"> |
|
316 | 308 | <img src="${h.url('/images/icons/book.png')}" alt="${_('Public journal')}" /> |
|
317 | 309 | </span> |
|
318 | 310 | <span>${_('Public journal')}</span> |
|
319 | 311 | </a> |
|
320 | 312 | </li> |
|
321 | 313 | %endif |
|
322 | 314 | <li ${is_current('search')}> |
|
323 | 315 | <a class="menu_link" title="${_('Search')}" href="${h.url('search')}"> |
|
324 | 316 | <span class="icon"> |
|
325 | 317 | <img src="${h.url('/images/icons/search_16.png')}" alt="${_('Search')}" /> |
|
326 | 318 | </span> |
|
327 | 319 | <span>${_('Search')}</span> |
|
328 | 320 | </a> |
|
329 | 321 | </li> |
|
330 | 322 | %if h.HasPermissionAll('hg.admin')('access admin main page'): |
|
331 | 323 | <li ${is_current('admin')}> |
|
332 | 324 | <a class="menu_link" title="${_('Admin')}" href="${h.url('admin_home')}"> |
|
333 | 325 | <span class="icon"> |
|
334 | 326 | <img src="${h.url('/images/icons/cog_edit.png')}" alt="${_('Admin')}" /> |
|
335 | 327 | </span> |
|
336 | 328 | <span>${_('Admin')}</span> |
|
337 | 329 | </a> |
|
338 | 330 | ${admin_menu()} |
|
339 | 331 | </li> |
|
340 | 332 | %endif |
|
341 | 333 | ${usermenu()} |
|
342 | 334 | %endif |
|
343 | 335 | <script type="text/javascript"> |
|
344 | 336 | YUE.on('repo_switcher','mouseover',function(){ |
|
345 | 337 | function qfilter(){ |
|
346 | 338 | var nodes = YUQ('ul#repo_switcher_list li a.repo_name'); |
|
347 | 339 | var target = 'q_filter_rs'; |
|
348 | 340 | var func = function(node){ |
|
349 | 341 | return node.parentNode; |
|
350 | 342 | } |
|
351 | 343 | q_filter(target,nodes,func); |
|
352 | 344 | } |
|
353 | 345 | var loaded = YUD.hasClass('repo_switcher','loaded'); |
|
354 | 346 | if(!loaded){ |
|
355 | 347 | YUD.addClass('repo_switcher','loaded'); |
|
356 | 348 | ypjax("${h.url('repo_switcher')}",'repo_switcher_list', |
|
357 | 349 | function(o){qfilter();}, |
|
358 | 350 | function(o){YUD.removeClass('repo_switcher','loaded');} |
|
359 | 351 | ,null); |
|
360 | 352 | } |
|
361 | 353 | return false; |
|
362 | 354 | }); |
|
363 | 355 | </script> |
|
364 | 356 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now