diff options
| author | Patrick Hoste <pko@odoo.com> | 2020-02-28 13:14:23 +0000 |
|---|---|---|
| committer | Patrick Hoste <pko@odoo.com> | 2020-03-31 06:31:08 +0000 |
| commit | aebe199d80c5c7411c3db44386c7b9f3cc5b712d (patch) | |
| tree | 11a3c49bc0f9db968d10f648c7f69ff7a5a305ab /addons/website_event/views | |
| parent | 0e9f4e6cdea02573702577c4754b129f9d84cdd8 (diff) | |
[IMP] (website_)event(_track): change event form view display
PURPOSE
Change the event form view to improve its usability and make it clearer.
SPECIFICATIONS
- Change some stats buttons icons
- Change order of the fields and put the range date field in second
place since it's a mandatory field.
LINKS
Task ID : 2198660
PR : #46659
Diffstat (limited to 'addons/website_event/views')
| -rw-r--r-- | addons/website_event/views/event_templates.xml | 47 | ||||
| -rw-r--r-- | addons/website_event/views/event_views.xml | 7 |
2 files changed, 20 insertions, 34 deletions
diff --git a/addons/website_event/views/event_templates.xml b/addons/website_event/views/event_templates.xml index 3671ec46010..f4c7f6c0a6a 100644 --- a/addons/website_event/views/event_templates.xml +++ b/addons/website_event/views/event_templates.xml @@ -213,7 +213,6 @@ <!-- Title --> <h5 t-attf-class="card-title mt-2 mb-0 text-truncate #{(not event.website_published) and 'text-danger'}"> <span t-field="event.name" itemprop="name"/> - <div class="badge badge-pill badge-info ml-2 mt-2 pt4 pb4" t-if="event.is_online">Online</div> </h5> <!-- Start Date & Time --> <time itemprop="startDate" t-att-datetime="event.date_begin"> @@ -225,8 +224,7 @@ <small class="text-muted text-truncate">Organizer: <span t-field="event.organizer_id" itemprop="organizer"/></small> </div> <!-- Location --> - <div t-if="not event.is_online" itemprop="location" t-field="event.address_id" t-options="{'widget': 'contact', 'fields': ['city'], 'no_marker': 'true'}"/> - <div t-else="" class="invisible">online</div> + <div itemprop="location" t-field="event.address_id" t-options="{'widget': 'contact', 'fields': ['city'], 'no_marker': 'true'}"/> <div class="mt8 d-flex align-items-center"> <t t-foreach="event.tag_ids" t-as="tag"> <span t-attf-class="badge mr8 #{'badge-primary' if tag in search_tags else 'badge-light'}"> @@ -466,31 +464,24 @@ </div> </div> <!-- Location --> - <t t-if="not event.is_online"> - <div t-if="event.address_id" class="o_wevent_sidebar_block"> - <h6 class="o_wevent_sidebar_title">Location</h6> - <h4 t-field="event.address_id" class="" t-options='{ - "widget": "contact", - "fields": ["name"] - }'/> - <div itemprop="location" class="mb-2" t-field="event.address_id" t-options='{ - "widget": "contact", - "fields": ["address"], - "no_marker": True - }'/> - <div class="mb-3" t-field="event.address_id" t-options='{ - "widget": "contact", - "fields": ["phone", "mobile", "email"] - }'/> - <i class="fa fa-map-marker fa-fw" role="img"/> - <a t-att-href="event.google_map_link()" target="_blank">Get the direction</a> - </div> - </t> - <t t-else=""> - <div class="o_wevent_sidebar_block"> - <h6 class="o_wevent_sidebar_title">Online Event</h6> - </div> - </t> + <div t-if="event.address_id" class="o_wevent_sidebar_block"> + <h6 class="o_wevent_sidebar_title">Location</h6> + <h4 t-field="event.address_id" class="" t-options='{ + "widget": "contact", + "fields": ["name"] + }'/> + <div itemprop="location" class="mb-2" t-field="event.address_id" t-options='{ + "widget": "contact", + "fields": ["address"], + "no_marker": True + }'/> + <div class="mb-3" t-field="event.address_id" t-options='{ + "widget": "contact", + "fields": ["phone", "mobile", "email"] + }'/> + <i class="fa fa-map-marker fa-fw" role="img"/> + <a t-att-href="event.google_map_link()" target="_blank">Get the direction</a> + </div> <!-- Organizer --> <div t-if="event.organizer_id" class="o_wevent_sidebar_block"> <h6 class="o_wevent_sidebar_title">Organizer</h6> diff --git a/addons/website_event/views/event_views.xml b/addons/website_event/views/event_views.xml index 28de6336ce3..a47a954627c 100644 --- a/addons/website_event/views/event_views.xml +++ b/addons/website_event/views/event_views.xml @@ -31,17 +31,13 @@ <field name="priority" eval="5"/> <field name="inherit_id" ref="event.view_event_form"/> <field name="arch" type="xml"> - <field name="organizer_id" position="before"> + <field name="company_id" position="after"> <field name="website_id" options="{'no_create': True}" domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]" groups="website.group_multi_website"/> </field> <div name="button_box" position="inside"> <field name="website_url" invisible="1"/> <field name="is_published" widget="website_redirect_button"/> </div> - <label for="is_online" position="after"> - <field name="website_menu"/> - <label for="website_menu" string="Website Menu"/> - </label> <xpath expr="//field[@name='stage_id']" position="before"> <button name="action_open_badge_editor" type="object" @@ -57,7 +53,6 @@ <field name="arch" type="xml"> <field name="company_id" position="after"> <field name="website_id" groups="website.group_multi_website" domain="['|', ('company_id', '=', company_id), ('company_id', '=', False)]" optional="show"/> - <field name="is_online" string="Is Online" optional="hide"/> </field> </field> </record> |
