Browse Source

Merge pull request #47 from Yajo/website_mail_snippet_fixed

[8.0][website_mail_snippet_fixed] Fixed-Width Layout Snippets for Writing Emails
pull/51/head
Rafael Blasco 9 years ago
parent
commit
7991f26b7c
  1. 90
      website_mail_snippet_fixed/README.rst
  2. 0
      website_mail_snippet_fixed/__init__.py
  3. 30
      website_mail_snippet_fixed/__openerp__.py
  4. 98
      website_mail_snippet_fixed/i18n/es.po
  5. BIN
      website_mail_snippet_fixed/images/snippets.png
  6. BIN
      website_mail_snippet_fixed/static/description/icon.png
  7. BIN
      website_mail_snippet_fixed/static/src/img/snippet_1_col.png
  8. BIN
      website_mail_snippet_fixed/static/src/img/snippet_2_cols.png
  9. BIN
      website_mail_snippet_fixed/static/src/img/snippet_3_cols.png
  10. BIN
      website_mail_snippet_fixed/static/src/img/snippet_event_date.png
  11. BIN
      website_mail_snippet_fixed/static/src/img/snippet_hr.png
  12. BIN
      website_mail_snippet_fixed/static/src/img/snippet_img_text.png
  13. BIN
      website_mail_snippet_fixed/static/src/img/snippet_text_img.png
  14. 60
      website_mail_snippet_fixed/views/snippet_1_col.xml
  15. 128
      website_mail_snippet_fixed/views/snippet_2_cols.xml
  16. 188
      website_mail_snippet_fixed/views/snippet_3_cols.xml
  17. 108
      website_mail_snippet_fixed/views/snippet_event_date.xml
  18. 32
      website_mail_snippet_fixed/views/snippet_hr.xml
  19. 95
      website_mail_snippet_fixed/views/snippet_img_text.xml
  20. 95
      website_mail_snippet_fixed/views/snippet_text_img.xml
  21. 55
      website_mail_snippet_fixed/views/templates.xml

90
website_mail_snippet_fixed/README.rst

@ -0,0 +1,90 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
==============================================
Fixed-Width Layout Snippets for Writing Emails
==============================================
This module extends the functionality of the website mail designer with new
snippets with a fixed-width layout that works fine across any mail client,
including MS Outlook.
Installation
============
This module is prepared to be compatible with module ``website_mail_bg_color``.
If you install it, you will be able to change snippets' background colors, but
it is not required.
Usage
=====
To use this module, you need to:
#. Install any module that makes use of the website mail designer, such as
``mass_mailing``.
#. Edit an email with the website mail designer.
#. You have a new collection of snippets under *Fixed 560px Width* section.
Use them as usual.
If you choose the *Horizontal Separator* snippet, you will be able to set its
height too. For that, you will have to aim carefully to click inside the green
line, and then use the option that will float above it.
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/205/8.0
Known issues / Roadmap
======================
* Snippet code is ugly, but that's because mail client HTML engines usually
lack many of the modern CSS and HTML features. I hope we will be able to
improve this as mail clients keep improving.
* To set the *Horizontal Separator* height, you have to click inside it, which
will insert a ``<br type="_moz"/>`` in Firefox, that will make it seem like
its height is at least like a caret, even if you set a lower value. Do not
worry, it goes away when you press *Save*.
Bug Tracker
===========
Bugs are tracked on `GitHub Issues
<https://github.com/OCA/social/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smashing it by providing a detailed and welcomed `feedback
<https://github.com/OCA/
social/issues/new?body=module:%20
website_mail_snippet_fixed%0Aversion:%20
8.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Credits
=======
Images
------
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
Contributors
------------
* Daniel Gómez-Zurita <danielgz@antiun.com>
* Rafael Blasco <rafabn@antiun.com>
* Jairo Llopis <yajo.sk8@gmail.com>
Maintainer
----------
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
To contribute to this module, please visit https://odoo-community.org.

0
website_mail_snippet_fixed/__init__.py

30
website_mail_snippet_fixed/__openerp__.py

@ -0,0 +1,30 @@
# -*- coding: utf-8 -*-
# © 2016 Antiun Ingeniería S.L. - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Fixed-Width Layout Snippets for Writing Emails",
"summary": "560px width extra building blocks",
"version": "8.0.1.0.0",
"category": "Marketing",
"website": "http://www.antiun.com",
"author": "Antiun Ingeniería S.L., Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
"installable": True,
"images": [
"images/snippets.png",
],
"depends": [
"website_mail_snippet_vertical_resize_base",
],
"data": [
"views/templates.xml",
"views/snippet_1_col.xml",
"views/snippet_2_cols.xml",
"views/snippet_3_cols.xml",
"views/snippet_event_date.xml",
"views/snippet_hr.xml",
"views/snippet_img_text.xml",
"views/snippet_text_img.xml",
],
}

98
website_mail_snippet_fixed/i18n/es.po

@ -0,0 +1,98 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_mail_snippet_fixed
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-02-10 16:43+0100\n"
"PO-Revision-Date: 2016-02-10 16:44+0100\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"X-Generator: Poedit 1.8.6\n"
#. module: website_mail_snippet_fixed
#: view:website:560px_section
msgid "Big image + Text + Button (1 column)"
msgstr "Imagen grande + texto + botón (1 columna)"
#. module: website_mail_snippet_fixed
#: view:website:560px_section
msgid "Change Height"
msgstr "Cambiar altura"
#. module: website_mail_snippet_fixed
#. openerp-web
#: code:addons/website_mail_snippet_fixed/static/src/js/vertical_resize.js:23
#, python-format
msgid "Element height in pixels"
msgstr "Altura del elemento en píxeles"
#. module: website_mail_snippet_fixed
#: view:website:560px_section
msgid "Horizontal Separator"
msgstr "Separador horizontal"
#. module: website_mail_snippet_fixed
#: view:website:560px_section
msgid "Image + Text + Button (2 columns)"
msgstr "Imagen + texto + botón (2 columnas)"
#. module: website_mail_snippet_fixed
#: view:website:560px_section
msgid "Image + Text + Button (3 columns)"
msgstr "Imagen + texto + botón (3 columnas)"
#. module: website_mail_snippet_fixed
#: view:website:560px_section
msgid "Integer ut tempor lectus. Vivamus at gravida arcu."
msgstr "Integer ut tempor lectus. Vivamus at gravida arcu."
#. module: website_mail_snippet_fixed
#: view:website:560px_section
msgid "Learn more"
msgstr "Aprenda más"
#. module: website_mail_snippet_fixed
#: view:website:560px_section
msgid "Left Image, Right Text + Button"
msgstr "Imagen a la izquierda, texto + botón a la derecha"
#. module: website_mail_snippet_fixed
#: view:website:560px_section
msgid "Left Text and Button, Right Image"
msgstr "Texto + botón a la izquierda, imagen a la derecha"
#. module: website_mail_snippet_fixed
#: view:website:560px_section
msgid ""
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed varius, leo a "
"ullamcorper feugiat, ante purus sodales justo, a faucibus libero lacus a "
"est. Aenean at mollis ipsum."
msgstr ""
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed varius, leo a "
"ullamcorper feugiat, ante purus sodales justo, a faucibus libero lacus a "
"est. Aenean at mollis ipsum."
#. module: website_mail_snippet_fixed
#: view:website:560px_section
msgid "News Item"
msgstr "Noticia del boletín"
#. module: website_mail_snippet_fixed
#. openerp-web
#: code:addons/website_mail_snippet_fixed/static/src/js/vertical_resize.js:22
#, python-format
msgid "Set element height"
msgstr ""
#. module: website_mail_snippet_fixed
#: view:website:560px_section
msgid "Title"
msgstr "Título"

BIN
website_mail_snippet_fixed/images/snippets.png

After

Width: 607  |  Height: 1827  |  Size: 60 KiB

BIN
website_mail_snippet_fixed/static/description/icon.png

After

Width: 128  |  Height: 128  |  Size: 9.2 KiB

BIN
website_mail_snippet_fixed/static/src/img/snippet_1_col.png

After

Width: 100  |  Height: 79  |  Size: 1.7 KiB

BIN
website_mail_snippet_fixed/static/src/img/snippet_2_cols.png

After

Width: 100  |  Height: 79  |  Size: 1.9 KiB

BIN
website_mail_snippet_fixed/static/src/img/snippet_3_cols.png

After

Width: 100  |  Height: 79  |  Size: 2.1 KiB

BIN
website_mail_snippet_fixed/static/src/img/snippet_event_date.png

After

Width: 100  |  Height: 79  |  Size: 2.7 KiB

BIN
website_mail_snippet_fixed/static/src/img/snippet_hr.png

After

Width: 100  |  Height: 79  |  Size: 1.2 KiB

BIN
website_mail_snippet_fixed/static/src/img/snippet_img_text.png

After

Width: 100  |  Height: 79  |  Size: 2.6 KiB

BIN
website_mail_snippet_fixed/static/src/img/snippet_text_img.png

After

Width: 100  |  Height: 79  |  Size: 2.6 KiB

60
website_mail_snippet_fixed/views/snippet_1_col.xml

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- © 2016 Antiun Ingeniería S.L. - Jairo Llopis
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
<openerp>
<data>
<template id="snippet_1_col"
inherit_id="560px_section">
<xpath expr=".">
<t t-call="website_mail_snippet_fixed.snippet">
<t t-set="image" t-value="'snippet_1_col'"/>
<t t-set="title">Big image + Text + Button (1 column)</t>
<tbody>
<tr>
<td align="left" style="font-size: 11pt; font-family: Arial, sans-serif; font-weight: bold; color: #000; padding: 20px 10px 10px 20px;">Title</td>
</tr>
<tr>
<td style="display: block; color: #000000; font-family: Arial, sans-serif; font-size: 9pt;"><a href="#" target="_blank"><img src="http://placehold.it/560x200/aaaaaa/ffffff?text=width 560px" style="display: block; color: #000000; font-family: Arial, sans-serif; font-size: 9pt; width: 560px;" border="0" width="570"/> </a></td>
</tr>
<tr>
<td style="padding:0 20px;">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td style="font-size: 18pt; font-family: Arial, sans-serif; color: #000000; padding-top: 30px;" align="left">Title</td>
</tr>
<tr>
<td style="padding: 20px 0 0 0; font-size: 9pt; line-height: 20px; font-family: Arial, sans-serif; color: #000000;" align="left">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed varius, leo a ullamcorper feugiat, ante purus sodales justo, a faucibus libero lacus a est. Aenean at mollis ipsum.</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td align="left">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td style="padding: 25px 20px;" align="left">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td align="center"><a href="#" style="font-size: 9pt; font-family: Arial, sans-serif; font-weight: normal; color: #ffffff; text-decoration: none; background-color: #00B518; border-top: 10px solid #00B518; border-bottom: 10px solid #00B518; border-left: 20px solid #00B518; border-right: 20px solid #00B518; border-radius: 3px; -webkit-border-radius: 3px; -moz-border-radius: 3px; display: inline-block;" class="bg_color_picker" target="_blank">Learn more</a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</t>
</xpath>
</template>
</data>
</openerp>

128
website_mail_snippet_fixed/views/snippet_2_cols.xml

@ -0,0 +1,128 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- © 2016 Antiun Ingeniería S.L. - Jairo Llopis
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
<openerp>
<data>
<template id="snippet_2_cols"
inherit_id="560px_section">
<xpath expr=".">
<t t-call="website_mail_snippet_fixed.snippet">
<t t-set="image" t-value="'snippet_2_cols'"/>
<t t-set="title">Image + Text + Button (2 columns)</t>
<tbody>
<tr>
<td align="left" colspan="2" style="font-size: 11pt; font-family: Arial, sans-serif; font-weight: bold; color: #000; padding: 20px 10px 0 20px;">Title</td>
</tr>
<tr>
<td style="padding: 0;" valign="top">
<!-- LEFT COLUMN -->
<table style="width:280px;" border="0" cellpadding="0" cellspacing="0" align="left">
<tbody>
<tr>
<td style="padding: 20px 10px 20px 20px;" valign="top">
<table style="border-collapse:collapse;background:inherit;color:inherit;" cellpadding="0" cellspacing="0" align="center">
<tbody>
<tr>
<td style="display: block; color: #000000; font-family: Arial, sans-serif; font-size: 9pt;"><a href="#" target="_blank"><img src="http://placehold.it/250x200/aaaaaa/ffffff?text=width 250px" style="display: block; color: #000000; font-family: Arial, sans-serif; font-size: 9pt; width: 250px;" width="250" border="0"/></a></td>
</tr>
<tr>
<td style="padding:0;">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td style="font-size: 18pt; font-family: Arial, sans-serif; color: #000000; padding-top: 30px;" align="left">Title</td>
</tr>
<tr>
<td style="padding: 20px 0 0 0; font-size: 9pt; line-height: 20px; font-family: Arial, sans-serif; color: #000000;" align="left">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed varius, leo a ullamcorper feugiat, ante purus sodales justo, a faucibus libero lacus a est. Aenean at mollis ipsum.</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td align="left">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td style="padding: 25px 0;" align="left">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td align="center"><a href="#" style="font-size: 9pt; font-family: Arial, sans-serif; font-weight: normal; color: #ffffff; text-decoration: none; background-color: #00B518; border-top: 10px solid #00B518; border-bottom: 10px solid #00B518; border-left: 20px solid #00B518; border-right: 20px solid #00B518; border-radius: 3px; -webkit-border-radius: 3px; -moz-border-radius: 3px; display: inline-block;" target="_blank" class="bg_color_picker">Learn more</a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<td style="padding: 0;" valign="top">
<!-- RIGHT COLUMN -->
<table style="width:280px;" border="0" cellpadding="0" cellspacing="0" align="left">
<tbody>
<tr>
<td style="padding: 20px 20px 20px 10px;" valign="top">
<table style="border-collapse:collapse;background:inherit;color:inherit;" cellpadding="0" cellspacing="0" align="center">
<tbody>
<tr>
<td style="display: block; color: #000000; font-family: Arial, sans-serif; font-size: 9pt;"><a href="#" target="_blank"><img src="http://placehold.it/250x200/aaaaaa/ffffff?text=width 250px" style="display: block; color: #000000; font-family: Arial, sans-serif; font-size: 9pt; width: 50% width: 250px;" width="250" border="0"/></a></td>
</tr>
<tr>
<td style="padding:0;">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td style="font-size: 18pt; font-family: Arial, sans-serif; color: #000000; padding-top: 30px;" align="left">Title</td>
</tr>
<tr>
<td style="padding: 20px 0 0 0; font-size: 9pt; line-height: 20px; font-family: Arial, sans-serif; color: #000000;" align="left">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed varius, leo a ullamcorper feugiat, ante purus sodales justo, a faucibus libero lacus a est. Aenean at mollis ipsum.</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td align="left">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td style="padding: 25px 0;" align="left">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td align="center"><a href="#" style="font-size: 9pt; font-family: Arial, sans-serif; font-weight: normal; color: #ffffff; text-decoration: none; background-color: #00B518; border-top: 10px solid #00B518; border-bottom: 10px solid #00B518; border-left: 20px solid #00B518; border-right: 20px solid #00B518; border-radius: 3px; -webkit-border-radius: 3px; -moz-border-radius: 3px; display: inline-block;" target="_blank" class="bg_color_picker">Learn more</a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</t>
</xpath>
</template>
</data>
</openerp>

188
website_mail_snippet_fixed/views/snippet_3_cols.xml

@ -0,0 +1,188 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- © 2016 Antiun Ingeniería S.L. - Jairo Llopis
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
<openerp>
<data>
<template id="snippet_3_cols"
inherit_id="560px_section">
<xpath expr=".">
<t t-call="website_mail_snippet_fixed.snippet">
<t t-set="image" t-value="'snippet_3_cols'"/>
<t t-set="title">Image + Text + Button (3 columns)</t>
<tbody>
<tr>
<td align="left" colspan="3" style="font-size: 11pt; font-family: Arial, sans-serif; font-weight: bold; color: #000; padding: 20px 10px 0 20px;">Title</td>
</tr>
<tr><!-- FIRST COLUMN -->
<td style="padding: 0;" valign="top">
<table align="left" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="padding: 20px 10px 20px 20px;" valign="top">
<table align="center" cellpadding="0" cellspacing="0" style="border-collapse:collapse;background:inherit;color:inherit;" width="160">
<tbody>
<tr>
<td style="display: block; color: #000000; font-family: Arial, sans-serif; font-size: 9pt;"><a href="#" target="_blank"><img src="http://placehold.it/160x160/aaaaaa/ffffff?text=width%20160px" style="display: block; color: #000000; font-family: Arial, sans-serif; font-size: 9pt;width: 100%; width:160px;" border="0" width="160"/></a></td>
</tr>
<tr>
<td style="padding:0;">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td style="font-size: 18pt; font-family: Arial, sans-serif; color: #000000; padding-top: 30px;" align="left">Title</td>
</tr>
<tr>
<td align="left" style="padding: 20px 0 0 0; font-size: 9pt; line-height: 20px; font-family: Arial, sans-serif; color: #000000;">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed varius, leo a ullamcorper feugiat, ante purus sodales justo, a faucibus libero lacus a est. Aenean at mollis ipsum.</td>
</tr>
<tr>
<td align="left">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td style="padding: 25px 0px;" align="left">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td align="center"><a href="#" style="font-size: 9pt; font-family: Arial, sans-serif; font-weight: normal; color: #ffffff; text-decoration: none; background-color: #00B518; border-top: 10px solid #00B518; border-bottom: 10px solid #00B518; border-left: 20px solid #00B518; border-right: 20px solid #00B518; border-radius: 3px; -webkit-border-radius: 3px; -moz-border-radius: 3px; display: inline-block;" class="bg_color_picker" target="_blank">Learn more</a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<!-- SECOND COLUMN -->
<td style="padding: 0;" valign="top">
<table align="left" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="padding: 20px 10px 20px 10px;" valign="top">
<table align="center" cellpadding="0" cellspacing="0" style="border-collapse:collapse;background:inherit;color:inherit;" width="160">
<tbody>
<tr>
<td style="display: block; color: #000000; font-family: Arial, sans-serif; font-size: 9pt;"><a href="#" target="_blank"><img src="http://placehold.it/160x160/aaaaaa/ffffff?text=width%20160px" style="display: block; color: #000000; font-family: Arial, sans-serif; font-size: 9pt;width: 100%; width:160px;" border="0" width="160"/></a></td>
</tr>
<tr>
<td style="padding:0;">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td style="font-size: 18pt; font-family: Arial, sans-serif; color: #000000; padding-top: 30px;" align="left">Title</td>
</tr>
<tr>
<td align="left" style="padding: 20px 0 0 0; font-size: 9pt; line-height: 20px; font-family: Arial, sans-serif; color: #000000;">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed varius, leo a ullamcorper feugiat, ante purus sodales justo, a faucibus libero lacus a est. Aenean at mollis ipsum.</td>
</tr>
<tr>
<td align="left">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td style="padding: 25px 0px;" align="left">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td align="center"><a href="#" style="font-size: 9pt; font-family: Arial, sans-serif; font-weight: normal; color: #ffffff; text-decoration: none; background-color: #00B518; border-top: 10px solid #00B518; border-bottom: 10px solid #00B518; border-left: 20px solid #00B518; border-right: 20px solid #00B518; border-radius: 3px; -webkit-border-radius: 3px; -moz-border-radius: 3px; display: inline-block;" class="bg_color_picker" target="_blank">Learn more</a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<!-- THIRD COLUMN -->
<td style="padding: 0;" valign="top">
<table align="left" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="padding: 20px 20px 20px 10px;" valign="top">
<table align="center" cellpadding="0" cellspacing="0" style="border-collapse:collapse;background:inherit;color:inherit;" width="160">
<tbody>
<tr>
<td style="display: block; color: #000000; font-family: Arial, sans-serif; font-size: 9pt;"><a href="#" target="_blank"><img src="http://placehold.it/160x160/aaaaaa/ffffff?text=width%20160px" style="display: block; color: #000000; font-family: Arial, sans-serif; font-size: 9pt;width: 100%; width:160px;" border="0" width="160"/></a></td>
</tr>
<tr>
<td style="padding:0;">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td style="font-size: 18pt; font-family: Arial, sans-serif; color: #000000; padding-top: 30px;" align="left">Title</td>
</tr>
<tr>
<td align="left" style="padding: 20px 0 0 0; font-size: 9pt; line-height: 20px; font-family: Arial, sans-serif; color: #000000;">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed varius, leo a ullamcorper feugiat, ante purus sodales justo, a faucibus libero lacus a est. Aenean at mollis ipsum.</td>
</tr>
<tr>
<td align="left">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td style="padding: 25px 0px;" align="left">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td align="center"><a href="#" style="font-size: 9pt; font-family: Arial, sans-serif; font-weight: normal; color: #ffffff; text-decoration: none; background-color: #00B518; border-top: 10px solid #00B518; border-bottom: 10px solid #00B518; border-left: 20px solid #00B518; border-right: 20px solid #00B518; border-radius: 3px; -webkit-border-radius: 3px; -moz-border-radius: 3px; display: inline-block;" class="bg_color_picker" target="_blank">Learn more</a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</t>
</xpath>
</template>
</data>
</openerp>

108
website_mail_snippet_fixed/views/snippet_event_date.xml

@ -0,0 +1,108 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- © 2016 Antiun Ingeniería S.L. - Jairo Llopis
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
<openerp>
<data>
<template id="snippet_event_date"
inherit_id="560px_section">
<xpath expr=".">
<t t-call="website_mail_snippet_fixed.snippet">
<t t-set="image" t-value="'snippet_event_date'"/>
<t t-set="title">Date + Text + Button (2 columns)</t>
<tbody>
<tr>
<td align="left" colspan="2" style="font-size: 11pt; font-family: Arial, sans-serif; font-weight: bold; color: #000; padding: 20px 10px 0 20px;">Title</td>
</tr>
<tr>
<td style="padding: 0;" valign="top"><!-- LEFT COLUMN -->
<table align="left" border="0" cellpadding="0" cellspacing="0" width="50%">
<tbody>
<tr>
<td style="padding: 20px 0 20px 40px;">
<table align="center" bgcolor="#FFFFFF" cellpadding="0" cellspacing="0" style="border-collapse:collapse;background:inherit;color:inherit; background:#000000">
<tbody>
<tr>
<td style="padding:1px;">
<table border="0" cellpadding="0" cellspacing="0" width="200" height="200" style="background:#FFFFFF">
<tbody>
<tr>
<td align="center" style="font-size: 65pt; text-align: center; line-height:50pt; font-weight: bold; font-family: Arial, sans-serif; color: #000000; padding: 30px 0 0 0;">07</td>
</tr>
<tr>
<td align="center" style="padding: 10px 0 0 0; font-size: 16pt; text-align: center; font-weight: bold; letter-spaccing:2px; text-transform: uppercase; line-height: 20px; font-family: Arial, sans-serif; color: #000000;">December</td>
</tr>
<tr>
<td align="center" style="padding: 0 0 30px 0; font-size: 16pt; text-align: center; font-weight: bold; letter-spaccing:2px; text-transform: uppercase; line-height: 20px; font-family: Arial, sans-serif; color: #000000;">18:00</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<!-- RIGHT COLUMN -->
<td>
<table align="left" border="0" cellpadding="0" cellspacing="0" width="50%">
<tbody>
<tr>
<td style="padding: 20px 20px 20px 10px;">
<table align="center" cellpadding="0" cellspacing="0" style="border-collapse:collapse;background:inherit;color:inherit;" width="250">
<tbody>
<tr>
<td style="padding:0;">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td style="font-size: 18pt; font-family: Arial, sans-serif; color: #000000; padding-top: 10px;" align="left">Event Title</td>
</tr>
<tr>
<td align="left" style="padding: 10px 0 0 0; font-size: 9pt; line-height: 20px; font-family: Arial, sans-serif; color: #000000;">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</td>
</tr>
<tr>
<td align="left">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td style="padding: 25px 0;" align="left">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td align="center"><a href="#" style="font-size: 9pt; font-family: Arial, sans-serif; font-weight: normal; color: #ffffff; text-decoration: none; background-color: #00B518; border-top: 10px solid #00B518; border-bottom: 10px solid #00B518; border-left: 20px solid #00B518; border-right: 20px solid #00B518; border-radius: 3px; -webkit-border-radius: 3px; -moz-border-radius: 3px; display: inline-block;" class="bg_color_picker" target="_blank">Learn more</a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</t>
</xpath>
</template>
</data>
</openerp>

32
website_mail_snippet_fixed/views/snippet_hr.xml

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- © 2016 Antiun Ingeniería S.L. - Jairo Llopis
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
<openerp>
<data>
<template id="snippet_hr"
inherit_id="560px_section">
<xpath expr=".">
<t t-call="website_mail_snippet_fixed.snippet">
<t t-set="image" t-value="'snippet_hr'"/>
<t t-set="title">Horizontal Separator</t>
<tbody>
<tr>
<td style="background-color: #ECECEC;" class="bg_color_picker" height="10"></td>
</tr>
<tr>
<td style="background-color: #00B518;"
height="5"
class="bg_color_picker vertical_resizable"/>
</tr>
<tr>
<td style="background-color: #ECECEC;" class="bg_color_picker" height="10"></td>
</tr>
</tbody>
</t>
</xpath>
</template>
</data>
</openerp>

95
website_mail_snippet_fixed/views/snippet_img_text.xml

@ -0,0 +1,95 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- © 2016 Antiun Ingeniería S.L. - Jairo Llopis
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
<openerp>
<data>
<template id="snippet_img_text"
inherit_id="560px_section">
<xpath expr=".">
<t t-call="website_mail_snippet_fixed.snippet">
<t t-set="image" t-value="'snippet_img_text'"/>
<t t-set="title">Left Image, Right Text + Button</t>
<tbody>
<tr>
<td align="left" colspan="2" style="font-size: 11pt; font-family: Arial, sans-serif; font-weight: bold; color: #000; padding: 20px 10px 0 20px;">Title</td>
</tr>
<tr>
<td style="padding: 0;" valign="top"><!-- LEFT COLUMN -->
<table align="left" border="0" cellpadding="0" cellspacing="0" width="50%">
<tbody>
<tr>
<td style="padding: 20px 10px 20px 20px;">
<table align="center" cellpadding="0" cellspacing="0" style="border-collapse:collapse;background:inherit;color:inherit;" width="250">
<tbody>
<tr>
<td style="display: block; color: #000000; font-family: Arial, sans-serif; font-size: 9pt;"><a href="#" target="_blank"><img src="http://placehold.it/250x200/aaaaaa/ffffff?text=width%20250px" style="display: block; color: #000000; font-family: Arial, sans-serif; font-size: 9pt; width: 250px;" border="0" width="250"/></a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<!-- RIGHT COLUMN -->
<td>
<table align="left" border="0" cellpadding="0" cellspacing="0" width="50%">
<tbody>
<tr>
<td style="padding: 20px 20px 20px 10px;" valign="top">
<table align="center" cellpadding="0" cellspacing="0" style="border-collapse:collapse;background:inherit;color:inherit;" width="250">
<tbody>
<tr>
<td style="padding:0;">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td style="font-size: 18pt; font-family: Arial, sans-serif; color: #000000; padding-top: 10px;" align="left">News Item</td>
</tr>
<tr>
<td align="left" style="padding: 10px 0 0 0; font-size: 9pt; line-height: 20px; font-family: Arial, sans-serif; color: #000000;">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</td>
</tr>
<tr>
<td align="left">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td style="padding: 25px 0;" align="left">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td align="center"><a href="#" style="font-size: 9pt; font-family: Arial, sans-serif; font-weight: normal; color: #ffffff; text-decoration: none; background-color: #00B518; border-top: 10px solid #00B518; border-bottom: 10px solid #00B518; border-left: 20px solid #00B518; border-right: 20px solid #00B518; border-radius: 3px; -webkit-border-radius: 3px; -moz-border-radius: 3px; display: inline-block;" class="bg_color_picker" target="_blank">Learn more</a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</t>
</xpath>
</template>
</data>
</openerp>

95
website_mail_snippet_fixed/views/snippet_text_img.xml

@ -0,0 +1,95 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- © 2016 Antiun Ingeniería S.L. - Jairo Llopis
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
<openerp>
<data>
<template id="snippet_text_img"
inherit_id="560px_section">
<xpath expr=".">
<t t-call="website_mail_snippet_fixed.snippet">
<t t-set="image" t-value="'snippet_text_img'"/>
<t t-set="title">Left Text and Button, Right Image</t>
<tbody>
<tr>
<td align="left" colspan="2" style="font-size: 11pt; font-family: Arial, sans-serif; font-weight: bold; color: #000; padding: 20px 10px 0 20px;">Title</td>
</tr>
<tr>
<td style="padding: 0;" valign="top"><!-- LEFT COLUMN -->
<table align="left" border="0" cellpadding="0" cellspacing="0" width="50%">
<tbody>
<tr>
<td style="padding: 20px 10px 20px 20px;" valign="top">
<table align="center" cellpadding="0" cellspacing="0" style="border-collapse:collapse;background:inherit;color:inherit;" width="250">
<tbody>
<tr>
<td style="padding:0;">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td style="font-size: 18pt; font-family: Arial, sans-serif; color: #000000; padding-top: 10px;" align="left">News Item</td>
</tr>
<tr>
<td align="left" style="padding: 10px 0 0 0; font-size: 9pt; line-height: 20px; font-family: Arial, sans-serif; color: #000000;">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</td>
</tr>
<tr>
<td align="left">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td style="padding: 25px 0;" align="left">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td align="center"><a href="#" style="font-size: 9pt; font-family: Arial, sans-serif; font-weight: normal; color: #ffffff; text-decoration: none; background-color: #00B518; border-top: 10px solid #00B518; border-bottom: 10px solid #00B518; border-left: 20px solid #00B518; border-right: 20px solid #00B518; border-radius: 3px; -webkit-border-radius: 3px; -moz-border-radius: 3px; display: inline-block;" class="bg_color_picker" target="_blank">Learn more</a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<!-- RIGHT COLUMN -->
<td>
<table align="left" border="0" cellpadding="0" cellspacing="0" width="50%">
<tbody>
<tr><td style="padding: 20px 20px 20px 10px;">
<table align="center" bgcolor="#FFFFFF" cellpadding="0" cellspacing="0" style="border-collapse:collapse;background:inherit;color:inherit; background:#FFFFFF" width="250">
<tbody>
<tr>
<td style="display: block; color: #000000; font-family: Arial, sans-serif; font-size: 9pt;"><a href="#" target="_blank"><img src="http://placehold.it/250x200/aaaaaa/ffffff?text=width%20250px" style="display: block; color: #000000; font-family: Arial, sans-serif; font-size: 9pt; width: 250px;" border="0" width="250"/></a></td>
</tr>
</tbody>
</table>
</td></tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</t>
</xpath>
</template>
</data>
</openerp>

55
website_mail_snippet_fixed/views/templates.xml

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- © 2016 Antiun Ingeniería S.L. - Jairo Llopis
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
<openerp>
<data>
<!-- Section with 560px width snippets -->
<template id="560px_section_add"
inherit_id="website_mail.email_designer_snippets">
<xpath expr="//a[@href='#snippet_email_structure']/.." position="after">
<li>
<a href="#snippet_email_560px" data-toggle="tab">
Fixed 560px Width
</a>
</li>
</xpath>
<xpath expr="//div[@id='snippet_email_structure']" position="after">
<div id="snippet_email_560px" class="tab-pane fade">
<t t-call="website_mail_snippet_fixed.560px_section"/>
</div>
</xpath>
</template>
<template id="560px_section"/>
<!-- Base structure for all snippets -->
<template id="snippet">
<div>
<div class="oe_snippet_thumbnail">
<img
class="oe_snippet_thumbnail_img"
t-attf-src="/website_mail_snippet_fixed/static/src/img/#{image}.png"/>
<span
t-esc="title"
class="oe_snippet_thumbnail_title"/>
</div>
<div
class="oe_snippet_body"
style="padding:0px; width:100%; background-color:#ececec; color:rgb(0,0,0); line-height:20px; font-family:Arial,sans-serif; font-size:9pt">
<table
style="width: 560px; border-collapse: collapse; background: inherit; color: inherit; background: #FFFFFF"
cellpadding="0"
cellspacing="0"
align="center"
class="bg_color_picker">
<t t-raw="0"/>
</table>
</div>
</div>
</template>
</data>
</openerp>
Loading…
Cancel
Save