fixed grid layout again
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.0.8 (2012-09-13 09:28:40) stable
|
Version 2.0.8 (2012-09-13 14:06:52) stable
|
||||||
|
|||||||
@@ -1,23 +1,33 @@
|
|||||||
# coding: utf8
|
# coding: utf8
|
||||||
{
|
{
|
||||||
|
'!=': '!=',
|
||||||
'!langcode!': 'it',
|
'!langcode!': 'it',
|
||||||
'!langname!': 'Italiano',
|
'!langname!': 'Italiano',
|
||||||
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" è un\'espressione opzionale come "campo1=\'nuovo valore\'". Non si può fare "update" o "delete" dei risultati di un JOIN ',
|
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" è un\'espressione opzionale come "campo1=\'nuovo valore\'". Non si può fare "update" o "delete" dei risultati di un JOIN ',
|
||||||
|
'%(nrows)s records found': '%(nrows)s records found',
|
||||||
'%d seconds ago': '%d seconds ago',
|
'%d seconds ago': '%d seconds ago',
|
||||||
'%s %%{row} deleted': '%s righe ("record") cancellate',
|
'%s %%{row} deleted': '%s righe ("record") cancellate',
|
||||||
'%s %%{row} updated': '%s righe ("record") modificate',
|
'%s %%{row} updated': '%s righe ("record") modificate',
|
||||||
'%s selected': '%s selezionato',
|
'%s selected': '%s selezionato',
|
||||||
'%Y-%m-%d': '%d/%m/%Y',
|
'%Y-%m-%d': '%d/%m/%Y',
|
||||||
'%Y-%m-%d %H:%M:%S': '%d/%m/%Y %H:%M:%S',
|
'%Y-%m-%d %H:%M:%S': '%d/%m/%Y %H:%M:%S',
|
||||||
|
'<': '<',
|
||||||
|
'<=': '<=',
|
||||||
|
'=': '=',
|
||||||
|
'>': '>',
|
||||||
|
'>=': '>=',
|
||||||
'@markmin\x01Number of entries: **%s**': 'Number of entries: **%s**',
|
'@markmin\x01Number of entries: **%s**': 'Number of entries: **%s**',
|
||||||
'About': 'About',
|
'About': 'About',
|
||||||
'Access Control': 'Access Control',
|
'Access Control': 'Access Control',
|
||||||
|
'Add': 'Add',
|
||||||
'Administrative Interface': 'Administrative Interface',
|
'Administrative Interface': 'Administrative Interface',
|
||||||
'Administrative interface': 'Interfaccia amministrativa',
|
'Administrative interface': 'Interfaccia amministrativa',
|
||||||
'Ajax Recipes': 'Ajax Recipes',
|
'Ajax Recipes': 'Ajax Recipes',
|
||||||
|
'And': 'And',
|
||||||
'appadmin is disabled because insecure channel': 'Amministrazione (appadmin) disabilitata: comunicazione non sicura',
|
'appadmin is disabled because insecure channel': 'Amministrazione (appadmin) disabilitata: comunicazione non sicura',
|
||||||
'Are you sure you want to delete this object?': 'Are you sure you want to delete this object?',
|
'Are you sure you want to delete this object?': 'Are you sure you want to delete this object?',
|
||||||
'Available Databases and Tables': 'Database e tabelle disponibili',
|
'Available Databases and Tables': 'Database e tabelle disponibili',
|
||||||
|
'Back': 'Back',
|
||||||
'Buy this book': 'Buy this book',
|
'Buy this book': 'Buy this book',
|
||||||
'cache': 'cache',
|
'cache': 'cache',
|
||||||
'Cache': 'Cache',
|
'Cache': 'Cache',
|
||||||
@@ -26,16 +36,22 @@
|
|||||||
'Change password': 'Change password',
|
'Change password': 'Change password',
|
||||||
'change password': 'Cambia password',
|
'change password': 'Cambia password',
|
||||||
'Check to delete': 'Seleziona per cancellare',
|
'Check to delete': 'Seleziona per cancellare',
|
||||||
|
'Clear': 'Clear',
|
||||||
'Clear CACHE?': 'Clear CACHE?',
|
'Clear CACHE?': 'Clear CACHE?',
|
||||||
'Clear DISK': 'Clear DISK',
|
'Clear DISK': 'Clear DISK',
|
||||||
'Clear RAM': 'Clear RAM',
|
'Clear RAM': 'Clear RAM',
|
||||||
'Client IP': 'Client IP',
|
'Client IP': 'Client IP',
|
||||||
|
'Close': 'Close',
|
||||||
|
'Cognome': 'Cognome',
|
||||||
'Community': 'Community',
|
'Community': 'Community',
|
||||||
'Components and Plugins': 'Components and Plugins',
|
'Components and Plugins': 'Components and Plugins',
|
||||||
|
'contains': 'contains',
|
||||||
'Controller': 'Controller',
|
'Controller': 'Controller',
|
||||||
'Copyright': 'Copyright',
|
'Copyright': 'Copyright',
|
||||||
'Created By': 'Created By',
|
'Created By': 'Created By',
|
||||||
'Created On': 'Created On',
|
'Created On': 'Created On',
|
||||||
|
'CSV': 'CSV',
|
||||||
|
'CSV (hidden cols)': 'CSV (hidden cols)',
|
||||||
'Current request': 'Richiesta (request) corrente',
|
'Current request': 'Richiesta (request) corrente',
|
||||||
'Current response': 'Risposta (response) corrente',
|
'Current response': 'Risposta (response) corrente',
|
||||||
'Current session': 'Sessione (session) corrente',
|
'Current session': 'Sessione (session) corrente',
|
||||||
@@ -67,7 +83,9 @@
|
|||||||
'Email non valida': 'Email non valida',
|
'Email non valida': 'Email non valida',
|
||||||
'enter an integer between %(min)g and %(max)g': 'enter an integer between %(min)g and %(max)g',
|
'enter an integer between %(min)g and %(max)g': 'enter an integer between %(min)g and %(max)g',
|
||||||
'Errors': 'Errors',
|
'Errors': 'Errors',
|
||||||
|
'Errors in form, please check it out.': 'Errors in form, please check it out.',
|
||||||
'export as csv file': 'esporta come file CSV',
|
'export as csv file': 'esporta come file CSV',
|
||||||
|
'Export:': 'Export:',
|
||||||
'FAQ': 'FAQ',
|
'FAQ': 'FAQ',
|
||||||
'First name': 'Nome',
|
'First name': 'Nome',
|
||||||
'Forgot username?': 'Forgot username?',
|
'Forgot username?': 'Forgot username?',
|
||||||
@@ -83,6 +101,7 @@
|
|||||||
'Hello World in a flash!': 'Salve Mondo in un flash!',
|
'Hello World in a flash!': 'Salve Mondo in un flash!',
|
||||||
'Home': 'Home',
|
'Home': 'Home',
|
||||||
'How did you get here?': 'How did you get here?',
|
'How did you get here?': 'How did you get here?',
|
||||||
|
'HTML': 'HTML',
|
||||||
'import': 'import',
|
'import': 'import',
|
||||||
'Import/Export': 'Importa/Esporta',
|
'Import/Export': 'Importa/Esporta',
|
||||||
'Index': 'Indice',
|
'Index': 'Indice',
|
||||||
@@ -117,16 +136,20 @@
|
|||||||
'Modified On': 'Modified On',
|
'Modified On': 'Modified On',
|
||||||
'My Sites': 'My Sites',
|
'My Sites': 'My Sites',
|
||||||
'Name': 'Nome',
|
'Name': 'Nome',
|
||||||
|
'New': 'New',
|
||||||
'New password': 'New password',
|
'New password': 'New password',
|
||||||
'New Record': 'Nuovo elemento (record)',
|
'New Record': 'Nuovo elemento (record)',
|
||||||
'new record inserted': 'nuovo record inserito',
|
'new record inserted': 'nuovo record inserito',
|
||||||
'next 100 rows': 'prossime 100 righe',
|
'next 100 rows': 'prossime 100 righe',
|
||||||
'No databases in this application': 'Nessun database presente in questa applicazione',
|
'No databases in this application': 'Nessun database presente in questa applicazione',
|
||||||
|
'No records found': 'No records found',
|
||||||
|
'Nome': 'Nome',
|
||||||
'Non può essere vuoto': 'Non può essere vuoto',
|
'Non può essere vuoto': 'Non può essere vuoto',
|
||||||
'not authorized': 'non autorizzato',
|
'not authorized': 'non autorizzato',
|
||||||
'Object or table name': 'Object or table name',
|
'Object or table name': 'Object or table name',
|
||||||
'Old password': 'Old password',
|
'Old password': 'Old password',
|
||||||
'Online examples': 'Vedere gli esempi',
|
'Online examples': 'Vedere gli esempi',
|
||||||
|
'Or': 'Or',
|
||||||
'or import from csv file': 'oppure importa da file CSV',
|
'or import from csv file': 'oppure importa da file CSV',
|
||||||
'Origin': 'Origine',
|
'Origin': 'Origine',
|
||||||
'Other Plugins': 'Other Plugins',
|
'Other Plugins': 'Other Plugins',
|
||||||
@@ -163,9 +186,11 @@
|
|||||||
'Rows in Table': 'Righe nella tabella',
|
'Rows in Table': 'Righe nella tabella',
|
||||||
'Rows selected': 'Righe selezionate',
|
'Rows selected': 'Righe selezionate',
|
||||||
'Save profile': 'Save profile',
|
'Save profile': 'Save profile',
|
||||||
|
'Search': 'Search',
|
||||||
'Semantic': 'Semantic',
|
'Semantic': 'Semantic',
|
||||||
'Services': 'Services',
|
'Services': 'Services',
|
||||||
'Size of cache:': 'Size of cache:',
|
'Size of cache:': 'Size of cache:',
|
||||||
|
'starts with': 'starts with',
|
||||||
'state': 'stato',
|
'state': 'stato',
|
||||||
'Statistics': 'Statistics',
|
'Statistics': 'Statistics',
|
||||||
'Stylesheet': 'Foglio di stile (stylesheet)',
|
'Stylesheet': 'Foglio di stile (stylesheet)',
|
||||||
@@ -184,6 +209,8 @@
|
|||||||
'Time in Cache (h:m:s)': 'Time in Cache (h:m:s)',
|
'Time in Cache (h:m:s)': 'Time in Cache (h:m:s)',
|
||||||
'Timestamp': 'Ora (timestamp)',
|
'Timestamp': 'Ora (timestamp)',
|
||||||
'too short': 'too short',
|
'too short': 'too short',
|
||||||
|
'TSV (Excel compatible)': 'TSV (Excel compatible)',
|
||||||
|
'TSV (Excel compatible, hidden cols)': 'TSV (Excel compatible, hidden cols)',
|
||||||
'Twitter': 'Twitter',
|
'Twitter': 'Twitter',
|
||||||
'unable to parse csv file': 'non riesco a decodificare questo file CSV',
|
'unable to parse csv file': 'non riesco a decodificare questo file CSV',
|
||||||
'Update': 'Update',
|
'Update': 'Update',
|
||||||
@@ -196,6 +223,7 @@
|
|||||||
'User %(id)s Profile updated': 'User %(id)s Profile updated',
|
'User %(id)s Profile updated': 'User %(id)s Profile updated',
|
||||||
'User %(id)s Registered': 'User %(id)s Registered',
|
'User %(id)s Registered': 'User %(id)s Registered',
|
||||||
'User ID': 'ID Utente',
|
'User ID': 'ID Utente',
|
||||||
|
'value already in database or empty': 'value already in database or empty',
|
||||||
'Verify Password': 'Verify Password',
|
'Verify Password': 'Verify Password',
|
||||||
'Videos': 'Videos',
|
'Videos': 'Videos',
|
||||||
'View': 'Vista',
|
'View': 'Vista',
|
||||||
@@ -204,6 +232,7 @@
|
|||||||
'Welcome to web2py': 'Benvenuto su web2py',
|
'Welcome to web2py': 'Benvenuto su web2py',
|
||||||
'Welcome to web2py!': 'Welcome to web2py!',
|
'Welcome to web2py!': 'Welcome to web2py!',
|
||||||
'Which called the function %s located in the file %s': 'che ha chiamato la funzione %s presente nel file %s',
|
'Which called the function %s located in the file %s': 'che ha chiamato la funzione %s presente nel file %s',
|
||||||
|
'XML': 'XML',
|
||||||
'You are successfully running web2py': 'Stai eseguendo web2py con successo',
|
'You are successfully running web2py': 'Stai eseguendo web2py con successo',
|
||||||
'You can modify this application and adapt it to your needs': 'Puoi modificare questa applicazione adattandola alle tue necessità',
|
'You can modify this application and adapt it to your needs': 'Puoi modificare questa applicazione adattandola alle tue necessità',
|
||||||
'You visited the url %s': "Hai visitato l'URL %s",
|
'You visited the url %s': "Hai visitato l'URL %s",
|
||||||
|
|||||||
@@ -176,19 +176,6 @@ div.error {
|
|||||||
|
|
||||||
/* #MEDIA QUERIES SECTION */
|
/* #MEDIA QUERIES SECTION */
|
||||||
|
|
||||||
/* All Mobile Sizes (devices and browser) */
|
|
||||||
@media only screen and (max-width:767px) {
|
|
||||||
/* removed because of bootswatch
|
|
||||||
.topbar {text-align:center}
|
|
||||||
#navbar,#menu {float:none}
|
|
||||||
#navbar {font-size:1.2em; padding:.6em 0 1.2em}
|
|
||||||
#menu {padding:0 0 1.5em}
|
|
||||||
#menu select {font-size:1.2em; margin:0; padding:0}
|
|
||||||
|
|
||||||
div.flash {top:110px; right:10px}
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*Grid
|
*Grid
|
||||||
*
|
*
|
||||||
@@ -240,7 +227,7 @@ div.error {
|
|||||||
margin:0;
|
margin:0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.web2py_search_actions{
|
.web2py_search_actions {
|
||||||
float:left;
|
float:left;
|
||||||
text-align:left;
|
text-align:left;
|
||||||
}
|
}
|
||||||
@@ -264,13 +251,13 @@ div.error {
|
|||||||
.web2py_console input[type=button],
|
.web2py_console input[type=button],
|
||||||
.web2py_console button {
|
.web2py_console button {
|
||||||
line-height:20px;
|
line-height:20px;
|
||||||
margin-right:5px; display:inline-block;
|
margin-right:2px; display:inline-block;
|
||||||
padding:3px 5px 3px 5px;
|
padding:3px 5px 3px 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.web2py_counter {
|
.web2py_counter {
|
||||||
margin-top:5px;
|
margin-top:5px;
|
||||||
margin-right:5px;
|
margin-right:2px;
|
||||||
width:35%;
|
width:35%;
|
||||||
float:right;
|
float:right;
|
||||||
text-align:right;
|
text-align:right;
|
||||||
@@ -308,7 +295,11 @@ li.w2p_grid_breadcrumb_elem {
|
|||||||
display:inline-block;
|
display:inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ie9 #query_panel {padding-bottom:2px}
|
.web2py_console form { vertical-align: middle; }
|
||||||
|
.web2py_console input, .web2py_console select,
|
||||||
|
.web2py_console a { margin: 2px; }
|
||||||
|
|
||||||
|
.ie9 #w2p_query_panel {padding-bottom:2px}
|
||||||
|
|
||||||
#wiki_page_body {
|
#wiki_page_body {
|
||||||
width: 600px;
|
width: 600px;
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
{{left_sidebar_enabled,right_sidebar_enabled=False,('message' in globals())}}
|
{{left_sidebar_enabled,right_sidebar_enabled=False,('message' in globals())}}
|
||||||
{{extend 'layout.html'}}
|
{{extend 'layout.html'}}
|
||||||
|
|
||||||
|
{{=SQLFORM.grid(db.auth_user)}}
|
||||||
|
|
||||||
{{if 'message' in globals():}}
|
{{if 'message' in globals():}}
|
||||||
<h3>{{=message}}</h3>
|
<h3>{{=message}}</h3>
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
<!--[if IE 9]><html class="ie9 ie-lte9 no-js" lang="{{=T.accepted_language or 'en'}}"> <![endif]-->
|
<!--[if IE 9]><html class="ie9 ie-lte9 no-js" lang="{{=T.accepted_language or 'en'}}"> <![endif]-->
|
||||||
<!--[if (gt IE 9)|!(IE)]><!--> <html class="no-js" lang="{{=T.accepted_language or 'en'}}"> <!--<![endif]-->
|
<!--[if (gt IE 9)|!(IE)]><!--> <html class="no-js" lang="{{=T.accepted_language or 'en'}}"> <!--<![endif]-->
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<!-- www.phpied.com/conditional-comments-block-downloads/ -->
|
<!-- www.phpied.com/conditional-comments-block-downloads/ -->
|
||||||
<!-- Always force latest IE rendering engine
|
<!-- Always force latest IE rendering engine
|
||||||
@@ -167,7 +168,9 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
jQuery('ul.nav li.dropdown a').click(function(){window.location=jQuery(this).attr('href');});
|
jQuery('ul.nav li.dropdown a').click(function(){window.location=jQuery(this).attr('href');});
|
||||||
});
|
// make all buttons bootstrap buttons
|
||||||
|
jQuery('button, form input[type="submit"], form input[type="button"]').addClass('btn').css({'margin-right':'2px','margin-bottom':'2px'});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
<script src="{{=URL('static','js/bootstrap.min.js')}}"></script>
|
<script src="{{=URL('static','js/bootstrap.min.js')}}"></script>
|
||||||
<!--[if lt IE 7 ]>
|
<!--[if lt IE 7 ]>
|
||||||
|
|||||||
+6
-4
@@ -243,7 +243,8 @@ def URL(
|
|||||||
elif a and c and not f: (c,f,a)=(a,c,f)
|
elif a and c and not f: (c,f,a)=(a,c,f)
|
||||||
from globals import current
|
from globals import current
|
||||||
if hasattr(current,'request'):
|
if hasattr(current,'request'):
|
||||||
r = current.request
|
r = current.request
|
||||||
|
|
||||||
if r:
|
if r:
|
||||||
application = r.application
|
application = r.application
|
||||||
controller = r.controller
|
controller = r.controller
|
||||||
@@ -296,10 +297,10 @@ def URL(
|
|||||||
if other.endswith('/'):
|
if other.endswith('/'):
|
||||||
other += '/' # add trailing slash to make last trailing empty arg explicit
|
other += '/' # add trailing slash to make last trailing empty arg explicit
|
||||||
|
|
||||||
if '_signature' in vars:
|
|
||||||
vars.pop('_signature')
|
|
||||||
list_vars = []
|
list_vars = []
|
||||||
for (key, vals) in sorted(vars.items()):
|
for (key, vals) in sorted(vars.items()):
|
||||||
|
if key == '_signature':
|
||||||
|
continue
|
||||||
if not isinstance(vals, (list, tuple)):
|
if not isinstance(vals, (list, tuple)):
|
||||||
vals = [vals]
|
vals = [vals]
|
||||||
for val in vals:
|
for val in vals:
|
||||||
@@ -347,7 +348,8 @@ def URL(
|
|||||||
|
|
||||||
if regex_crlf.search(join([application, controller, function, other])):
|
if regex_crlf.search(join([application, controller, function, other])):
|
||||||
raise SyntaxError, 'CRLF Injection Detected'
|
raise SyntaxError, 'CRLF Injection Detected'
|
||||||
url = url_out(r, env, application, controller, function,
|
|
||||||
|
url = url_out(r,env, application, controller, function,
|
||||||
args, other, scheme, host, port)
|
args, other, scheme, host, port)
|
||||||
return url
|
return url
|
||||||
|
|
||||||
|
|||||||
+12
-6
@@ -162,10 +162,12 @@ def url_in(request, environ):
|
|||||||
return map_url_in(request, environ)
|
return map_url_in(request, environ)
|
||||||
return regex_url_in(request, environ)
|
return regex_url_in(request, environ)
|
||||||
|
|
||||||
def url_out(request, env, application, controller, function, args, other, scheme, host, port):
|
def url_out(request, env, application, controller, function,
|
||||||
|
args, other, scheme, host, port):
|
||||||
"assemble and rewrite outgoing URL"
|
"assemble and rewrite outgoing URL"
|
||||||
if routers:
|
if routers:
|
||||||
acf = map_url_out(request, env, application, controller, function, args, other, scheme, host, port)
|
acf = map_url_out(request, env, application, controller,
|
||||||
|
function, args, other, scheme, host, port)
|
||||||
url = '%s%s' % (acf, other)
|
url = '%s%s' % (acf, other)
|
||||||
else:
|
else:
|
||||||
url = '/%s/%s/%s%s' % (application, controller, function, other)
|
url = '/%s/%s/%s%s' % (application, controller, function, other)
|
||||||
@@ -226,7 +228,8 @@ def try_rewrite_on_error(http_response, request, environ, ticket=None):
|
|||||||
# Rewrite routes_onerror path.
|
# Rewrite routes_onerror path.
|
||||||
path_info = '/' + path_info.lstrip('/') # add leading '/' if missing
|
path_info = '/' + path_info.lstrip('/') # add leading '/' if missing
|
||||||
environ['PATH_INFO'] = path_info
|
environ['PATH_INFO'] = path_info
|
||||||
error_handling_path = url_in(request, environ)[1]['PATH_INFO']
|
error_handling_path = \
|
||||||
|
url_in(request, environ)[1]['PATH_INFO']
|
||||||
# Avoid infinite loop.
|
# Avoid infinite loop.
|
||||||
if error_handling_path != error_raising_path:
|
if error_handling_path != error_raising_path:
|
||||||
# wsgibase will be called recursively with the routes_onerror path.
|
# wsgibase will be called recursively with the routes_onerror path.
|
||||||
@@ -1122,7 +1125,8 @@ class MapUrlIn(object):
|
|||||||
class MapUrlOut(object):
|
class MapUrlOut(object):
|
||||||
"logic for mapping outgoing URLs"
|
"logic for mapping outgoing URLs"
|
||||||
|
|
||||||
def __init__(self, request, env, application, controller, function, args, other, scheme, host, port):
|
def __init__(self, request, env, application, controller,
|
||||||
|
function, args, other, scheme, host, port):
|
||||||
"initialize a map-out object"
|
"initialize a map-out object"
|
||||||
self.default_application = routers.BASE.default_application
|
self.default_application = routers.BASE.default_application
|
||||||
if application in routers:
|
if application in routers:
|
||||||
@@ -1323,7 +1327,8 @@ def map_url_in(request, env, app=False):
|
|||||||
map.update_request()
|
map.update_request()
|
||||||
return (None, map.env)
|
return (None, map.env)
|
||||||
|
|
||||||
def map_url_out(request, env, application, controller, function, args, other, scheme, host, port):
|
def map_url_out(request, env, application, controller,
|
||||||
|
function, args, other, scheme, host, port):
|
||||||
'''
|
'''
|
||||||
supply /a/c/f (or /a/lang/c/f) portion of outgoing url
|
supply /a/c/f (or /a/lang/c/f) portion of outgoing url
|
||||||
|
|
||||||
@@ -1349,7 +1354,8 @@ def map_url_out(request, env, application, controller, function, args, other, sc
|
|||||||
|
|
||||||
We assume that language names do not collide with a/c/f names.
|
We assume that language names do not collide with a/c/f names.
|
||||||
'''
|
'''
|
||||||
map = MapUrlOut(request, env, application, controller, function, args, other, scheme, host, port)
|
map = MapUrlOut(request, env, application, controller,
|
||||||
|
function, args, other, scheme, host, port)
|
||||||
return map.acf()
|
return map.acf()
|
||||||
|
|
||||||
def get_effective_router(appname):
|
def get_effective_router(appname):
|
||||||
|
|||||||
+25
-15
@@ -1664,15 +1664,20 @@ class SQLFORM(FORM):
|
|||||||
return URL(**b)
|
return URL(**b)
|
||||||
|
|
||||||
referrer = session.get('_web2py_grid_referrer_'+formname, url())
|
referrer = session.get('_web2py_grid_referrer_'+formname, url())
|
||||||
if user_signature:
|
# if not user_signature every action is accessible
|
||||||
if ('/'.join(str(a) for a in args) != '/'.join(request.args) and \
|
# else forbid access unless
|
||||||
user_signature and \
|
# - url is based url
|
||||||
not URL.verify(request,user_signature=user_signature)) or \
|
# - url has valid signature (vars are not signed, only path_info)
|
||||||
(not (session.auth and session.auth.user) and \
|
# = url does not contain 'create','delete','edit' (readonly)
|
||||||
('edit' in request.args or \
|
if user_signature:
|
||||||
'create' in request.args or \
|
if not(
|
||||||
'delete' in request.args)):
|
'/'.join(str(a) for a in args) == '/'.join(request.args) or
|
||||||
session.flash = T('not authorized')
|
URL.verify(request,user_signature=user_signature,
|
||||||
|
hash_vars=False) or not (
|
||||||
|
'create' in request.args or
|
||||||
|
'delete' in request.args or
|
||||||
|
'edit' in request.args)):
|
||||||
|
session.flash = T('not authorized')
|
||||||
redirect(referrer)
|
redirect(referrer)
|
||||||
|
|
||||||
def gridbutton(buttonclass='buttonadd', buttontext='Add',
|
def gridbutton(buttonclass='buttonadd', buttontext='Add',
|
||||||
@@ -1868,6 +1873,16 @@ class SQLFORM(FORM):
|
|||||||
session['_web2py_grid_referrer_'+formname] = url2(vars=request.vars)
|
session['_web2py_grid_referrer_'+formname] = url2(vars=request.vars)
|
||||||
console = DIV(_class='web2py_console %(header)s %(cornertop)s' % ui)
|
console = DIV(_class='web2py_console %(header)s %(cornertop)s' % ui)
|
||||||
error = None
|
error = None
|
||||||
|
if create:
|
||||||
|
add = gridbutton(
|
||||||
|
buttonclass='buttonadd',
|
||||||
|
buttontext='Add',
|
||||||
|
buttonurl=url(args=['new',tablename]))
|
||||||
|
if not searchable:
|
||||||
|
console.append(add)
|
||||||
|
else:
|
||||||
|
add = ''
|
||||||
|
|
||||||
if searchable:
|
if searchable:
|
||||||
sfields = reduce(lambda a,b:a+b,
|
sfields = reduce(lambda a,b:a+b,
|
||||||
[[f for f in t if f.readable] for t in tables])
|
[[f for f in t if f.readable] for t in tables])
|
||||||
@@ -1875,7 +1890,7 @@ class SQLFORM(FORM):
|
|||||||
search_widget = search_widget[tablename]
|
search_widget = search_widget[tablename]
|
||||||
if search_widget=='default':
|
if search_widget=='default':
|
||||||
search_menu = SQLFORM.search_menu(sfields)
|
search_menu = SQLFORM.search_menu(sfields)
|
||||||
search_widget = lambda sfield, url: DIV(FORM(
|
search_widget = lambda sfield, url: CAT(add,FORM(
|
||||||
INPUT(_name='keywords',_value=request.vars.keywords,
|
INPUT(_name='keywords',_value=request.vars.keywords,
|
||||||
_id='web2py_keywords',_onfocus="jQuery('#w2p_query_fields').change();jQuery('#w2p_query_panel').slideDown();"),
|
_id='web2py_keywords',_onfocus="jQuery('#w2p_query_fields').change();jQuery('#w2p_query_panel').slideDown();"),
|
||||||
INPUT(_type='submit',_value=T('Search'),_class="btn"),
|
INPUT(_type='submit',_value=T('Search'),_class="btn"),
|
||||||
@@ -1895,11 +1910,6 @@ class SQLFORM(FORM):
|
|||||||
error = T('Invalid query')
|
error = T('Invalid query')
|
||||||
else:
|
else:
|
||||||
subquery = None
|
subquery = None
|
||||||
if create:
|
|
||||||
console.append(gridbutton(
|
|
||||||
buttonclass='buttonadd',
|
|
||||||
buttontext='Add',
|
|
||||||
buttonurl=url(args=['new',tablename])))
|
|
||||||
|
|
||||||
if subquery:
|
if subquery:
|
||||||
dbset = dbset(subquery)
|
dbset = dbset(subquery)
|
||||||
|
|||||||
@@ -1225,7 +1225,6 @@ class Auth(object):
|
|||||||
else:
|
else:
|
||||||
next = '?_next=' + urllib.quote(URL(args=request.args,
|
next = '?_next=' + urllib.quote(URL(args=request.args,
|
||||||
vars=request.get_vars))
|
vars=request.get_vars))
|
||||||
|
|
||||||
href = lambda function: '%s/%s%s' % (action, function,
|
href = lambda function: '%s/%s%s' % (action, function,
|
||||||
next if referrer_actions is DEFAULT or function in referrer_actions else '')
|
next if referrer_actions is DEFAULT or function in referrer_actions else '')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user