##// END OF EJS Templates
fixed base.html. and missing lib str2bool function
marcink -
r922:b2a70582 default
parent child Browse files
Show More
@@ -0,0 +1,29 b''
1 # -*- coding: utf-8 -*-
2 """
3 rhodecode.lib.__init__
4 ~~~~~~~~~~~~~~~~~~~~~~~
5
6 Some simple helper functions
7
8 :created_on: Jan 5, 2011
9 :author: marcink
10 :copyright: (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
11 :license: GPLv3, see COPYING for more details.
12 """
13 # This program is free software; you can redistribute it and/or
14 # modify it under the terms of the GNU General Public License
15 # as published by the Free Software Foundation; version 2
16 # of the License or (at your opinion) any later version of the license.
17 #
18 # This program is distributed in the hope that it will be useful,
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 # GNU General Public License for more details.
22 #
23 # You should have received a copy of the GNU General Public License
24 # along with this program; if not, write to the Free Software
25 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
26 # MA 02110-1301, USA.
27
28 def str2bool(v):
29 return v.lower() in ["yes", "true", "t", "1"] if v else None
@@ -207,7 +207,11 b''
207 </a>
207 </a>
208 <ul>
208 <ul>
209 %if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
209 %if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
210 <li>${h.link_to(_('settings'),h.url('repo_settings_home',repo_name=c.repo_name),class_='settings')}</li>
210 %if h.HasPermissionAll('hg.admin')('access settings on repository'):
211 <li>${h.link_to(_('settings'),h.url('edit_repo',repo_name=c.repo_name),class_='settings')}</li>
212 %else:
213 <li>${h.link_to(_('settings'),h.url('repo_settings_home',repo_name=c.repo_name),class_='settings')}</li>
214 %endif
211 <li>${h.link_to(_('fork'),h.url('repo_fork_home',repo_name=c.repo_name),class_='fork')}</li>
215 <li>${h.link_to(_('fork'),h.url('repo_fork_home',repo_name=c.repo_name),class_='fork')}</li>
212 %endif
216 %endif
213 <li>${h.link_to(_('search'),h.url('search_repo',search_repo=c.repo_name),class_='search')}</li>
217 <li>${h.link_to(_('search'),h.url('search_repo',search_repo=c.repo_name),class_='search')}</li>
@@ -337,7 +341,7 b' function onSuccess(){'
337
341
338 function toggleFollowingUser(fallows_user_id,token){
342 function toggleFollowingUser(fallows_user_id,token){
339 args = 'follows_user_id='+fallows_user_id;
343 args = 'follows_user_id='+fallows_user_id;
340 args+= '&auth_token='+token;
344 args+= '&amp;auth_token='+token;
341 YUC.asyncRequest('POST',base_url,{
345 YUC.asyncRequest('POST',base_url,{
342 success:function(o){
346 success:function(o){
343 onSuccess();
347 onSuccess();
@@ -347,7 +351,7 b' function toggleFollowingUser(fallows_use'
347
351
348 function toggleFollowingRepo(fallows_repo_id,token){
352 function toggleFollowingRepo(fallows_repo_id,token){
349 args = 'follows_repo_id='+fallows_repo_id;
353 args = 'follows_repo_id='+fallows_repo_id;
350 args+= '&auth_token='+token;
354 args+= '&amp;auth_token='+token;
351 YUC.asyncRequest('POST',base_url,{
355 YUC.asyncRequest('POST',base_url,{
352 success:function(o){
356 success:function(o){
353 onSuccess();
357 onSuccess();
General Comments 0
You need to be logged in to leave comments. Login now