s_latest_posts.xml 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <openerp>
  3. <data>
  4. <!-- ======== LATEST POSTS ======== -->
  5. <!-- Snippet's Body -->
  6. <template id="s_latest_posts" name="Latest Posts List">
  7. <section class="s_latest_posts">
  8. <div class="container">
  9. <h2 class="text-center">Ultimas Publicaciones</h2>
  10. <div class="js_get_posts" data-loading="true" data-template="snippet_latest_posts.media_list_template" />
  11. <hr/>
  12. </div>
  13. </section>
  14. </template>
  15. <!-- Latest posts's Template -->
  16. <template id="media_list_template">
  17. <t t-if="not posts">
  18. <t t-call="snippet_latest_posts.no_blog_posts"/>
  19. </t>
  20. <t t-foreach="posts" t-as="p">
  21. <div class="post media media_list_template">
  22. <div class="pull-left">
  23. <a t-att-href="'/blog/%s/post/%s' % (p.blog_id.id, p.id)">
  24. <div class="media-object loading_container thumb" t-att-style="'background-image: url(%s)' % p.background_image"/>
  25. </a>
  26. </div>
  27. <div class="media-body">
  28. <h4 class="media-heading" t-field="p.name"/>
  29. <p t-field="p.subtitle"/>
  30. <a class="btn btn-default" t-att-href="'/blog/%s/post/%s' % (p.blog_id.id, p.id)">Ver Más</a>
  31. </div>
  32. </div>
  33. </t>
  34. </template>
  35. <!-- No post here, template -->
  36. <template id="no_blog_posts">
  37. <div class="container readable">
  38. <div class="alert alert-warning alert-dismissible text-center" role="alert">
  39. <button type="button" class="close" data-dismiss="alert" aria-label="Close">
  40. <span aria-hidden="true">&#215;</span>
  41. </button>
  42. <h3>NO hay publicaciones aqui...</h3>
  43. <p>Asegurate que tus publicaciones esten publicadas</p>
  44. </div>
  45. </div>
  46. </template>
  47. <!-- ======== LATEST POSTS BIG PICTURES ======== -->
  48. <!-- Snippet's Body -->
  49. <template id="s_latest_posts_big_picture" name="Latest Posts Big Images">
  50. <section class="s_latest_posts_big_picture">
  51. <h2 class="text-center sans-serif">Ultimas publicaciones</h2>
  52. <div class="js_get_posts" data-loading="true" data-template="snippet_latest_posts.s_latest_posts_big_picture_template" />
  53. </section>
  54. </template>
  55. <template id="s_latest_posts_big_picture_template">
  56. <t t-if="not posts">
  57. <t t-call="snippet_latest_posts.no_blog_posts"/>
  58. </t>
  59. <t t-foreach="posts" t-as="p">
  60. <figure class="loading_container col-sm-6">
  61. <div class="content">
  62. <div class="thumb" t-att-style="'background-image: url(%s)' % p.background_image" />
  63. <figcaption>
  64. <h2 t-field="p.name" />
  65. <p t-field="p.subtitle"/>
  66. <a t-att-href="'/blog/%s/post/%s' % (p.blog_id.id, p.id)">Ver Más</a>
  67. </figcaption>
  68. </div>
  69. </figure>
  70. </t>
  71. </template>
  72. </data>
  73. </openerp>