From 316043d93a9e9231a31280112560814bb7a9f527 Mon Sep 17 00:00:00 2001 From: franck Date: Fri, 13 Sep 2013 00:18:19 +0200 Subject: [PATCH] Fixed action column alignment --- .../default/assets/less/thelia/tables.less | 7 +++ templates/admin/default/attribute-edit.html | 22 ++++--- templates/admin/default/attributes.html | 62 ++++++++++++++++++- templates/admin/default/categories.html | 2 +- templates/admin/default/currencies.html | 2 +- templates/admin/default/customers.html | 24 +++---- .../default/includes/inner-form-toolbar.html | 2 +- .../standard-description-form-fields.html | 8 +-- .../default/includes/thelia_news_feed.html | 3 +- templates/admin/default/orders.html | 14 ++--- 10 files changed, 111 insertions(+), 35 deletions(-) diff --git a/templates/admin/default/assets/less/thelia/tables.less b/templates/admin/default/assets/less/thelia/tables.less index d8b3a9e4e..5997840a8 100755 --- a/templates/admin/default/assets/less/thelia/tables.less +++ b/templates/admin/default/assets/less/thelia/tables.less @@ -55,6 +55,13 @@ .table-left-aligned { th, td { text-align: left; + + &.text-center { + text-align: center; + } + &.text-right { + text-align: right; + } } select, textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input { diff --git a/templates/admin/default/attribute-edit.html b/templates/admin/default/attribute-edit.html index 1b290f222..882edd60c 100644 --- a/templates/admin/default/attribute-edit.html +++ b/templates/admin/default/attribute-edit.html @@ -37,6 +37,10 @@

{intl l='Attribute information'}

+ {form_field form=$form field='id'} + + {/form_field} + {* Be sure to get the attribute ID, even if the form could not be validated *} @@ -52,7 +56,7 @@ {if $form_error}
{$form_error_message}
{/if} - {include file="includes/standard-description-form-fields.html"} + {include file="includes/standard-description-form-fields.html" form=$form}
@@ -79,9 +83,10 @@ {admin_sortable_header - current_order=$order + current_order=$attributeav_order order='id' reverse_order='id_reverse' + request_parameter_name='attributeav_order' path={url path='/admin/configuration/attributes/update' attribute_id=$attribute_id} label="{intl l='ID'}" } @@ -89,9 +94,10 @@ {admin_sortable_header - current_order=$order + current_order=$attributeav_order order='alpha' reverse_order='alpha_reverse' + request_parameter_name='attributeav_order' path={url path='/admin/configuration/attributes/update' attribute_id=$attribute_id} label="{intl l='Value'}" } @@ -99,9 +105,10 @@ {admin_sortable_header - current_order=$order + current_order=$attributeav_order order='manual' reverse_order='manual_reverse' + request_parameter_name='attributeav_order' path={url path='/admin/configuration/attributes/update' attribute_id=$attribute_id} label="{intl l="Position"}" } @@ -114,12 +121,13 @@ - {loop name="list" type="attribute_availability" attribute=$attribute_id backend_context="1" lang=$edit_language_id order=$order} + {loop name="list" type="attribute_availability" attribute=$attribute_id backend_context="1" lang=$edit_language_id order=$attributeav_order} {$ID} - + {* FIXME : integrate this in the encolsing form to provide standard form processing *} + @@ -151,7 +159,7 @@
- {intl l="No product attribute has been created yet. Click the + button to create one."} + {intl l="No value has been created yet. Click the + button to create one."}
diff --git a/templates/admin/default/attributes.html b/templates/admin/default/attributes.html index eab4996ac..57fd9c256 100644 --- a/templates/admin/default/attributes.html +++ b/templates/admin/default/attributes.html @@ -97,6 +97,17 @@ {module_include location='attributes_table_row'} + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.attributes.change"} + + {/loop} +
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.attributes.change"} @@ -213,10 +224,51 @@ dialog_title = {intl l="Delete attribute"} dialog_message = {intl l="Do you really want to delete this attribute ? It will be removed from all product templates."} - form_action = {url path='/admin/configuration/attributes/delete'} + form_action = {url path='/admin/configuration/attributes/remove_from-all-templates' attribute_id=$ID} form_content = {$smarty.capture.delete_dialog nofilter} } + +{* Add to all dialog *} + +{capture "add_to_all_dialog"} + + + {module_include location='attribute_add_to_all_form'} + +{/capture} + +{include + file = "includes/generic-confirm-dialog.html" + + dialog_id = "add_to_all_dialog" + dialog_title = {intl l="Add to all product templates"} + dialog_message = {intl l="Do you really want to add this attribute to all product templates ?"} + + form_action = {url path='/admin/configuration/attributes/add-to-all-templates'} + form_content = {$smarty.capture.add_to_all_dialog nofilter} +} + +{* Remove from all dialog *} + +{capture "remove_from_all_dialog"} + + + {module_include location='attribute_add_to_all_form'} + +{/capture} + +{include + file = "includes/generic-confirm-dialog.html" + + dialog_id = "remove_from_all_dialog" + dialog_title = {intl l="Remove from all product templates"} + dialog_message = {intl l="Do you really want to remove this attribute from all product templates ? You'll loose all product related data for this attribute."} + + form_action = {url path='/admin/configuration/attributes/remove-from-all-templates'} + form_content = {$smarty.capture.remove_from_all_dialog nofilter} +} + {/block} {block name="javascript-initialization"} @@ -233,6 +285,14 @@ $('#attribute_delete_id').val($(this).data('id')); }); + $('a.attribute-add-to-all').click(function(ev) { + $('#attribute_add_to_all_id').val($(this).data('id')); + }); + + $('a.attribute-remove-from-all').click(function(ev) { + $('#attribute_remove_from_all_id').val($(this).data('id')); + }); + // JS stuff for creation form {include file = "includes/generic-js-dialog.html" diff --git a/templates/admin/default/categories.html b/templates/admin/default/categories.html index 0423bcc66..6fe06f8bc 100755 --- a/templates/admin/default/categories.html +++ b/templates/admin/default/categories.html @@ -82,7 +82,7 @@ } - {intl l='Actions'} + {intl l='Actions'} diff --git a/templates/admin/default/currencies.html b/templates/admin/default/currencies.html index 72bf01e75..fe4cfe882 100644 --- a/templates/admin/default/currencies.html +++ b/templates/admin/default/currencies.html @@ -111,7 +111,7 @@ {module_include location='currencies_table_header'} - {intl l='Actions'} + {intl l='Actions'} diff --git a/templates/admin/default/customers.html b/templates/admin/default/customers.html index 799115bf3..72179f667 100644 --- a/templates/admin/default/customers.html +++ b/templates/admin/default/customers.html @@ -11,9 +11,9 @@
- + @@ -58,7 +58,7 @@ {intl l='order amount'} - {intl l='Actions'} + {intl l='Actions'} @@ -154,23 +154,23 @@ {* on success, redirect to the edition page, _ID_ is replaced with the created object ID, see controller *} {/form_field} - + {form_field form=$form field='company'}
{/form_field} - - {form_field form=$form field='title'} + + {form_field form=$form field='title'}
- + +
{/form_field} @@ -191,13 +191,13 @@ {form_field form=$form field='address1'}
- +
{form_field form=$form field='address2'} - {/form_field} + {/form_field}
@@ -237,8 +237,8 @@
- {/form_field} - + {/form_field} + {/capture} {include diff --git a/templates/admin/default/includes/inner-form-toolbar.html b/templates/admin/default/includes/inner-form-toolbar.html index 518c204e3..c142cbdd7 100755 --- a/templates/admin/default/includes/inner-form-toolbar.html +++ b/templates/admin/default/includes/inner-form-toolbar.html @@ -12,7 +12,7 @@
{/form_field} @@ -25,7 +25,7 @@ {intl l="The détailed description."} - +
{/form_field} @@ -36,6 +36,6 @@ {intl l="A short post-description information"} - +
{/form_field} \ No newline at end of file diff --git a/templates/admin/default/includes/thelia_news_feed.html b/templates/admin/default/includes/thelia_news_feed.html index 6b9d2b5a9..09b3af020 100755 --- a/templates/admin/default/includes/thelia_news_feed.html +++ b/templates/admin/default/includes/thelia_news_feed.html @@ -4,7 +4,8 @@

{$DATE}

{$TITLE|strip_tags nofilter}

-

{$DESCRIPTION|strip_tags|truncate:250:"...":true nofilter}

+ {* we use unescape:"htmlall" to unescape var before truncate, to prevent a cut in the middel of an HTML entity, eg &ea... *} +

{$DESCRIPTION|strip_tags|unescape:"htmlall"|truncate:250:"...":true nofilter}

{intl l='Lire la suite »'}

{/loop} diff --git a/templates/admin/default/orders.html b/templates/admin/default/orders.html index 947c615a3..4f9c6ecf8 100644 --- a/templates/admin/default/orders.html +++ b/templates/admin/default/orders.html @@ -17,7 +17,7 @@ {module_include location='orders_top'}
-
+
- + {module_include location='orders_table_header'} - + - + @@ -116,7 +116,7 @@ - + - +
@@ -36,14 +36,14 @@
{intl l="Name"} {intl l="Amount"} {intl l="Status"}{intl l="Actions"}{intl l="Actions"}
01230450123045
-
+