odoo/addons/website_event/views/website_event.xml

337 lines
19 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="website_event_script" inherit_id="website.layout" name="Website Event script">
<xpath expr="//t[@id='editable_scripts_hook']" position="inside">
<script type="text/javascript" src="/website_event/static/src/js/website_event.editor.js" t-ignore="true"></script>
</xpath>
</template>
<!-- Layout add nav and footer -->
<template id="header_footer_custom" inherit_id="website.layout" name="Footer Events Link">
<xpath expr="//footer//ul[@name='products']" position="inside">
<li><a href="/event">Events</a></li>
</xpath>
</template>
<!-- Page -->
<template id="index" name="Events">
<t t-call="website.layout">
<div id="wrap">
<div class="oe_structure"/>
<div class="container">
<h1 class="text-center">
Next Events
</h1>
<h3 class="text-center text-muted">
<t t-esc="current_date or ''"/><span t-if="current_type"><t t-if="current_date">,</t>
<t t-esc="current_type.name"/></span><span t-if="current_country"><t t-if="current_type or current_date">,</t>
<t t-esc="current_country.name"/>
</span>
</h3>
<div class="row mt32 mb32">
<div class="col-md-3 col-sm-4 css_noprint" id="left_column">
<ul class="nav nav-pills nav-stacked">
<t t-foreach="dates" t-as="date">
<li t-att-class="searches.get('date') == date[0] and 'active' or ''" t-if="date[3] or (date[0] in ('old','all'))">
<a t-href="/event/#{ search_path }&amp;date=#{ date[0] }"><t t-esc="date[1]"/>
<span t-if="date[3]" class="badge pull-right"><t t-esc="date[3]"/></span>
</a>
</li>
</t>
</ul>
</div>
<div class="col-sm-7 col-md-6" id="middle_column">
<t t-call="website.pager" >
<t t-set="classname">pull-left</t>
</t>
<div class="oe_structure">
</div>
<t t-if="not event_ids">
<p t-if="current_date or current_country or current_type">
No event found in this category, check <a href="/event">all events</a>.
</p>
<p t-if="(current_date is None) and (current_country is None) and (current_type is None)">
No events are planned for now on.
</p>
</t>
<ul class="media-list">
<li t-foreach="event_ids" t-as="event" class="media">
<div class="media-body">
<t t-if="event.event_ticket_ids">
<span t-if="not event.register_avail" class="label label-danger pull-right">Sold Out</span>
<span t-if="event.register_avail and event.register_avail &lt;= ((event.register_max or 0) / 4)" class="label pull-right label-info">
Only <t t-esc="event.register_avail"/> Remaining
</span>
</t>
<h4 class="media-heading">
<a t-href="/event/#{ event.id }/"><span t-field="event.name"> </span></a>
<small t-if="not event.website_published" class="label label-danger">not published</small>
</h4>
<div>
<t t-if="event.organizer_id">
Organized by: <span t-field="event.organizer_id"> </span>
</t>
</div>
<div>
<i class="icon-time"></i> <span t-field="event.date_begin"> </span> <i>to</i> <span t-field="event.date_end"> </span>
</div>
<div t-if="event.country_id">
<i class="icon-map-marker"></i> <span t-field="event.city"/>, <span t-field="event.country_id"/>
</div>
<div class="text-muted">
<i class="icon-tag"></i> <span t-field="event.type"/>
</div>
</div>
</li>
</ul>
</div>
<div class="col-sm-2 col-md-3 oe_structure" id="right_column">
</div>
<div class="col-md-8 col-lg-offset-4 text-center">
<t t-call="website.pager" />
</div>
</div>
</div>
<div class="oe_structure"/>
</div>
</t>
</template>
<template id="event_right_photos" inherit_id="website_event.index" inherit_option_id="website_event.index" name="Photos">
<xpath expr="//div[@id='right_column']" position="inside">
<div class="row">
<div class="col-md-12 mb16">
<div class="oe_demo">
<img src="/website_event/static/src/img/openerp_enterprise_of_the_year.png" class="img-rounded"/>
<div class="text-center"><a href="/event">Photos of Past Events</a></div>
</div>
</div>
<div class="col-md-12 mb16">
<div class="oe_demo">
<img src="/website_event/static/src/img/training.jpg" class="img-rounded"/>
<div class="text-center"><a href="/event">Our Trainings</a></div>
</div>
</div>
</div>
</xpath>
</template>
<template id="event_right_quotes" inherit_id="website_event.index" inherit_option_id="website_event.index" name="Quotes">
<xpath expr="//div[@id='right_column']" position="inside">
<div class="row">
<div class="col-md-12 mb16">
<blockquote class="oe_snippet_body">
<p>
Write here a quote from one of your attendees.
It gives confidence in your
events.
</p>
<small>Author</small>
</blockquote>
</div>
</div>
</xpath>
</template>
<template id="event_category" inherit_id="website_event.index" inherit_option_id="website_event.index" name="Filter by Category">
<xpath expr="//div[@id='left_column']" position="inside">
<ul class="nav nav-pills nav-stacked mt32">
<t t-foreach="types">
<li t-if="type" t-att-class="searches.get('type') == str(type and type[0]) and 'active' or ''">
<a t-href="/event/#{ search_path }&amp;type=#{ type[0] }"><t t-esc="type[1]"/>
<span class="badge pull-right"><t t-esc="type_count"/></span>
</a>
</li>
</t>
</ul>
</xpath>
</template>
<template id="event_location" inherit_id="website_event.index" inherit_option_id="website_event.index" name="Filter by Country">
<xpath expr="//div[@id='left_column']" position="inside">
<ul class="nav nav-pills nav-stacked mt32">
<t t-foreach="countries">
<li t-if="country_id" t-att-class="searches.get('country') == str(country_id and country_id[0]) and 'active' or ''">
<a t-href="/event/#{ search_path }&amp;country=#{ country_id[0] }"><t t-esc="country_id[1]"/>
<span class="badge pull-right"><t t-esc="country_id_count"/></span>
</a>
</li>
</t>
</ul>
</xpath>
</template>
<template id="event_description_full">
<t t-call="website.layout">
<t t-set="additional_title">Events</t>
<div id="wrap">
<div class="container">
<h1 class="text-center" t-field="event_id.name"></h1>
<h4 class="text-center text-muted">
<i class="icon-time"></i> <span t-field="event_id.date_begin"/> to
<span t-field="event_id.date_end"/>
</h4>
<h4 t-if="event_id.city and event_id.country_id" class="text-center text-muted">
<i class="icon-map-marker"/>
<span t-field="event_id.city"/>,
<span t-field="event_id.country_id"/>
</h4>
<div class="row mt32 mb32">
<div class="col-md-8">
<form t-action="/event/#{ event_id.id }/add_cart" method="post" t-if="event_id.event_ticket_ids">
<table class="table table-striped">
<thead>
<tr>
<th>Ticket Type</th>
<th style="min-width: 100px">Sales End</th>
<th style="min-width: 100px">Price</th>
<th></th>
<th>Quantity</th>
</tr>
</thead>
<tbody>
<tr t-foreach="event_id.event_ticket_ids" t-as="ticket">
<td>
<div t-field="ticket.name"/>
<div><small t-field="ticket.product_id.description_sale"/></div>
</td>
<td><span t-field="ticket.deadline"/></td>
<td><span t-field="ticket.price"/></td>
<td>
<span t-if="ticket.register_max and (float(ticket.register_current or 0) / ticket.register_max)&lt;=0.2" class="text-muted">
<t t-esc="ticket.register_max - ticket.register_current"/> <span>left</span>
</span>
</td>
<td>
<select t-if="ticket.register_avail" t-attf-name="ticket-#{ ticket.id }" class="form-control">
<t t-foreach="range(0, ticket.register_avail > 9 and 10 or ticket.register_avail+1 )" t-as="nb"><option t-esc="nb"/></t>
</select>
<span t-if="not ticket.register_avail">Sold Out</span>
</td>
</tr>
</tbody>
</table>
<button type="submit" class="btn btn-primary btn-lg pull-right" t-if="event_id.register_avail">Order Now</button>
<div class="clearfix"/>
<hr/>
</form>
<div t-field="event_id.description"></div>
<div class="clearfix"/>
<ul class="media-list" id="comment">
<li t-foreach="event_id.website_message_ids" t-as="comment" class="media">
<div class="media-body">
<t t-call="website.publish_management">
<t t-set="object" t-value="comment"/>
<t t-set="publish_edit" t-value="True"/>
<t t-set="publish_controller">/event/publish</t>
</t>
<t t-raw="comment.body"/>
<small class="pull-right muted text-right">
<div t-field="comment.author_id"/>
<div t-field="comment.date"/>
</small>
</div>
</li>
</ul>
</div>
<div class="col-md-4 css_noprint">
<div class="clearfix"/>
<div class="panel panel-default" t-if="event_id.address_id">
<div class="panel-heading">
<t t-call="website.publish_management">
<t t-set="object" t-value="event_id"/>
<t t-set="publish_edit" t-value="True"/>
<t t-set="publish_controller">/event/publish</t>
<t t-set="style">position: relative; top: -80px;</t>
</t>
<h4>Where</h4>
</div>
<div class="panel-body">
<a t-att-href="event_id.google_map_link()" target="_BLANK">
<img t-att-src="event_id.google_map_img()" width="100%%"/>
</a>
<address class="mt16 mb8" t-field="event_id.address_id"> <!-- TODO: use widget contact -->
<!-- <strong t-field="event_id.address_id"/>
<p t-field="event_id.address_id"/>
<div t-if="event_id.address_id.phone">
<span class="icon-phone"/> <span t-field="event_id.address_id.phone"/>
</div>
<div t-if="event_id.address_id.email">
<span class="icon-envelope"/>
<a t-att-href="'mailto:'+event_id.address_id.email">
<span t-field="event_id.address_id.email"/>
</a>
</div> -->
</address>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h4>When</h4>
</div>
<div class="panel-body">
<i class="icon-time"></i> <span t-field="event_id.date_begin"> </span><br/>
<i class="icon-time"></i> <span t-field="event_id.date_end"> </span>
</div>
</div>
<div class="panel panel-default" t-if="event_id.organizer_id">
<div class="panel-heading">
<h4>Organizer</h4>
</div>
<div class="panel-body" t-field="event_id.organizer_id"> <!-- TODO: use widget contact -->
<!-- <p><strong t-field="event_id.organizer_id.display_name"/></p>
<div t-if="event_id.phone">
<span class="icon-phone"/> <span t-field="event_id.phone"/>
</div>
<div t-if="event_id.email">
<i class="icon-envelope"/> <span t-field="event_id.email"/>
</div> -->
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h4>Social Stream</h4>
</div>
<div class="panel-body">
<t t-call="website_mail.follow"><t t-set="object" t-value="event_id"/></t>
<div t-if="event_id.twitter_hashtag">
<p><strong>Join the Experience</strong></p>
<p class="text-muted">
Find out what others are seeing and
saying about this event, and join the
conversation.
</p>
<p><strong>Use this tag:
<a t-att-href="'twitter.com/search?q=#'+event_id.twitter_hashtag" class="label label-primary">#<span t-field="event_id.twitter_hashtag"/></a>
</strong></p>
</div>
</div>
</div>
<ul class="list-unstyled">
<li t-if="event_id.type">
<a t-href="/event?type=#{event_id.type.id}"><strong><span class="icon-double-angle-right"/> Other <t t-esc="event_id.type.name"/></strong></a>
</li>
<li t-if="event_id.country_id">
<a t-href="/event?country=#{event_id.country_id.id}"><strong><span class="icon-double-angle-right"/> Other Events in <span t-esc="event_id.country_id.name"/></strong></a>
</li>
<li><a href="/event"><strong><span class="icon-double-angle-right"/> All Events</strong></a></li>
</ul>
</div>
</div>
</div>
</div>
</t>
</template>
</data>
</openerp>