event_templates.xml 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <!-- Add a shortcut to favorites / tracks after registration -->
  4. <template id="registration_complete" inherit_id="website_event.registration_complete">
  5. <xpath expr="//div[hasclass('row')][last()]" position="after">
  6. <div t-if="event.website_track" class="row mt-5 mb256">
  7. <div class="col-12">
  8. <h3>Book your seats to the best talks</h3>
  9. <p>Get prepared and
  10. <a t-att-href="'/event/%s/track' % (slug(event))">register to your favorites talks now.</a>
  11. </p>
  12. </div>
  13. </div>
  14. </xpath>
  15. </template>
  16. <template id="layout" inherit_id="website_event.layout">
  17. <xpath expr='//t[@t-call="website.layout"]' position="inside">
  18. <t t-set="pageName" t-value="'event'"/>
  19. <t t-set="head">
  20. <t t-out="head"/>
  21. <t t-call="website_event_track.pwa_manifest"/>
  22. </t>
  23. </xpath>
  24. </template>
  25. <template id="index" inherit_id="website_event.index">
  26. <xpath expr='//t[@t-call="website.layout"]' position="inside">
  27. <t t-set="pageName" t-value="'event'"/>
  28. <t t-set="head">
  29. <t t-out="head"/>
  30. <t t-call="website_event_track.pwa_manifest"/>
  31. </t>
  32. </xpath>
  33. </template>
  34. <template id="pwa_manifest">
  35. <link rel="manifest" href="/event/manifest.webmanifest" crossorigin="use-credentials"/>
  36. <link rel="apple-touch-icon" t-att-href="website.image_url(website, 'app_icon', size='192x192')"/>
  37. <meta name="theme-color" content="#875A7B"/>
  38. </template>
  39. <template id="pwa_offline" inherit_id="website_event.index" primary="True">
  40. <xpath expr='//div[@id="wrap"]' position="replace">
  41. <div id="wrap" class="o_wevent_index">
  42. <div class="container">
  43. <div class="row">
  44. <div class="col-12 card-body">
  45. <div class="h2 mb-3">You're offline!</div>
  46. <div class="alert alert-info text-center">
  47. <span class="fa-stack fa-4x">
  48. <i class="fa fa-wifi fa-stack-1x"></i>
  49. <i class="fa fa-ban fa-stack-2x text-muted"></i>
  50. </span>
  51. <p>This page hasn't been saved for offline reading yet.<br/>Please check your network connection.</p>
  52. <p>
  53. <a t-att-href="url_for('/event')" class="btn btn-primary btn-block">Home page</a>
  54. <button onclick="history.back();" class="btn btn-secondary btn-block">Previous page</button>
  55. </p>
  56. </div>
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. <script type="text/javascript">
  62. window.addEventListener('online', function(e) {
  63. console.log('Go back online');
  64. location.reload();
  65. });
  66. </script>
  67. </xpath>
  68. </template>
  69. </odoo>