diff options
| author | qmo-odoo <qmo@odoo.com> | 2020-07-24 08:35:53 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2020-08-04 14:28:29 +0000 |
| commit | 10e162d3f16c6f8abc34d73ad5986a637ab4e7ca (patch) | |
| tree | 8cbc6271ab1451ff76b0c5c28c14627f15d3f9db /addons/website_event_meet_quiz/views | |
| parent | 92caab190183aed30726e4251366f972d0c5755f (diff) | |
[ADD] website_event_meet_quiz: integrate quiz within meet "Community" page
RATIONALE
Events are sometimes held online, gathering a community. In this merge
we improve Event application to better support full-online events with
improved tracks, wishlists, chat rooms, ...
PURPOSE
This bridge module enables a better integration of the quiz features within the
website_event_meet "Community" frontend page.
SPECS
As both quiz and meet share the "Community" frontend page, this bridge adds a
small block on the existing meet template to display the top 3 of the quiz
leaderboard.
A link on that block allows users to reach the full leaderboard page where they
can see their own position and perform a simple search for other attendees.
LINKS
Task ID-2252655 (Main Online Event task)
Task ID-2283771 (Quizzes on Talks, Leaderboard)
Task ID-2283742 (Community gathering on chat rooms)
Co-Authored-By: Aurélien Warnon <awa@odoo.com>
Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Quentin Mourier <qmo@odoo.com>
Co-Authored-By: Stéphane Debauche <std@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Diffstat (limited to 'addons/website_event_meet_quiz/views')
| -rw-r--r-- | addons/website_event_meet_quiz/views/event_meet_templates.xml | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/addons/website_event_meet_quiz/views/event_meet_templates.xml b/addons/website_event_meet_quiz/views/event_meet_templates.xml new file mode 100644 index 00000000000..04b7be6b768 --- /dev/null +++ b/addons/website_event_meet_quiz/views/event_meet_templates.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> +<template id="community_aside" name="Community: Aside (Leaderboard)" + inherit_id="website_event_meet.community_aside"> + <xpath expr="//div[hasclass('o_wevent_community_aside')]" position="inside"> + <t t-if="top3_visitors" t-call="website_event_meet_quiz.community_leaderboard_small"/> + </xpath> +</template> + +<template id="community_leaderboard_small" name="Small Leaderboard"> + <div class="row"> + <div class="col"> + <div class="w-100 d-flex justify-content-between align-items-end o_page_header"> + <h1 class="m-0">Leaderboard</h1> + <a t-attf-href="#{'/event/%s/community/leaderboard' % (slug(event))}">View all</a> + </div> + </div> + </div> + <div class="row"> + <div class="col"> + <t t-foreach="top3_visitors" t-as="visitor"> + <t t-call="website_event_meet_quiz.visitor_quiz_points_card"/> + </t> + </div> + </div> +</template> + +<template id='visitor_quiz_points_card' name="User Quick Quiz Points Card"> + <div class="d-flex mb-3 align-items-center justify-content-between"> + <div class="d-flex align-items-center"> + <b class="mr-2 text-muted" t-esc="visitor['position']"/> + <img class="rounded-circle float-left" + style="width: 32px; height: 32px; object-fit: cover;" + t-att-src="image_data_uri(visitor['visitor'].partner_image) if visitor['visitor'].partner_image else '/web/static/src/img/user_placeholder.jpg'" + t-att-alt="visitor['visitor'].display_name"/> + <div style="line-height:1.3"> + <span class="font-weight-bold" t-esc="visitor['visitor'].display_name"/> + </div> + </div> + <div class="d-flex align-items-center"> + <span><t t-esc="visitor['points']"/> Points</span> + </div> + </div> +</template> + +</odoo> |
