[FIX] Ecomm - login to post a comment if not logged

bzr revid: jke@openerp.com-20140404135005-4uz7qtzyke58sgy2
This commit is contained in:
Kersten Jeremy
2014-04-04 15:50:05 +02:00
parent aa0f70f5ae
commit 9226642436
+14 -8
View File
@@ -440,14 +440,20 @@
</li>
</ul>
<div class="css_editable_mode_hidden">
<form id="comment" t-attf-action="/shop/product/#{product.id}/comment"
method="POST">
<img class="img pull-left img-rounded" t-att-src="'/website/image?model=res.partner&amp;field=image_small&amp;id='+str(user_id.partner_id.id)" style="width: 50px; margin-right: 10px;"/>
<div class="pull-left mb32" style="width: 75%%">
<textarea rows="3" name="comment" class="form-control" placeholder="Write a comment..."></textarea>
<a class="btn btn-primary mt8 a-submit">Post</a>
</div>
</form>
<t groups="base.group_public">
<a class="btn btn-primary mt8" t-attf-href="/web/login?redirect=/shop/product/#{product.id}%23comment">Log in </a> <span>to post comments</span>
</t>
<t groups="base.group_user,base.group_portal">
<form id="comment" t-attf-action="/shop/product/#{product.id}/comment"
method="POST">
<img class="img pull-left img-rounded" t-att-src="'/website/image?model=res.partner&amp;field=image_small&amp;id='+str(user_id.partner_id.id)" style="width: 50px; margin-right: 10px;"/>
<div class="pull-left mb32" style="width: 75%%">
<textarea rows="3" name="comment" class="form-control" placeholder="Write a comment..."></textarea>
<a class="btn btn-primary mt8 a-submit">Post</a>
</div>
</form>
</t>
</div>
</div>
</section>