Files
odoo_source/addons/website_mail/controllers/email_designer.py
T
Thibault Delavallée b97727701c [IMP] [ADD] website: added base for template designer.
[ADD] website: email_template: added website_link field, a link to edit the template
directly in the website
[ADD] website_mail: added controller and page to edit templates. They are still jinja
templates editable in the website. Not qweb templates.
[ADD] website_mail: JS file and editor override to enable only certain snippets. Those
are still to add, but will be base templates for email.
[IMP] website: improved the addition of editor JS in the template header to be able
to add JS file that override the editor without having to hack everything in the
template.

bzr revid: tde@openerp.com-20140113125534-djy48pi7lf42f9ms
2014-01-13 13:55:34 +01:00

22 lines
748 B
Python

# -*- coding: utf-8 -*-
# from openerp import SUPERUSER_ID
from openerp.addons.web import http
from openerp.addons.web.http import request
from openerp.addons.website.models import website
class WebsiteEmailDesigner(http.Controller):
@website.route('/website_mail/email_designer/<model("email.template"):template>/', type='http', auth="public", multilang=True)
def index(self, template, **kw):
values = {
'template': template,
}
print template
return request.website.render("website_mail.designer_index", values)
@website.route(['/website_mail/snippets'], type='json', auth="public")
def snippets(self):
return request.website._render('website_mail.email_designer_snippets')