fixing a mess

This commit is contained in:
mdipierro
2014-08-09 01:02:58 -05:00
parent 24c0c3d129
commit e9ed69e7a9
29 changed files with 1382 additions and 267 deletions
@@ -0,0 +1,109 @@
{{extend 'layout_b.html'}}
<div class="page-header">
<h1>Some navigation examples</h1>
</div>
<p class="lead">By using <code>bs3.menu()</code> we can build several navigation types: <code>navbars</code>, <code>tabbed navigations</code> and <code>pills navigations</code>.</p>
<div class="container">
<div class="row">
<div id="myTab" class="col-md-10 col-md-offset-1">
<h2><span class="muted-text">Navbar</span></h2>
<br>
<nav class="navbar navbar-default" role="navigation">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Brand</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
{{
nav1 = [LI(A('Link', _href='#'), _class='active'),
LI(A('Link', _href='#')),
('', False, A('Dropdown', _href='#'),[
LI(A('Action', _href="#")),
LI(A('Another action', _href="#")),
LI(A('Something else here', _href="#")),
LI(_class="divider"),
LI(A('Separated link', _href="#")),
LI(_class="divider"),
LI(A('One more separated link', _href="#"))
])
]
nav2 = [LI(A('Link', _href='#')),
('', False, A('Dropdown', _href='#'),[
LI(A('Action', _href="#")),
LI(A('Another action', _href="#")),
LI(A('Something else here', _href="#")),
LI(_class="divider"),
LI(A('Separated link', _href="#"))
])
]
=bs3.menu(menu_list=nav1)}}
<form class="navbar-form navbar-left" role="search">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search">
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
{{=bs3.menu(add_classes='pull-right',menu_list=nav2)}}
</div><!-- /.navbar-collapse -->
</nav>
</div>
</div>
<br>
<div class="row">
<div id="myTab" class="col-md-10 col-md-offset-1">
<h2><span class="muted-text">Tabs</span></h2>
<br>
{{=bs3.menu('tabs','nav-justified',test_tabs)}}
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade" id="home">
<p>Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.</p>
</div>
<div class="tab-pane fade" id="profile">
<p>Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.</p>
</div>
<div class="tab-pane fade" id="dropdown1">
<p>Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.</p>
</div>
<div class="tab-pane fade active in" id="dropdown2">
<p>Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.</p>
</div>
</div>
</div>
</div>
<br>
<div class="row">
<div class="col-md-10 col-md-offset-1">
<h2><span class="muted-text">Pills</span></h2>
<br>
{{
nav3 = [LI(A('Home', _href='#'), _class='active'),
LI(A('Help', _href='#')),
('', False, A('Dropdown', _href='#'),[
LI(A('Action', _href="#")),
LI(A('Another action', _href="#")),
LI(A('Something else here', _href="#")),
LI(_class="divider"),
LI(A('Separated link', _href="#"))
])
]
}}
<div class="row">
<div class="col-md-6">
{{=bs3.menu('pills',menu_list=nav3)}}
</div>
<div class="col-md-6">
{{=bs3.menu('pills','pull-right nav-stacked', nav3)}}
</div>
</div>
</div>
</div>
</div>
@@ -0,0 +1,18 @@
{{extend 'layout.html'}}
<h2>{{=T(request.function.replace('_',' ').capitalize())}}</h2>
<p class="lead">&nbsp;</p>
<div class="container">
<div class="row">
<div class="col-md-6">
{{=form}}
</div>
</div>
</div>
{{block page_js}}
<script>
jQuery("#web2py_user_form input:visible:enabled:first").focus();
</script>
{{end page_js}}
@@ -0,0 +1 @@
{{extend 'layout_c.html'}}
+50 -35
View File
@@ -1,35 +1,50 @@
{{left_sidebar_enabled,right_sidebar_enabled=False,('message' in globals())}}
{{extend 'layout.html'}}
{{if 'message' in globals():}}
<h3>{{=message}}</h3>
<h4>{{=T('How did you get here?')}}</h4>
<ol>
<li>{{=T('You are successfully running web2py')}}</li>
<li>{{=XML(T('You visited the url %s', A(request.env.path_info,_href=request.env.path_info)))}}</li>
<li>{{=XML(T('Which called the function %s located in the file %s',
(A(request.function+'()',_href='#'),
A('web2py/applications/%(application)s/controllers/%(controller)s.py'%request,
_href=URL('admin','default','peek', args=(request.application,'controllers',request.controller+'.py'))))))}}</li>
<li>{{=XML(T('The output of the file is a dictionary that was rendered by the view %s',
A('web2py/applications/%(application)s/views/%(controller)s/index.html'%request,
_href=URL('admin','default','peek',args=(request.application,'views',request.controller,'index.html')))))}}</li>
<li>{{=T('You can modify this application and adapt it to your needs')}}</li>
</ol>
{{elif 'content' in globals():}}
{{=content}}
{{else:}}
{{=BEAUTIFY(response._vars)}}
{{pass}}
{{block right_sidebar}}
{{=A(T("Administrative Interface"), _href=URL('admin','default','index'), _class='btn',
_style='margin-top: 1em;')}}
<h6>{{=T("Don't know what to do?")}}</h6>
<ul>
<li>{{=A(T("Online examples"), _href=URL('examples','default','index'))}}</li>
<li><a href="http://web2py.com">web2py.com</a></li>
<li><a href="http://web2py.com/book">{{=T('Documentation')}}</a></li>
</ul>
{{end}}
{{left_sidebar_enabled,right_sidebar_enabled=False,('message' in globals())}}
{{extend 'layout.html'}}
{{block head}}
<style>
#w2padmin-btn {margin:30px 0 30px 0;}
</style>
{{end head}}
{{if 'message' in globals():}}
<h2>{{=message}}</h2>
<p class="lead">{{=T('How did you get here?')}}</p>
<ol>
<li>{{=T('You are successfully running web2py')}}</li>
<li>{{=XML(T('You visited the url %s', A(request.env.path_info,_href=request.env.path_info)))}}</li>
<li>{{=XML(T('Which called the function %s located in the file %s',
(A(request.function+'()',_href='#'),
A('web2py/applications/%(application)s/controllers/%(controller)s.py'%request,
_href=URL('admin','default','peek', args=(request.application,'controllers',request.controller+'.py'))))))}}</li>
<li>{{=XML(T('The output of the file is a dictionary that was rendered by the view %s',
A('web2py/applications/%(application)s/views/%(controller)s/index.html'%request,
_href=URL('admin','default','peek',args=(request.application,'views',request.controller,'index.html')))))}}</li>
<li>{{=T('You can modify this application and adapt it to your needs')}}</li>
</ol>
{{elif 'content' in globals():}}
{{=content}}
{{else:}}
{{=BEAUTIFY(response._vars)}}
{{pass}}
{{block right_sidebar}}
<button id="w2padmin-btn" class="btn btn-primary btn-lg btn-block">
<i class="glyphicon glyphicon-cog"></i> {{=T("Administrative Interface")}}</button>
<div class="panel panel-info">
<div class="panel-heading">{{=T("Don't know what to do?")}}</div>
<ul class="list-group">
<li class="list-group-item">{{=A(T("Online examples"), _href=URL('examples','default','index'))}}</li>
<li class="list-group-item"><a href="http://web2py.com">web2py.com</a></li>
<li class="list-group-item"><a href="http://web2py.com/book">{{=T('Documentation')}}</a></li>
</ul>
</div>
{{end}}
{{block page_js}}
<script>
$('#w2padmin-btn').click(function() {
window.location = "{{=URL('admin','default','index')}}";
});
</script>
{{end}}
@@ -0,0 +1,6 @@
{{bs3_table = SQLTABLE(records, _class='table table-striped table-bordered table-hover table-condensed')}}
{{extend 'layout.html'}}
<div class="table-responsive">
{{=bs3_table}}
</div>
+25 -16
View File
@@ -1,25 +1,34 @@
{{extend 'layout.html'}}
<h2>{{=T( request.args(0).replace('_',' ').capitalize() )}}</h2>
<div id="web2py_user_form">
{{
if request.args(0)=='login' and not session.auth_2_factor_user:
if not 'register' in auth.settings.actions_disabled:
form.add_button(T('Register'),URL(args='register', vars={'_next': request.vars._next} if request.vars._next else None),_class='btn')
pass
if not 'request_reset_password' in auth.settings.actions_disabled:
form.add_button(T('Lost Password'),URL(args='request_reset_password'),_class='btn')
pass
pass
=form
}}
<div class="container">
<div class="row">
<div id="web2py_user_form" class="col-lg-6">
{{
if request.args(0)=='login':
if not 'register' in auth.settings.actions_disabled:
form.add_button(T('Register'),URL(args='register', vars={'_next': request.vars._next} if request.vars._next else None),_class='btn btn-default')
pass
if not 'request_reset_password' in auth.settings.actions_disabled:
form.add_button(T('Lost Password'),URL(args='request_reset_password'),_class='btn btn-default')
pass
pass
=form
}}
</div>
</div>
</div>
<script language="javascript"><!--
jQuery("#web2py_user_form input:visible:enabled:first").focus();
{{block page_js}}
<script>
jQuery("#web2py_user_form input:visible:enabled:first").focus();
{{if request.args(0)=='register':}}
web2py_validate_entropy(jQuery('#auth_user_password'),100);
{{elif request.args(0) in ('change_password','reset_password'):}}
{{elif request.args(0)=='change_password':}}
web2py_validate_entropy(jQuery('#no_table_new_password'),100);
{{pass}}
//--></script>
</script>
{{end page_js}}