From 93a5122ac52aadc81e043ad2d8143b639471d06b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 6 Feb 2014 15:55:10 +0100 Subject: [PATCH 1/5] [IMP] website_mail: improve email_template link for front-end edition didsplay bzr revid: tde@openerp.com-20140206145510-y4mangyhhmwcofa7 --- addons/website_mail/models/email_template.py | 2 +- addons/website_mail/views/email_template_view.xml | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/addons/website_mail/models/email_template.py b/addons/website_mail/models/email_template.py index aed01c179f7..6d84f91e5ab 100644 --- a/addons/website_mail/models/email_template.py +++ b/addons/website_mail/models/email_template.py @@ -30,7 +30,7 @@ class EmailTemplate(osv.Model): _inherit = 'email.template' def _get_website_link(self, cr, uid, ids, name, args, context=None): - return dict((id, _('Edit in Website') % id) for id in ids) + return dict((id, _('Open with visual editor') % id) for id in ids) _columns = { 'website_link': fields.function( diff --git a/addons/website_mail/views/email_template_view.xml b/addons/website_mail/views/email_template_view.xml index 3206eaeaee6..bb346af5e97 100644 --- a/addons/website_mail/views/email_template_view.xml +++ b/addons/website_mail/views/email_template_view.xml @@ -6,8 +6,10 @@ email.template - - + +
+
From 989a4f3103906c207d8f6dbfad90b5c56c0ae562 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 6 Feb 2014 15:55:24 +0100 Subject: [PATCH 2/5] [FIX] website_mail: also depends on email_template bzr revid: tde@openerp.com-20140206145524-bafdhe3gc62oya2c --- addons/website_mail/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website_mail/__openerp__.py b/addons/website_mail/__openerp__.py index 400411ed329..74fe86c6193 100644 --- a/addons/website_mail/__openerp__.py +++ b/addons/website_mail/__openerp__.py @@ -26,7 +26,7 @@ 'version': '0.1', 'description': """Glue module holding mail improvements for website.""", 'author': 'OpenERP SA', - 'depends': ['website', 'mail'], + 'depends': ['website', 'mail', 'email_template'], 'data': [ 'views/snippets.xml', 'views/website_mail.xml', From 1e2452fb1a9a06c341d6b80007437295ef705827 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Fri, 7 Feb 2014 09:41:37 +0100 Subject: [PATCH 3/5] [IMP] website_mail: email designer snippets categories better explained, to avoid confusion with the classic html editor bzr revid: tde@openerp.com-20140207084137-zk2o3nn7ml84axa6 --- addons/website_mail/views/snippets.xml | 12 ++++-------- addons/website_mail/views/website_email_designer.xml | 3 +++ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/addons/website_mail/views/snippets.xml b/addons/website_mail/views/snippets.xml index 0ec93296ddd..89bac693437 100644 --- a/addons/website_mail/views/snippets.xml +++ b/addons/website_mail/views/snippets.xml @@ -5,14 +5,12 @@
-
+
@@ -281,7 +279,7 @@
-
+
@@ -443,8 +441,6 @@
-
-
diff --git a/addons/website_mail/views/website_email_designer.xml b/addons/website_mail/views/website_email_designer.xml index e44c9f84a03..60c21255dd2 100644 --- a/addons/website_mail/views/website_email_designer.xml +++ b/addons/website_mail/views/website_email_designer.xml @@ -11,6 +11,9 @@

+ + Back to back-end +
Email From
From d26919f73e26327d6ff7a1f2c68543f9d1f5d4ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Fri, 7 Feb 2014 10:19:07 +0100 Subject: [PATCH 4/5] [IMP] website_mail: reordered email snippets, added 2 and 3 columns in basic email structures bzr revid: tde@openerp.com-20140207091907-6brx7m2i69mo9ow0 --- addons/website/models/website.py | 6 +- .../src/img/blocks/block_three_columns.png | Bin 0 -> 1293 bytes .../src/img/blocks/block_two_columns.png | Bin 0 -> 1081 bytes addons/website_mail/views/snippets.xml | 260 ++++++++++-------- 4 files changed, 155 insertions(+), 111 deletions(-) create mode 100644 addons/website_mail/static/src/img/blocks/block_three_columns.png create mode 100644 addons/website_mail/static/src/img/blocks/block_two_columns.png diff --git a/addons/website/models/website.py b/addons/website/models/website.py index 87dbb5b16ad..8703c6c5f32 100644 --- a/addons/website/models/website.py +++ b/addons/website/models/website.py @@ -78,7 +78,11 @@ def is_multilang_url(path, langs=None): def slugify(s, max_length=None): if slugify_lib: - return slugify_lib.slugify(s, max_length) + # There are 2 different libraries only python-slugify is supported + try: + return slugify_lib.slugify(s, max_length=max_length) + except TypeError: + pass spaceless = re.sub(r'\s+', '-', s) specialless = re.sub(r'[^-_A-Za-z0-9]', '', spaceless) return specialless[:max_length] diff --git a/addons/website_mail/static/src/img/blocks/block_three_columns.png b/addons/website_mail/static/src/img/blocks/block_three_columns.png new file mode 100644 index 0000000000000000000000000000000000000000..dd50e0336d3d238c683ec7aea7a59e6e7b7b7753 GIT binary patch literal 1293 zcmV+o1@iidP)O00009a7bBm000XU z000XU0RWnu7ytkO2XskIMF-vj2MG=x@uSB6000E6NklLI@3Pdo$vAB5NK5!3vuBJeaz1x&zy;D)Q6{KacL z62*Vyiz3SjXNjrnMUkS`>-YDX%_QPGQCl?gAb9@siacb^V`h#(>SwM^%NNybv>p^GTB21Q9g0D z*5P5RMF=@QIb99lfo-3++Zf{q`}=&((BIB{|Ml71r7|I;*Y9_)t%@YARV&u)qoj^c zPM5LICthGmKv57vdzPu|4M$_6uJbjehOT3bufmiEwmlC5qpowq(o~gph@rg>lQ;t` zIyD9n4H0dWDpHxRRL9hyiQ|ZZz`Zu0g(yngb-m;(p8v%{IvxZe3xp6ZmA3KMWWg}W zGQgS#bA(W-gd-d-(UQ#F*F=r5rq&1{@hyJ*dNxK}k>%t?i2>Hc`9uiWYwm_lqK2-! zp2z3X#BmTpp$pooB3C47;(X$coeaepU=c!k{f`w%I%u_46Gs$;$Bzy%#@%a+d+-Og zt*PqT?gHJ(AcS-+iyIa#KANhoRXq-IwmxfM+oC8mOjA>9{>{zI_bZY_Bl)t^Nz;^e zuPt1{MqSs`8jVmzmMfA(2zh<>Hf2-VwJcE-_L{p!UH5&TkcA|bImC+`UQHaQVVat% zQcT0qxYzG<&nbWJ(sVjg&!x&VkYo0tSeK};-kceAeN}v5+r9orCh;O)U}v~w%XaH( ztKx;|uBx2LD@x^ZXx&V|Dvl}2TN2-ixpFidjZ-F9RgptC(gwCoyQeg(?kJbGC%yys zv$oQdf&nam1+V~Co~#(tH(Yi)$%URh{XY4|P)@}Q(Hk;s9ag~d{hW$J8fKA(np$%` zH=#2Fy4`pe6ECSHghoSW^%b56yf8fF2j zs>s~un*VA!6^CjFX?Vx2gX?*(-kh<@efRA*^h!j$$H+G700000NkvXXu0mjf DRCZu2 literal 0 HcmV?d00001 diff --git a/addons/website_mail/static/src/img/blocks/block_two_columns.png b/addons/website_mail/static/src/img/blocks/block_two_columns.png new file mode 100644 index 0000000000000000000000000000000000000000..55a3f0c1c99ebb116932d3f3434ca05e075f9e86 GIT binary patch literal 1081 zcmV-91jhS`P)O00009a7bBm000XU z000XU0RWnu7ytkO2XskIMF-vj2MG!?J{~@!000BnNklq)w4oKy)BgI)I8)sKmcesU3<61BfhOg`w>@(E;=WKMcc|uQ|WC@Pi-{AbCU6;!G&Q0fe{u0^xK#p;5gYllZI*YlWq6E}dYV!dBk zCgW*4&YylicyNA0(+yplk)&p0ZFg^BV$GKBXNuA8-5d1D*i!F3@CV2gh6tfyy^*Mq42W(Rat46r9~ZHFKX{CV z5hh6zqsoRqKzgyR9UCE3Qk0nonrH2`t|Np@%c5V_aR*2*Rvdn_P?-qmUt<7hQ&T2{Mr%(U^q6Cg(g*R-w-O?y>V z$pqmCfo(gzL7z`=j~f7;epVQU!wNJ$#s@%fQp$S&l`g<|u?$^f_eqP@1+kjO1RypA zC;y-}1hGIY5bI@H+&rt-AGAB2_|M(>vOT&PkRtOG3y{FGl5X$@v^Ru>13(zE3B$5F zXFGPxi}QK>?@l@u6Al1LDYHV_^}O5L+l=p%3x(9Ri*SIrVwsk8K;vX)QIGUl z93a62AAfsptaqfnQ7{0khHS)|Eh$v`BxO}iccX9sSPdZzg{Kbb4tQ^Ftke1v`TyvRY3#0EFQrt%k!4V=Na62?IwkK(f`4O7D%BBuOc@UW5Zc>Hu>Vhy`MS zSRfV{hy`MSSRfXN1!94LSRfXN1!93%FVy}50;h$xbiZk800000NkvXXu0mjfJ_6## literal 0 HcmV?d00001 diff --git a/addons/website_mail/views/snippets.xml b/addons/website_mail/views/snippets.xml index 89bac693437..35932f6f7c3 100644 --- a/addons/website_mail/views/snippets.xml +++ b/addons/website_mail/views/snippets.xml @@ -5,7 +5,7 @@
@@ -13,6 +13,56 @@
+
+
+ + Text Block +
+
+ + + + + + + + + +
+

+ A Great Headline +

+

+ A good subtitle +

+
+
+

+ A great way to catch your reader's attention is to tell a story. + Everything you consider writing can be told as a story. +

+

+ Great stories have personality. Consider telling + a great story that provides personality. Writing a story + with personality for potential clients will asist with + making a relationship connection. This shows up in small + quirks like word choices or phrases. Write from your point + of view, not from someone else's experience. +

+

+ Great stories are for everyone even when only written for + just one person. If you try to write with a wide general + audience in mind, your story will ring false and be bland. + No one will be interested. Write for one person. If it’s genuine + for the one, it’s genuine for the rest. +

+ +
+
+
+
+ +
@@ -95,125 +145,34 @@
-
+
- - Big Message -
-
- - - - - - -
-
-

Sell Online. Easily.

-

- Write one sentence to convince visitor about your message. -

-
-
-
-
- - -
-
- - Text Block -
-
- - - - - - - - - -
-

- A Great Headline -

-

- A good subtitle -

-
-
-

- A great way to catch your reader's attention is to tell a story. - Everything you consider writing can be told as a story. -

-

- Great stories have personality. Consider telling - a great story that provides personality. Writing a story - with personality for potential clients will asist with - making a relationship connection. This shows up in small - quirks like word choices or phrases. Write from your point - of view, not from someone else's experience. -

-

- Great stories are for everyone even when only written for - just one person. If you try to write with a wide general - audience in mind, your story will ring false and be bland. - No one will be interested. Write for one person. If it’s genuine - for the one, it’s genuine for the rest. -

- -
-
-
-
- - -
-
- - Separator + + Two Columns
- - - -
-
-
-
+
+
-
-
- - -
-
- - Big Picture -
-
- - - - - - - - +
-

A Punchy Headline

+
+
- -
-

-

A Small Subtitle

+
+

Feature One

+

+ Choose a vibrant image and write an inspiring paragraph + about it. It does not have to be long, but it should + reinforce your image.

-

+

+

Feature Two

+

Choose a vibrant image and write an inspiring paragraph about it. It does not have to be long, but it should reinforce your image. @@ -228,7 +187,7 @@

- + Three Columns
@@ -276,12 +235,69 @@
+ +
+
+ + Separator +
+
+ + + + + + +
+
+
+
+
+
+
+
+
+
+ + Big Picture +
+
+ + + + + + + + + + + + +
+

A Punchy Headline

+
+ +
+

+

A Small Subtitle

+

+

+ Choose a vibrant image and write an inspiring paragraph + about it. It does not have to be long, but it should + reinforce your image. +

+
+
+
+ +
@@ -373,6 +389,30 @@
+
+
+ + Big Message +
+
+ + + + + + +
+
+

Sell Online. Easily.

+

+ Write one sentence to convince visitor about your message. +

+
+
+
+
+ +
From c02a51088992ee1bf4bf2819c6919ae8c552eb3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Fri, 7 Feb 2014 11:21:24 +0100 Subject: [PATCH 5/5] [IMP] website_mail: email designer: improved template + link to backend bzr revid: tde@openerp.com-20140207102124-5joee7c201fmxizu --- .../views/website_email_designer.xml | 59 ++++++++++--------- 1 file changed, 32 insertions(+), 27 deletions(-) diff --git a/addons/website_mail/views/website_email_designer.xml b/addons/website_mail/views/website_email_designer.xml index 60c21255dd2..dc2014c9310 100644 --- a/addons/website_mail/views/website_email_designer.xml +++ b/addons/website_mail/views/website_email_designer.xml @@ -10,38 +10,43 @@
-

- - Back to back-end - -
-
-
Email From
-
-
+
+
+ + + +

+
+
+
Email From
+
+
-
-
To (Email)
-
-
+
+
To (Email)
+
+
-
-
To (Partners)
-
-
+
+
To (Partners)
+
+
-
-
Reply To
-
-
+
+
Reply To
+
+
-
-
Subject
-
-
+
+
Subject
+
+
-
-
+
+
+
+