+
+<template id="country_events" name="Country Events" inherit_id="website.snippets">
+ <xpath expr="//div[@id='snippet_content']" position="inside">
+ <div>
+ <div class="oe_snippet_thumbnail">
+ <div style="background: white;box-shadow:none;-webkit-box-shadow:none;" class="oe_snippet_thumbnail_img" >
+ <i class="fa fa-flag fa-5x text-muted"></i>
+ </div>
+ <span class="oe_snippet_thumbnail_title">Local Events</span>
+ </div>
+ <div class="oe_snippet_body oe_country_events mb16 mt16">
+ <div class="country_events_list">
+ <div class="text-muted text-left">
+ <div>
+ <img class="img-rounded img-responsive" src="/website_event/static/src/img/world_map.jpg"></img>
+ </div>
+ <div>Events in visitor's country</div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </xpath>
+ <xpath expr="//div[@id='snippet_options']" position="inside">
+ <div data-snippet-option-id='country_events'
+ data-selector=".oe_country_events"
+ data-selector-siblings="p, h1, h2, h3, blockquote, .well, .panel"
+ data-selector-children=".content"
+ >
+ </div>
+ </xpath>
+</template>
+
+<template id="country_events_list" name="Country">
+ <t t-ignore="true">
+ <t t-if="events">
+ <div class="country_events_list">
+ <div>
+ <t t-if="country">
+ <img class="img-rounded img-responsive" t-att-src="'/website/image?model=res.country&field=image&id='+str(country.id)"></img>
+ <h4><b>Events: <span t-esc="country.name"></span></b></h4>
+ </t>
+ <t t-if="not country">
+ <img class="img-rounded img-responsive" src="/website_event/static/src/img/world_map.jpg"></img>
+ <h4><b>Upcoming Events</b></h4>
+ </t>
+ <div t-foreach="events[:5]" t-as="event_dict" class="oe_website_overflow_ellipsis mb8">
+ <t t-if="not event_dict['event'].website_published">
+ <span class="label label-danger"><i class="fa fa-ban"></i></span>
+ </t>
+ <t t-if="event_dict['event'].address_id">
+ <i class="fa fa-map-marker"></i>
+ </t>
+ <t t-if="not event_dict['event'].address_id">
+ <i class="fa fa-cloud"></i>
+ </t>
+ <b><span t-esc="event_dict['date']"/>: <span><a t-att-href="event_dict['url']"><t t-esc="event_dict['event'].name"/></a></span></b>
+ </div>
+ <t t-if="len(events) > 5">
+ <div t-if="country">
+ <b><a t-att-href="'/event?country='+str(country.id)">See all events from <span t-esc="country.name"></span></a></b>
+ </div>
+ <div t-if="not country">
+ <b><a href="/event"> See all upcoming events </a></b>
+ </div>
+ </t>
+ </div>
+ </div>
+ </t>
+ </t>
+</template>