Mercurial > kallithea
comparison rhodecode/templates/base/base.html @ 1085:3fe3285868d1 beta
implemented public journal for anonymous users, admin can control which repositories
are visible in such journal in admin panel
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Fri, 25 Feb 2011 18:47:09 +0100 |
parents | f52aab02db29 |
children | 0e6035a85980 |
comparison
equal
deleted
inserted
replaced
1084:17721a2dfadb | 1085:3fe3285868d1 |
---|---|
36 <div class="gravatar"> | 36 <div class="gravatar"> |
37 <img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,20)}" /> | 37 <img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,20)}" /> |
38 </div> | 38 </div> |
39 <div class="account"> | 39 <div class="account"> |
40 %if c.rhodecode_user.username == 'default': | 40 %if c.rhodecode_user.username == 'default': |
41 %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')(): | 41 <a href="${h.url('public_journal')}">${_('Public journal')}</a> |
42 ${h.link_to('anonymous',h.url('register'),title='%s %s'%(c.rhodecode_user.name,c.rhodecode_user.lastname))} | |
43 %else: | |
44 ${h.link_to('anonymous',h.url('#'),title='%s %s'%(c.rhodecode_user.name,c.rhodecode_user.lastname))} | |
45 %endif | |
46 | |
47 %else: | 42 %else: |
48 ${h.link_to(c.rhodecode_user.username,h.url('admin_settings_my_account'),title='%s %s'%(c.rhodecode_user.name,c.rhodecode_user.lastname))} | 43 ${h.link_to(c.rhodecode_user.username,h.url('admin_settings_my_account'),title='%s %s'%(c.rhodecode_user.name,c.rhodecode_user.lastname))} |
49 %endif | 44 %endif |
50 </div> | 45 </div> |
51 </li> | 46 </li> |
371 f_cnt.innerHTML = cnt; | 366 f_cnt.innerHTML = cnt; |
372 } | 367 } |
373 } | 368 } |
374 } | 369 } |
375 | 370 |
376 function toggleFollowingUser(fallows_user_id,token){ | 371 function toggleFollowingUser(target,fallows_user_id,token,user_id){ |
377 args = 'follows_user_id='+fallows_user_id; | 372 args = 'follows_user_id='+fallows_user_id; |
378 args+= '&auth_token='+token; | 373 args+= '&auth_token='+token; |
374 if(user_id != undefined){ | |
375 args+="&user_id="+user_id; | |
376 } | |
379 YUC.asyncRequest('POST',base_url,{ | 377 YUC.asyncRequest('POST',base_url,{ |
380 success:function(o){ | 378 success:function(o){ |
381 onSuccess(); | 379 onSuccess(target); |
382 } | 380 } |
383 },args); return false; | 381 },args); return false; |
384 } | 382 } |
385 | 383 |
386 function toggleFollowingRepo(target,fallows_repo_id,token){ | 384 function toggleFollowingRepo(target,fallows_repo_id,token,user_id){ |
387 | 385 |
388 args = 'follows_repo_id='+fallows_repo_id; | 386 args = 'follows_repo_id='+fallows_repo_id; |
389 args+= '&auth_token='+token; | 387 args+= '&auth_token='+token; |
388 if(user_id != undefined){ | |
389 args+="&user_id="+user_id; | |
390 } | |
390 YUC.asyncRequest('POST',base_url,{ | 391 YUC.asyncRequest('POST',base_url,{ |
391 success:function(o){ | 392 success:function(o){ |
392 onSuccess(target); | 393 onSuccess(target); |
393 } | 394 } |
394 },args); return false; | 395 },args); return false; |