Hello
I am trying to create a view where I have tabs and each tab has its own
view.
All tabs are included into main view. lets call it settings.
In settings there are tabs for user to insert workers into tables, posts,
etc etc. all the (un)necessary stuff.
For each I would like to use SQLFORM.grid. It already works for inserting
workers, but how to add new ones??
I guess in controller I have to create function for each table (form.grid)
and for each I have to create new view (html)??
And what function to create for main view? - Basically it should show data
for workers but this way all I get is workers SQLform.grid
Is this it even possible.
Any guideliness would be nice
Thank you
some code
main view
<ul class="nav nav-tabs">
<li class="active"><a href="#zaposleni"
data-toggle="tab">{{=T('Delavci')}}</a></li>
<li><a href="#turnusi" data-toggle="tab">{{=T('Turnusi')}}</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="visual">
{{include '../views/settings/workers.html'}}
</div>
<div class="tab-pane" id="turnusi">
{{include '../views/settings/turnusi.html'}}
</div>
</div>
<div>
<div class="col-md-2">
<div id="navVisual" data-spy="affix" data-offset-top="60">
<ul class="nav nav-pills nav-stacked" style="margin-top: 10px;">
<li><a href="#SifrantDelavcev">{{=T('Delavci')}}</a></li>
<li><a href="#unkn">{{=T('Turnusi')}}</a></li>
</ul>
</div>
</div>
</div>
My view for workers
<div class="row" >
<div id="mainContainer" class="col-md-10">
<h4><b>{{=T('Šifrant delavcev')}}</b></h4>
<div class="flash">{{=response.flash}}</div>
<div id="SifrantDelavcev" class="well well-sm">
{{=grid}}
</div>
</div>
</div
my view for turnusi
<div class="row" >
<div id="mainContainer" class="col-md-10">
<h4><b>{{=T('Šifrant turnusov')}}</b></h4>
<div class="flash">{{=response.flash}}</div>
{{=grid}}
</div>
</div>
and for both i have fucntions in controller
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.