Merge branch 'master' of github.com:thelia/thelia

Conflicts:
	templates/admin/default/customer-edit.html
This commit is contained in:
Manuel Raynaud
2013-10-28 15:41:48 +01:00
18 changed files with 1295 additions and 203 deletions

View File

@@ -100,7 +100,7 @@
<td>
{loop type="image" name="cat_image" source="category" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"}
<a href="{url path='admin/catalog' category_id=$ID}" title="{intl l='Browse this category'}"><img class="img-thumbnail" src="{$IMAGE_URL}" alt="{$TITLE}" /></a>
<a href="{url path='admin/catalog' category_id=$OBJECT_ID}" title="{intl l='Browse this category'}"><img class="img-thumbnail" src="{$IMAGE_URL}" alt="{$TITLE}" /></a>
{/loop}
</td>
@@ -269,7 +269,7 @@
<td>
{loop type="image" name="cat_image" source="product" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"}
<a href="{url path='/admin/products/update' product_id=$ID}" title="{intl l='Edit this product'}">
<a href="{url path='/admin/products/update' product_id=$OBJECT_ID}" title="{intl l='Edit this product'}">
<img src="{$IMAGE_URL}" alt="{$TITLE}" />
</a>
{/loop}

View File

@@ -151,14 +151,14 @@
</tr>
{/loop}
{* {loop type="auth" name="pcc6" role="ADMIN" resource="admin.configuration.mailing-system" access="VIEW"}
{loop type="auth" name="pcc6" role="ADMIN" resource="admin.configuration.mailing-system" access="VIEW"}
<tr>
<td><a href="{url path='/admin/configuration/mailing_system'}">{intl l='Mailing system'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/mailing_system'}"><i class="glyphicon glyphicon-edit"></i></a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/mailingSystem'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc7" role="ADMIN" resource="admin.configuration.admin-logs" access="VIEW"}
{* {loop type="auth" name="pcc7" role="ADMIN" resource="admin.configuration.admin-logs" access="VIEW"}
<tr>
<td><a href="{url path='/admin/configuration/admin_logs'}">{intl l='Administration logs'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/admin_logs'}"><i class="glyphicon glyphicon-edit"></i></a></td>

View File

@@ -161,6 +161,10 @@
{$ADDRESS1}
{if $ADDRESS2}<br />{$ADDRESS2}{/if}
{if $ADDRESS3}<br />{$ADDRESS3}{/if}
<br>{$ZIPCODE} {$CITY}
{loop name="address.country" type="country" id=$COUNTRY}
<br>{$TITLE}
{/loop}
{if $PHONE}
<br> <abbr title="{intl l="Phone"}">P:</abbr>{$PHONE}
{/if}

View File

@@ -44,10 +44,6 @@
{intl l="customer ref"}
</th>
<th class="object-title">
{intl l="company"}
</th>
{module_include location='category_list_header'}
<th>
@@ -81,10 +77,6 @@
<tr>
<td><a href="{url path="/admin/customer/update/{$ID}"}">{$REF}</a></td>
<td>
{$COMPANY}
</td>
<td class="object-title">
{$FIRSTNAME} {$LASTNAME}
</td>
@@ -98,7 +90,7 @@
<td>
{$lastOrderCurrency} {$lastOrderAmount}
</td>
<td>
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_change" role="ADMIN" resource="admin.customer" access="UPDATE"}

View File

@@ -105,7 +105,7 @@
<td>
{loop type="image" name="folder_image" source="folder" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"}
<a href="{url path='admin/folders' parent=$ID}" title="{intl l='Browse this folder'}"><img class="img-thumbnail" src="{$IMAGE_URL}" alt="{$TITLE}" /></a>
<a href="{url path='admin/folders' parent=$OBJECT_ID}" title="{intl l='Browse this folder'}"><img class="img-thumbnail" src="{$IMAGE_URL}" alt="{$TITLE}" /></a>
{/loop}
</td>
@@ -264,7 +264,7 @@
<td>
{loop type="image" name="folder_image" source="content" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"}
<a href="{url path="admin/content/update/$ID"}" title="{intl l='Edit this content'}">
<a href="{url path="admin/content/update/$OBJECT_ID"}" title="{intl l='Edit this content'}">
<img src="{$IMAGE_URL}" alt="{$TITLE}" />
</a>
{/loop}

View File

@@ -24,68 +24,98 @@
<div class="title title-without-tabs">{intl l="Configuration variables"}</div>
<form action="" method="">
<div class="form-group">
<label for="" class="label-control">{intl l="SMTP Server"}</label>
<div class="input-group">
<input type="text" class="form-control" name="" placeholder="{intl l="SMTP Server"}">
<span class="input-group-btn">
<button class="btn btn-default btn-primary"><span class="glyphicon glyphicon-remove"></span></button>
</span>
{form name="thelia.admin.mailing-system.update"}
<form method="POST" action="{url path="/admin/configuration/mailingSystem/save"}" {form_enctype form=$form} >
<div class="row inner-toolbar">
<div class="col-md-12 inner-actions clearfix">
<button type="submit" name="save_mode" value="stay" class="btn btn-default btn-success pull-right" title="Save">Save <span class="glyphicon glyphicon-ok"></span></button>
</div>
</div>
<div class="form-group">
<label for="" class="label-control">{intl l="Port"}</label>
<div class="input-group">
<input type="text" class="form-control" name="" placeholder="{intl l="port"}">
<span class="input-group-btn">
<button class="btn btn-default btn-primary"><span class="glyphicon glyphicon-remove"></span></button>
</span>
{form_hidden_fields form=$form}
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
{form_field form=$form field='enabled'}
<div class="form-group">
<label for="{$label_attr.for}" class="label-control">{intl l="Enable remote SMTP use : "}</label>
<input type="hidden" id="smtp_enabled" name="{$name}" value="{if $form_error}{$value}{else}{if {config key="smtp.enabled"}}1{else}0{/if}{/if}">
<div class="make-switch switch-small" id="enable-smtp" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input type="checkbox" id="{$label_attr.for}" {if $form_error AND $value == 1 OR !$form_error AND {config key="smtp.enabled"} == 1}checked{/if}>
</div>
</div>
</div>
{/form_field}
<div class="form-group">
<label for="" class="label-control">{intl l="Username"}</label>
<div class="input-group">
<input type="text" class="form-control" name="" placeholder="{intl l="username"}">
<span class="input-group-btn">
<button class="btn btn-default btn-primary"><span class="glyphicon glyphicon-remove"></span></button>
</span>
{form_field form=$form field='host'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="label-control">{intl l="Host :"}</label>
<input type="text" class="form-control" id="{$label_attr.for}" name="{$name}" placeholder="{intl l="Host"}" value="{if $form_error}{$value}{else}{config key="smtp.host"}{/if}">
</div>
</div>
{/form_field}
<div class="form-group">
<label for="" class="label-control">{intl l="Password"}</label>
<div class="input-group">
<input type="password" class="form-control" name="" placeholder="{intl l="password"}">
<span class="input-group-btn">
<button class="btn btn-default btn-primary"><span class="glyphicon glyphicon-remove"></span></button>
</span>
{form_field form=$form field='port'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="label-control">{intl l="Port :"}</label>
<input type="text" class="form-control" id="{$label_attr.for}" name="{$name}" placeholder="{intl l="Port"}" value="{if $form_error}{$value}{else}{config key="smtp.port"}{/if}">
</div>
</div>
{/form_field}
<div class="form-group">
<label for="" class="label-control">{intl l="Protocol"}</label>
<div class="input-group">
<input type="text" class="form-control" name="" placeholder="{intl l="protocol"}">
<span class="input-group-btn">
<button class="btn btn-default btn-primary"><span class="glyphicon glyphicon-remove"></span></button>
</span>
{form_field form=$form field='encryption'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="label-control">{intl l="Encryption :"}</label>
<input type="text" class="form-control" id="{$label_attr.for}" name="{$name}" placeholder="{intl l="Encryption"}" value="{if $form_error}{$value}{else}{config key="smtp.encryption"}{/if}">
</div>
</div>
{/form_field}
<div class="form-group">
<label for="" class="label-control">{intl l="Active ?"}</label>
{form_field form=$form field='username'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="label-control">{intl l="Username :"}</label>
<input type="text" class="form-control" id="{$label_attr.for}" name="{$name}" placeholder="{intl l="Username"}" value="{if $form_error}{$value}{else}{config key="smtp.username"}{/if}">
</div>
{/form_field}
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input type="checkbox" name="" id="" checked>
{form_field form=$form field='password'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="label-control">{intl l="Password :"}</label>
<input type="password" class="form-control" id="{$label_attr.for}" name="{$name}" value="{if $form_error}{$value}{else}{config key="smtp.password"}{/if}">
</div>
{/form_field}
{form_field form=$form field='authmode'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="label-control">{intl l="Auth Mode :"}</label>
<input type="text" class="form-control" id="{$label_attr.for}" name="{$name}" placeholder="{intl l="Auth Mode"}" value="{if $form_error}{$value}{else}{config key="smtp.authmode"}{/if}">
</div>
{/form_field}
{form_field form=$form field='timeout'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="label-control">{intl l="Timeout :"}</label>
<input type="text" class="form-control" id="{$label_attr.for}" name="{$name}" placeholder="{intl l="Timeout"}" value="{if $form_error}{$value}{else}{config key="smtp.timeout"}{/if}">
</div>
{/form_field}
{form_field form=$form field='sourceip'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="label-control">{intl l="Source IP :"}</label>
<input type="text" class="form-control" id="{$label_attr.for}" name="{$name}" placeholder="{intl l="Source IP"}" value="{if $form_error}{$value}{else}{config key="smtp.sourceip"}{/if}">
</div>
{/form_field}
<div class="row inner-toolbar">
<div class="col-md-12 inner-actions clearfix">
<button type="submit" name="save_mode" value="stay" class="btn btn-default btn-success pull-right" title="Save">Save <span class="glyphicon glyphicon-ok"></span></button>
</div>
</div>
</form>
{/form}
</div>
</div>
</div>
@@ -100,4 +130,14 @@
{javascripts file='assets/js/bootstrap-switch/bootstrap-switch.js'}
<script src="{$asset_url}"></script>
{/javascripts}
<script type="text/javascript">
jQuery(function($) {
$('#enable-smtp').on('switch-change', function (e, data) {
$('#smtp_enabled').val(data.value ? 1 : 0);
});
});
</script>
{/block}