[FIX] Show subscribe/unsuscribe button on events for user/portal, not when user is anonymous

bzr revid: vta@openerp.com-20121212111710-h0nmw6useq19wy12
This commit is contained in:
vta vta@openerp.com 2012-12-12 12:17:10 +01:00
parent 04a3aaec98
commit 35099eb3c5
1 changed files with 16 additions and 14 deletions

View File

@ -240,20 +240,22 @@
</i>
</t>
</p>
<t t-if="record.register_avail.raw_value gt 0 and record.register_avail.raw_value lt 9999">
<t t-if="!record.is_subscribed.raw_value">
<input t-att-id="record.id.raw_value" type="text" name="subscribe" class="no_of_seats" value="1" onchange="document.getElementById('btn_sub' +this.id).setAttribute('data-context',JSON.stringify({'ticket':this.value}))"/>
<button t-att-id="'btn_sub'+record.id.raw_value" type="object" name="subscribe_to_event" class="oe_subscribe_button">
<span >Subscribe</span>
</button>
</t>
</t>
<t t-if="record.is_subscribed.raw_value">
<button type="object" name="unsubscribe_to_event" class="oe_unsubscribe_button ">
<span>Subscribed</span>
<span class="oe_unsubscribe">Unsubscribe</span>
</button>
</t>
<div groups="base.group_user,portal.group_portal">
<t t-if="record.register_avail.raw_value gt 0 and record.register_avail.raw_value lt 9999">
<t t-if="!record.is_subscribed.raw_value">
<input t-att-id="record.id.raw_value" type="text" name="subscribe" class="no_of_seats" value="1" onchange="document.getElementById('btn_sub' +this.id).setAttribute('data-context',JSON.stringify({'ticket':this.value}))"/>
<button t-att-id="'btn_sub'+record.id.raw_value" type="object" name="subscribe_to_event" class="oe_subscribe_button">
<span >Subscribe</span>
</button>
</t>
</t>
<t t-if="record.is_subscribed.raw_value">
<button type="object" name="unsubscribe_to_event" class="oe_unsubscribe_button ">
<span>Subscribed</span>
<span class="oe_unsubscribe">Unsubscribe</span>
</button>
</t>
</div>
</div>
</div>
</t>