[FIX] website_event_*: fix minor view/wording issues
This commit fixes a few wording and view issues, notably: - Avoid breaking the talk description page when description is very long - Modify all occurrences of "starts at" to "starts on" (better wording) - Move the "hide sponsor" concept from _exhibitor to _track_online To be able to hide the sponsors on the "registration confirmed" template - Hide the sponsor block in "mobile" view (breakpoint md) - Make some minor layout adjustments Task ID-2325327 PR odoo/odoo#56430 X-original-commit: 342799035911123b609876268a86c1da251f7645
This commit is contained in:
committed by
Thibault Delavallée
parent
c482fdbf05
commit
afb6749426
@@ -383,13 +383,17 @@ class WebsiteEventController(http.Controller):
|
||||
registrations = self._process_attendees_form(event, post)
|
||||
attendees_sudo = self._create_attendees_from_registration_post(event, registrations)
|
||||
|
||||
return request.render("website_event.registration_complete",
|
||||
self._get_registration_confirm_values(event, attendees_sudo))
|
||||
|
||||
def _get_registration_confirm_values(self, event, attendees_sudo):
|
||||
urls = event._get_event_resource_urls()
|
||||
return request.render("website_event.registration_complete", {
|
||||
return {
|
||||
'attendees': attendees_sudo,
|
||||
'event': event,
|
||||
'google_url': urls.get('google_url'),
|
||||
'iCal_url': urls.get('iCal_url')
|
||||
})
|
||||
}
|
||||
|
||||
def _extract_searched_event_tags(self, searches):
|
||||
tags = request.env['event.tag']
|
||||
|
||||
@@ -18,7 +18,7 @@ class WebsiteEventController(WebsiteEventController):
|
||||
date_begin = format_datetime(event.with_context(tz=event.date_tz).date_begin, format="medium")
|
||||
|
||||
values["toast_message"] = (
|
||||
_('The event %s starts at %s (%s). \nJoin us there to chat about "%s" !')
|
||||
_('The event %s starts on %s (%s). \nJoin us there to chat about "%s" !')
|
||||
% (event.name, date_begin, event.date_tz, meeting_room.name)
|
||||
)
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
t-options="{'widget': 'duration', 'digital': True, 'unit': 'minute', 'round': 'minute'}"/>.
|
||||
</span>
|
||||
<span class="my-0" t-else="meeting_room.event_id.start_today">
|
||||
starts at
|
||||
starts on
|
||||
<span t-field="meeting_room.event_id.with_context(tz=meeting_room.event_id.date_tz).date_begin"
|
||||
t-options="{'format': 'medium'}"/> (<t t-esc="meeting_room.event_id.date_tz"/>).
|
||||
</span>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from . import event
|
||||
from . import event_track
|
||||
from . import webmanifest
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo.addons.website_event.controllers.main import WebsiteEventController
|
||||
|
||||
|
||||
class EventOnlineController(WebsiteEventController):
|
||||
|
||||
def _get_registration_confirm_values(self, event, attendees_sudo):
|
||||
values = super(EventOnlineController, self)._get_registration_confirm_values(event, attendees_sudo)
|
||||
values['hide_sponsors'] = True
|
||||
return values
|
||||
@@ -1,3 +1,9 @@
|
||||
// small hack to hide sponsors on specific views
|
||||
.o_wevent_hide_sponsors .container.mt32.mb16.d-none.d-md-block.d-print-none {
|
||||
// Not a very accurate way to target the 'sponsors' block -> improve in master
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/*
|
||||
* EVENT TOOL: REMINDER WIDGET
|
||||
*/
|
||||
|
||||
@@ -49,7 +49,14 @@
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1400px) {
|
||||
max-width: none;
|
||||
// return to bootstrap value for col-lg-9 / 10 breakpoint if screen is big enough
|
||||
&.col-lg-9 {
|
||||
max-width: 75%;
|
||||
}
|
||||
|
||||
&.col-lg-10 {
|
||||
max-width: 83.33333333%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<!-- Add a shortcut to wishlist / talks after registration -->
|
||||
<template id="registration_complete" inherit_id="website_event.registration_complete">
|
||||
<xpath expr="//div[hasclass('row')][last()]" position="after">
|
||||
<div t-if="event.website_track" class="row mt-5">
|
||||
<div t-if="event.website_track" class="row mt-5 mb256">
|
||||
<div class="col-12">
|
||||
<h3>Book your seats to the best talks</h3>
|
||||
<p>Get prepared and
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="event_layout" inherit_id="website_event.layout">
|
||||
<xpath expr="//div[@id='wrap']" position="attributes">
|
||||
<attribute name="t-attf-class">o_wevent_event js_event #{'o_wevent_hide_sponsors' if hide_sponsors else ''}</attribute>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template name="Sponsors" id="event_sponsor" customize_show="True" inherit_id="website_event.layout">
|
||||
<xpath expr="//div[@id='wrap']" position="inside">
|
||||
<div class="container mt32 mb16 d-print-none" t-if="event.sponsor_ids">
|
||||
<div class="container mt32 mb16 d-none d-md-block d-print-none" t-if="event.sponsor_ids">
|
||||
<div t-attf-class="d-flex flex-wrap mb-5 #{'' if (len(event.sponsor_ids) > 10) else 'justify-content-md-center'}">
|
||||
<t t-foreach="event.sponsor_ids" t-as="sponsor">
|
||||
<t t-if="sponsor.url">
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
t-options="{'widget': 'duration', 'digital': False, 'unit': 'minute', 'round': 'minute'}"/>
|
||||
</span>
|
||||
<span t-else="">
|
||||
starts at
|
||||
starts on
|
||||
<span t-field="track.event_id.with_context(tz=track.event_id.date_tz).date_begin"
|
||||
t-options="{'format': 'long', 'tz_name': track.event_id.date_tz, 'hide_seconds': True}"/>
|
||||
</span>
|
||||
@@ -53,7 +53,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- TRACK DESCRIPTION -->
|
||||
<div class="o_wesession_track_main_description">
|
||||
<div class="o_wesession_track_main_description overflow-auto">
|
||||
<div class="mx-3 pt-3 mb-3 d-flex justify-content-between flex-column flex-md-row">
|
||||
<div class="d-flex flex-column">
|
||||
<span class="h4 mb-0" t-esc="track.name"/>
|
||||
|
||||
@@ -18,7 +18,7 @@ class WebsiteEventController(WebsiteEventController):
|
||||
date_begin = format_datetime(event.with_context(tz=event.date_tz).date_begin, format="medium")
|
||||
|
||||
values["toast_message"] = (
|
||||
_('The event %s starts at %s (%s). \nJoin us there to meet %s !')
|
||||
_('The event %s starts on %s (%s). \nJoin us there to meet %s !')
|
||||
% (event.name, date_begin, event.date_tz, sponsor.partner_name)
|
||||
)
|
||||
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
.o_wevent_hide_sponsors .container.mt32.mb16.d-print-none {
|
||||
// Not a very accurate way to target the 'sponsors' block -> improve in master
|
||||
display: none;
|
||||
}
|
||||
|
||||
.o_wesponsor_index {
|
||||
|
||||
/*
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<span t-esc="widget.sponsorData.event_start_remaining"/> minutes
|
||||
</span>
|
||||
<span class="my-0" t-else="">
|
||||
starts at <span t-esc="widget.sponsorData.event_date_begin_located"/>
|
||||
starts on <span t-esc="widget.sponsorData.event_date_begin_located"/>
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-12 alert alert-warning text-center" role="alert"
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="event_layout" inherit_id="website_event.layout">
|
||||
<xpath expr="//div[@id='wrap']" position="attributes">
|
||||
<attribute name="t-attf-class">o_wevent_event js_event #{'o_wevent_hide_sponsors' if hide_sponsors else ''}</attribute>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="event_exhibitors" name="Event Exhibitors">
|
||||
<t t-call="website_event.layout">
|
||||
<div class="o_wevent_online o_wevent_online_bg o_wesponsor_index">
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
t-options="{'widget': 'duration', 'digital': True, 'unit': 'minute', 'round': 'minute'}"/>.
|
||||
</span>
|
||||
<span class="my-0" t-else="">
|
||||
starts at
|
||||
starts on
|
||||
<span t-field="sponsor.event_id.with_context(tz=sponsor.event_id.date_tz).date_begin"
|
||||
t-options="{'format': 'medium'}"/> (<t t-esc="sponsor.event_id.date_tz"/>).
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user