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] [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. +

+
+
+
+
+ +