event_snippets.xml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <!-- Snippets and options -->
  4. <template id="snippets" inherit_id="website.snippets">
  5. <xpath expr="//t[@id='event_speaker_bio_hook']" position="replace">
  6. <t t-snippet="website_event.s_speaker_bio" string="Speaker Bio" t-thumbnail="/website_event/static/src/img/snippets_thumbs/s_speaker_bio.svg"/>
  7. </xpath>
  8. </template>
  9. <template id="snippet_options" inherit_id="website.snippet_options">
  10. <xpath expr="//*[@t-set='so_content_addition_selector']" position="inside">, .s_speaker_bio</xpath>
  11. </template>
  12. <template id="event_searchbar_input_snippet_options" inherit_id="website.searchbar_input_snippet_options" name="event search bar snippet options">
  13. <xpath expr="//div[@data-js='SearchBar']/we-select[@data-name='scope_opt']" position="inside">
  14. <we-button data-set-search-type="events" data-select-data-attribute="events" data-name="search_events_opt" data-form-action="/events">Events</we-button>
  15. </xpath>
  16. <xpath expr="//div[@data-js='SearchBar']/we-select[@data-name='order_opt']" position="inside">
  17. <we-button data-set-order-by="date_begin asc" data-select-data-attribute="date_begin asc" data-dependencies="search_events_opt" data-name="order_date_begin_asc_opt">Date (old to new)</we-button>
  18. <we-button data-set-order-by="date_end desc" data-select-data-attribute="date_end desc" data-dependencies="search_events_opt" data-name="order_date_end_desc_opt">Date (new to old)</we-button>
  19. </xpath>
  20. <xpath expr="//div[@data-js='SearchBar']/div[@data-dependencies='limit_opt']" position="inside">
  21. <we-checkbox string="Description" data-dependencies="search_events_opt" data-select-data-attribute="true" data-attribute-name="displayDescription"
  22. data-apply-to=".search-query"/>
  23. <we-checkbox string="Event Date" data-dependencies="search_events_opt" data-select-data-attribute="true" data-attribute-name="displayDetail"
  24. data-apply-to=".search-query"/>
  25. </xpath>
  26. </template>
  27. <!-- Snippet - Speaker Bio -->
  28. <template id="s_speaker_bio" name="Speaker Bio">
  29. <div class="s_speaker_bio" itemscope="itemscope" itemtype="http://schema.org/Person" itemprop="performer">
  30. <span class="badge text-bg-secondary text-uppercase o_wevent_badge">Speaker</span>
  31. <img src="/website_event/static/src/img/speaker.png" width="70" class="img-fluid rounded-circle float-start me-3" alt=""/>
  32. <div class="overflow-hidden">
  33. <h4 class="mt-3 mb-1" itemprop="name">John DOE</h4>
  34. <h6 class="mb-4">Company</h6>
  35. <p>At just 13 years old, John DOE was already starting to develop his first business applications for customers. After mastering civil engineering, he founded TinyERP. This was the first phase of OpenERP which would later became Odoo, the most installed open-source business software worldwide.</p>
  36. </div>
  37. </div>
  38. </template>
  39. </odoo>