def index(): """ example action using the internationalization operator T and flash rendered by views/default/index.html or views/generic.html
if you need a simple wiki simple replace the two lines below with: return auth.wiki() """ if auth.user: response.flash = T('Welcome %s %s' % (auth.user.first_name, auth.user.last_name)) else: response.flash = T('Welcome Visitor') news = db(db.posts).select(orderby=~db.posts.id, limitby=(0, 3)) return dict(news=news){{for post in news:}}<div id="carousel-example-generic" class="carousel slide"> <ol class="carousel-indicators"> <li data-target="#carousel-example-captions" data-slide-to="0" class=""></li> <li data-target="#carousel-example-captions" data-slide-to="1" class=""></li> <li data-target="#carousel-example-captions" data-slide-to="2" class=""></li> </ol>
<div class="carousel-inner"> <div class="item active"> <img data-src="holder.js/900x500/auto/#777:#777" alt="900x500" src="http://payload.cargocollective.com/1/0/221/2318/08-Poster-2_900.jpg"> <div class="carousel-caption"> <h3><a href="{{=URL(a='hugo', c='default', f='show', args=[post.id])}}" title="{{=post.title}}">{{=post.title}}</h3> <p class="text-center">{{=XML(markdown(post.post))}}</p> <p class="text-right">{{=post.created_on}}</p> </div> </div> </div> <!-- Controls --> <a class="left carousel-control" href="#carousel-example-generic" data-slide="prev"> <span class="glyphicon glyphicon-chevron-left"></span> </a> <a class="right carousel-control" href="#carousel-example-generic" data-slide="next"> <span class="glyphicon glyphicon-chevron-right"></span> </a></div>{{pass}}--
---
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 web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
<div id="carousel-example-generic" class="carousel slide">
<ol class="carousel-indicators"> <li data-target="#carousel-example-captions" data-slide-to="0" class="active"></li> <li data-target="#carousel-example-captions" data-slide-to="1"></li> <li data-target="#carousel-example-captions" data-slide-to="2"></li> </ol> <div class="carousel-inner"> {{for post in news:}} {{if index==0:}} <div class="active item"><img src="{{=URL('static','images/carousel/%s' %(post.image))}}" alt="banner1" /> <h3>{{=post.title}}</h3> <p class="text-center">{{=post.post}}</p> <p class="text-right">{{=post.created_on}}</p> </div> {{else}} <div class="item"><img src="{{=URL('static','images/carousel/%s' %(post.image))}}" alt="banner2" /></div> {{pass}} {{pass}} </div> <a class="cglyphicon glyphicon-chevron-left" href="#carousel-example-generic" data-slide="prev">‹</a> <a class="glyphicon glyphicon-chevron-right" href="#carousel-example-generic" data-slide="next">›</a> </div></div>
<div id="carousel-example-generic" class="carousel slide"> <ol class="carousel-indicators"> <li data-target="#carousel-example-captions" data-slide-to="0" class="active"></li> <li data-target="#carousel-example-captions" data-slide-to="1"></li> <li data-target="#carousel-example-captions" data-slide-to="2"></li> </ol> <div class="carousel-inner"> {{for index, post in enumerate(news):}}
{{if index==0:}} <div class="active item"><img src="{{=URL('static','images/carousel/%s' %(post.image))}}" alt="banner1" /> <h3>{{=post.title}}</h3> <p class="text-center">{{=post.post}}</p> <p class="text-right">{{=post.created_on}}</p> </div> {{pass}}
{{else:}} <div class="item"><img src="{{=URL('static','images/carousel/%s' %(post.image))}}" alt="banner2" /> <h3>{{=post.title}}</h3> <p class="text-center">{{=post.post}}</p> <p class="text-right">{{=post.created_on}}</p> </div> {{pass}} {{pass}} </div> <a class="glyphicon glyphicon-chevron-left" href="#carousel-example-generic" data-slide="prev">‹</a> <a class="glyphicon glyphicon-chevron-right" href="#carousel-example-generic" data-slide="next">›</a> </div></div>carousel-inner"?<div class="carousel-inner">
<div class="active item"><img src="/diogo/static/images/carousel/carousel3.jpg" alt="banner1"> <h3>Azeite Vinaldo</h3> <p class="text-center">Guache sobre Tela, 75x30 cm.</p> <p class="text-right">2013-08-07 18:03:38.774240</p> </div> <div class="item"><img src="/diogo/static/images/carousel/carousel1.jpg" alt="banner2"> <h3>Bezegaio Frito</h3> <p class="text-center">Acrilico sobre Tela, 45x40 cm</p> <p class="text-right">2013-08-07 17:52:27.399172</p> </div> </div>