[IMP] empty screen for events

bzr revid: fp@openerp.com-20131111212433-xyvl14vhewsp2g14
This commit is contained in:
Fabien Pinckaers 2013-11-11 22:24:33 +01:00
parent 7164a12eb8
commit e402105d91
2 changed files with 10 additions and 2 deletions

View File

@ -98,7 +98,7 @@ class website_event(http.Controller):
domain_search["country"] = [("country_id", "=", int(searches["country"]))]
def dom_without(without):
domain = SUPERUSER_ID != request.uid and [('website_published', '=', True)] or [(1, "=", 1)]
domain = [('state', "in", ['draft','confirm','done'])]
for key, search in domain_search.items():
if key != without:
domain += search

View File

@ -28,7 +28,7 @@
<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]=='old')">
<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>
@ -42,6 +42,14 @@
</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" data-publish="">
<div class="media-body">