event_track_templates_page.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <template id="event_track_main" name="Event Exhibitor">
  4. <t t-call="website_event.layout">
  5. <div class="o_wevent_online o_wesession_index">
  6. <!-- Options -->
  7. <t t-set="option_widescreen" t-value="option_widescreen or False"/>
  8. <t t-set="option_track_wishlist" t-value="not event.is_done and is_view_active('website_event_track.session_topbar_wishlist')"/>
  9. <!-- Drag/Drop Area -->
  10. <div id="oe_structure_wesession_track_index_1" class="oe_structure"/>
  11. <!-- Content -->
  12. <div t-att-class="'o_wevent_online_page_container %s' % ('container pb-3' if not option_widescreen else 'pb-3')">
  13. <div t-att-class="'row mb-5 mx-0 %s' % ('justify-content-center' if not tracks_other else '')">
  14. <t t-if="tracks_other">
  15. <t t-call="website_event_track.event_track_aside"/>
  16. </t>
  17. <t t-call="website_event_track.event_track_content"/>
  18. </div>
  19. </div>
  20. <!-- Drag/Drop Area -->
  21. <div id="oe_structure_wesession_track_index_2" class="oe_structure"/>
  22. </div>
  23. </t>
  24. </template>
  25. <!-- ============================================================ -->
  26. <!-- CONTENT: MAIN TEMPLATES -->
  27. <!-- ============================================================ -->
  28. <template id="event_track_content_partner_info">
  29. <div class="mb-1 align-items-baseline text-break" t-if="track.partner_function">
  30. <i class="fa fa-briefcase me-2"/><span t-out="track.partner_function"/>
  31. <t t-if="track.partner_company_name">
  32. <span> at </span><span t-out="track.partner_company_name"/>
  33. </t>
  34. </div>
  35. <div class="mb-1 align-items-baseline text-break" t-if="track.partner_id.website">
  36. <i class="fa fa-home me-2"/><a t-att-href="track.partner_id.website"><span t-field="track.partner_id.website"/></a>
  37. </div>
  38. <div class="mb-1 align-items-baseline text-break" t-if="track.partner_email">
  39. <i class="fa fa-envelope me-2"/><a t-att-mailto="track.partner_email"><span t-field="track.partner_email"/></a>
  40. </div>
  41. <div class="mb-1 align-items-baseline text-break" t-if="track.partner_phone">
  42. <i class="fa fa-phone me-2"/><span t-field="track.partner_phone"/>
  43. </div>
  44. </template>
  45. <template id="event_track_content" name="Track: Main Description">
  46. <div name="o_wesession_track_main"
  47. t-att-class="'col-12 o_wesession_track_main o_wevent_theme_bg_base border mt-3 p-0 %s' % ('col-md-9 col-lg-10' if option_widescreen else 'col-md-8 col-lg-9')">
  48. <!-- LIVE INFORMATIONS -->
  49. <div t-if="not track.event_id.is_ongoing and track.event_id.start_remaining" class="pt-3">
  50. <div class="mx-3 alert alert-warning">
  51. Event <span t-out="track.event_id.name" class="fw-bold"/>
  52. <span t-if="track.event_id.start_today">
  53. starts in
  54. <span t-if="track.event_id.start_remaining &gt;= 1" t-out="track.event_id.start_remaining"
  55. t-options="{'widget': 'duration', 'digital': False, 'unit': 'minute', 'round': 'minute'}"/>
  56. <t t-else="">
  57. a few seconds
  58. </t>.
  59. </span>
  60. <span t-else="">
  61. starts on
  62. <span t-field="track.event_id.with_context(tz=track.event_id.date_tz).date_begin"
  63. t-options="{'format': 'medium', 'tz_name': track.event_id.date_tz, 'hide_seconds': 'True'}"/>
  64. (<span t-out="track.event_id.date_tz"/>)
  65. </span>
  66. </div>
  67. </div>
  68. <div t-elif="track.track_start_remaining">
  69. <t t-call="website_event.display_timer_alert_widget">
  70. <t t-set="time_to_live" t-value="track.track_start_remaining"/>
  71. </t>
  72. </div>
  73. <!-- TRACK DESCRIPTION -->
  74. <div class="o_wesession_track_main_description overflow-auto">
  75. <div class="mx-3 pt-3 mb-3 d-flex justify-content-between flex-column flex-md-row">
  76. <div class="d-flex flex-column">
  77. <span class="h4 mb-0" t-out="track.name"/>
  78. <div>
  79. <t t-foreach="track.tag_ids" t-as="tag">
  80. <span t-if="tag.color"
  81. t-att-class="'badge o_tag_color_hovered_%s' % (tag.color)"
  82. t-out="tag.name"/>
  83. </t>
  84. </div>
  85. </div>
  86. <div class="o_we_track_action_buttons d-flex justify-content-md-end align-items-center flex-wrap">
  87. <div class="o_we_track_reminder_button my-1">
  88. <div t-if="option_track_wishlist and not track.is_track_done"
  89. t-call="website_event_track.track_widget_reminder">
  90. <t t-set="reminder_small" t-value="False"/>
  91. <t t-set="reminder_light" t-value="False"/>
  92. </div>
  93. </div>
  94. </div>
  95. </div>
  96. <div class="mx-3 text-muted">
  97. <t t-if="track.location_id">
  98. <strong>Location:</strong> <span t-field="track.location_id"/>
  99. <span> - </span>
  100. </t>
  101. <t t-if="track.date">
  102. <span t-field="track.date"
  103. t-options='{"hide_seconds":"True", "format": "short", "tz_name": event.date_tz}'/>
  104. -
  105. <span t-field="track.date_end"
  106. t-options='{"hide_seconds":"True", "format": "short", "tz_name": event.date_tz}'/>
  107. <t t-if="event.date_tz">
  108. (<span t-out="event.date_tz"/>)
  109. </t>
  110. </t>
  111. <t t-if="track.duration">
  112. (<span t-field="track.duration"
  113. t-options='{"widget": "duration", "unit": "hour", "round": "minute"}'/>)
  114. </t>
  115. </div>
  116. <hr class="mt-2 mb-0"/>
  117. <!-- ABOUT AUTHOR -->
  118. <t t-set="track_fields" t-value="['image', 'partner_name', 'partner_function', 'partner_email', 'partner_phone']"/>
  119. <!-- Avoid rendering a section for track information if we don't have anything to display -->
  120. <t t-if="any(track[track_field] for track_field in track_fields) or track.partner_id.website or not is_html_empty(track.partner_biography)">
  121. <div class="mx-3">
  122. <div class="mt-2 mb-2 d-flex">
  123. <div t-if="track.image" t-field="track.image"
  124. t-options="{'widget': 'image', 'class': 'rounded-circle me-2', 'max_width': '96'}"/>
  125. <div class="ps-2 pe-0 pe-md-2 d-flex flex-grow-1 flex-column">
  126. <div t-if="track.partner_name" t-field="track.partner_name" class="fw-bold mb-2"/>
  127. <div class="d-none d-lg-block">
  128. <t t-call="website_event_track.event_track_content_partner_info"/>
  129. </div>
  130. </div>
  131. </div>
  132. <div class="d-block d-lg-none mt-3 mb-3">
  133. <t t-call="website_event_track.event_track_content_partner_info"/>
  134. </div>
  135. <div t-if="not is_html_empty(track.partner_biography)" t-field="track.partner_biography"
  136. class="oe_no_empty"/>
  137. <hr t-if="not is_html_empty(track.description)" class="mt-2 pb-1 mb-1"/>
  138. </div>
  139. </t>
  140. <!-- Description -->
  141. <div t-if="not is_html_empty(track.description)" t-field="track.description" class="my-2 mx-3 oe_no_empty"/>
  142. <t t-elif="env.user.has_group('event.group_event_user')">
  143. <div t-field="track.description" class="my-2 mx-3"
  144. placeholder="e.g. &quot;This talk will be about...&quot;"/>
  145. <div class="alert alert-info mx-3 mt-3 o_wesession_track_main_empty_descr_warning">
  146. This track does not have a description.
  147. <a t-attf-href="?{{ keep_query('*', enable_editor=1) }}">
  148. <i class="fa fa-fw fa-arrow-right"></i>
  149. Write one.
  150. </a>
  151. </div>
  152. </t>
  153. </div>
  154. </div>
  155. </template>
  156. <!-- ============================================================ -->
  157. <!-- ASIDE: CONTROL PANEL -->
  158. <!-- ============================================================ -->
  159. <template id="event_track_aside" name="Track: Aside">
  160. <div t-att-class="'col-12 ps-0 pe-0 mt-3 border o_wevent_online_page_aside o_wesession_track_aside %s' % ('col-md-3 col-lg-2' if option_widescreen else 'col-md-4 col-lg-3')">
  161. <div class="o_wevent_theme_bg_base o_wevent_online_page_aside_content">
  162. <div class="mx-2" t-if="track.date and track.website_cta">
  163. <t t-set="cta_coundown" t-value="bool(track.website_cta_start_remaining)"/>
  164. <div t-if="cta_coundown" class="text-center w-100 btn btn-primary d-none">
  165. <t t-call="website_event.display_timer_widget">
  166. <t t-set="pre_remaining_time" t-value="int(track.track_start_remaining)"/>
  167. <!--<t t-set="pre_countdown_text" t-value="'Talk starts in'"/>-->
  168. <t t-set="pre_countdown_display" t-value="bool(False)"/>
  169. <t t-set="main_remaining_time" t-value="int(track.website_cta_start_remaining)"/>
  170. <!--<t t-set="main_countdown_text" t-value="'Magic happens in'"/>-->
  171. <t t-set="main_countdown_display" t-value="bool(False)"/>
  172. <t t-set="display_class" t-value="'.o_event_cta_action'"/>
  173. </t>
  174. </div>
  175. <div t-att-class="'o_event_cta_action %s' % ('d-none' if cta_coundown else '')">
  176. <a t-att-href="track.website_cta_url"
  177. target="_blank"
  178. class="btn btn-primary w-100 my-3">
  179. <span t-out="track.website_cta_title"/>
  180. </a>
  181. </div>
  182. </div>
  183. <div class="d-flex align-items-center justify-content-between my-2 me-2">
  184. <ul class="nav nav-tabs o_wesession_track_aside_nav d-flex border-0" role="tablist">
  185. <li class="nav-item flex-grow-1">
  186. <a href="#track_list" aria-controls="track_list" class="nav-link active" role="tab" data-bs-toggle="tab">
  187. Talks
  188. </a>
  189. </li>
  190. </ul>
  191. <a href="#collapse_track_aside" data-bs-toggle="collapse" class="d-md-none p-2 text-decoration-none o_wevent_online_page_aside_collapse collapsed">
  192. <i class="fa fa-chevron-down d-md-none"/>
  193. </a>
  194. </div>
  195. <div id="collapse_track_aside"
  196. class="tab-content collapse d-md-block o_wesession_track_aside_tabs">
  197. <div class="tab-pane fade show active" id="track_list" role="tabpanel">
  198. <ul class="list-unstyled mb-0">
  199. <li t-foreach="tracks_other" t-as="track_other" class="w-100">
  200. <a t-if="is_event_user or track_other.is_published"
  201. t-att-data-publish="track_other.website_published and 'on' or 'off'"
  202. class="d-block w-100 h-100 px-2 pt-2 pb-1 text-decoration-none"
  203. t-att-href="track_other.website_url">
  204. <t t-call="website_event_track.event_track_aside_other_track"/>
  205. </a>
  206. <div t-else="" class="text-muted px-2 pt-2 pb-1">
  207. <div t-att-data-publish="track_other.website_published and 'on' or 'off'">
  208. <t t-call="website_event_track.event_track_aside_other_track"/>
  209. </div>
  210. </div>
  211. </li>
  212. </ul>
  213. </div>
  214. </div>
  215. </div>
  216. </div>
  217. </template>
  218. <template id="event_track_aside_other_track">
  219. <span t-out="track_other.name" class="w-100"/>
  220. <div class="d-flex align-items-center">
  221. <small class="text-muted" t-out="track_other.partner_name"/>
  222. <div class="d-inline-block ms-auto o_wesession_track_aside_info text-truncate">
  223. <small t-if="not track_other.website_published and user_event_manager"
  224. class="badge text-bg-danger">Unpublished</small>
  225. <small t-if="track_other.is_track_live and not track_other.is_track_done"
  226. class="badge text-bg-danger">Live</small>
  227. <small t-elif="track_other.is_track_done"
  228. class="badge text-bg-light">Done</small>
  229. <small t-elif="track_other.is_track_today and track_other.track_start_remaining"
  230. class="badge text-bg-light">
  231. <span t-out="track_other.track_start_remaining"
  232. t-options="{'widget': 'duration', 'digital': False, 'add_direction': True,
  233. 'unit': 'second', 'round': 'minute', 'format': 'narrow'}"/>
  234. </small>
  235. <div t-elif="track_other.date" class="badge text-bg-light">
  236. <span t-out="track_other.date" t-options="{'widget': 'datetime', 'tz_name': track_other.event_id.date_tz, 'format': 'MMM. dd'}"/>
  237. </div>
  238. </div>
  239. </div>
  240. </template>
  241. </odoo>