[IMP] website_event: category and location in the left menu are optional

bzr revid: chm@openerp.com-20130812140243-ds50tzo36lqvdxyr
This commit is contained in:
Christophe Matthieu
2013-08-12 16:02:43 +02:00
parent f6c27fda01
commit ed5ad1c91d
+27 -18
View File
@@ -15,7 +15,7 @@
<!-- Page -->
<template id="index">
<template id="index" name="E-commerce">
<t t-call="website.layout">
<t t-set="head">
<script type="text/javascript" src="/website_event/static/src/js/website_event.js"></script>
@@ -24,7 +24,7 @@
<t t-set="title">Events</t>
<div class="container mt48">
<div class="row">
<div class="span4 css_noprint">
<div class="span4 css_noprint" id="left_column">
<ul class="nav nav-list">
<li class="nav-header">Date</li>
<t t-foreach="dates" t-as="date">
@@ -33,22 +33,6 @@
</li>
</t>
</ul>
<ul class="nav nav-list">
<li class="nav-header">Category</li>
<t t-foreach="types">
<li t-if="type" t-att-class="searches.get('type') == str(type and type[0]) and 'active' or ''">
<a t-att-href="'/event/%%s&amp;type=%%s' %% (search_path, type[0])"><t t-esc="type[1]"/> <small>(<t t-esc="type_count"/>)</small></a>
</li>
</t>
</ul>
<ul class="nav nav-list">
<li class="nav-header">Location</li>
<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-att-href="'/event/%%s&amp;country=%%s' %% (search_path, country_id[0])"><t t-esc="country_id[1]"/><small>(<t t-esc="country_id_count"/>)</small></a>
</li>
</t>
</ul>
</div>
<div class='span8 navbar navbar-inverse'>
<div class='navbar-inner'>
@@ -102,6 +86,31 @@
</t>
</template>
<template id="event_category" inherit_id="website_event.index" inherit_option_id="website_event.index" name="Category">
<xpath expr="//div[@id='left_column']" position="inside">
<ul class="nav nav-list">
<li class="nav-header">Category</li>
<t t-foreach="types">
<li t-if="type" t-att-class="searches.get('type') == str(type and type[0]) and 'active' or ''">
<a t-att-href="'/event/%%s&amp;type=%%s' %% (search_path, type[0])"><t t-esc="type[1]"/> <small>(<t t-esc="type_count"/>)</small></a>
</li>
</t>
</ul>
</xpath>
</template>
<template id="event_location" inherit_id="website_event.index" inherit_option_id="website_event.index" name="Location">
<xpath expr="//div[@id='left_column']" position="inside">
<ul class="nav nav-list">
<li class="nav-header">Location</li>
<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-att-href="'/event/%%s&amp;country=%%s' %% (search_path, country_id[0])"><t t-esc="country_id[1]"/><small>(<t t-esc="country_id_count"/>)</small></a>
</li>
</t>
</ul>
</xpath>
</template>
<template id="detail">
<t t-call="website.layout">
<t t-set="head">