s_latest_posts.xml 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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 col-md-12">
  22. <div class="media-body col-md-6">
  23. <h4 class="media-heading" t-field="p.name"/>
  24. <p t-field="p.subtitle"/>
  25. <div class="letrablog" id="blogletra" t-field="p.content"/>
  26. <a class="btn btn-default" t-att-href="'/blog/%s/post/%s' % (p.blog_id.id, p.id)">Ver todosMás </a>
  27. </div>
  28. <div class="pull-left col-md-6">
  29. <a t-att-href="'/blog/%s/post/%s' % (p.blog_id.id, p.id)">
  30. <div class="media-object loading_container thumb" t-att-style="'background-image: url(%s)' % p.background_image"/>
  31. </a>
  32. </div>
  33. </div>
  34. </t>
  35. </template>
  36. <!-- No post here, template -->
  37. <template id="no_blog_posts">
  38. <div class="container readable">
  39. <div class="alert alert-warning alert-dismissible text-center" role="alert">
  40. <button aria-label="Close" class="close" data-dismiss="alert" type="button">
  41. <span aria-hidden="true">×</span>
  42. </button>
  43. <h3>NO hay publicaciones aqui...</h3>
  44. <p>Asegurate que tus publicaciones esten publicadas</p>
  45. </div>
  46. </div>
  47. </template>
  48. <!-- ======== LATEST POSTS BIG PICTURES ======== -->
  49. <!-- Snippet's Body -->
  50. <template id="s_latest_posts_big_picture" name="Latest Posts Big Images">
  51. <section class="s_latest_posts_big_picture">
  52. <h2 class="text-center sans-serif">Ultimas publicaciones</h2>
  53. <div class="js_get_posts" data-loading="true" data-template="snippet_latest_posts.s_latest_posts_big_picture_template"/>
  54. </section>
  55. </template>
  56. <template id="s_latest_posts_big_picture_template">
  57. <t t-if="not posts">
  58. <t t-call="snippet_latest_posts.no_blog_posts"/>
  59. </t>
  60. <t t-as="p" t-foreach="posts">
  61. <figure class="loading_container col-sm-6 ">
  62. <div class="content">
  63. <a t-att-href="'/blog/%s/post/%s' % (p.blog_id.id, p.id)">
  64. <h2 class="blog_big_pname pull-left" t-field="p.name"/>
  65. </a>
  66. <p class="pull-left textoautor">
  67. <strong>Por <span t-field="p.author_id"/>
  68. el<span t-field="p.create_date" t-field-options="{&quot;format&quot;: &quot;dd 'de' MMMM 'de' yyyy&quot;}"/></strong>
  69. <br/>
  70. <span>En
  71. <span class="fa fa-folder-open"/>
  72. <a t-att-href="'/blog/%s' % (p.blog_id.id)">
  73. <span t-field="p.blog_id"/></a>
  74. </span>
  75. <a class="btn-info btn-sm vermasblog " t-att-href="'/blog/%s/post/%s' % (p.blog_id.id, p.id)">
  76. <i aria-hidden="true" class="fa fa-eye"/>Ver Más</a>
  77. </p>
  78. <br/>
  79. <p class="textoautor pull-left"/>
  80. <a class="imagen_grande_blog" t-att-href="'/blog/%s/post/%s' % (p.blog_id.id, p.id)">
  81. <div class="thumb imagen_blog shadow" t-att-style="'background-image: url(%s)' % p.background_image"/>
  82. </a>
  83. <figcaption>
  84. <a t-att-href="'/blog/%s/post/%s' % (p.blog_id.id, p.id)">
  85. <p class="hidden">Ver Más</p>
  86. </a>
  87. </figcaption>
  88. </div>
  89. </figure>
  90. </t>
  91. </template>
  92. </data>
  93. </openerp>