[IMP] most data-publish removed

bzr revid: fp@openerp.com-20131116173636-atrxzu1if4fjumhp
This commit is contained in:
Fabien Pinckaers 2013-11-16 18:36:36 +01:00
parent f105e069f6
commit e41d8db917
8 changed files with 20 additions and 24 deletions

View File

@ -288,14 +288,12 @@
<template id="publish_short">
<t t-if="has_access_write" t-ignore="true">
<a href="#" t-att-data-id="object.id" t-att-data-object="object._name"
t-att-data-publish="object.id and object.website_published and 'on' or 'off'"
class="pull-right js_publish">
<span t-attf-class="text-success css_publish glyphicon glyphicon-ok"></span>
<span t-attf-class="text-danger css_unpublish glyphicon glyphicon-remove-circle"></span>
<span t-attf-class="text-muted css_published glyphicon glyphicon-ok"></span>
<span t-attf-class="text-muted css_unpublished glyphicon glyphicon-remove-circle"></span>
</a>
<div t-attf-class="btn-group pull-right js_publish_management #{object.website_published and 'css_published' or 'css_unpublished'}" t-att-data-id="object.id" t-att-data-object="object._name" t-att-data-controller="publish_controller">
<button t-attf-class="btn btn-sm btn-#{object.website_published and 'success' or 'danger'} js_publish_btn">
<span class="css_publish">Not Published</span>
<span class="css_unpublish">Published</span>
</button>
</div>
</t>
</template>

View File

@ -195,12 +195,13 @@ class WebsiteBlog(http.Controller):
@website.route(['/blog/<int:blog_post_id>/comment'], type='http', auth="public")
def blog_post_comment(self, blog_post_id=None, **post):
cr, uid, context = request.cr, request.uid, request.context
request.registry['blog.post'].message_post(
cr, uid, blog_post_id,
body=post.get('comment'),
type='comment',
subtype='mt_comment',
context=dict(context, mail_create_nosubcribe=True))
if post.get('comment'):
request.registry['blog.post'].message_post(
cr, uid, blog_post_id,
body=post.get('comment'),
type='comment',
subtype='mt_comment',
context=dict(context, mail_create_nosubcribe=True))
return werkzeug.utils.redirect(request.httprequest.referrer + "#comments")
@website.route(['/blog/<int:category_id>/new'], type='http', auth="public", multilang=True)

View File

@ -145,7 +145,7 @@
<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>
<button type="submit" class="btn btn-danger mt8">Post</button>
<button type="submit" class="btn btn-primary mt8">Post</button>
</div>
</form>
</section>

View File

@ -82,7 +82,7 @@
<t t-if="current_country"> in <t t-esc="current_country.name"/></t>
</h3>
</t>
<div class="media thumbnail" data-publish="">
<div class="media thumbnail">
<t t-call="website.publish_management"><t t-set="object" t-value="partner_id"/></t>
<a class="pull-left" t-href="/partners/#{ partner_id.id }/">
<img class="media-object" t-att-src="partner_id.img('image_small')"/>

View File

@ -41,7 +41,7 @@
<xpath expr="//div[@t-field='partner.website_description']" position="after">
<h3 id="references">References</h3>
<div>
<div t-foreach="partner.implemented_partner_ids" t-as="partner" class="media thumbnail" data-publish="">
<div t-foreach="partner.implemented_partner_ids" t-as="partner" class="media thumbnail">
<t t-call="website.publish_management"><t t-set="object" t-value="partner"/></t>
<a class="pull-left" t-attf-href="/customers/#{ partner.id }/">
<img class="media-object" t-att-src="partner.img('image_small')"/>

View File

@ -45,11 +45,7 @@ class website_hr_recruitment(http.Controller):
@website.route(['/job/detail/<model("hr.job"):job>'], type='http', auth="public", multilang=True)
def detail(self, job, **kwargs):
values = {
'job': job,
'vals_date': job.write_date.split(' ')[0],
}
return request.website.render("website_hr_recruitment.detail", values)
return request.website.render("website_hr_recruitment.detail", {'job': job})
@website.route(['/job/success'], type='http', auth="admin", multilang=True)
def success(self, **post):

View File

@ -73,6 +73,7 @@
<span t-field="job.address_id.city"/>
<span t-if="job.address_id.state_id" t-field="job.address_id.state_id"/>
, <span t-field="job.address_id.country_id.name"/>
<span t-if="not job.website_published" class="label label-danger">not published</span>
</div>
<div class="text-muted">
<i class="icon-time"/> <span t-field="job.write_date"/>
@ -127,7 +128,7 @@
<i class="icon-map-marker"/> <span t-field="job.address_id.city"/> <span t-if="job.address_id.state_id" t-field="job.address_id.state_id.name"/>, <span t-field="job.address_id.country_id.name"/>
</h5>
<h5 class="text-center text-muted">
<i class="icon-time"/> <span><t t-esc="vals_date"/></span>
<i class="icon-time"/> <span t-field="job.write_date"/>
</h5>
</div>
<div t-field="job.website_description"/>

View File

@ -60,7 +60,7 @@
<h3 class="text-center"><span t-field="membership_line_id.membership_id"/></h3>
</t>
<t t-set="partner" t-value="membership_line_id.partner"/>
<div class="media" data-publish="">
<div class="media">
<t t-call="website.publish_management">
<t t-set="object" t-value="partner"/>
</t>