[IMP] Events Style

bzr revid: fp@openerp.com-20130928164352-loesvbihw1kvkvaj
This commit is contained in:
Fabien Pinckaers 2013-09-28 18:43:52 +02:00
parent 0762fd9e93
commit 5ade35c313
4 changed files with 122 additions and 59 deletions

View File

@ -343,15 +343,18 @@
<template id="publish_management">
<t t-if="editable" t-ignore="true">
<a t-att-href="'/admin/#model=%s&amp;id=%s' % (object._name, object.id)" class="btn btn-default pull-right" title="Manage in backend openerp"><span class="glyphicon glyphicon-wrench"></span></a>
<div t-attf-class="dropdown js_publish_management pull-right #{object.id and object.website_published and 'css_publish' or 'css_unpublish'}" t-att-data-id="object.id" t-att-data-object="object._name">
<a t-attf-class="btn btn-#{object.id and object.website_published and 'success' or 'default'}" t-att-id="'dopprod-%s' % object.id" role="button" data-toggle="dropdown"> Publish options <span class="caret"></span></a>
<a t-attf-class="btn btn-sm btn-#{object.id and object.website_published and 'success' or 'default'}" t-att-id="'dopprod-%s' % object.id" role="button" data-toggle="dropdown">Options <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu" t-att-aria-labelledby="'dopprod-%s' % object.id">
<t t-raw="0"/>
<li>
<a href="#" class="js_publish_btn css_unpublish">Unpublish</a>
<a href="#" class="js_publish_btn css_publish">Publish</a>
</li>
<li class="divider"/>
<li>
<a t-att-href="'/admin/#model=%s&amp;id=%s' % (object._name, object.id)">Edit</a>
</li>
</ul>
</div>
</t>

View File

@ -156,7 +156,7 @@ class website_event(http.Controller):
event_obj = request.registry['event.event']
values = {
'event_id': event_obj.browse(request.cr, request.uid, event_id,
dict(request.context, show_address=1)),
dict(request.context, show_address_only=1)),
'range': range
}
return request.website.render("website_event.event_description_full", values)

View File

@ -31,13 +31,14 @@
<h3 class="oe_slogan">Get rid of old WYSIWYG editors</h3>
<div class="oe_span6">
<p class='oe_mt32'>
Drag &amp; Drop well designed <em>'Building Blocks'</em> to
create beautifull event pages that your customer will love.
Create beautiful event pages by drag &amp; droping well
designed <em>'Building Blocks'</em>. Publish event photos,
speakers, agenda, etc.
</p><p>
OpenERP's unique <em>'edit inline'</em> approach makes website
creation surprisingly easy. "Want to introduce a speaker? to
change the price of a ticket? to update a banner? promote sponsors?"
just click and change. What you see is what you get. Really.
just click and change.
</p>
</div>
<div class="oe_span6">
@ -51,7 +52,7 @@
<section class="oe_container">
<div class="oe_row">
<h2 class="oe_slogan">Sell Tickets Online</h2>
<h3 class="oe_slogan">Mass Mailing &amp; Social Media Icons</h3>
<h3 class="oe_slogan">Automate the registration and payment process</h3>
<div class="oe_span6">
<img class="oe_picture oe_screenshot" src="">
</div>

View File

@ -30,33 +30,34 @@
<t t-set="title">Events</t>
<div id="wrap">
<div class="container">
<div class="row">
<div class="col-md-4 css_noprint" id="left_column">
<div class="oe_structure"/>
<h1 class="text-center">
Our Events
</h1>
<h3 class="text-center text-muted">
<t t-esc="current_date"/><t t-if="current_type">,
<t t-esc="current_type.name"/></t><t t-if="current_country">,
<t t-esc="current_country.name"/>
</t>
</h3>
<div class="row mt16 mb32">
<div class="col-md-3 col-sm-4 css_noprint" id="left_column">
<ul class="nav nav-pills nav-stacked">
<li class="nav-header">Date</li>
<t t-foreach="dates" t-as="date">
<li t-att-class="searches.get('date') == date[0] and 'active' or ''">
<a t-href="/event/#{ search_path }&amp;date=#{ date[0] }"><t t-esc="date[1]"/> <small t-if="date[3]">(<t t-esc="date[3]"/>)</small></a>
<li t-att-class="searches.get('date') == date[0] and 'active' or ''" t-if="date[3]">
<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-md-8">
<div class="col-sm-8 col-md-9">
<t t-call="website.pager" >
<t t-set="classname">pull-left</t>
</t>
</div>
<div class="col-md-8">
<div class="oe_structure">
<h2>
Events for <t t-esc="current_date"/>
<t t-if="current_type">
in <t t-esc="current_type.name"/>
</t>
<t t-if="current_country">
in <t t-esc="current_country.name"/>
</t>
</h2>
</div>
<ul class="media-list">
<li t-foreach="event_ids" t-as="event" class="media" data-publish="">
@ -76,7 +77,6 @@
</t>
<h4 class="media-heading"><a t-href="/event/#{ event.id }/"><span t-field="event.name"> </span></a></h4>
<div>
<span t-field="event.type">: </span>
<t t-if="event.organizer_id">
Organized by: <span t-field="event.organizer_id"> </span>
</t>
@ -85,7 +85,10 @@
<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> <span t-field="event.zip"> </span>, <span t-field="event.country_id"> </span>
<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>
@ -107,7 +110,9 @@
<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-href="/event/#{ search_path }&amp;type=#{ type[0] }"><t t-esc="type[1]"/> <small>(<t t-esc="type_count"/>)</small></a>
<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>
@ -119,7 +124,9 @@
<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-href="/event/#{ search_path }&amp;country=#{ country_id[0] }"><t t-esc="country_id[1]"/><small>(<t t-esc="country_id_count"/>)</small></a>
<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>
@ -134,37 +141,24 @@
<t t-set="title">Events</t>
<div id="wrap">
<div class="container">
<div class="row">
<div class="col-md-8">
<t t-call="website.publish_management"><t t-set="object" t-value="event_id"/></t>
<t t-call="website_mail.follow"><t t-set="object" t-value="event_id"/></t>
<h1 class="text-center" t-field="event_id.name"></h1>
<h4 class="text-center">
<i class="icon-time"></i> <span t-field="event_id.date_begin"/> to
<span t-field="event_id.date_end"/>
</h4>
<h5 class="text-center" t-field="event_id.address_id"/>
</div>
<div class="col-md-4 css_noprint pull-right">
<h4>When &amp; Where</h4>
<a t-att-href="event_id.google_map_link()" target="_BLANK">
<img class="thumbnail" t-att-src="event_id.google_map_img()"/>
</a>
<address><pre t-field="event_id.address_id"/></address>
<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>
<t t-if="event_id.organizer_id">
<h6>Organized by:</h6>
<address><strong t-field="event_id.organizer_id.display_name"/><t t-if="event_id.phone"><br/><span>&amp;#x2706;</span> <span t-field="event_id.phone"></span></t><t t-if="event_id.email"><br/><i class="icon-envelope"></i> <span t-field="event_id.email"></span></t></address>
</t>
</div>
<t t-call="website.publish_management"><t t-set="object" t-value="event_id"/></t>
<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">
<div class="col-md-8">
<t t-if="event_id.event_ticket_ids">
<hr/>
<form t-action="/event/#{ event_id.id }/add_cart" method="post">
<table class="table">
<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</th>
@ -189,10 +183,10 @@
</tr>
</tbody>
</table>
<button type="submit" class="btn btn-primary pull-right" t-if="event_id.register_avail">Order Now</button><br/>
<button type="submit" class="btn btn-primary btn-lg pull-right" t-if="event_id.register_avail">Order Now</button>
<hr/>
</form>
</t>
<hr/>
<div class="clearfix"/>
<div t-field="event_id.description"></div>
<hr/>
<ul class="media-list" id="comment">
@ -208,6 +202,71 @@
</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">
<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">
<strong t-field="event_id.address_id.name"/>
<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" t-if="event_id.address_id">
<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">
<strong t-field="event_id.organizer_id.display_name"/>
<t t-if="event_id.phone">
<span class="icon-phone"/> <span t-field="event_id.phone"/>
</t>
<t t-if="event_id.email">
<i class="icon-envelope"/> <span t-field="event_id.email"/>
</t>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h4>Share</h4>
</div>
<div class="panel-body">
<t t-call="website_mail.follow"><t t-set="object" t-value="event_id"/></t>
</div>
</div>
<ul class="list-unstyled">
</ul>
</div>
</div>
</div>
</div>