Merge branch 'master' of https://github.com/thelia/thelia into install_wizard
# By Manuel Raynaud (19) and others # Via Manuel Raynaud (7) and others * 'master' of https://github.com/thelia/thelia: (29 commits) feed loop is now countable Change error page design Add validation button on form - Edit country view creation - Delete and edit modalbox creation - Countries routes management Completed template management fix faker fix faker script Working : Fixture : cleaning debugbar log query also use Tlog update CartAdd form Working : Fixture : cleaning Working : Coupon : Fix unit tests @todo refactor force charset in sql files Countries view and routing creation save if producSaleElements is in promo or not Finished Features management add promo column in cart_item dispatch event when default currency change add return statement in clear cache method create cache for config entity ...
This commit is contained in:
@@ -206,7 +206,6 @@
|
||||
- <a href="http://www.openstudio.fr/" target="_blank">{intl l='Édité par OpenStudio'}</a>
|
||||
- <a href="http://forum.thelia.net/" target="_blank">{intl l='Forum Thelia'}</a>
|
||||
- <a href="http://contrib.thelia.net/" target="_blank">{intl l='Contributions Thelia'}</a>
|
||||
<span class="pull-right">{intl l='interface par <a target="_blank" href="http://www.steaw-webdesign.com/">Steaw-Webdesign</a>'}</span>
|
||||
</p>
|
||||
|
||||
{module_include location='in_footer'}
|
||||
|
||||
@@ -1,15 +1,102 @@
|
||||
<div class="form-group">
|
||||
{ifloop rel="free_attributes"}
|
||||
<select name="free_attributes" id="free_attributes" class="form-control">
|
||||
<option value="">Select an attribute...</option>
|
||||
{loop name="free_attributes" type="attribute" template="$template_id" backend_context="1" lang="$edit_language_id"}
|
||||
<option value="{$ID}">{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
<span class="help-block">{intl l='Select an attribute and click (+) to add it to this template'}</span>
|
||||
<form action="{url path='/admin/configuration/templates/attributes/add'}">
|
||||
|
||||
<input type="hidden" name="template_id" value="{$template_id}" />
|
||||
|
||||
<div class="input-group">
|
||||
<select required="required" name="attribute_id" id="attribute_id" class="form-control">
|
||||
<option value="">Select an attribute...</option>
|
||||
{loop name="free_attributes" type="attribute" exclude_template="$template_id" backend_context="1" lang="$edit_language_id"}
|
||||
<option value="{$ID}">{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default btn-primary action-btn" type="submit"><span class="glyphicon glyphicon-plus-sign"></span></button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<span class="help-block">{intl l='Select an attribute and click (+) to add it to this template'}</span>
|
||||
</form>
|
||||
|
||||
{/ifloop}
|
||||
{elseloop rel="free_attributes"}
|
||||
<div class="alert alert-info">There is currently no available attributes.</div>
|
||||
{/elseloop}
|
||||
</div>
|
||||
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{intl l='ID'}</th>
|
||||
|
||||
<th>{intl l='Attribute title'}</th>
|
||||
|
||||
{module_include location='template_attributes_table_header'}
|
||||
|
||||
<th class="actions">{intl l="Actions"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="assigned_attributes" type="attribute" template="$template_id" backend_context="1" lang="$edit_language_id"}
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
|
||||
<td>
|
||||
{$TITLE}
|
||||
</td>
|
||||
|
||||
{module_include location='template_attributes_table_row'}
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.template.attribute.delete"}
|
||||
<a class="btn btn-default btn-xs delete-attribute" title="{intl l='Delete this attribute'}" href="#delete_attribute_dialog" data-id="{$ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="assigned_attributes"}
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<div class="alert alert-info">
|
||||
{intl l="This template contains no attributes"}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/elseloop}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{* Delete value confirmation dialog *}
|
||||
|
||||
{capture "delete_attribute_dialog"}
|
||||
<input type="hidden" name="template_id" value="{$template_id}" />
|
||||
<input type="hidden" name="attribute_id" id="attribute_delete_id" value="" />
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
|
||||
dialog_id = "delete_attribute_dialog"
|
||||
dialog_title = {intl l="Remove attribute"}
|
||||
dialog_message = {intl l="Do you really want to remove this attribute from the template ?"}
|
||||
|
||||
form_action = {url path='/admin/configuration/templates/attributes/delete'}
|
||||
form_content = {$smarty.capture.delete_attribute_dialog nofilter}
|
||||
}
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
// Set proper attribute ID in delete attribute from
|
||||
$('a.delete-attribute').click(function(ev) {
|
||||
$('#attribute_delete_id').val($(this).data('id'));
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
102
templates/admin/default/ajax/template-feature-list.html
Normal file
102
templates/admin/default/ajax/template-feature-list.html
Normal file
@@ -0,0 +1,102 @@
|
||||
<div class="form-group">
|
||||
{ifloop rel="free_features"}
|
||||
<form action="{url path='/admin/configuration/templates/features/add'}">
|
||||
|
||||
<input type="hidden" name="template_id" value="{$template_id}" />
|
||||
|
||||
<div class="input-group">
|
||||
<select required="required" name="feature_id" id="feature_id" class="form-control">
|
||||
<option value="">Select an feature...</option>
|
||||
{loop name="free_features" type="feature" exclude_template="$template_id" backend_context="1" lang="$edit_language_id"}
|
||||
<option value="{$ID}">{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default btn-primary action-btn" type="submit"><span class="glyphicon glyphicon-plus-sign"></span></button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<span class="help-block">{intl l='Select an feature and click (+) to add it to this template'}</span>
|
||||
</form>
|
||||
|
||||
{/ifloop}
|
||||
{elseloop rel="free_features"}
|
||||
<div class="alert alert-info">There is currently no available features.</div>
|
||||
{/elseloop}
|
||||
</div>
|
||||
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{intl l='ID'}</th>
|
||||
|
||||
<th>{intl l='Feature title'}</th>
|
||||
|
||||
{module_include location='template_features_table_header'}
|
||||
|
||||
<th class="actions">{intl l="Actions"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="assigned_features" type="feature" template="$template_id" backend_context="1" lang="$edit_language_id"}
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
|
||||
<td>
|
||||
{$TITLE}
|
||||
</td>
|
||||
|
||||
{module_include location='template_features_table_row'}
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.template.feature.delete"}
|
||||
<a class="btn btn-default btn-xs delete-feature" title="{intl l='Delete this feature'}" href="#delete_feature_dialog" data-id="{$ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="assigned_features"}
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<div class="alert alert-info">
|
||||
{intl l="This template contains no features"}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/elseloop}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{* Delete value confirmation dialog *}
|
||||
|
||||
{capture "delete_feature_dialog"}
|
||||
<input type="hidden" name="template_id" value="{$template_id}" />
|
||||
<input type="hidden" name="feature_id" id="feature_delete_id" value="" />
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
|
||||
dialog_id = "delete_feature_dialog"
|
||||
dialog_title = {intl l="Remove feature"}
|
||||
dialog_message = {intl l="Do you really want to remove this feature from the template ?"}
|
||||
|
||||
form_action = {url path='/admin/configuration/templates/features/delete'}
|
||||
form_content = {$smarty.capture.delete_feature_dialog nofilter}
|
||||
}
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
// Set proper feature ID in delete feature from
|
||||
$('a.delete-feature').click(function(ev) {
|
||||
$('#feature_delete_id').val($(this).data('id'));
|
||||
});
|
||||
});
|
||||
</script>
|
||||
220
templates/admin/default/countries.html
Normal file
220
templates/admin/default/countries.html
Normal file
@@ -0,0 +1,220 @@
|
||||
{extends file="admin-layout.tpl"}
|
||||
|
||||
{block name="page-title"}{intl l='Countries'}{/block}
|
||||
|
||||
{block name="check-permissions"}admin.configuration.countries.view{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="countries">
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration/countries'}">{intl l="Countries"}</a></li>
|
||||
</ul>
|
||||
|
||||
{module_include location='countries_top'}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<form action="" method="post">
|
||||
|
||||
<div class="general-block-decorator">
|
||||
|
||||
<table class="table table-striped table-condensed">
|
||||
<caption class="clearfix">
|
||||
{intl l='Countries'}
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.countries.create"}
|
||||
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new country'}" href="#add_country_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Name</th>
|
||||
<th>Default</th>
|
||||
<th>Shop</th>
|
||||
<th>N° ISO</th>
|
||||
<th>ISO Code</th>
|
||||
|
||||
{module_include location='countries_table_header'}
|
||||
|
||||
<th class="actions">{intl l='Actions'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="countries" type="country" backend_context="1" lang=$lang_id order=$order}
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
<td>{$TITLE}</td>
|
||||
<td>
|
||||
<div class="make-switch switch-small switch-radio" 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 class="change-default" type="radio" name="" value="{$ID}" {if $IS_DEFAULT}selected="selected"{/if}/>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="make-switch switch-small switch-radio" 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 class="change-default" type="radio" name="" value="{$ID}" {if $IS_DEFAULT}selected="selected"{/if}/>
|
||||
</div>
|
||||
</td>
|
||||
<td>{$ISOCODE}</td>
|
||||
<td>{$ISOALPHA3}</td>
|
||||
|
||||
{module_include location='countries_table_row'}
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.countries.change"}
|
||||
<a class="btn btn-default btn-xs country-change" title="{intl l='Change this country'}" href="{url path="/admin/configuration/countries/update/{$ID}"}">
|
||||
<span class="glyphicon glyphicon-edit"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.countries.delete"}
|
||||
<a class="btn btn-default btn-xs country-delete" title="{intl l='Delete this country'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
{elseloop rel="countries"}
|
||||
<tr>
|
||||
<td colspan="8">
|
||||
<div class="alert alert-info">
|
||||
{intl l="No country has been created yet. Click the + button to create one."}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/elseloop}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{module_include location='countries_bottom'}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* Adding a new Country *}
|
||||
|
||||
{form name="thelia.admin.country.creation"}
|
||||
|
||||
{* Capture the dialog body, to pass it to the generic dialog *}
|
||||
{capture "country_creation_dialog"}
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
{* on success, redirect to the edition page, _ID_ is replaced with the created object ID, see controller *}
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/country/update' country_id='_ID_'}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='title'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Country title'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='area'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||
<select name="{$name}" id="{$label_attr.for}" class="form-control">
|
||||
<option value="{$ID}">{$TITLE}</option>
|
||||
</select>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='isocode'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='ISO Code'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='isoalpha2'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Alpha code 2'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='isoalpha3'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Alpha code 3'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{module_include location='country_create_form'}
|
||||
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-create-dialog.html"
|
||||
|
||||
dialog_id = "add_country_dialog"
|
||||
dialog_title = {intl l="Create a new country"}
|
||||
dialog_body = {$smarty.capture.country_creation_dialog nofilter}
|
||||
|
||||
dialog_ok_label = {intl l="Create this country"}
|
||||
dialog_cancel_label = {intl l="Cancel"}
|
||||
|
||||
form_action = {url path='/admin/configuration/countries/create'}
|
||||
form_enctype = {form_enctype form=$form}
|
||||
form_error_message = $form_error_message
|
||||
}
|
||||
{/form}
|
||||
|
||||
|
||||
{* Delete confirmation dialog *}
|
||||
|
||||
{capture "delete_dialog"}
|
||||
<input type="hidden" name="country_id" id="country_delete_id" value="" />
|
||||
|
||||
{module_include location='country_delete_form'}
|
||||
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
|
||||
dialog_id = "delete_dialog"
|
||||
dialog_title = {intl l="Delete country"}
|
||||
dialog_message = {intl l="Do you really want to delete this country ?"}
|
||||
|
||||
form_action = {url path='/admin/configuration/countries/delete'}
|
||||
form_content = {$smarty.capture.delete_dialog nofilter}
|
||||
}
|
||||
|
||||
{/block}
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
|
||||
{javascripts file='assets/js/bootstrap-switch/bootstrap-switch.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
|
||||
<script>
|
||||
// Toogle switch on input radio
|
||||
$('.switch-radio').on('switch-change', function () {
|
||||
$('.switch-radio').bootstrapSwitch('toggleRadioState');
|
||||
});
|
||||
</script>
|
||||
{/javascripts}
|
||||
|
||||
{/block}
|
||||
147
templates/admin/default/country-edit.html
Normal file
147
templates/admin/default/country-edit.html
Normal file
@@ -0,0 +1,147 @@
|
||||
{extends file="admin-layout.tpl"}
|
||||
|
||||
{block name="page-title"}{intl l='Edit a country'}{/block}
|
||||
|
||||
{block name="check-permissions"}admin.configuration.countries.edit{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="countries edit-country">
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
{loop name="country_edit" type="country" id="$country_id" backend_context="1" lang="$edit_language_id"}
|
||||
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration/countries'}">{intl l="Countries"}</a></li>
|
||||
<li>{intl l='Editing country "%name"' name="{$TITLE}"}</li>
|
||||
</ul>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 general-block-decorator">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12 title title-without-tabs">
|
||||
{intl l="Edit country $TITLE"}
|
||||
</div>
|
||||
|
||||
<div class="form-container">
|
||||
<div class="col-md-12">
|
||||
|
||||
{form name="thelia.admin.country.modification"}
|
||||
<form method="POST" action="{url path='/admin/configuration/countries/save'}" {form_enctype form=$form} class="clearfix">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{* Be sure to get the country ID, even if the form could not be validated *}
|
||||
<input type="hidden" name="country_id" value="{$country_id}" />
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/configuration/countries'}" />
|
||||
{/form_field}
|
||||
|
||||
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
|
||||
|
||||
{form_field form=$form field='area'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||
<select name="{$name}" id="{$label_attr.for}" class="form-control">
|
||||
<option value="{$ID}">{$TITLE}</option>
|
||||
</select>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='isocode'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='ISO Code'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='isoalpha2'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Alpha code 2'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='isoalpha3'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Alpha code 3'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 title title-without-tabs">
|
||||
{intl l="Translations"}
|
||||
</div>
|
||||
|
||||
{loop type="lang" name="lang"}
|
||||
<div class="col-md-3">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<img src="{image file="assets/img/flags/{$CODE}.gif"}" alt="{intl l=$TITLE}"> {$TITLE}
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{form_field form=$form field='title'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Country title'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field form=$form field='short-description'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||
<textarea id="{$label_attr.for}" name="{$name}" class="form-control" title="{intl l="{$label}"}" placeholder="{intl l='Country short description'}"></textarea>
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field form=$form field='description'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||
<textarea id="{$label_attr.for}" name="{$name}" class="form-control" title="{intl l="{$label}"}" placeholder="{intl l='Country description'}"></textarea>
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/loop}
|
||||
|
||||
<div class="col-md-12 text-right">
|
||||
<button type="submit" class="btn btn-default btn-primary" title="{intl l='Add a new country'}">
|
||||
{intl l="Save"}
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{/form}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="country_edit"}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-error">
|
||||
{intl l="Sorry, country ID=$country_id was not found."}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/elseloop}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
316
templates/admin/default/feature-edit.html
Normal file
316
templates/admin/default/feature-edit.html
Normal file
@@ -0,0 +1,316 @@
|
||||
{extends file="admin-layout.tpl"}
|
||||
|
||||
{block name="page-title"}{intl l='Edit an feature'}{/block}
|
||||
|
||||
{block name="check-permissions"}admin.configuration.features.edit{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="features edit-feature">
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
{loop name="feature_edit" type="feature" id=$feature_id backend_context="1" lang=$edit_language_id}
|
||||
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration/features'}">{intl l="Features"}</a></li>
|
||||
<li>{intl l='Editing feature "%name"' name="{$TITLE}"}</li>
|
||||
</ul>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 general-block-decorator">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12 title title-without-tabs">
|
||||
{intl l="Edit feature $TITLE"}
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="form-container">
|
||||
{form name="thelia.admin.feature.modification"}
|
||||
<form method="POST" action="{url path='/admin/configuration/features/save'}" {form_enctype form=$form} class="clearfix">
|
||||
|
||||
{include file="includes/inner-form-toolbar.html" close_url="{url path='/admin/configuration/features'}"}
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<p class="title title-without-tabs">{intl l='Feature information'}</p>
|
||||
|
||||
{form_field form=$form field='id'}
|
||||
<input type="hidden" name="{$name}" value="{$feature_id}" />
|
||||
{/form_field}
|
||||
|
||||
{* Be sure to get the feature ID, even if the form could not be validated *}
|
||||
<input type="hidden" name="feature_id" value="{$feature_id}" />
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/configuration/features'}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='locale'}
|
||||
<input type="hidden" name="{$name}" value="{$edit_language_locale}" />
|
||||
{/form_field}
|
||||
|
||||
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
|
||||
|
||||
{include file="includes/standard-description-form-fields.html" form=$form}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<p class="title title-without-tabs">
|
||||
|
||||
{intl l='Feature values'}
|
||||
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.feature-av.create"}
|
||||
<span class="pull-right">
|
||||
<a data-toggle="modal" href="#creation_dialog" title="Add a new feature value" class="btn btn-default btn-primary">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
</a>
|
||||
</span>
|
||||
{/loop}
|
||||
</p>
|
||||
|
||||
<div class="alert alert-info">
|
||||
{intl l="Enter here all possible feature values."}
|
||||
</div>
|
||||
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
{admin_sortable_header
|
||||
current_order=$featureav_order
|
||||
order='id'
|
||||
reverse_order='id_reverse'
|
||||
request_parameter_name='featureav_order'
|
||||
path={url path='/admin/configuration/features/update' feature_id=$feature_id}
|
||||
label="{intl l='ID'}"
|
||||
}
|
||||
</th>
|
||||
|
||||
<th>
|
||||
{admin_sortable_header
|
||||
current_order=$featureav_order
|
||||
order='alpha'
|
||||
reverse_order='alpha_reverse'
|
||||
request_parameter_name='featureav_order'
|
||||
path={url path='/admin/configuration/features/update' feature_id=$feature_id}
|
||||
label="{intl l='Value'}"
|
||||
}
|
||||
</th>
|
||||
|
||||
<th class="text-center">
|
||||
{admin_sortable_header
|
||||
current_order=$featureav_order
|
||||
order='manual'
|
||||
reverse_order='manual_reverse'
|
||||
request_parameter_name='featureav_order'
|
||||
path={url path='/admin/configuration/features/update' feature_id=$feature_id}
|
||||
label="{intl l="Position"}"
|
||||
}
|
||||
</th>
|
||||
|
||||
{module_include location='features_value_table_header'}
|
||||
|
||||
<th class="actions">{intl l="Actions"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="list" type="feature_availability" feature=$feature_id backend_context="1" lang=$edit_language_id order=$featureav_order}
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
|
||||
<td>
|
||||
{* FIXME : integrate this in the encolsing form to provide standard form processing *}
|
||||
<input class="js-edit form-control" type="text" name="feature_values[{$ID}]" value="{$TITLE}" />
|
||||
</td>
|
||||
|
||||
<td class="text-center">
|
||||
{admin_position_block
|
||||
permission="admin.features.edit"
|
||||
path={url path='/admin/configuration/features-av/update-position' feature_id=$feature_id}
|
||||
url_parameter="featureav_id"
|
||||
in_place_edit_class="positionChange"
|
||||
position="$POSITION"
|
||||
id="$ID"
|
||||
}
|
||||
</td>
|
||||
|
||||
{module_include location='features_value_table_row'}
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.feature-av.delete"}
|
||||
<a class="btn btn-default btn-xs value-delete" title="{intl l='Delete this value'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="list"}
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<div class="alert alert-info">
|
||||
{intl l="No value has been created yet. Click the + button to create one."}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/elseloop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
{/form}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="feature_edit"}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-error">
|
||||
{intl l="Sorry, feature ID=$feature_id was not found."}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/elseloop}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* Adding a new feature *}
|
||||
|
||||
{form name="thelia.admin.featureav.creation"}
|
||||
|
||||
{* Capture the dialog body, to pass it to the generic dialog *}
|
||||
|
||||
{capture "creation_dialog"}
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{* Be sure to get the feature ID, even if the form could not be validated *}
|
||||
<input type="hidden" name="feature_id" value="{$feature_id}" />
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
{* on success, redirect to this page *}
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/configuration/features/update' feature_id=$feature_id}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='feature_id'}
|
||||
<input type="hidden" name="{$name}" value="{$feature_id}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='title'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||
|
||||
{loop type="lang" name="current-edit-lang" id="$edit_language_id"}
|
||||
<div class="input-group">
|
||||
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" class="form-control" value="{$value}" title="{intl l='Feature title'}" placeholder="{intl l='Title'}">
|
||||
<span class="input-group-addon"><img src="{image file="assets/img/flags/{$CODE}.gif"}" alt="{intl l=$TITLE}" /></span>
|
||||
</div>
|
||||
|
||||
<div class="help-block">{intl l="Enter here the value in the current edit language ($TITLE)"}</div>
|
||||
|
||||
{form_field form=$form field='locale'}
|
||||
<input type="hidden" name="{$name}" value="{$LOCALE}" />
|
||||
{/form_field}
|
||||
{/loop}
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{module_include location='feature_value_create_form'}
|
||||
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-create-dialog.html"
|
||||
|
||||
dialog_id = "creation_dialog"
|
||||
dialog_title = {intl l="Create a new feature value"}
|
||||
dialog_body = {$smarty.capture.creation_dialog nofilter}
|
||||
|
||||
dialog_ok_label = {intl l="Create this value"}
|
||||
|
||||
form_action = {url path='/admin/configuration/features-av/create'}
|
||||
form_enctype = {form_enctype form=$form}
|
||||
form_error_message = $form_error_message
|
||||
}
|
||||
{/form}
|
||||
|
||||
{* Delete value confirmation dialog *}
|
||||
|
||||
{capture "delete_dialog"}
|
||||
<input type="hidden" name="feature_id" value="{$feature_id}" />
|
||||
<input type="hidden" name="featureav_id" id="value_delete_id" value="" />
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
|
||||
dialog_id = "delete_dialog"
|
||||
dialog_title = {intl l="Delete feature value"}
|
||||
dialog_message = {intl l="Do you really want to delete this feature value ?"}
|
||||
|
||||
form_action = {url path='/admin/configuration/features-av/delete'}
|
||||
form_content = {$smarty.capture.delete_dialog nofilter}
|
||||
}
|
||||
|
||||
{/block}
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
|
||||
{javascripts file='assets/js/bootstrap-editable/bootstrap-editable.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
// Set proper feature ID in delete from
|
||||
$('a.value-delete').click(function(ev) {
|
||||
$('#value_delete_id').val($(this).data('id'));
|
||||
});
|
||||
|
||||
// JS stuff for creation form
|
||||
{include
|
||||
file = "includes/generic-js-dialog.html"
|
||||
dialog_id = "creation_dialog"
|
||||
form_name = "thelia.admin.featureav.creation"
|
||||
}
|
||||
|
||||
{* Inline editing of object position using bootstrap-editable *}
|
||||
|
||||
$('.positionChange').editable({
|
||||
type : 'text',
|
||||
title : '{intl l="Enter new value position"}',
|
||||
mode : 'popup',
|
||||
inputclass : 'input-mini',
|
||||
placement : 'left',
|
||||
success : function(response, newValue) {
|
||||
// The URL template
|
||||
var url = "{url path='/admin/configuration/features-av/update-position' featureav_id='__ID__' position='__POS__' feature_id=$feature_id}";
|
||||
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id')).replace('__POS__', newValue);
|
||||
|
||||
// Reload the page
|
||||
location.href = url;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
326
templates/admin/default/features.html
Normal file
326
templates/admin/default/features.html
Normal file
@@ -0,0 +1,326 @@
|
||||
{extends file="admin-layout.tpl"}
|
||||
|
||||
{block name="page-title"}{intl l='Thelia Product Features'}{/block}
|
||||
|
||||
{block name="check-permissions"}admin.configuration.features.view{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="features">
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a></li>
|
||||
<li><a href="{url path='/admin/configuration/features'}">{intl l="Product features"}</a></li>
|
||||
</ul>
|
||||
|
||||
{module_include location='features_top'}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<form action="#" method="post">
|
||||
<div class="general-block-decorator">
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<caption>
|
||||
{intl l='Thelia product features'}
|
||||
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.features.create"}
|
||||
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new product feature'}" href="#creation_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
{admin_sortable_header
|
||||
current_order=$order
|
||||
order='id'
|
||||
reverse_order='id_reverse'
|
||||
path='/admin/configuration/features'
|
||||
label="{intl l='ID'}"
|
||||
}
|
||||
</th>
|
||||
|
||||
<th>
|
||||
{admin_sortable_header
|
||||
current_order=$order
|
||||
order='alpha'
|
||||
reverse_order='alpha_reverse'
|
||||
path='/admin/configuration/features'
|
||||
label="{intl l='Title'}"
|
||||
}
|
||||
</th>
|
||||
|
||||
<th class="text-center">
|
||||
{admin_sortable_header
|
||||
current_order=$order
|
||||
order='manual'
|
||||
reverse_order='manual_reverse'
|
||||
path='/admin/configuration/features'
|
||||
label="{intl l="Position"}"
|
||||
}
|
||||
</th>
|
||||
|
||||
{module_include location='features_table_header'}
|
||||
|
||||
<th class="actions">{intl l="Actions"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="list" type="feature" backend_context="1" lang=$lang_id order=$order}
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
|
||||
<td>
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.features.change"}
|
||||
<a title="{intl l='Change this feature'}" href="{url path='/admin/configuration/features/update' feature_id=$ID}">{$TITLE}</a>
|
||||
{/loop}
|
||||
{elseloop rel="can_change"}
|
||||
{$TITLE}
|
||||
{/elseloop}
|
||||
</td>
|
||||
|
||||
<td class="text-center">
|
||||
{admin_position_block
|
||||
permission="admin.features.edit"
|
||||
path="/admin/configuration/features/update-position"
|
||||
url_parameter="feature_id"
|
||||
in_place_edit_class="positionChange"
|
||||
position="$POSITION"
|
||||
id="$ID"
|
||||
}
|
||||
</td>
|
||||
|
||||
{module_include location='features_table_row'}
|
||||
|
||||
<td class="actions">
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.features.change"}
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-default btn-xs feature-remove-from-all" title="{intl l='Remove this feature from all product templates'}" href="#remove_from_all_dialog" data-id="{$ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-minus"></span>
|
||||
</a>
|
||||
<a class="btn btn-default btn-xs feature-add-to-all" title="{intl l='Add this feature to all product templates'}" href="#add_to_all_dialog" data-id="{$ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
</a>
|
||||
</div>
|
||||
{/loop}
|
||||
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.features.change"}
|
||||
<a class="btn btn-default btn-xs feature-change" title="{intl l='Change this product feature'}" href="{url path='/admin/configuration/features/update' feature_id=$ID}"><span class="glyphicon glyphicon-edit"></span></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.features.delete"}
|
||||
<a class="btn btn-default btn-xs feature-delete" title="{intl l='Delete this product feature'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="list"}
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<div class="alert alert-info">
|
||||
{intl l="No product feature has been created yet. Click the + button to create one."}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/elseloop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{module_include location='features_bottom'}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* Adding a new feature *}
|
||||
|
||||
{form name="thelia.admin.feature.creation"}
|
||||
|
||||
{* Capture the dialog body, to pass it to the generic dialog *}
|
||||
{capture "creation_dialog"}
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
{* on success, redirect to the edition page, _ID_ is replaced with the created feature ID, see controller *}
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/configuration/features/update' feature_id='_ID_'}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='title'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||
|
||||
{loop type="lang" name="default-lang" default_only="1"}
|
||||
<div class="input-group">
|
||||
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" class="form-control" value="{$value}" title="{intl l='Feature title'}" placeholder="{intl l='Title'}">
|
||||
<span class="input-group-addon"><img src="{image file="assets/img/flags/{$CODE}.gif"}" alt="{intl l=$TITLE}" /></span>
|
||||
</div>
|
||||
|
||||
<div class="help-block">{intl l="Enter here the feature name in the default language ($TITLE)"}</div>
|
||||
|
||||
{* Switch edition to the current locale *}
|
||||
<input type="hidden" name="edit_language_id" value="{$ID}" />
|
||||
|
||||
{form_field form=$form field='locale'}
|
||||
<input type="hidden" name="{$name}" value="{$LOCALE}" />
|
||||
{/form_field}
|
||||
{/loop}
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='add_to_all'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<div class="checkbox {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">
|
||||
<input type="checkbox" name="{$name}" value="1" {if $value != 0}checked="checked"{/if}>
|
||||
{$label}
|
||||
</label>
|
||||
<span class="help-block">{intl l='Check this box if you want to add this features to all product templates'}</span>
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{module_include location='feature_create_form'}
|
||||
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-create-dialog.html"
|
||||
|
||||
dialog_id = "creation_dialog"
|
||||
dialog_title = {intl l="Create a new feature"}
|
||||
dialog_body = {$smarty.capture.creation_dialog nofilter}
|
||||
|
||||
dialog_ok_label = {intl l="Create this feature"}
|
||||
|
||||
form_action = {url path='/admin/configuration/features/create'}
|
||||
form_enctype = {form_enctype form=$form}
|
||||
form_error_message = $form_error_message
|
||||
}
|
||||
{/form}
|
||||
|
||||
{* Delete confirmation dialog *}
|
||||
|
||||
{capture "delete_dialog"}
|
||||
<input type="hidden" name="feature_id" id="feature_delete_id" value="" />
|
||||
|
||||
{module_include location='feature_delete_form'}
|
||||
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
|
||||
dialog_id = "delete_dialog"
|
||||
dialog_title = {intl l="Delete feature"}
|
||||
dialog_message = {intl l="Do you really want to delete this feature ? It will be removed from all product templates."}
|
||||
|
||||
form_action = {url path='/admin/configuration/features/delete'}
|
||||
form_content = {$smarty.capture.delete_dialog nofilter}
|
||||
}
|
||||
|
||||
|
||||
{* Add to all dialog *}
|
||||
|
||||
{capture "add_to_all_dialog"}
|
||||
<input type="hidden" name="feature_id" id="feature_add_to_all_id" value="" />
|
||||
|
||||
{module_include location='feature_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 feature to all product templates ?"}
|
||||
|
||||
form_action = {url path='/admin/configuration/features/add-to-all-templates'}
|
||||
form_content = {$smarty.capture.add_to_all_dialog nofilter}
|
||||
}
|
||||
|
||||
{* Remove from all dialog *}
|
||||
|
||||
{capture "remove_from_all_dialog"}
|
||||
<input type="hidden" name="feature_id" id="feature_remove_from_all_id" value="" />
|
||||
|
||||
{module_include location='feature_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 feature from all product templates ? You'll loose all product related data for this feature."}
|
||||
|
||||
form_action = {url path='/admin/configuration/features/remove-from-all-templates'}
|
||||
form_content = {$smarty.capture.remove_from_all_dialog nofilter}
|
||||
}
|
||||
|
||||
{/block}
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
|
||||
{javascripts file='assets/js/bootstrap-editable/bootstrap-editable.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
// Set proper feature ID in delete from
|
||||
$('a.feature-delete').click(function(ev) {
|
||||
$('#feature_delete_id').val($(this).data('id'));
|
||||
});
|
||||
|
||||
$('a.feature-add-to-all').click(function(ev) {
|
||||
$('#feature_add_to_all_id').val($(this).data('id'));
|
||||
});
|
||||
|
||||
$('a.feature-remove-from-all').click(function(ev) {
|
||||
$('#feature_remove_from_all_id').val($(this).data('id'));
|
||||
});
|
||||
|
||||
// JS stuff for creation form
|
||||
{include
|
||||
file = "includes/generic-js-dialog.html"
|
||||
dialog_id = "creation_dialog"
|
||||
form_name = "thelia.admin.feature.creation"
|
||||
}
|
||||
|
||||
{* Inline editing of object position using bootstrap-editable *}
|
||||
|
||||
$('.positionChange').editable({
|
||||
type : 'text',
|
||||
title : '{intl l="Enter new feature position"}',
|
||||
mode : 'popup',
|
||||
inputclass : 'input-mini',
|
||||
placement : 'left',
|
||||
success : function(response, newValue) {
|
||||
// The URL template
|
||||
var url = "{url path='/admin/configuration/features/update-position' feature_id='__ID__' position='__POS__'}";
|
||||
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id'))
|
||||
.replace('__POS__', newValue);
|
||||
|
||||
// Reload the page
|
||||
location.href = url;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
@@ -10,11 +10,13 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h1>{intl l="Oops! An Error Occurred"}</h1>
|
||||
<div class="general-block-decorator text-center">
|
||||
<h1>{intl l="Oops! An Error Occurred"}</h1>
|
||||
|
||||
{block name="error-message"}<div class="alert alert-error">{$error_message}</div>{/block}
|
||||
|
||||
<p><i class="glyphicon glyphicon-backward"></i> <a href="{url path='/admin/home'}">{intl l="Go to administration home"}</a></p>
|
||||
{block name="error-message"}<div class="alert alert-danger">{$error_message}</div>{/block}
|
||||
|
||||
<a href="{url path='/admin/home'}" class="btn btn-default btn-info btn-lg"><span class="glyphicon glyphicon-home"></span> {intl l="Go to administration home"}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -108,8 +108,8 @@
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$('#attribute_list_management').load("{admin_viewurl view='ajax/template-attribute-list' template_id=$template_id}");
|
||||
$('#feature_list_management').load("{admin_viewurl view='ajax/template-feature-list' template_id=$template_id}");
|
||||
$('#feature_list_management').load("{url path='/admin/configuration/templates/features/list' template_id=$template_id}");
|
||||
$('#attribute_list_management').load("{url path='/admin/configuration/templates/attributes/list' template_id=$template_id}");
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
@@ -2,150 +2,156 @@
|
||||
(function($) {
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------
|
||||
onLoad Function -------------------------------------------------- */
|
||||
$(document).ready(function(){
|
||||
/* ------------------------------------------------------------------
|
||||
onLoad Function -------------------------------------------------- */
|
||||
$(document).ready(function(){
|
||||
|
||||
|
||||
// Main Navigation Hover
|
||||
$('.nav-main')
|
||||
.on('click.subnav', '[data-toggle=dropdown]', function(event){
|
||||
if($(this).parent().hasClass('open') && $(this).is(event.target))
|
||||
return false;
|
||||
})
|
||||
.on('mouseenter.subnav', '.dropdown', function(event){
|
||||
if($(this).hasClass('open'))
|
||||
return;
|
||||
// Main Navigation Hover
|
||||
$('.nav-main')
|
||||
.on('click.subnav', '[data-toggle=dropdown]', function(event){
|
||||
if($(this).parent().hasClass('open') && $(this).is(event.target))
|
||||
return false;
|
||||
})
|
||||
.on('mouseenter.subnav', '.dropdown', function(event){
|
||||
if($(this).hasClass('open'))
|
||||
return;
|
||||
|
||||
$(this).addClass('open');
|
||||
})
|
||||
.on('mouseleave.subnav', '.dropdown', function(){
|
||||
if(!$(this).hasClass('open'))
|
||||
return;
|
||||
$(this).removeClass('open');
|
||||
});
|
||||
$(this).addClass('open');
|
||||
})
|
||||
.on('mouseleave.subnav', '.dropdown', function(){
|
||||
if(!$(this).hasClass('open'))
|
||||
return;
|
||||
$(this).removeClass('open');
|
||||
});
|
||||
|
||||
// Tooltip
|
||||
$('body').tooltip({
|
||||
selector: '[data-toggle=tooltip]'
|
||||
});
|
||||
// Tooltip
|
||||
$('body').tooltip({
|
||||
selector: '[data-toggle=tooltip]'
|
||||
});
|
||||
|
||||
// Toolbar
|
||||
var $category_products = $('#category-products');
|
||||
if($category_products.size() > 0){
|
||||
var $parent = $category_products.parent();
|
||||
// Toolbar
|
||||
var $category_products = $('#category-products');
|
||||
if($category_products.size() > 0){
|
||||
var $parent = $category_products.parent();
|
||||
|
||||
|
||||
$parent.on('click.view-mode', '[data-toggle=view]', function(){
|
||||
if( ($(this).hasClass('btn-grid') && $parent.hasClass('grid')) || ($(this).hasClass('btn-list') && $parent.hasClass('list')))
|
||||
return;
|
||||
$parent.on('click.view-mode', '[data-toggle=view]', function(){
|
||||
if( ($(this).hasClass('btn-grid') && $parent.hasClass('grid')) || ($(this).hasClass('btn-list') && $parent.hasClass('list')))
|
||||
return;
|
||||
|
||||
$parent.toggleClass('grid').toggleClass('list');
|
||||
$parent.toggleClass('grid').toggleClass('list');
|
||||
|
||||
return false;
|
||||
});
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
// Login
|
||||
/* var $form_login = $('#form-login');
|
||||
if($form_login.size() > 0) {
|
||||
$form_login.on('change.account', ':radio', function(){
|
||||
if($(this).val() === '0')
|
||||
$('#password', $form_login).val('').prop('disabled', true); // Disabled (new customer)
|
||||
else
|
||||
$('#password', $form_login).prop('disabled', false); // Enabled
|
||||
}).find(':radio:checked').trigger('change.account');
|
||||
}*/
|
||||
// Login
|
||||
var $form_login = $('#form-login');
|
||||
if($form_login.size() > 0) {
|
||||
$form_login.on('change.account', ':radio', function(){
|
||||
if($(this).val() === '0')
|
||||
$('#password', $form_login).val('').prop('disabled', true); // Disabled (new customer)
|
||||
else
|
||||
$('#password', $form_login).prop('disabled', false); // Enabled
|
||||
}).find(':radio:checked').trigger('change.account');
|
||||
}
|
||||
|
||||
// Forgot Password
|
||||
/*
|
||||
var $forgot_password = $('.forgot-password', $form_login);
|
||||
if($forgot_password.size() > 0) {
|
||||
$forgot_password.popover({
|
||||
html : true,
|
||||
title: 'Forgot Password',
|
||||
content: function() {
|
||||
return $('#form-forgotpassword').html();
|
||||
}
|
||||
}).on('click.btn-forgot', function(){
|
||||
// Forgot Password
|
||||
/*
|
||||
var $forgot_password = $('.forgot-password', $form_login);
|
||||
if($forgot_password.size() > 0) {
|
||||
$forgot_password.popover({
|
||||
html : true,
|
||||
title: 'Forgot Password',
|
||||
content: function() {
|
||||
return $('#form-forgotpassword').html();
|
||||
}
|
||||
}).on('click.btn-forgot', function(){
|
||||
|
||||
$('.btn-forgot').click(function(){
|
||||
alert('click form');
|
||||
return false;
|
||||
});
|
||||
$('.btn-forgot').click(function(){
|
||||
alert('click form');
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.btn-close').click(function(){
|
||||
$forgot_password.popover('hide');
|
||||
});
|
||||
$('.btn-close').click(function(){
|
||||
$forgot_password.popover('hide');
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
}
|
||||
*/
|
||||
return false;
|
||||
});
|
||||
}
|
||||
*/
|
||||
|
||||
//.Form Filters
|
||||
$('#form-filters').each(function(){
|
||||
var $form = $(this);
|
||||
//.Form Filters
|
||||
$('#form-filters').each(function(){
|
||||
var $form = $(this);
|
||||
|
||||
$form
|
||||
.on('change.filter', ':checkbox', function(){
|
||||
$form.submit();
|
||||
})
|
||||
.find('.group-btn > .btn').addClass('sr-only');
|
||||
});
|
||||
$form
|
||||
.on('change.filter', ':checkbox', function(){
|
||||
$form.submit();
|
||||
})
|
||||
.find('.group-btn > .btn').addClass('sr-only');
|
||||
});
|
||||
|
||||
// Product details Thumbnails
|
||||
$('#product-gallery').each(function(){
|
||||
var $thumbnails = $('.thumbnail', this),
|
||||
$image = $('.product-image > img', this);
|
||||
// Product details Thumbnails
|
||||
$('#product-gallery').each(function(){
|
||||
var $item = $('.item', this),
|
||||
$thumbnails = $('.thumbnail', this),
|
||||
$image = $('.product-image > img', this);
|
||||
|
||||
$(this).on('click.thumbnails', '.thumbnail', function(){
|
||||
if($(this).hasClass('active'))
|
||||
return false;
|
||||
// Show Carousel control if needed
|
||||
if($item.size() > 1){
|
||||
$('#product-thumbnails', this).carousel({interval: false}).find('.carousel-control').show();
|
||||
}
|
||||
|
||||
$image.attr('src',$(this).attr('href'));
|
||||
$thumbnails.removeClass('active');
|
||||
$(this).addClass('active');
|
||||
$(this).on('click.thumbnails', '.thumbnail', function(){
|
||||
if($(this).hasClass('active'))
|
||||
return false;
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
$image.attr('src',$(this).attr('href'));
|
||||
$thumbnails.removeClass('active');
|
||||
$(this).addClass('active');
|
||||
|
||||
// Payment Method
|
||||
$('#payment-method').each(function(){
|
||||
var $label = $('label', this);
|
||||
$label.on('change', ':radio', function(){
|
||||
$label.removeClass('active');
|
||||
$label.filter('[for="' + $(this).attr('id') + '"]').addClass('active');
|
||||
}).filter(':has(:checked)').addClass('active');
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
// Payment Method
|
||||
$('#payment-method').each(function(){
|
||||
var $label = $('label', this);
|
||||
$label.on('change', ':radio', function(){
|
||||
$label.removeClass('active');
|
||||
$label.filter('[for="' + $(this).attr('id') + '"]').addClass('active');
|
||||
}).filter(':has(:checked)').addClass('active');
|
||||
});
|
||||
|
||||
|
||||
// Styliser le message Confirm par Bootstrap sur un formulaire
|
||||
/*
|
||||
$('body').on('click', '[data-confirm]', function(){
|
||||
var $this = $(this);
|
||||
bootbox.confirm($(this).attr('data-confirm'),
|
||||
function(result){
|
||||
if(result) {
|
||||
// Si lien
|
||||
if($this.attr('href')){
|
||||
window.location.href = $this.attr('href');
|
||||
}else{
|
||||
// Si on doit soumettre un formulaire
|
||||
var $form = $this.closest("form");
|
||||
if($form.size() > 0){
|
||||
$form.submit();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
// Styliser le message Confirm par Bootstrap sur un formulaire
|
||||
/*
|
||||
$('body').on('click', '[data-confirm]', function(){
|
||||
var $this = $(this);
|
||||
bootbox.confirm($(this).attr('data-confirm'),
|
||||
function(result){
|
||||
if(result) {
|
||||
// Si lien
|
||||
if($this.attr('href')){
|
||||
window.location.href = $this.attr('href');
|
||||
}else{
|
||||
// Si on doit soumettre un formulaire
|
||||
var $form = $this.closest("form");
|
||||
if($form.size() > 0){
|
||||
$form.submit();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
return false;
|
||||
});
|
||||
*/
|
||||
});
|
||||
return false;
|
||||
});
|
||||
*/
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
|
||||
|
||||
@@ -6,6 +6,16 @@
|
||||
// Collapse
|
||||
.no-js .collapse { display: block!important; }
|
||||
|
||||
// thumbnail
|
||||
.thumbnail {
|
||||
&.active,
|
||||
&:active {
|
||||
border-style: solid;
|
||||
border-width: 2px;
|
||||
}
|
||||
&.active { border-color: @gray-light; }
|
||||
}
|
||||
|
||||
// Layout
|
||||
.main { margin-bottom: @line-height-computed; }
|
||||
.layout-col-1,
|
||||
|
||||
@@ -9,11 +9,16 @@
|
||||
|
||||
// Availibility
|
||||
.availability {
|
||||
display: block;
|
||||
|
||||
// In Stock
|
||||
&.in-stock {}
|
||||
.in-stock {
|
||||
font-style: italic;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
// Out of Stock
|
||||
&.out-of-stock {}
|
||||
.out-of-stock {}
|
||||
}
|
||||
|
||||
|
||||
@@ -61,11 +66,33 @@
|
||||
margin-bottom: @line-height-computed;
|
||||
}
|
||||
|
||||
.product-thumbnails {
|
||||
> ul {
|
||||
#product-thumbnails {
|
||||
.carousel-inner {
|
||||
margin: 0 auto;
|
||||
width: 90%;
|
||||
}
|
||||
.carousel-control {
|
||||
background-image: none;
|
||||
display: none; // Need js
|
||||
width: 4%; margin-top: -4px;
|
||||
.icon-prev {
|
||||
&:before {
|
||||
.icon(@chevron-left);
|
||||
}
|
||||
}
|
||||
.icon-next {
|
||||
&:before {
|
||||
.icon(@chevron-right);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ul {
|
||||
.list-inline;
|
||||
li {
|
||||
width: 20%;
|
||||
margin: 0;
|
||||
> li {
|
||||
margin: 0; padding: 0;
|
||||
width: 19%;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -80,13 +107,12 @@
|
||||
}
|
||||
.product-price {
|
||||
margin-bottom: @line-height-computed;
|
||||
.availability {
|
||||
.availibity-label { .sr-only; }
|
||||
font-style: italic;
|
||||
text-transform: uppercase;
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
}
|
||||
}
|
||||
.product-cart {
|
||||
background: @option-bg;
|
||||
border: 1px solid @option-border;
|
||||
border-radius: @option-border-radius;
|
||||
margin-bottom: @line-height-computed; padding: @option-padding;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
@FontAwesomePath: "../font/fontawesome";
|
||||
|
||||
//bootstrap font
|
||||
@icon-font-path: "../font/bootstrap/";
|
||||
@icon-font-path: "../font/bootstrap/";
|
||||
|
||||
// Grid system
|
||||
@grid-float-breakpoint: @screen-desktop;
|
||||
@@ -14,9 +14,9 @@
|
||||
@legend-border-color: transparent;
|
||||
|
||||
// Buttons
|
||||
@btn-default-color: #333;
|
||||
@btn-default-bg: #f5f5f5;
|
||||
@btn-default-border: #ccc;
|
||||
@btn-default-color: #333;
|
||||
@btn-default-bg: #f5f5f5;
|
||||
@btn-default-border: #ccc;
|
||||
|
||||
@btn-primary-color: #fff;
|
||||
@btn-primary-bg: @brand-primary;
|
||||
@@ -74,14 +74,14 @@
|
||||
@block-subheading-font-size: ceil(@font-size-base * 1.1); // 15.4px
|
||||
|
||||
// Thelia : Block Links
|
||||
@block-nav-bg: transparent;
|
||||
@block-nav-hover-bg: #f7f7f7;
|
||||
@block-nav-border: #eee;
|
||||
@block-nav-color: #747474;
|
||||
@block-nav-bg: transparent;
|
||||
@block-nav-hover-bg: #f7f7f7;
|
||||
@block-nav-border: #eee;
|
||||
@block-nav-color: #747474;
|
||||
|
||||
// Thelia : Block Links
|
||||
@block-links-bg: transparent;
|
||||
@block-links-hover-bg: #f7f7f7;
|
||||
@block-links-hover-bg: darken(@body-bg, 8%);
|
||||
@block-links-border: #fff;
|
||||
@block-links-color: #747474;
|
||||
|
||||
@@ -112,25 +112,3 @@
|
||||
@option-heading-border: darken(@body-bg, 12.5%); //#dfdfdf
|
||||
@option-heading-color: @text-color;
|
||||
@option-heading-font-size: @font-size-base;
|
||||
|
||||
|
||||
// Callout
|
||||
@callout-bg: @body-bg;
|
||||
@callout-border: #ddd;
|
||||
@callout-text: @text-color;
|
||||
|
||||
@callout-success-text: @state-success-text;
|
||||
@callout-success-border: @state-success-border;
|
||||
@callout-success-bg: @state-success-bg;
|
||||
|
||||
@callout-warning-text: @state-warning-text;
|
||||
@callout-warning-border: @state-warning-border;
|
||||
@callout-warning-bg: @state-warning-bg;
|
||||
|
||||
@callout-danger-text: @state-danger-text;
|
||||
@callout-danger-border: @state-danger-border;
|
||||
@callout-danger-bg: @state-danger-bg;
|
||||
|
||||
@callout-info-text: @state-info-text;
|
||||
@callout-info-border: @state-info-border;
|
||||
@callout-info-bg: @state-info-bg;
|
||||
|
||||
@@ -41,16 +41,6 @@ label { font-weight: 600; }
|
||||
.box-shadow(none);
|
||||
}
|
||||
|
||||
// thumbnail
|
||||
.thumbnail {
|
||||
&.active,
|
||||
&:active {
|
||||
border-style: solid;
|
||||
border-width: 5px;
|
||||
}
|
||||
&.active { border-color: @gray-light; }
|
||||
}
|
||||
|
||||
|
||||
// Navbar
|
||||
.navbar {
|
||||
@@ -169,9 +159,9 @@ header {
|
||||
font-weight: 600;
|
||||
text-align: left;
|
||||
text-shadow: none;
|
||||
|
||||
|
||||
@media (min-width: @screen-desktop) { padding: 2px 15px 2px 5px; }
|
||||
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
background-color: @brand-primary;
|
||||
@@ -208,7 +198,7 @@ header {
|
||||
font-weight: 600;
|
||||
text-align: left;
|
||||
text-shadow: none;
|
||||
|
||||
|
||||
@media (min-width: @screen-desktop) { padding: 2px 15px 2px 5px; }
|
||||
|
||||
&:hover,
|
||||
@@ -252,7 +242,7 @@ header {
|
||||
// Products List
|
||||
#category-products .btn-cart {
|
||||
.btn-secondary;
|
||||
|
||||
|
||||
&:before {
|
||||
content: @shopping-cart;
|
||||
font-size: 1.3em;
|
||||
@@ -335,6 +325,9 @@ td.product,
|
||||
}
|
||||
}
|
||||
|
||||
// Availibility
|
||||
.availibity-label { .sr-only; }
|
||||
|
||||
|
||||
.products-grid,
|
||||
.products-list {
|
||||
@@ -600,6 +593,38 @@ td.product,
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
.product-cart {
|
||||
background-color: #f5f5f5!important;
|
||||
margin-bottom: @line-height-computed; padding: 10px!important;
|
||||
}
|
||||
}
|
||||
|
||||
#product-thumbnails {
|
||||
.carousel-control {
|
||||
width: 17px!important;
|
||||
&.left {
|
||||
border-right: 7px solid #ccc;
|
||||
color: #ccc;
|
||||
text-align: left;
|
||||
> .icon-prev {
|
||||
left: 0; margin-left: 0; margin-top: -15px;
|
||||
&:before {
|
||||
color: inherit;
|
||||
content: @caret-left!important;
|
||||
}
|
||||
}
|
||||
}
|
||||
&.right {
|
||||
border-left: 7px solid #ccc;
|
||||
text-align: right;
|
||||
> .icon-next {
|
||||
left: auto; right: 0; margin-left: 0; margin-top: -15px;
|
||||
&:before {
|
||||
content: @caret-right!important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: @screen-tablet) {
|
||||
@@ -613,7 +638,13 @@ td.product,
|
||||
|
||||
// Product Details
|
||||
#product-details {
|
||||
|
||||
.group-qty {
|
||||
.form-control {
|
||||
display: inline-block;
|
||||
margin-right: 1em; margin-left: .4em;
|
||||
width: 100px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -896,7 +927,7 @@ td.product,
|
||||
}
|
||||
|
||||
// Add address button
|
||||
#account-address,
|
||||
#account-address,
|
||||
#delivery-address {
|
||||
.btn-add-address {
|
||||
.btn-link;
|
||||
@@ -1021,7 +1052,7 @@ td.product,
|
||||
margin-right: .3em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
|
||||
&:hover,
|
||||
&:focus { color: @link-hover-color; }
|
||||
}
|
||||
@@ -1075,7 +1106,7 @@ td.product,
|
||||
}
|
||||
|
||||
.table-cart {
|
||||
|
||||
|
||||
thead,
|
||||
tbody,
|
||||
tfoot {
|
||||
@@ -1139,14 +1170,14 @@ td.product,
|
||||
padding: 12px;
|
||||
text-align: left;
|
||||
width: 100%;
|
||||
|
||||
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active,
|
||||
&.active {
|
||||
background-color: @brand-primary;
|
||||
}
|
||||
|
||||
|
||||
&.disabled,
|
||||
&[disabled] {
|
||||
&,
|
||||
@@ -1158,7 +1189,7 @@ td.product,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media (min-width: @screen-tablet) {
|
||||
.btn-step {
|
||||
border-top: 0;
|
||||
|
||||
@@ -50,8 +50,8 @@
|
||||
|
||||
|
||||
// Pager
|
||||
@pager-border-radius: 0;
|
||||
@pager-disabled-color: @gray-light;
|
||||
@pager-border-radius: 0;
|
||||
@pager-disabled-color: @gray-light;
|
||||
|
||||
|
||||
// Navbar
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<a href="{$URL}" itemprop="url" tabindex="-1" class="product-image">
|
||||
{ifloop rel="image_product_new" }
|
||||
<img itemprop="image"
|
||||
{loop name="image_product_new" type="image" limit="1" product="{$ID}"}
|
||||
{loop name="image_product_new" type="image" limit="1" product="{$ID}" force_return="1" width="280" height="196" resize_mode="crop"}
|
||||
src="{$IMAGE_URL}"
|
||||
{/loop}
|
||||
alt="Product #{$LOOP_COUNT}" >
|
||||
@@ -99,7 +99,7 @@
|
||||
<a href="{$URL}" itemprop="url" tabindex="-1" class="product-image">
|
||||
{ifloop rel="image_product_promo" }
|
||||
<img itemprop="image"
|
||||
{loop name="image_product_promo" type="image" limit="1" product="{$ID}"}
|
||||
{loop name="image_product_promo" type="image" limit="1" product="{$ID}" force_return="1" width="218" height="146" resize_mode="crop"}
|
||||
src="{$IMAGE_URL}"
|
||||
{/loop}
|
||||
alt="Product #{$LOOP_COUNT}" >
|
||||
|
||||
@@ -95,7 +95,7 @@ URL: http://www.thelia.net
|
||||
{/elseloop}
|
||||
<li class="dropdown">
|
||||
<a href="cart.html" class="dropdown-toggle cart" data-toggle="dropdown">
|
||||
Cart <span class="badge">2</span>
|
||||
Cart <span class="badge">{cart attr="count_item"}</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
202
templates/default/product.html
Normal file
202
templates/default/product.html
Normal file
@@ -0,0 +1,202 @@
|
||||
{extends file="layout.tpl"}
|
||||
|
||||
{block name="breadcrumb"}
|
||||
<nav class="nav-breadcrumb" role="navigation" aria-labelledby="breadcrumb-label">
|
||||
<strong id="breadcrumb-label">You are here: </strong>
|
||||
<ul class="breadcrumb" itemprop="breadcrumb">
|
||||
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="index.php" itemprop="url"><span itemprop="title">Home</span></a></li>
|
||||
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="category.php" itemprop="url"><span itemprop="title">Category 1</span></a></li>
|
||||
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="category.php" itemprop="url"><span itemprop="title">Category 1.2</span></a></li>
|
||||
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb" class="active"><span itemprop="title">Product name</span></li>
|
||||
</ul>
|
||||
</nav><!-- /.nav-breadcrumb -->
|
||||
{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="main">
|
||||
{loop name="product.details" type="product" id="{product attr="id"}"}
|
||||
<article id="product" class="col-main" role="main" itemscope itemtype="http://schema.org/Product">
|
||||
|
||||
<!-- Use the meta tag to specify content that is not visible on the page in any way -->
|
||||
<meta itemprop="brand" content="Diesel">
|
||||
<meta itemprop="productID" content="isbn:925872">
|
||||
|
||||
<section id="product-gallery">
|
||||
<figure class="product-image">
|
||||
{loop type="image" name="image.main" product="{$ID}" width="560" height="445" resize_mode="crop" limit="1" force_result="1"}
|
||||
<img src="{$IMAGE_URL}" alt="{$TITLE}" class="img-responsive" itemprop="image" data-toggle="magnify">
|
||||
{/loop}
|
||||
</figure>
|
||||
|
||||
<div id="product-thumbnails" class="slide" style="position:relative;">
|
||||
<div class="carousel-inner">
|
||||
<div class="item active">
|
||||
<ul>
|
||||
{loop name="image.carousel" type="image" product="{$ID}" width="560" height="445" resize_mode="crop" limit="5" force_result="1"}
|
||||
<li>
|
||||
<a href="{$IMAGE_URL}" class="thumbnail {if $LOOP_COUNT == 1}active{/if}">
|
||||
{loop type="image" name="image.thumbs" id="{$ID}" product="$OBJECT_ID" width="118" height="85" resize_mode="crop" force_result="1"}
|
||||
<img src="{$IMAGE_URL}" alt="{$TITLE}">
|
||||
{/loop}
|
||||
</a>
|
||||
</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
</div>
|
||||
{ifloop rel="image.carouselsup"}
|
||||
<div class="item">
|
||||
<ul>
|
||||
|
||||
{loop name="image.carouselsup" type="image" product="{$ID}" width="560" height="445" resize_mode="crop" offset="5" force_result="1"}
|
||||
<li>
|
||||
<a href="{$IMAGE_URL}" class="thumbnail">
|
||||
{loop type="image" name="image.thumbssup" id="{$ID}" product="$OBJECT_ID" width="118" height="85" resize_mode="crop" force_result="1"}
|
||||
<img src="{$IMAGE_URL}" alt="{$TITLE}">
|
||||
{/loop}
|
||||
</a>
|
||||
</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
</div>
|
||||
{/ifloop}
|
||||
</div>
|
||||
{ifloop rel="image.carouselsup"}
|
||||
<a class="left carousel-control" href="#product-thumbnails" data-slide="prev"><i class="icon-prev"></i></a>
|
||||
<a class="right carousel-contol" href="#product-thumbnails" data-slide="next"><i class="icon-next"></i></a>
|
||||
{/ifloop}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="product-details">
|
||||
<div class="product-info">
|
||||
<h1 class="name"><span itemprop="name">{$TITLE}</span></h1>
|
||||
<span itemprop="sku" class="sku">{intl l='Ref.'}: {$REF}</span>
|
||||
|
||||
<div class="short-description">
|
||||
<p>{$POSTSCRIPTUM}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="product-price" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
|
||||
<div class="availability"><span class="availibity-label">{intl l="Availability"}: </span><span itemprop="availability" href="http://schema.org/InStock" class="in-stock">In stock</span></div>
|
||||
|
||||
<div class="price-container">
|
||||
<meta itemprop="category" content="Category1">
|
||||
<meta itemprop="itemCondition" itemscope itemtype="http://schema.org/NewCondition"> <!-- List of condition : NewCondition, DamagedCondition, UsedCondition, RefurbishedCondition -->
|
||||
<meta itemprop="priceCurrency" content="USD"> <!-- List of currency : The currency used to describe the product price, in three-letter ISO format. -->
|
||||
<link itemprop="availability" href="http://schema.org/InStock" content="in_stock" />
|
||||
<!-- List of availibility :
|
||||
out_of_stock : http://schema.org/OutOfStock
|
||||
in_stock : http://schema.org/InStock
|
||||
instore_only : http://schema.org/InStoreOnly
|
||||
preorder : http://schema.org/PreOrder
|
||||
online_only : http://schema.org/OnlineOnly
|
||||
-->
|
||||
{if $IS_PROMO }
|
||||
{loop name="productSaleElements_promo" type="product_sale_elements" product="{$ID}" limit="1"}
|
||||
{assign var="default_product_sale_elements" value="$ID"}
|
||||
<span class="special-price"><span itemprop="price" class="price-label">{intl l="Special Price:"} </span><span class="price">{format_number number="{$TAXED_PROMO_PRICE}"} {currency attr="symbol"}</span></span>
|
||||
<span class="old-price"><span class="price-label">{intl l="Regular Price:"} </span><span class="price">{format_number number="{$TAXED_PRICE}"} {currency attr="symbol"}</span></span>
|
||||
{/loop}
|
||||
{else}
|
||||
<span class="special-price"><span itemprop="price" class="price-label">{intl l="Special Price:"} </span><span class="price">{format_number number="{$BEST_TAXED_PRICE}"} {currency attr="symbol"}</span></span>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{form name="thelia.cart.add" }
|
||||
<form id="form-product-details" action="{url path="/cart/add" }" method="post" role="form">
|
||||
{form_hidden_fields form=$form}
|
||||
<input type="hidden" name="view" value="product">
|
||||
<input type="hidden" name="product_id" value="{$ID}">
|
||||
|
||||
{if $form_error}<div class="alert alert-error">{$form_error_message}</div>{/if}
|
||||
|
||||
{form_field form=$form field='product_sale_elements_id'}
|
||||
{if $default_product_sale_elements }
|
||||
<input type="hidden" name="{$name}" value="{$default_product_sale_elements}" {$attr}>
|
||||
{else}
|
||||
{loop name="productSaleElements_promo" type="product_sale_elements" product="{$ID}" limit="1"}
|
||||
<input type="hidden" name="{$name}" value="{$ID}" {$attr}>
|
||||
{/loop}
|
||||
{/if}
|
||||
{/form_field}
|
||||
{form_field form=$form field="product"}
|
||||
<input id="{$label_attr.for}" type="hidden" name="{$name}" value="{$ID}" {$attr} >
|
||||
{/form_field}
|
||||
<fieldset class="product-options">
|
||||
<div class="option option-color">
|
||||
<label for="option-color" class="option-heading">Show</label>
|
||||
<div class="option-content">
|
||||
<select id="option-color" name="option-color" class="form-control">
|
||||
<option value="0">Blue</option>
|
||||
<option value="1">Red</option>
|
||||
<option value="2">Purple</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="option option-size">
|
||||
<fieldset>
|
||||
<legend class="option-heading">Size</legend>
|
||||
<div class="option-content">
|
||||
<label class="checkbox-inline" for="size1">
|
||||
<input type="checkbox" name="size1" id="size1" value="1"> Large
|
||||
</label>
|
||||
<label class="checkbox-inline" for="size2">
|
||||
<input type="checkbox" name="size2" id="size2" value="2"> Medium
|
||||
</label>
|
||||
<label class="checkbox-inline" for="size3">
|
||||
<input type="checkbox" name="size3" id="size3" value="3"> Small
|
||||
</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="product-cart form-inline">
|
||||
{form_field form=$form field='quantity'}
|
||||
<div class="form-group group-qty {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
|
||||
<label for="{$label_attr.for}">{$label}</label>
|
||||
<input type="number" name="{$name}" id="{$label_attr.for}" class="form-control" value="{$value|default:1}" min="0" required>
|
||||
{if $error }
|
||||
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
|
||||
{elseif $value != "" && !$error}
|
||||
<span class="help-block"><i class="icon-ok"></i></span>
|
||||
{/if}
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
<div class="form-group group-btn">
|
||||
<button type="submit" class="btn btn_add_to_cart">{intl l="Add to cart"}</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
{/form}
|
||||
</section>
|
||||
|
||||
<section id="product-tabs">
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li class="active" role="presentation"><a id="tab1" href="#description" data-toggle="tab" role="tab">{intl l="Description"}</a></li>
|
||||
<li role="presentation"><a id="tab2" href="#additional" data-toggle="tab" role="tab">{intl l="Additional Info"}</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active in" id="description" itemprop="description" role="tabpanel" aria-labelledby="tab1">
|
||||
<p>{$DESCRIPTION}</p>
|
||||
</div>
|
||||
<div class="tab-pane" id="additional" role="tabpanel" aria-labelledby="tab2">
|
||||
<p>Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</article><!-- /product -->
|
||||
{/loop}
|
||||
<ul class="pager">
|
||||
<li class="previous"><a href="#">Previous product</a></li>
|
||||
<li class="next"><a href="#">Next product</a></li>
|
||||
</ul
|
||||
|
||||
></div>
|
||||
|
||||
</div><!-- /.container -->
|
||||
{/block}
|
||||
Reference in New Issue
Block a user