navbar dropdown, thanks Paolo
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.0.8 (2012-09-12 09:55:52) stable
|
Version 2.0.8 (2012-09-12 10:18:30) stable
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
'Cache': 'Cache',
|
'Cache': 'Cache',
|
||||||
'Cache Keys': 'Cache Keys',
|
'Cache Keys': 'Cache Keys',
|
||||||
'Cannot be empty': 'Non può essere vuoto',
|
'Cannot be empty': 'Non può essere vuoto',
|
||||||
|
'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 CACHE?': 'Clear CACHE?',
|
'Clear CACHE?': 'Clear CACHE?',
|
||||||
@@ -69,6 +70,7 @@
|
|||||||
'export as csv file': 'esporta come file CSV',
|
'export as csv file': 'esporta come file CSV',
|
||||||
'FAQ': 'FAQ',
|
'FAQ': 'FAQ',
|
||||||
'First name': 'Nome',
|
'First name': 'Nome',
|
||||||
|
'Forgot username?': 'Forgot username?',
|
||||||
'Forms and Validators': 'Forms and Validators',
|
'Forms and Validators': 'Forms and Validators',
|
||||||
'Free Applications': 'Free Applications',
|
'Free Applications': 'Free Applications',
|
||||||
'Group %(group_id)s created': 'Group %(group_id)s created',
|
'Group %(group_id)s created': 'Group %(group_id)s created',
|
||||||
@@ -115,6 +117,7 @@
|
|||||||
'Modified On': 'Modified On',
|
'Modified On': 'Modified On',
|
||||||
'My Sites': 'My Sites',
|
'My Sites': 'My Sites',
|
||||||
'Name': 'Nome',
|
'Name': 'Nome',
|
||||||
|
'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',
|
||||||
@@ -122,6 +125,7 @@
|
|||||||
'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',
|
||||||
'Online examples': 'Vedere gli esempi',
|
'Online examples': 'Vedere gli esempi',
|
||||||
'or import from csv file': 'oppure importa da file CSV',
|
'or import from csv file': 'oppure importa da file CSV',
|
||||||
'Origin': 'Origine',
|
'Origin': 'Origine',
|
||||||
@@ -153,10 +157,12 @@
|
|||||||
'Registration key': 'Chiave di Registazione',
|
'Registration key': 'Chiave di Registazione',
|
||||||
'Registration successful': 'Registration successful',
|
'Registration successful': 'Registration successful',
|
||||||
'Remember me (for 30 days)': 'Remember me (for 30 days)',
|
'Remember me (for 30 days)': 'Remember me (for 30 days)',
|
||||||
|
'Request reset password': 'Request reset password',
|
||||||
'Reset Password key': 'Resetta chiave Password ',
|
'Reset Password key': 'Resetta chiave Password ',
|
||||||
'Role': 'Ruolo',
|
'Role': 'Ruolo',
|
||||||
'Rows in Table': 'Righe nella tabella',
|
'Rows in Table': 'Righe nella tabella',
|
||||||
'Rows selected': 'Righe selezionate',
|
'Rows selected': 'Righe selezionate',
|
||||||
|
'Save profile': 'Save profile',
|
||||||
'Semantic': 'Semantic',
|
'Semantic': 'Semantic',
|
||||||
'Services': 'Services',
|
'Services': 'Services',
|
||||||
'Size of cache:': 'Size of cache:',
|
'Size of cache:': 'Size of cache:',
|
||||||
@@ -185,6 +191,9 @@
|
|||||||
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Per costruire richieste (query) più complesse si usano (...)&(...) come "e" (AND), (...)|(...) come "o" (OR), e ~(...) come negazione (NOT).',
|
'Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.': 'Per costruire richieste (query) più complesse si usano (...)&(...) come "e" (AND), (...)|(...) come "o" (OR), e ~(...) come negazione (NOT).',
|
||||||
'User %(id)s Logged-in': 'User %(id)s Logged-in',
|
'User %(id)s Logged-in': 'User %(id)s Logged-in',
|
||||||
'User %(id)s Logged-out': 'User %(id)s Logged-out',
|
'User %(id)s Logged-out': 'User %(id)s Logged-out',
|
||||||
|
'User %(id)s Password changed': 'User %(id)s Password changed',
|
||||||
|
'User %(id)s Password reset': 'User %(id)s Password reset',
|
||||||
|
'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',
|
||||||
'Verify Password': 'Verify Password',
|
'Verify Password': 'Verify Password',
|
||||||
|
|||||||
@@ -107,6 +107,7 @@ div.flash {
|
|||||||
-webkit-border-radius:5px;
|
-webkit-border-radius:5px;
|
||||||
z-index:2000;
|
z-index:2000;
|
||||||
}
|
}
|
||||||
|
div.flash:hover { opacity:0.25; }
|
||||||
|
|
||||||
div.error_wrapper {display:block}
|
div.error_wrapper {display:block}
|
||||||
div.error {
|
div.error {
|
||||||
|
|||||||
@@ -81,6 +81,8 @@ body {
|
|||||||
.ie-lte7 #navbar .auth_navbar, #navbar .auth_navbar a {color:expression(this.parentNode.currentStyle['color']); /* ie7 doesn't support inherit */}
|
.ie-lte7 #navbar .auth_navbar, #navbar .auth_navbar a {color:expression(this.parentNode.currentStyle['color']); /* ie7 doesn't support inherit */}
|
||||||
|
|
||||||
#navbar .auth_navbar a:hover {color:white;text-decoration:none;} /* this overwrite bootswatch */
|
#navbar .auth_navbar a:hover {color:white;text-decoration:none;} /* this overwrite bootswatch */
|
||||||
|
ul#navbar{padding:0;} /*reset ul padding */
|
||||||
|
ul#navbar>.auth_navbar{display:inline-block;padding:5px;} /* set padding of span.auth_navbar inside ul*/
|
||||||
|
|
||||||
body {
|
body {
|
||||||
height:auto; /*to avoid vertical scroll bar*/
|
height:auto; /*to avoid vertical scroll bar*/
|
||||||
|
|||||||
@@ -1,177 +1,178 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
|
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
|
||||||
<!--[if lt IE 7]><html class="ie ie6 ie-lte9 ie-lte8 ie-lte7 no-js" lang="{{=T.accepted_language or 'en'}}"> <![endif]-->
|
<!--[if lt IE 7]><html class="ie ie6 ie-lte9 ie-lte8 ie-lte7 no-js" lang="{{=T.accepted_language or 'en'}}"> <![endif]-->
|
||||||
<!--[if IE 7]><html class="ie ie7 ie-lte9 ie-lte8 ie-lte7 no-js" lang="{{=T.accepted_language or 'en'}}"> <![endif]-->
|
<!--[if IE 7]><html class="ie ie7 ie-lte9 ie-lte8 ie-lte7 no-js" lang="{{=T.accepted_language or 'en'}}"> <![endif]-->
|
||||||
<!--[if IE 8]><html class="ie ie8 ie-lte9 ie-lte8 no-js" lang="{{=T.accepted_language or 'en'}}"> <![endif]-->
|
<!--[if IE 8]><html class="ie ie8 ie-lte9 ie-lte8 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 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
|
||||||
(even in intranet) & Chrome Frame
|
(even in intranet) & Chrome Frame
|
||||||
Remove this if you use the .htaccess -->
|
Remove this if you use the .htaccess -->
|
||||||
<!--[if IE]>
|
<!--[if IE]>
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge{{=not request.is_local and ',chrome=1' or ''}}">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge{{=not request.is_local and ',chrome=1' or ''}}">
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
|
||||||
<title>{{=response.title or request.application}}</title>
|
<title>{{=response.title or request.application}}</title>
|
||||||
|
|
||||||
<!-- http://dev.w3.org/html5/markup/meta.name.html -->
|
<!-- http://dev.w3.org/html5/markup/meta.name.html -->
|
||||||
<meta name="application-name" content="{{=request.application}}" />
|
<meta name="application-name" content="{{=request.application}}" />
|
||||||
|
|
||||||
<!-- Speaking of Google, don't forget to set your site up:
|
<!-- Speaking of Google, don't forget to set your site up:
|
||||||
http://google.com/webmasters -->
|
http://google.com/webmasters -->
|
||||||
<meta name="google-site-verification" content="" />
|
<meta name="google-site-verification" content="" />
|
||||||
|
|
||||||
<!-- Mobile Viewport Fix
|
<!-- Mobile Viewport Fix
|
||||||
j.mp/mobileviewport & davidbcalhoun.com/2010/viewport-metatag
|
j.mp/mobileviewport & davidbcalhoun.com/2010/viewport-metatag
|
||||||
device-width: Occupy full width of the screen in its current orientation
|
device-width: Occupy full width of the screen in its current orientation
|
||||||
initial-scale = 1.0 retains dimensions instead of zooming out if page height > device height
|
initial-scale = 1.0 retains dimensions instead of zooming out if page height > device height
|
||||||
user-scalable = yes allows the user to zoom in -->
|
user-scalable = yes allows the user to zoom in -->
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
<link rel="shortcut icon" href="{{=URL('static','images/favicon.ico')}}" type="image/x-icon">
|
<link rel="shortcut icon" href="{{=URL('static','images/favicon.ico')}}" type="image/x-icon">
|
||||||
<link rel="apple-touch-icon" href="{{=URL('static','images/favicon.png')}}">
|
<link rel="apple-touch-icon" href="{{=URL('static','images/favicon.png')}}">
|
||||||
|
|
||||||
<!-- All JavaScript at the bottom, except for Modernizr which enables
|
<!-- All JavaScript at the bottom, except for Modernizr which enables
|
||||||
HTML5 elements & feature detects -->
|
HTML5 elements & feature detects -->
|
||||||
<script src="{{=URL('static','js/modernizr.custom.js')}}"></script>
|
<script src="{{=URL('static','js/modernizr.custom.js')}}"></script>
|
||||||
|
|
||||||
<!-- include stylesheets -->
|
<!-- include stylesheets -->
|
||||||
{{
|
{{
|
||||||
response.files.append(URL('static','css/bootstrap.min.css'))
|
response.files.append(URL('static','css/bootstrap.min.css'))
|
||||||
response.files.append(URL('static','css/bootstrap-responsive.min.css'))
|
response.files.append(URL('static','css/bootstrap-responsive.min.css'))
|
||||||
response.files.append(URL('static','css/web2py.css'))
|
response.files.append(URL('static','css/web2py.css'))
|
||||||
response.files.append(URL('static','css/web2py_bootstrap.css'))
|
response.files.append(URL('static','css/web2py_bootstrap.css'))
|
||||||
}}
|
}}
|
||||||
|
|
||||||
{{include 'web2py_ajax.html'}}
|
{{include 'web2py_ajax.html'}}
|
||||||
|
|
||||||
{{
|
{{
|
||||||
# using sidebars need to know what sidebar you want to use
|
# using sidebars need to know what sidebar you want to use
|
||||||
left_sidebar_enabled = globals().get('left_sidebar_enabled',False)
|
left_sidebar_enabled = globals().get('left_sidebar_enabled',False)
|
||||||
right_sidebar_enabled = globals().get('right_sidebar_enabled',False)
|
right_sidebar_enabled = globals().get('right_sidebar_enabled',False)
|
||||||
middle_columns = {0:'span12',1:'span9',2:'span6'}[
|
middle_columns = {0:'span12',1:'span9',2:'span6'}[
|
||||||
(left_sidebar_enabled and 1 or 0)+(right_sidebar_enabled and 1 or 0)]
|
(left_sidebar_enabled and 1 or 0)+(right_sidebar_enabled and 1 or 0)]
|
||||||
}}
|
}}
|
||||||
|
|
||||||
<!-- uncomment here to load jquery-ui
|
<!-- uncomment here to load jquery-ui
|
||||||
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/base/jquery-ui.css" type="text/css" media="all" />
|
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/base/jquery-ui.css" type="text/css" media="all" />
|
||||||
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js" type="text/javascript"></script>
|
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js" type="text/javascript"></script>
|
||||||
uncomment to load jquery-ui //-->
|
uncomment to load jquery-ui //-->
|
||||||
<noscript><link href="{{=URL('static', 'css/web2py_bootstrap_nojs.css')}}" rel="stylesheet" type="text/css" /></noscript>
|
<noscript><link href="{{=URL('static', 'css/web2py_bootstrap_nojs.css')}}" rel="stylesheet" type="text/css" /></noscript>
|
||||||
{{block head}}{{end}}
|
{{block head}}{{end}}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<!-- Navbar ================================================== -->
|
<!-- Navbar ================================================== -->
|
||||||
<div class="navbar navbar-fixed-top">
|
<div class="navbar navbar-fixed-top">
|
||||||
<div class="navbar-inner">
|
<div class="navbar-inner">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<!-- the next tag is necessary for bootstrap menus, do not remove -->
|
<!-- the next tag is necessary for bootstrap menus, do not remove -->
|
||||||
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
</a>
|
</a>
|
||||||
<a class="brand" href="#">web2py™ </a>
|
<a class="brand" href="#">web2py™ </a>
|
||||||
<div id="navbar">{{='auth' in globals() and auth.navbar() or ''}}</div>
|
<ul id="navbar" class="nav pull-right">{{='auth' in globals() and auth.navbar(mode="dropdown") or ''}}</ul>
|
||||||
<div class="nav-collapse">
|
<div class="nav-collapse">
|
||||||
{{is_mobile=request.user_agent().is_mobile}}
|
{{is_mobile=request.user_agent().is_mobile}}
|
||||||
{{if response.menu:}}
|
{{if response.menu:}}
|
||||||
{{=MENU(response.menu, _class='mobile-menu nav' if is_mobile else 'nav',mobile=is_mobile,li_class='dropdown',ul_class='dropdown-menu')}}
|
{{=MENU(response.menu, _class='mobile-menu nav' if is_mobile else 'nav',mobile=is_mobile,li_class='dropdown',ul_class='dropdown-menu')}}
|
||||||
{{pass}}
|
{{pass}}
|
||||||
</div><!--/.nav-collapse -->
|
</div><!--/.nav-collapse -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div><!--/top navbar -->
|
</div><!--/top navbar -->
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="flash">{{=response.flash or ''}}</div>
|
<div class="flash">{{=response.flash or ''}}</div>
|
||||||
|
|
||||||
<!-- Masthead ================================================== -->
|
<!-- Masthead ================================================== -->
|
||||||
<header class="mastheader" id="header">
|
<header class="mastheader" id="header">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1>
|
<h1>
|
||||||
{{=response.title or request.application}}
|
{{=response.title or request.application}}
|
||||||
<small>{{=response.subtitle or ''}}</small>
|
<small>{{=response.subtitle or ''}}</small>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<section id="main" class="main span12">
|
<section id="main" class="main span12">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{{if left_sidebar_enabled:}}
|
{{if left_sidebar_enabled:}}
|
||||||
<div class="span3 left-sidebar">
|
<div class="span3 left-sidebar">
|
||||||
{{block left_sidebar}}
|
{{block left_sidebar}}
|
||||||
<h3>Left Sidebar</h3>
|
<h3>Left Sidebar</h3>
|
||||||
<p></p>
|
<p></p>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
{{pass}}
|
{{pass}}
|
||||||
|
|
||||||
<div class="{{=middle_columns}}">
|
<div class="{{=middle_columns}}">
|
||||||
{{block center}}
|
{{block center}}
|
||||||
{{include}}
|
{{include}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{if right_sidebar_enabled:}}
|
{{if right_sidebar_enabled:}}
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
{{block right_sidebar}}
|
{{block right_sidebar}}
|
||||||
<h3>Right Sidebar</h3>
|
<h3>Right Sidebar</h3>
|
||||||
<p></p>
|
<p></p>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
{{pass}}
|
{{pass}}
|
||||||
</div><!--/row-->
|
</div><!--/row-->
|
||||||
</section><!--/main-->
|
</section><!--/main-->
|
||||||
|
|
||||||
<!-- Footer ================================================== -->
|
<!-- Footer ================================================== -->
|
||||||
<footer class="footer" id="footer">
|
<footer class="footer" id="footer">
|
||||||
{{block footer}} <!-- this is default footer -->
|
{{block footer}} <!-- this is default footer -->
|
||||||
<div class="footer-content">
|
<div class="footer-content">
|
||||||
<div class="copyright pull-left">{{=T('Copyright')}} © {{=request.now.year}}</div>
|
<div class="copyright pull-left">{{=T('Copyright')}} © {{=request.now.year}}</div>
|
||||||
<div id="poweredBy" class="pull-right">
|
<div id="poweredBy" class="pull-right">
|
||||||
{{=T('Powered by')}}
|
{{=T('Powered by')}}
|
||||||
<a href="http://www.web2py.com/">web2py</a>
|
<a href="http://www.web2py.com/">web2py</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
</div> <!-- /container -->
|
</div> <!-- /container -->
|
||||||
|
|
||||||
<!-- The javascript =============================================
|
<!-- The javascript =============================================
|
||||||
(Placed at the end of the document so the pages load faster) -->
|
(Placed at the end of the document so the pages load faster) -->
|
||||||
<script>
|
<script>
|
||||||
// this code improves bootstrap menus and adds dropdown support
|
// this code improves bootstrap menus and adds dropdown support
|
||||||
jQuery(function(){
|
jQuery(function(){
|
||||||
jQuery('.nav>li>a').each(function(){
|
jQuery('.nav>li>a').each(function(){
|
||||||
if(jQuery(this).parent().find('ul').length)
|
if(jQuery(this).parent().find('ul').length)
|
||||||
jQuery(this).attr({'class':'dropdown-toggle','data-toggle':'dropdown'}).append('<b class="caret"></b>');
|
jQuery(this).attr({'class':'dropdown-toggle','data-toggle':'dropdown'}).append('<b class="caret"></b>');
|
||||||
});
|
});
|
||||||
jQuery('.nav li li').each(function(){
|
jQuery('.nav li li').each(function(){
|
||||||
if(jQuery(this).find('ul').length)
|
if(jQuery(this).find('ul').length)
|
||||||
jQuery(this).children('a').contents().before('<i class="chevron-right"></i>');
|
jQuery(this).children('a').contents().before('<i class="chevron-right"></i>');
|
||||||
});
|
});
|
||||||
if(jQuery(document).width()>=980) {
|
if(jQuery(document).width()>=980) {
|
||||||
jQuery('ul.nav li.dropdown').hover(function() {
|
jQuery('ul.nav li.dropdown').hover(function() {
|
||||||
jQuery(this).find('.dropdown-menu').stop(true, true).delay(200).fadeIn();
|
jQuery(this).find('.dropdown-menu').stop(true, true).delay(200).fadeIn();
|
||||||
}, function() {
|
}, function() {
|
||||||
jQuery(this).find('.dropdown-menu').stop(true, true).delay(200).fadeOut();
|
jQuery(this).find('.dropdown-menu').stop(true, true).delay(200).fadeOut();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
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');});
|
||||||
});
|
});
|
||||||
</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 ]>
|
||||||
<script src="{{=URL('static','js/dd_belatedpng.js')}}"></script>
|
<script src="{{=URL('static','js/dd_belatedpng.js')}}"></script>
|
||||||
<script> DD_belatedPNG.fix('img, .png_bg'); //fix any <img> or .png_bg background-images </script>
|
<script> DD_belatedPNG.fix('img, .png_bg'); //fix any <img> or .png_bg background-images </script>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
{{if response.google_analytics_id:}}<script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', '{{=response.google_analytics_id}}']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> {{pass}}
|
{{if response.google_analytics_id:}}<script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', '{{=response.google_analytics_id}}']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> {{pass}}
|
||||||
<script src="{{=URL('static','js/share.js',vars=dict(static=URL('static','images')))}}"></script>
|
<script src="{{=URL('static','js/share.js',vars=dict(static=URL('static','images')))}}"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
+33
-7
@@ -1208,16 +1208,17 @@ class Auth(object):
|
|||||||
|
|
||||||
def navbar(self, prefix='Welcome', action=None,
|
def navbar(self, prefix='Welcome', action=None,
|
||||||
separators=(' [ ',' | ',' ] '), user_identifier=DEFAULT,
|
separators=(' [ ',' | ',' ] '), user_identifier=DEFAULT,
|
||||||
referrer_actions=DEFAULT):
|
referrer_actions=DEFAULT, mode='default'):
|
||||||
referrer_actions = [] if not referrer_actions else referrer_actions
|
referrer_actions = [] if not referrer_actions else referrer_actions
|
||||||
request = current.request
|
request = current.request
|
||||||
|
asdropdown = (mode == 'dropdown')
|
||||||
T = current.T
|
T = current.T
|
||||||
if isinstance(prefix, str):
|
if isinstance(prefix, str):
|
||||||
prefix = T(prefix)
|
prefix = T(prefix)
|
||||||
if prefix:
|
if prefix:
|
||||||
prefix = prefix.strip() + ' '
|
prefix = prefix.strip() + ' '
|
||||||
if not action:
|
if not action:
|
||||||
action=self.url(self.settings.function)
|
action = self.url(self.settings.function)
|
||||||
s1,s2,s3 = separators
|
s1,s2,s3 = separators
|
||||||
if URL() == action:
|
if URL() == action:
|
||||||
next = ''
|
next = ''
|
||||||
@@ -1244,11 +1245,19 @@ class Auth(object):
|
|||||||
profile = A(T('Profile'), _href=href('profile'))
|
profile = A(T('Profile'), _href=href('profile'))
|
||||||
password = A(T('Password'), _href=href('change_password'))
|
password = A(T('Password'), _href=href('change_password'))
|
||||||
bar = SPAN(prefix, user_identifier, s1, logout, s3, _class='auth_navbar')
|
bar = SPAN(prefix, user_identifier, s1, logout, s3, _class='auth_navbar')
|
||||||
|
|
||||||
|
if asdropdown:
|
||||||
|
logout = LI(A(I(_class='icon-off'), ' '+T('Logout'), _href='%s/logout?_next=%s' %
|
||||||
|
(action, urllib.quote(self.settings.logout_next)))) # the space before T('Logout') is intentional. It creates a gap between icon and text
|
||||||
|
profile = LI(A(I(_class='icon-user'), ' '+T('Profile'), _href=href('profile')))
|
||||||
|
password = LI(A(I(_class='icon-lock'), ' '+T('Password'), _href=href('change_password')))
|
||||||
|
bar = UL(logout,_class='dropdown-menu') # logout will be the last item in list
|
||||||
|
|
||||||
if not 'profile' in self.settings.actions_disabled:
|
if not 'profile' in self.settings.actions_disabled:
|
||||||
bar.insert(-1, s2)
|
if not asdropdown: bar.insert(-1, s2)
|
||||||
bar.insert(-1, profile)
|
bar.insert(-1, profile)
|
||||||
if not 'change_password' in self.settings.actions_disabled:
|
if not 'change_password' in self.settings.actions_disabled:
|
||||||
bar.insert(-1, s2)
|
if not asdropdown: bar.insert(-1, s2)
|
||||||
bar.insert(-1, password)
|
bar.insert(-1, password)
|
||||||
else:
|
else:
|
||||||
login = A(T('Login'), _href=href('login'))
|
login = A(T('Login'), _href=href('login'))
|
||||||
@@ -1259,17 +1268,34 @@ class Auth(object):
|
|||||||
T('Lost password?'), _href=href('request_reset_password'))
|
T('Lost password?'), _href=href('request_reset_password'))
|
||||||
bar = SPAN(s1, login, s3, _class='auth_navbar')
|
bar = SPAN(s1, login, s3, _class='auth_navbar')
|
||||||
|
|
||||||
|
if asdropdown:
|
||||||
|
user_identifier = ''
|
||||||
|
login = LI(A(I(_class='icon-off'), ' '+T('Login'), _href=href('login'))) #the space before T('Login') is intentional. It creates a gap between icon and text
|
||||||
|
register = LI(A(I(_class='icon-user'), ' '+T('Register'), _href=href('register')))
|
||||||
|
retrieve_username = LI(A(I(_class='icon-edit'), ' '+T('Forgot username?'), _href=href('retrieve_username')))
|
||||||
|
lost_password = LI(A(I(_class='icon-lock'), ' '+T('Lost password?'), _href=href('request_reset_password')))
|
||||||
|
bar = UL(login,_class='dropdown-menu') # login will be the last item in list
|
||||||
|
|
||||||
if not 'register' in self.settings.actions_disabled:
|
if not 'register' in self.settings.actions_disabled:
|
||||||
bar.insert(-1, s2)
|
if not asdropdown: bar.insert(-1, s2)
|
||||||
bar.insert(-1, register)
|
bar.insert(-1, register)
|
||||||
if self.settings.use_username and not 'retrieve_username' \
|
if self.settings.use_username and not 'retrieve_username' \
|
||||||
in self.settings.actions_disabled:
|
in self.settings.actions_disabled:
|
||||||
bar.insert(-1, s2)
|
if not asdropdown: bar.insert(-1, s2)
|
||||||
bar.insert(-1, retrieve_username)
|
bar.insert(-1, retrieve_username)
|
||||||
if not 'request_reset_password' \
|
if not 'request_reset_password' \
|
||||||
in self.settings.actions_disabled:
|
in self.settings.actions_disabled:
|
||||||
bar.insert(-1, s2)
|
if not asdropdown: bar.insert(-1, s2)
|
||||||
bar.insert(-1, lost_password)
|
bar.insert(-1, lost_password)
|
||||||
|
|
||||||
|
if asdropdown:
|
||||||
|
bar.insert(-1, LI('',_class='divider'))
|
||||||
|
if self.user_id:
|
||||||
|
bar = LI(A(prefix, user_identifier, _href='#'),
|
||||||
|
bar,_class='dropdown')
|
||||||
|
else:
|
||||||
|
bar = LI(A(T('Login'), _href='#'),
|
||||||
|
bar,_class='dropdown')
|
||||||
return bar
|
return bar
|
||||||
|
|
||||||
def __get_migrate(self, tablename, migrate=True):
|
def __get_migrate(self, tablename, migrate=True):
|
||||||
|
|||||||
Reference in New Issue
Block a user