s_latest_posts.xml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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-as="p" t-foreach="posts">
  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 aria-label="Close" class="close" data-dismiss="alert" type="button">
  40. <span aria-hidden="true">×</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-as="p" t-foreach="posts">
  60. <figure class="loading_container col-sm-6 ">
  61. <div class="content">
  62. <div class="thumb imagen_blog" t-att-style="'background-image: url(%s)' % p.background_image"/>
  63. <figcaption>
  64. <a t-att-href="'/blog/%s/post/%s' % (p.blog_id.id, p.id)"><p class="hidden">Ver Más</p></a>
  65. </figcaption>
  66. <a t-att-href="'/blog/%s/post/%s' % (p.blog_id.id, p.id)">
  67. <h2 class="blog_big_pname" t-field="p.name"/>
  68. </a>
  69. <p class="text-center textoautor">
  70. <strong>
  71. <span t-field="p.author_id"/>
  72. <span t-field="p.create_date" t-field-options="{&quot;format&quot;: &quot;dd MMMM yyyy&quot;}"/>
  73. </strong>
  74. </p>
  75. </div>
  76. </figure>
  77. </t>
  78. </template>
  79. </data>
  80. </openerp>