Browse Source

Merge pull request #48 from Yajo/website_mail_snippet_tr_edit

[8.0][website_mail_snippet_tr_edit] Edit <tr> in your mails.
pull/52/head
Pedro M. Baeza 9 years ago
parent
commit
4aea2f4a42
  1. 81
      website_mail_snippet_table_edit/README.rst
  2. 0
      website_mail_snippet_table_edit/__init__.py
  3. 20
      website_mail_snippet_table_edit/__openerp__.py
  4. BIN
      website_mail_snippet_table_edit/static/description/icon.png
  5. 49
      website_mail_snippet_table_edit/static/description/icon.svg
  6. 18
      website_mail_snippet_table_edit/views/snippets.xml

81
website_mail_snippet_table_edit/README.rst

@ -0,0 +1,81 @@
.. 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
=======================================
Edit Table Rows in Website Mail Designer
=======================================
This module extends the functionality of ``website_mail`` to support
duplication and deletion of table rows (``<tr>`` elements) and allow you to
have a beter UX when using table-based templates or snippets.
Installation
============
To see the effect of this module, you need to install another module that uses
the website mail designer, and you need to have some table-based snippets for
that, i.e. these modules:
* ``mass_mailing``.
* ``website_mail_snippet_fixed``.
Usage
=====
To use this module, you need to:
* Edit an email with the website editor.
* Use a table-based template or snippet.
* Select any table row. You can now copy or delete 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
======================
* You cannot drag & drop table rows among tables, and that's because of the
inner design of Odoo's drag & drop engine, that does not allow that easily.
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_table_edit%0Aversion:%20
8.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Credits
=======
Images
------
* FontAwesome: `Icon <http://fontawesome.io/icon/table/>`_.
Contributors
------------
* 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_table_edit/__init__.py

20
website_mail_snippet_table_edit/__openerp__.py

@ -0,0 +1,20 @@
# -*- 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": "Edit Table Rows in Website Mail Designer",
"summary": "Allows you to edit any <tr> element in any snippet/template",
"version": "8.0.1.0.0",
"category": "Social Network",
"website": "http://www.antiun.com",
"author": "Antiun Ingeniería S.L., Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": [
"website_mail",
],
"data": [
"views/snippets.xml",
],
}

BIN
website_mail_snippet_table_edit/static/description/icon.png

After

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

49
website_mail_snippet_table_edit/static/description/icon.svg

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
id="svg2"
viewBox="0 0 100 100"
height="100"
width="100">
<defs
id="defs4" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(0,-952.36216)"
id="layer1">
<text
id="text3336"
y="1014.9865"
x="49.967205"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:78.35671997px;line-height:87.99999952%;font-family:FontAwesome;-inkscape-font-specification:FontAwesome;text-align:center;writing-mode:lr-tb;text-anchor:middle;opacity:1;fill:#333333;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
xml:space="preserve"><tspan
y="1014.9865"
x="49.967205"
id="tspan3338"></tspan></text>
<text
id="text3340"
y="1045.1829"
x="49.990616"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:33.63451004px;line-height:87.99999952%;font-family:FontAwesome;-inkscape-font-specification:FontAwesome;text-align:center;writing-mode:lr-tb;text-anchor:middle;opacity:1;fill:#333333;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
xml:space="preserve"><tspan
y="1045.1829"
x="49.990616"
id="tspan3342"> </tspan></text>
</g>
</svg>

18
website_mail_snippet_table_edit/views/snippets.xml

@ -0,0 +1,18 @@
<?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="email_designer_snippets"
inherit_id="website_mail.email_designer_snippets">
<xpath expr="//div[@id='snippet_options']">
<div data-snippet-option-id='tr_editor'
data-selector="[data-oe-field='body_html'] tr">
</div>
</xpath>
</template>
</data>
</openerp>
Loading…
Cancel
Save