From 53a103868d85499e4405413705d11c906367a9f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Espeche?= Date: Tue, 11 Feb 2014 09:21:19 +0100 Subject: [PATCH 1/6] uniformity of structure --- templates/backOffice/default/coupon-list.html | 256 ++++++++++-------- 1 file changed, 136 insertions(+), 120 deletions(-) diff --git a/templates/backOffice/default/coupon-list.html b/templates/backOffice/default/coupon-list.html index 5ed255cb1..fefd06098 100644 --- a/templates/backOffice/default/coupon-list.html +++ b/templates/backOffice/default/coupon-list.html @@ -6,132 +6,148 @@ {block name="page-title"}{intl l='Coupons'}{/block} {block name="main-content"} -
+
- +
- + -
-
-
- - - - - - - - - - - - - {loop type="coupon" name="list_coupon" is_enabled="1" backend_context="true"} - - - - - - - - {/loop} - -
- {intl l='Enabled coupons'} -
{block name="coupon-label-code"}{intl l='Code'}{/block}{block name="coupon-label-title"}{intl l='Title'}{/block}{block name="coupon-label-expiration-date"}{intl l='Days before expiration'}{/block}{block name="coupon-label-usage-left"}{intl l='Usage left'}{/block}{block name="coupon-label-action"}{/block}
{block name="coupon-code"}{$CODE}{/block}{block name="coupon-title"}{$TITLE}{/block}{block name="coupon-expiration-date"}{$DAY_LEFT_BEFORE_EXPIRATION}{/block} - {block name="coupon-usage-left"} - {if $USAGE_LEFT == -1} - - {intl l="Unlimited"} - - {elseif $USAGE_LEFT} - - {$USAGE_LEFT} - - {else} - - 0 - - {/if} - {/block} - - {block name="coupon-action"} - - {intl l='Edit'} - - {/block} -
-
-
-
+ {**} -
-
-
- - - - - - - - - - - - - {loop type="coupon" name="list_coupon" is_enabled="0" backend_context="true"} - - - - - - + + + + + + + + + + {loop type="coupon" name="list_coupon" is_enabled="1" backend_context="true"} + + + + + + + + {/loop} + +
- {intl l='Disabled coupons'} -
{block name="coupon-label-code"}{intl l='Code'}{/block}{block name="coupon-label-title"}{intl l='Title'}{/block}{block name="coupon-label-expiration-date"}{intl l='Expiration date'}{/block}{block name="coupon-label-usage-left"}{intl l='Usage left'}{/block}{block name="coupon-label-action"}{/block}
{block name="coupon-code"}{$CODE}{/block}{block name="coupon-title"}{$TITLE}{/block}{block name="coupon-expiration-date"}{$EXPIRATION_DATE}{/block} - {block name="coupon-usage-left"} - {if $USAGE_LEFT == -1} - - {intl l="Unlimited"} - - {elseif $USAGE_LEFT} - - {$USAGE_LEFT} - - {else} - - 0 - - {/if} - {/block} - - {block name="coupon-action"} - - {intl l='Edit'} +
+
+
+
+ +
+ {intl l='Enabled coupons'} + + {module_include location='coupon_list_caption'} + + {loop type="auth" name="can_create" role="ADMIN" resource="admin.coupon" access="CREATE"} + + - {/block} - - - {/loop} - -
-
-
- + {/loop} + - +
{block name="coupon-label-code"}{intl l='Code'}{/block}{block name="coupon-label-title"}{intl l='Title'}{/block}{block name="coupon-label-expiration-date"}{intl l='Days before expiration'}{/block}{block name="coupon-label-usage-left"}{intl l='Usage left'}{/block}{block name="coupon-label-action"}{/block}
{block name="coupon-code"}{$CODE}{/block}{block name="coupon-title"}{$TITLE}{/block}{block name="coupon-expiration-date"}{$DAY_LEFT_BEFORE_EXPIRATION}{/block} + {block name="coupon-usage-left"} + {if $USAGE_LEFT == -1} + + {intl l="Unlimited"} + + {elseif $USAGE_LEFT} + + {$USAGE_LEFT} + + {else} + + 0 + + {/if} + {/block} + + {block name="coupon-action"} + + {intl l='Edit'} + + {/block} +
+
+
+
+
+ +
+
+
+
+ + + + + + + + + + + + + {loop type="coupon" name="list_coupon" is_enabled="0" backend_context="true"} + + + + + + + + {/loop} + +
+ {intl l='Disabled coupons'} +
{block name="coupon-label-code"}{intl l='Code'}{/block}{block name="coupon-label-title"}{intl l='Title'}{/block}{block name="coupon-label-expiration-date"}{intl l='Expiration date'}{/block}{block name="coupon-label-usage-left"}{intl l='Usage left'}{/block}{block name="coupon-label-action"}{/block}
{block name="coupon-code"}{$CODE}{/block}{block name="coupon-title"}{$TITLE}{/block}{block name="coupon-expiration-date"}{$EXPIRATION_DATE}{/block} + {block name="coupon-usage-left"} + {if $USAGE_LEFT == -1} + + {intl l="Unlimited"} + + {elseif $USAGE_LEFT} + + {$USAGE_LEFT} + + {else} + + 0 + + {/if} + {/block} + + {block name="coupon-action"} + + {intl l='Edit'} + + {/block} +
+
+
+
+
+ + + + {/block} From c9b9bd2f375e11e22c04477f17863385e5cbc524 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Espeche?= Date: Tue, 11 Feb 2014 09:22:10 +0100 Subject: [PATCH 2/6] Delete smarty comments --- templates/backOffice/default/coupon-list.html | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/templates/backOffice/default/coupon-list.html b/templates/backOffice/default/coupon-list.html index fefd06098..cf09171cc 100644 --- a/templates/backOffice/default/coupon-list.html +++ b/templates/backOffice/default/coupon-list.html @@ -17,13 +17,6 @@ - {**} -
@@ -144,7 +137,7 @@
- + From 81ef58fe08b4dde3decab68f5ccd43720d9f9e00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Espeche?= Date: Tue, 11 Feb 2014 09:37:14 +0100 Subject: [PATCH 3/6] uniformity of structure --- .../backOffice/default/coupon-update.html | 31 +- templates/backOffice/default/coupon/form.html | 370 +++++++++--------- 2 files changed, 203 insertions(+), 198 deletions(-) diff --git a/templates/backOffice/default/coupon-update.html b/templates/backOffice/default/coupon-update.html index 2900aa971..5a2d89ccc 100644 --- a/templates/backOffice/default/coupon-update.html +++ b/templates/backOffice/default/coupon-update.html @@ -6,25 +6,22 @@ {block name="page-title"}{intl l='Update coupon'}{/block} {block name="main-content"} -
+
+
- + - - - {form name="thelia.admin.coupon.creation"} - {include file='coupon/form.html' formAction={url path={$formAction}} form=$form noConditions=false} - {/form} - -
+ {form name="thelia.admin.coupon.creation"} + {include file='coupon/form.html' formAction={url path={$formAction}} form=$form noConditions=false} + {/form} + + {/block} {block name="javascript-initialization"} diff --git a/templates/backOffice/default/coupon/form.html b/templates/backOffice/default/coupon/form.html index 2deadde4a..4f1650bca 100644 --- a/templates/backOffice/default/coupon/form.html +++ b/templates/backOffice/default/coupon/form.html @@ -1,175 +1,185 @@ {$thelia_page_css_file = "assets/bootstrap-editable/css/bootstrap-editable.css"} {include file='includes/notifications.html' message=$general_error} -
-
- -
- - {form_hidden_fields form=$form} - - {form_field form=$form field='locale'} - - {/form_field} - - {form_field form=$form field='success_url'} - - {/form_field} - -
-
- {if !$noConditions} - {include - file = "includes/inner-form-toolbar.html" - hide_submit_buttons = false - - page_url = "{url path="{$formAction}"}" - } - {/if} -
- {form_field form=$form field='code'} -
- - - {if $error}{$message}{/if} -
- {/form_field} - - {form_field form=$form field='title'} -
- - - {if $error}{$message}{/if} -
- {/form_field} - - {form_field form=$form field='isEnabled'} -
- -
- {/form_field} - - {form_field form=$form field='isAvailableOnSpecialOffers'} -
- -
- {/form_field} - - {form_field form=$form field='isCumulative'} -
- -
- {/form_field} - - {form_field form=$form field='isRemovingPostage'} -
- -
- {/form_field} - - {form_field form=$form field='expirationDate'} -
- -
- - {if $error}{$message}{/if} - -
-
- {/form_field} - - {form_field form=$form field='maxUsage'} -
- - - - - {if $error}{$message}{/if} -
- {/form_field} +
+
+
+
+ {intl l='Edit %title' title=$couponCode}
+
-
-
-
- {form_field form=$form field='type'} +
+ + + + {form_hidden_fields form=$form} + + {form_field form=$form field='locale'} + + {/form_field} + + {form_field form=$form field='success_url'} + + {/form_field} + + {if !$noConditions} + {include + file = "includes/inner-form-toolbar.html" + hide_submit_buttons = false + + page_url = "{url path="{$formAction}"}" + } + {/if} + +
+
+ {form_field form=$form field='code'}
- - + + + {if $error}{$message}{/if} +
+ {/form_field} + + {form_field form=$form field='title'} +
+ + + {if $error}{$message}{/if} +
+ {/form_field} + + {form_field form=$form field='isEnabled'} +
+ +
+ {/form_field} + + {form_field form=$form field='isAvailableOnSpecialOffers'} +
+ +
+ {/form_field} + + {form_field form=$form field='isCumulative'} +
+ +
+ {/form_field} + + {form_field form=$form field='isRemovingPostage'} +
+ +
+ {/form_field} + + {form_field form=$form field='expirationDate'} +
+ +
+ + {if $error}{$message}{/if} + +
+
+ {/form_field} + + {form_field form=$form field='maxUsage'} +
+ + + + {if $error}{$message}{/if} - {$availableCoupons.0.toolTip}
{/form_field}
-
- {form_field form=$form field='amount'} - {$couponInputsHtml nofilter} +
+
+
+ {form_field form=$form field='type'} +
+ + + {if $error}{$message}{/if} + {$availableCoupons.0.toolTip} +
+ {/form_field} +
+ +
+ {form_field form=$form field='amount'} + {$couponInputsHtml nofilter} + {/form_field} +
+
+ + {form_field form=$form field='shortDescription'} +
+ + + {if $error}{$message}{/if} +
{/form_field}
-
- - {form_field form=$form field='shortDescription'} -
- - - {if $error}{$message}{/if} -
- {/form_field} -
-
-
+
- {form_field form=$form field='description'} -
- - - {if $error}{$message}{/if} +
+ {form_field form=$form field='description'} +
+ + + {if $error}{$message}{/if} +
+ {/form_field} + + {if $noConditions} + + {/if}
- {/form_field} - - {if $noConditions} - - {/if} -
- +
+
- -
+ + {if $noConditions} {include file='includes/notifications.html' message={intl l='Please save your Coupon in oder to affect it some conditions'}} {else} -
-
- +
+
+ +
+
@@ -184,39 +194,37 @@
{intl l='Conditions'}
-
-
-
- + -
- {**} - {**} - {**} +
+
+ +
+ +
+ + {intl l='Save this condition'} + + +
+ + + +
+ +
+ +
-
- - - -
- -
-
- -
+ + {/if} From 8b57dff7172623e50c7c64a09aee9733c45997b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Espeche?= Date: Tue, 11 Feb 2014 09:41:26 +0100 Subject: [PATCH 4/6] uniformity of structure --- templates/backOffice/default/coupon-read.html | 43 ++++++++++--------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/templates/backOffice/default/coupon-read.html b/templates/backOffice/default/coupon-read.html index ff95084ac..c6dab9462 100644 --- a/templates/backOffice/default/coupon-read.html +++ b/templates/backOffice/default/coupon-read.html @@ -6,7 +6,10 @@ {block name="page-title"}{intl l='Coupon'}{/block} {block name="main-content"} -
+
+ +
+ {loop type="coupon" name="read_coupon" id={$couponId} backend_context="true"} - - - -
-
- - {if !$IS_ENABLED} -
- - {intl l='This coupon is disabled, you can enable at the bottom of this form.'} -
- {/if} - +
+
+
+ + {if !$IS_ENABLED} +
+ + {intl l='This coupon is disabled, you can enable at the bottom of this form.'} +
+ {/if} + @@ -142,8 +141,8 @@ @@ -151,11 +150,13 @@
- - {intl l='Edit'} + + {intl l='Edit'}
-
+
+
{/loop} -
+ + - {include file='includes/confirmation-modal.html' id="enable" message="{intl l='Do you really want to enable this element ?'}"} +{include file='includes/confirmation-modal.html' id="enable" message="{intl l='Do you really want to enable this element ?'}"} {/block} From 9eee933a498f537a0c937c2ffd781508084936b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Espeche?= Date: Tue, 11 Feb 2014 09:42:25 +0100 Subject: [PATCH 5/6] Fix wrong read url --- templates/backOffice/default/coupon-list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/backOffice/default/coupon-list.html b/templates/backOffice/default/coupon-list.html index cf09171cc..50d4ee5cb 100644 --- a/templates/backOffice/default/coupon-list.html +++ b/templates/backOffice/default/coupon-list.html @@ -102,7 +102,7 @@ {loop type="coupon" name="list_coupon" is_enabled="0" backend_context="true"} - {block name="coupon-code"}{$CODE}{/block} + {block name="coupon-code"}{$CODE}{/block} {block name="coupon-title"}{$TITLE}{/block} {block name="coupon-expiration-date"}{$EXPIRATION_DATE}{/block} From be39d3c55c24b3845a257800447583168a5ff90f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Espeche?= Date: Tue, 11 Feb 2014 09:49:18 +0100 Subject: [PATCH 6/6] Add utf-8 charset & x-ua-compatible tag --- templates/backOffice/default/admin-layout.tpl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/templates/backOffice/default/admin-layout.tpl b/templates/backOffice/default/admin-layout.tpl index 08829acdc..a55ca3b7b 100644 --- a/templates/backOffice/default/admin-layout.tpl +++ b/templates/backOffice/default/admin-layout.tpl @@ -13,11 +13,14 @@ + + {block name="page-title"}Default Page Title{/block} - {intl l='Thelia Back Office'} {images file='assets/img/favicon.ico'}{/images} - + + {block name="meta"}{/block}