Merge with master
This commit is contained in:
@@ -4,6 +4,9 @@
|
||||
{check_auth roles="ADMIN" permissions="{block name="check-permissions"}{/block}" login_tpl="/admin/login"}
|
||||
{/block}
|
||||
|
||||
{* -- Define some stuff for Smarty ----------------------------------------- *}
|
||||
{config_load file='variables.conf'}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="{$lang_code}">
|
||||
<head>
|
||||
@@ -53,7 +56,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12 clearfix">
|
||||
<div class="version-info pull-left">{intl l='Version %ver' ver="{$THELIA_VERSION}"}</div>
|
||||
|
||||
|
||||
<div class="clearfix pull-right hidden-xs">
|
||||
<div class="btn-group pull-right">
|
||||
<a href="{navigate to="index"}" title="{intl l='View site'}" target="_blank" class="btn btn-default"><span class="glyphicon glyphicon-eye-open"></span> {intl l="View shop"}</a>
|
||||
@@ -71,7 +74,7 @@
|
||||
</div>
|
||||
|
||||
{module_include location='inside_topbar'}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -86,7 +89,7 @@
|
||||
<nav class="navbar navbar-default" role="navigation">
|
||||
|
||||
<div class="container">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="btn navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
@@ -111,26 +114,30 @@
|
||||
{/loop}
|
||||
|
||||
{loop name="menu-auth-order" type="auth" roles="ADMIN" permissions="admin.orders.view"}
|
||||
<li class="dropdown {if $admin_current_location == 'customer'}active{/if}" id="orders_menu">
|
||||
<li class="dropdown {if $admin_current_location == 'order'}active{/if}" id="orders_menu">
|
||||
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{intl l="Orders"} <span class="caret"></span></a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{intl l="Orders"} <span class="caret"></span></a>
|
||||
|
||||
<ul class="dropdown-menu config_menu" role="menu">
|
||||
<ul class="dropdown-menu config_menu" role="menu">
|
||||
|
||||
<li role="menuitem"><a data-target="{url path='admin/orders'}" href="{url path='admin/orders'}">
|
||||
{intl l="All orders"}
|
||||
<span class="badge">{count type="order"}</span></a>
|
||||
</li>
|
||||
<li role="menuitem">
|
||||
<a data-target="{url path='admin/orders'}" href="{url path='admin/orders'}">
|
||||
{intl l="All orders"}
|
||||
<span class="label label-default pull-right">{count type="order" customer="*" backend_context="1"}</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{loop name="order-status-list" type="order-status"}
|
||||
<li role="menuitem">
|
||||
<a data-target="{url path='admin/orders/$LABEL'}" href="{url path='admin/orders/$LABEL'}">
|
||||
{$LABEL} <span class="badge">{count type="order" status="{$ID}"}</span>
|
||||
</a>
|
||||
</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
</li>
|
||||
{loop name="order-status-list" type="order-status"}
|
||||
{assign "orderStatusLabel" "order_$CODE"}
|
||||
<li role="menuitem">
|
||||
<a data-target="{url path='admin/orders/$LABEL'}" href="{url path="admin/orders" status=$ID}">
|
||||
{$TITLE}
|
||||
<span class="label label-{#$orderStatusLabel#} pull-right">{count type="order" customer="*" backend_context="1" status=$ID}</span>
|
||||
</a>
|
||||
</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
</li>
|
||||
{/loop}
|
||||
|
||||
{loop name="menu-auth-catalog" type="auth" roles="ADMIN" permissions="admin.catalog.view"}
|
||||
@@ -147,7 +154,7 @@
|
||||
|
||||
{loop name="menu-auth-coupon" type="auth" roles="ADMIN" permissions="admin.coupon.view"}
|
||||
<li class="{if $admin_current_location == 'coupon'}active{/if}" id="coupon_menu">
|
||||
<a href="{url path='/admin/coupon/'}">{intl l="Coupons"}</a>
|
||||
<a href="{url path='/admin/coupon'}">{intl l="Coupons"}</a>
|
||||
</li>
|
||||
{/loop}
|
||||
|
||||
@@ -221,8 +228,16 @@
|
||||
{* -- Javascript section ------------------------------------------------ *}
|
||||
|
||||
{block name="before-javascript-include"}{/block}
|
||||
<script src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
|
||||
<script>
|
||||
if (typeof jQuery == 'undefined') {
|
||||
{javascripts file='assets/js/libs/jquery.js'}
|
||||
document.write(unescape("%3Cscript src='{$asset_url}' %3E%3C/script%3E"));
|
||||
{/javascripts}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<script src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
|
||||
|
||||
{debugbar_renderjs}
|
||||
{debugbar_renderresult}
|
||||
|
||||
248
templates/admin/default/ajax/product-attributes-tab.html
Normal file
248
templates/admin/default/ajax/product-attributes-tab.html
Normal file
@@ -0,0 +1,248 @@
|
||||
{loop name="product_edit" type="product" visible="*" id=$product_id backend_context="1" lang=$edit_language_id}
|
||||
<div class="form-container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<p></p> {* <---- FIXME Lame ! *}
|
||||
<form method="POST" class="clearfix" action="{url path="/admin/product/$ID/set-product-template"}" id="product_template_form">
|
||||
|
||||
<input type="hidden" name="product_id" value="{$product_id}" />
|
||||
<input type="hidden" name="current_tab" value="attributes" />
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="well well-sm">
|
||||
<p>{intl
|
||||
l="To use features or attributes on this product, please select a product template. You can define product templates in the <a href=\"%tpl_mgmt_url\" target=\"tpl_window\">configuration section</a> of the administration."
|
||||
tpl_mgmt_url={url path='/admin/configuration/templates'}
|
||||
}
|
||||
</p>
|
||||
|
||||
<label for="template_id" class="control-label">
|
||||
{intl l='Current product template'} :
|
||||
</label>
|
||||
|
||||
<div class="input-group">
|
||||
<select required="required" name="template_id" id="template_id" class="form-control">
|
||||
<option value="0">{intl l='Do not use a product template'}</option>
|
||||
{loop name="product_template_select" type="template"}
|
||||
<option value="{$ID}" {if $TEMPLATE == $ID}selected="selected"{/if}>{$NAME}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
|
||||
<span class="input-group-btn" id="apply_template_button">
|
||||
<button class="btn btn-default btn-primary action-btn" type="submit">{intl l="Apply"}</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* Check if a product template is defined *}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<form method="POST" action="{url path="/admin/product/$ID/update-attributes-and-features"}" id="attribute_form">
|
||||
|
||||
<input type="hidden" name="product_id" value="{$product_id}" />
|
||||
<input type="hidden" name="current_tab" value="attributes" />
|
||||
|
||||
{include
|
||||
file = "includes/inner-form-toolbar.html"
|
||||
hide_submit_buttons = false
|
||||
|
||||
page_url = "{url path='/admin/products/update' product_id=$ID}"
|
||||
close_url = "{url path='/admin/categories' category_id=$DEFAULT_CATEGORY}"
|
||||
}
|
||||
|
||||
{* -- Begin attributes management ------------------------------- *}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="well well-sm">
|
||||
<div class="form-group">
|
||||
<p class="title title-without-tabs">{intl l='Product Attributes'}</p>
|
||||
|
||||
<p>
|
||||
{if $TEMPLATE}
|
||||
{intl
|
||||
l="You can change template attributes and their positions in <a href=\"%tpl_mgmt_url\" target=\"tpl_window\">the template configuration page</a>."
|
||||
tpl_mgmt_url={url path='/admin/configuration/templates/update' template_id=$TEMPLATE}
|
||||
}
|
||||
{else}
|
||||
{intl
|
||||
l="You can change attributes and their positions in <a href=\"%tpl_mgmt_url\" target=\"tpl_window\">the attributes configuration page</a>."
|
||||
tpl_mgmt_url={url path='/admin/configuration/attributes'}
|
||||
}
|
||||
{/if}
|
||||
</p>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{intl l='ID'}</th>
|
||||
<th>{intl l='Attribute Name'}</th>
|
||||
|
||||
{module_include location='product_attributes_table_header'}
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="product-attributes" type="attribute" order="manual" product=$product_id backend_context="1" lang="$edit_language_id"}
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
|
||||
<td>{$TITLE}</td>
|
||||
|
||||
{module_include location='product_features_table_row'}
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="product-attributes"}
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div class="alert alert-info">
|
||||
{intl l="This product template does not contains any features"}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/elseloop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* -- Begin features management ---------------------------------- *}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="well well-sm">
|
||||
<div class="form-group">
|
||||
<p class="title title-without-tabs">{intl l='Product Features'}</p>
|
||||
|
||||
<p>
|
||||
{if $TEMPLATE}
|
||||
{intl
|
||||
l="You can change templates features and their positions in <a href=\"%tpl_mgmt_url\" target=\"tpl_window\">the template configuration page</a>."
|
||||
tpl_mgmt_url={url path='/admin/configuration/templates/update' template_id=$TEMPLATE}
|
||||
}
|
||||
{else}
|
||||
{intl
|
||||
l="You can change feature and their positions in <a href=\"%tpl_mgmt_url\" target=\"tpl_window\">the features configuration page</a>."
|
||||
tpl_mgmt_url={url path='/admin/configuration/features'}
|
||||
}
|
||||
{/if}
|
||||
</p>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{intl l='ID'}</th>
|
||||
<th>{intl l='Feature Name'}</th>
|
||||
<th>{intl l='Feature value for this product'}</th>
|
||||
|
||||
{module_include location='product_features_table_header'}
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="product-features" type="feature" order="manual" product=$product_id backend_context="1" lang="$edit_language_id"}
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
|
||||
<td>{$TITLE}</td>
|
||||
|
||||
<td>
|
||||
{* Multiple values *}
|
||||
|
||||
{ifloop rel="product-features-av"}
|
||||
|
||||
{* load all selected values in an array to speed up things a little *}
|
||||
|
||||
{$selected = array()}
|
||||
|
||||
{loop name="free-text-value" exclude_free_text="true" type="feature_value" product=$product_id feature=$ID backend_context="1" lang="$edit_language_id"}
|
||||
{$selected[] = $FEATURE_AV_ID}
|
||||
{/loop}
|
||||
|
||||
{capture "select_options"}
|
||||
{loop name="product-features-av" type="feature-availability" feature=$ID order="manual" backend_context="1" lang="$edit_language_id"}
|
||||
<option value="{$ID}" {if in_array($ID, $selected)}selected="selected"{/if}>{$TITLE}</option>
|
||||
|
||||
{$options_count = $LOOP_COUNT} {* LOOP_COUNT is only available inside the loop ! *}
|
||||
{/loop}
|
||||
{/capture}
|
||||
|
||||
<div class="input-form">
|
||||
<select multiple="multiple" name="feature_value[{$ID}][]" id="feature_value_{$ID}" size="{$options_count}" class="form-control">
|
||||
{$smarty.capture.select_options nofilter}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<span class="help-block text-right">
|
||||
{intl l='Use Ctrl+click to select more than one value. You can also <a href="#" class="clear_feature_value" data-id="%id">clear selected values</a>.' id=$ID}
|
||||
</span>
|
||||
{/ifloop}
|
||||
|
||||
{* Free text *}
|
||||
|
||||
{elseloop rel="product-features-av"}
|
||||
{* Get the free text value *}
|
||||
|
||||
{loop name="free-text-value" exclude_feature_availability="1" type="feature_value" product=$product_id feature=$ID backend_context="1" lang="$edit_language_id"}
|
||||
{$feature_value=$FREE_TEXT_VALUE}
|
||||
{/loop}
|
||||
|
||||
<input type="text" id="feature_text_value_{$ID}" name="feature_text_value[{$ID}]" title="{intl l='Enter here the feature value as free text'}" placeholder="{intl l='Feature value'}" class="form-control" value="{$feature_value|default:''}">
|
||||
{/elseloop}
|
||||
</td>
|
||||
|
||||
{module_include location='product_features_table_row'}
|
||||
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="product-features"}
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<div class="alert alert-info">
|
||||
{intl l="This product template does not contains any features"}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/elseloop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{/loop}
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
// Unselect all options in attribute + feature tab
|
||||
$('.clear_feature_value').click(function(event){
|
||||
$('#feature_value_' + $(this).data('id') + ' option').prop('selected', false);
|
||||
|
||||
event.preventDefault();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
576
templates/admin/default/ajax/product-related-tab.html
Normal file
576
templates/admin/default/ajax/product-related-tab.html
Normal file
@@ -0,0 +1,576 @@
|
||||
{loop name="product_edit" type="product" visible="*" id=$product_id backend_context="1" lang=$edit_language_id}
|
||||
<div class="form-container">
|
||||
|
||||
{include
|
||||
file = "includes/inner-form-toolbar.html"
|
||||
hide_submit_buttons = true
|
||||
|
||||
page_url = "{url path='/admin/products/update' product_id=$ID}"
|
||||
close_url = "{url path='/admin/categories' category_id=$DEFAULT_CATEGORY}"
|
||||
}
|
||||
|
||||
<div class="row">
|
||||
|
||||
{* -- Begin related content management ------------------------------ *}
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="well well-sm">
|
||||
<div class="form-group">
|
||||
<form method="POST" action="{url path='/admin/products/content/add'}" id="related_content_form">
|
||||
|
||||
<p class="title title-without-tabs">{intl l='Related content'}</p>
|
||||
<p>{intl l='You can attach here some content to this product'}</p>
|
||||
|
||||
<input type="hidden" name="product_id" value="{$product_id}" />
|
||||
<input type="hidden" name="current_tab" value="related" />
|
||||
|
||||
{ifloop rel="folders"}
|
||||
<div class="form-group">
|
||||
<select name="folder_id" id="folder_id" class="form-control">
|
||||
<option value="">{intl l='Select a folder...'}</option>
|
||||
{loop name="folders" type="folder-tree" folder="0" backend_context="1" lang="$edit_language_id"}
|
||||
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px">{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
|
||||
<span class="help-block">{intl l='Select a folder to get its content'}</span>
|
||||
</div>
|
||||
|
||||
<div id="content_selector" class="hide">
|
||||
<div class="input-group">
|
||||
<select required="required" name="content_id" id="content_id" class="form-control">
|
||||
<option value="">{intl l='Select a folder content...'}</option>
|
||||
</select>
|
||||
<span class="input-group-btn" id="content_add_button">
|
||||
<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 a content and click (+) to add it to this product'}</span>
|
||||
</div>
|
||||
|
||||
<div id="content_selector_empty" class="hide">
|
||||
<div class="alert alert-info">
|
||||
{intl l="No available content in this folder"}
|
||||
</div>
|
||||
</div>
|
||||
{/ifloop}
|
||||
|
||||
{elseloop rel="folders"}
|
||||
<div class="alert alert-info">{intl l="No folders found"}</div>
|
||||
{/elseloop}
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{intl l='ID'}</th>
|
||||
|
||||
<th>{intl l='Content title'}</th>
|
||||
|
||||
<th class="text-center">{intl l='Position'}</th>
|
||||
|
||||
{module_include location='product_contents_table_header'}
|
||||
|
||||
<th class="actions">{intl l="Actions"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="assigned_contents" type="associated_content" product="$product_id" backend_context="1" lang="$edit_language_id"}
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
|
||||
<td>
|
||||
{$TITLE}
|
||||
</td>
|
||||
|
||||
<td class="text-center">
|
||||
{admin_position_block
|
||||
permission="admin.products.edit"
|
||||
path={url path='/admin/product/update-content-position' product_id=$product_id current_tab="related"}
|
||||
url_parameter="content_id"
|
||||
in_place_edit_class="contentPositionChange"
|
||||
position=$POSITION
|
||||
id=$ID
|
||||
}
|
||||
</td>
|
||||
|
||||
{module_include location='product_contents_table_row'}
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.product.content.delete"}
|
||||
<a class="btn btn-default btn-xs delete-content" title="{intl l='Delete this content'}" href="#delete_content_dialog" data-id="{$ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="assigned_contents"}
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<div class="alert alert-info">
|
||||
{intl l="This product contains no contents"}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/elseloop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* -- End related content management -------------------------------- *}
|
||||
|
||||
{* -- Begin accessories management ---------------------------------- *}
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class=" well well-sm">
|
||||
<div class="form-group">
|
||||
<form method="POST" action="{url path='/admin/products/accessory/add'}" id="accessory_form">
|
||||
|
||||
<p class="title title-without-tabs">{intl l='Product accessories'}</p>
|
||||
<p>{intl l='Define here this product\'s accessories'}</p>
|
||||
|
||||
<input type="hidden" name="product_id" value="{$product_id}" />
|
||||
<input type="hidden" name="current_tab" value="related" />
|
||||
|
||||
{ifloop rel="categories"}
|
||||
<div class="form-group">
|
||||
<select name="accessory_category_id" id="accessory_category_id" class="form-control">
|
||||
<option value="">{intl l='Select a category...'}</option>
|
||||
{loop name="categories" type="category-tree" category="0" backend_context="1" lang="$edit_language_id"}
|
||||
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px">{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
|
||||
<span class="help-block">{intl l='Select a category to get its products'}</span>
|
||||
</div>
|
||||
|
||||
<div id="accessory_selector" class="hide">
|
||||
<div class="input-group">
|
||||
<select required="required" name="accessory_id" id="accessory_id" class="form-control">
|
||||
<option value="">{intl l='Select a product...'}</option>
|
||||
</select>
|
||||
<span class="input-group-btn" id="accessory_add_button">
|
||||
<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 a product and click (+) to add it as an accessory'}</span>
|
||||
</div>
|
||||
|
||||
<div id="accessory_selector_empty" class="hide">
|
||||
<div class="alert alert-info">
|
||||
{intl l="No available product in this category"}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/ifloop}
|
||||
|
||||
{elseloop rel="categories"}
|
||||
<div class="alert alert-info">{intl l="No categories found"}</div>
|
||||
{/elseloop}
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{intl l='ID'}</th>
|
||||
|
||||
<th>{intl l='Accessory title'}</th>
|
||||
|
||||
<th class="text-center">{intl l='Position'}</th>
|
||||
|
||||
{module_include location='product_accessories_table_header'}
|
||||
|
||||
<th class="actions">{intl l="Actions"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="assigned_accessories" order="accessory" type="accessory" product="$product_id" backend_context="1" lang="$edit_language_id"}
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
|
||||
<td>
|
||||
{$TITLE}
|
||||
</td>
|
||||
|
||||
<td class="text-center">
|
||||
{admin_position_block
|
||||
permission="admin.products.edit"
|
||||
path={url path='/admin/product/update-accessory-position' product_id=$product_id current_tab="related"}
|
||||
url_parameter="accessory_id"
|
||||
in_place_edit_class="accessoryPositionChange"
|
||||
position=$POSITION
|
||||
id=$ID
|
||||
}
|
||||
</td>
|
||||
|
||||
{module_include location='product_accessories_table_row'}
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.product.accessory.delete"}
|
||||
<a class="btn btn-default btn-xs delete-accessory" title="{intl l='Delete this accessory'}" href="#delete_accessory_dialog" data-id="{$ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="assigned_accessories"}
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<div class="alert alert-info">
|
||||
{intl l="This product contains no accessories"}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/elseloop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* -- End accessories management ------------------------------------ *}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
{* -- Begin categories management ----------------------------------- *}
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="well well-sm">
|
||||
<div class="form-group">
|
||||
<form method="POST" action="{url path='/admin/products/category/add'}" id="related_content_form">
|
||||
|
||||
<p class="title title-without-tabs">{intl l='Additional categories'}</p>
|
||||
<p>{intl l='A product could be attached to more than one category. Select here the additional categories for this product.'}
|
||||
{loop name="default_category" type="category" id=$DEFAULT_CATEGORY}
|
||||
{intl l='You can change the default category (%title) in the "General" tab.' title=$TITLE}
|
||||
{/loop}
|
||||
|
||||
{$exclude_from_tree = "-1"}
|
||||
{loop name="additional_categories" type="category" product=$product_id exclude=$DEFAULT_CATEGORY backend_context="1" lang="$edit_language_id"}
|
||||
{$exclude_from_tree = "$exclude_from_tree,$ID"}
|
||||
{/loop}
|
||||
|
||||
<input type="hidden" name="product_id" value="{$product_id}" />
|
||||
<input type="hidden" name="current_tab" value="related" />
|
||||
|
||||
{ifloop rel="categories"}
|
||||
<div class="input-group">
|
||||
|
||||
<select name="additional_category_id" id="accessory_category_id" class="form-control">
|
||||
<option value="">{intl l='Select a category...'}</option>
|
||||
{loop name="categories" type="category-tree" category="0" exclude=$exclude_from_tree backend_context="1" lang="$edit_language_id"}
|
||||
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px" {if $DEFAULT_CATEGORY==$ID}disabled="disabled"{/if}>
|
||||
{$TITLE} {if $DEFAULT_CATEGORY==$ID}{intl l=' (default)'}{/if}
|
||||
</option>
|
||||
{/loop}
|
||||
</select>
|
||||
|
||||
<span class="input-group-btn" id="content_add_button">
|
||||
<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 a category and click (+) to add it to the additional category list'}</span>
|
||||
{/ifloop}
|
||||
|
||||
{elseloop rel="categories"}
|
||||
<div class="alert alert-info">{intl l="No categories found"}</div>
|
||||
{/elseloop}
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{intl l='ID'}</th>
|
||||
|
||||
<th>{intl l='Category title'}</th>
|
||||
|
||||
{module_include location='product_categories_table_header'}
|
||||
|
||||
<th class="actions">{intl l="Actions"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="additional_categories" type="category" product=$product_id exclude=$DEFAULT_CATEGORY backend_context="1" lang="$edit_language_id"}
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
|
||||
<td>
|
||||
{$TITLE}
|
||||
</td>
|
||||
|
||||
{module_include location='product_categories_table_row'}
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.product.category.delete"}
|
||||
<a class="btn btn-default btn-xs delete-category" title="{intl l='Remove the product from this category'}" href="#delete_category_dialog" data-id="{$ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="additional_categories"}
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<div class="alert alert-info">
|
||||
{intl l="This product doesn't belong to any additional category."}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/elseloop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{* -- End categories management ------------------------------------- *}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{* Delete related content confirmation dialog *}
|
||||
|
||||
{capture "delete_content_dialog"}
|
||||
<input type="hidden" name="product_id" value="{$product_id}" />
|
||||
<input type="hidden" name="content_id" id="content_delete_id" value="" />
|
||||
<input type="hidden" name="folder_id" id="folder_delete_id" value="" />
|
||||
|
||||
<input type="hidden" name="current_tab" value="related" />
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
|
||||
dialog_id = "delete_content_dialog"
|
||||
dialog_title = {intl l="Remove related content"}
|
||||
dialog_message = {intl l="Do you really want to remove this related content from the product ?"}
|
||||
|
||||
form_action = {url path='/admin/products/content/delete'}
|
||||
form_content = {$smarty.capture.delete_content_dialog nofilter}
|
||||
}
|
||||
|
||||
{* Delete accessory confirmation dialog *}
|
||||
|
||||
{capture "delete_accessory_dialog"}
|
||||
<input type="hidden" name="product_id" value="{$product_id}" />
|
||||
<input type="hidden" name="accessory_id" id="accessory_delete_id" value="" />
|
||||
<input type="hidden" name="accessory_category_id" id="accessory_category_delete_id" value="" />
|
||||
|
||||
<input type="hidden" name="current_tab" value="related" />
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
|
||||
dialog_id = "delete_accessory_dialog"
|
||||
dialog_title = {intl l="Remove an accessory"}
|
||||
dialog_message = {intl l="Do you really want to remove this accessory from the product ?"}
|
||||
|
||||
form_action = {url path='/admin/products/accessory/delete'}
|
||||
form_content = {$smarty.capture.delete_accessory_dialog nofilter}
|
||||
}
|
||||
|
||||
{* Delete category confirmation dialog *}
|
||||
|
||||
{capture "delete_category_dialog"}
|
||||
<input type="hidden" name="product_id" value="{$product_id}" />
|
||||
<input type="hidden" name="additional_category_id" id="additional_category_delete_id" value="" />
|
||||
|
||||
<input type="hidden" name="current_tab" value="related" />
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
|
||||
dialog_id = "delete_category_dialog"
|
||||
dialog_title = {intl l="Remove from category"}
|
||||
dialog_message = {intl l="Do you really want to remove the product from this category ?"}
|
||||
|
||||
form_action = {url path='/admin/products/category/delete'}
|
||||
form_content = {$smarty.capture.delete_category_dialog nofilter}
|
||||
}
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
// Set proper content ID in delete content from
|
||||
$('a.delete-content').click(function(ev) {
|
||||
$('#content_delete_id').val($(this).data('id'));
|
||||
$('#folder_delete_id').val($('#folder_id').val());
|
||||
});
|
||||
|
||||
// Set proper content ID in accessory delete from
|
||||
$('a.delete-accessory').click(function(ev) {
|
||||
$('#accessory_delete_id').val($(this).data('id'));
|
||||
$('#accessory_category_delete_id').val($('#accessory_category_id').val());
|
||||
});
|
||||
|
||||
// Set proper content ID in accessory delete from
|
||||
$('a.delete-category').click(function(ev) {
|
||||
$('#additional_category_delete_id').val($(this).data('id'));
|
||||
});
|
||||
|
||||
|
||||
// Load content on folder selection
|
||||
$('#folder_id').change(function(event) {
|
||||
var val = $(this).val();
|
||||
|
||||
if (val != "") {
|
||||
$.ajax({
|
||||
url : '{url path="/admin/product/$product_id/available-content/"}' + $(this).val() + '.xml',
|
||||
type : 'get',
|
||||
dataType : 'json',
|
||||
success : function(json) {
|
||||
$('#content_id :not(:first-child)').remove();
|
||||
|
||||
var have_content = false;
|
||||
|
||||
$.each(json, function(idx, value) {
|
||||
$('#content_id').append($('<option>').text(value.title).attr('value', value.id));
|
||||
|
||||
have_content = true; // Lame...
|
||||
});
|
||||
|
||||
if (have_content) {
|
||||
$('#content_selector_empty').addClass('hide');
|
||||
$('#content_selector').removeClass('hide');
|
||||
}
|
||||
else {
|
||||
$('#content_selector_empty').removeClass('hide');
|
||||
$('#content_selector').addClass('hide');
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
$('#content_selector_empty').addClass('hide');
|
||||
$('#content_selector').addClass('hide');
|
||||
}
|
||||
});
|
||||
|
||||
// Load accessory on category selection
|
||||
$('#accessory_category_id').change(function(event) {
|
||||
var val = $(this).val();
|
||||
|
||||
if (val != "") {
|
||||
$.ajax({
|
||||
url : '{url path="/admin/product/$product_id/available-accessories/"}' + $(this).val() + '.xml',
|
||||
type : 'get',
|
||||
dataType : 'json',
|
||||
success : function(json) {
|
||||
$('#accessory_id :not(:first-child)').remove();
|
||||
|
||||
var have_content = false;
|
||||
|
||||
$.each(json, function(idx, value) {
|
||||
$('#accessory_id').append($('<option>').text(value.title).attr('value', value.id));
|
||||
|
||||
have_content = true; // Lame...
|
||||
});
|
||||
|
||||
if (have_content) {
|
||||
$('#accessory_selector_empty').addClass('hide');
|
||||
$('#accessory_selector').removeClass('hide');
|
||||
}
|
||||
else {
|
||||
$('#accessory_selector_empty').removeClass('hide');
|
||||
$('#accessory_selector').addClass('hide');
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
$('#accessory_selector_empty').addClass('hide');
|
||||
$('#accessory_selector').addClass('hide');
|
||||
}
|
||||
});
|
||||
|
||||
{* Inline editing of accessory position using bootstrap-editable *}
|
||||
|
||||
$('.accessoryPositionChange').editable({
|
||||
type : 'text',
|
||||
title : '{intl l="Enter new accessory position"}',
|
||||
mode : 'popup',
|
||||
inputclass : 'input-mini',
|
||||
placement : 'left',
|
||||
success : function(response, newValue) {
|
||||
// The URL template
|
||||
var url = "{url noamp='1' path='/admin/product/update-accessory-position' accessory_id='__ID__' position='__POS__' product_id=$product_id current_tab='related' }";
|
||||
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id')).replace('__POS__', newValue);
|
||||
|
||||
// Reload the page
|
||||
location.href = url;
|
||||
}
|
||||
});
|
||||
|
||||
$('.contentPositionChange').editable({
|
||||
type : 'text',
|
||||
title : '{intl l="Enter new content position"}',
|
||||
mode : 'popup',
|
||||
inputclass : 'input-mini',
|
||||
placement : 'left',
|
||||
success : function(response, newValue) {
|
||||
// The URL template
|
||||
var url = "{url noamp='1' path='/admin/product/update-content-position' content_id='__ID__' position='__POS__' product_id=$product_id current_tab='related' }";
|
||||
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id')).replace('__POS__', newValue);
|
||||
|
||||
// Reload the page
|
||||
location.href = url;
|
||||
}
|
||||
});
|
||||
|
||||
// Initialize folder (id={$folder_id}) select value
|
||||
{if $folder_id != 0}
|
||||
$('#folder_id').val("{$folder_id}").change();
|
||||
{/if}
|
||||
|
||||
// Initialize accessory category id (id={$accessory_category_id}) select value
|
||||
{if $accessory_category_id != 0}
|
||||
$('#accessory_category_id').val("{$accessory_category_id}").change();
|
||||
{/if}
|
||||
|
||||
// Unselect all options in attribute + feature tab
|
||||
$('.clear_feature_value').click(function(event){
|
||||
$('#feature_value_' + $(this).data('id') + ' option').prop('selected', false);
|
||||
|
||||
event.preventDefault();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/loop}
|
||||
@@ -1,12 +1,12 @@
|
||||
<div class="form-group">
|
||||
{ifloop rel="free_attributes"}
|
||||
<form action="{url path='/admin/configuration/templates/attributes/add'}">
|
||||
<form method="POST" 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>
|
||||
<option value="">{intl l='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}
|
||||
@@ -33,6 +33,8 @@
|
||||
|
||||
<th>{intl l='Attribute title'}</th>
|
||||
|
||||
<th class="text-center">{intl l='Position'}</th>
|
||||
|
||||
{module_include location='template_attributes_table_header'}
|
||||
|
||||
<th class="actions">{intl l="Actions"}</th>
|
||||
@@ -44,8 +46,17 @@
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
|
||||
<td>
|
||||
{$TITLE}
|
||||
<td>{$TITLE}</td>
|
||||
|
||||
<td class="text-center">
|
||||
{admin_position_block
|
||||
permission="admin.templates.edit"
|
||||
path={url path="admin/template/update-attribute-position" template_id=$template_id}
|
||||
url_parameter="attribute_id"
|
||||
in_place_edit_class="attributePositionChange"
|
||||
position=$POSITION
|
||||
id=$ID
|
||||
}
|
||||
</td>
|
||||
|
||||
{module_include location='template_attributes_table_row'}
|
||||
@@ -64,7 +75,7 @@
|
||||
|
||||
{elseloop rel="assigned_attributes"}
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<td colspan="4">
|
||||
<div class="alert alert-info">
|
||||
{intl l="This template contains no attributes"}
|
||||
</div>
|
||||
@@ -93,11 +104,33 @@
|
||||
}
|
||||
|
||||
<script>
|
||||
|
||||
$(function() {
|
||||
|
||||
// Set proper attribute ID in delete attribute from
|
||||
$('a.delete-attribute').click(function(ev) {
|
||||
$('#attribute_delete_id').val($(this).data('id'));
|
||||
});
|
||||
|
||||
{* Inline editing of object position using bootstrap-editable *}
|
||||
|
||||
$('.attributePositionChange').editable({
|
||||
type : 'text',
|
||||
title : '{intl l="Enter new category position"}',
|
||||
mode : 'popup',
|
||||
inputclass : 'input-mini',
|
||||
placement : 'left',
|
||||
success : function(response, newValue) {
|
||||
// The URL template
|
||||
var url = "{url noamp='1' path="admin/template/update-attribute-position" template_id=$template_id attribute_id='__ID__' position='__POS__'}";
|
||||
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id')).replace('__POS__', newValue);
|
||||
|
||||
// Reload the page
|
||||
location.href = url;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<div class="form-group">
|
||||
{ifloop rel="free_features"}
|
||||
<form action="{url path='/admin/configuration/templates/features/add'}">
|
||||
<form method="POST" 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>
|
||||
<option value="">{intl l='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}
|
||||
@@ -33,6 +33,8 @@
|
||||
|
||||
<th>{intl l='Feature title'}</th>
|
||||
|
||||
<th class="text-center">{intl l='Position'}</th>
|
||||
|
||||
{module_include location='template_features_table_header'}
|
||||
|
||||
<th class="actions">{intl l="Actions"}</th>
|
||||
@@ -48,6 +50,17 @@
|
||||
{$TITLE}
|
||||
</td>
|
||||
|
||||
<td class="text-center">
|
||||
{admin_position_block
|
||||
permission="admin.templates.edit"
|
||||
path={url path="/admin/template/update-feature-position" template_id=$template_id}
|
||||
url_parameter="feature_id"
|
||||
in_place_edit_class="featurePositionChange"
|
||||
position=$POSITION
|
||||
id=$ID
|
||||
}
|
||||
</td>
|
||||
|
||||
{module_include location='template_features_table_row'}
|
||||
|
||||
<td class="actions">
|
||||
@@ -64,7 +77,7 @@
|
||||
|
||||
{elseloop rel="assigned_features"}
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<td colspan="4">
|
||||
<div class="alert alert-info">
|
||||
{intl l="This template contains no features"}
|
||||
</div>
|
||||
@@ -100,5 +113,26 @@
|
||||
$('a.delete-feature').click(function(ev) {
|
||||
$('#feature_delete_id').val($(this).data('id'));
|
||||
});
|
||||
|
||||
{* Inline editing of object position using bootstrap-editable *}
|
||||
|
||||
$('.featurePositionChange').editable({
|
||||
type : 'text',
|
||||
title : '{intl l="Enter new category position"}',
|
||||
mode : 'popup',
|
||||
inputclass : 'input-mini',
|
||||
placement : 'left',
|
||||
success : function(response, newValue) {
|
||||
// The URL template
|
||||
var url = "{url noamp='1' path='/admin/template/update-feature-position' template_id=$template_id feature_id='__ID__' position='__POS__'}";
|
||||
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id')).replace('__POS__', newValue);
|
||||
|
||||
// Reload the page
|
||||
location.href = url;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
$(function($){
|
||||
|
||||
// Manage how coupon and conditions are saved
|
||||
$.couponManager = {};
|
||||
// Condition to be saved
|
||||
$.couponManager.conditionToSave = {};
|
||||
$.couponManager.conditionToSave.serviceId = false;
|
||||
$.couponManager.conditionToSave.operators = {};
|
||||
$.couponManager.conditionToSave.values = {};
|
||||
// Conditions payload to save
|
||||
$.couponManager.conditionsToSave = [];
|
||||
// Condition being updated id
|
||||
$.couponManager.conditionToUpdateId = false;
|
||||
|
||||
// Clean array from deleteValue (undefined) keys
|
||||
Array.prototype.clean = function(deleteValue) {
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
@@ -11,110 +23,112 @@ $(function($){
|
||||
return this;
|
||||
};
|
||||
|
||||
// Remove 1 Rule then Save Rules AJAX
|
||||
couponManager.removeRuleAjax = function(id) {
|
||||
// Delete rule in temporary array
|
||||
delete couponManager.rulesToSave[id];
|
||||
couponManager.rulesToSave.clean(undefined);
|
||||
// Remove 1 Condition then Save Conditions AJAX
|
||||
$.couponManager.removeConditionAjax = function(id) {
|
||||
// Delete condition in temporary array
|
||||
delete $.couponManager.conditionsToSave[id];
|
||||
$.couponManager.conditionsToSave.clean(undefined);
|
||||
|
||||
// Save
|
||||
couponManager.saveRuleAjax();
|
||||
$.couponManager.saveConditionAjax();
|
||||
};
|
||||
|
||||
// Add 1 Rule / or update the temporary Rules array then Save Rules via AJAX
|
||||
couponManager.createOrUpdateRuleAjax = function() {
|
||||
var id = couponManager.ruleToUpdateId;
|
||||
// Add 1 Condition / or update the temporary Conditions array then Save Conditions via AJAX
|
||||
$.couponManager.createOrUpdateConditionAjax = function() {
|
||||
var id = $.couponManager.conditionToUpdateId;
|
||||
// If create
|
||||
if(!id) {
|
||||
couponManager.rulesToSave.push(couponManager.ruleToSave);
|
||||
$.couponManager.conditionsToSave.push($.couponManager.conditionToSave);
|
||||
} else { // else update
|
||||
couponManager.rulesToSave[id] = couponManager.ruleToSave;
|
||||
$.couponManager.conditionsToSave[id] = $.couponManager.conditionToSave;
|
||||
// reset edit mode to off
|
||||
couponManager.ruleToUpdateId = false;
|
||||
$.couponManager.conditionToUpdateId = false;
|
||||
}
|
||||
|
||||
// Save
|
||||
couponManager.saveRuleAjax();
|
||||
$.couponManager.saveConditionAjax();
|
||||
};
|
||||
|
||||
// Set rule inputs to allow editing
|
||||
couponManager.updateRuleSelectAjax = function(id) {
|
||||
couponManager.ruleToUpdateId = id;
|
||||
couponManager.ruleToSave = couponManager.rulesToSave[id];
|
||||
// Set condition inputs to allow editing
|
||||
$.couponManager.updateConditionSelectAjax = function(id) {
|
||||
$.couponManager.conditionToUpdateId = id;
|
||||
$.couponManager.conditionToSave = $.couponManager.conditionsToSave[id];
|
||||
|
||||
// Set the rule selector
|
||||
// Set the condition selector
|
||||
$("#category-rule option").filter(function() {
|
||||
return $(this).val() == couponManager.ruleToSave.serviceId;
|
||||
return $(this).val() == $.couponManager.conditionToSave.serviceId;
|
||||
}).prop('selected', true);
|
||||
|
||||
// Force rule input refresh
|
||||
couponManager.loadRuleInputs(couponManager.ruleToSave.serviceId, function() {
|
||||
couponManager.fillInRuleInputs();
|
||||
// Force condition input refresh
|
||||
$.couponManager.loadConditionInputs($.couponManager.conditionToSave.serviceId, function() {
|
||||
$.couponManager.fillInConditionInputs();
|
||||
});
|
||||
};
|
||||
|
||||
// Fill in rule inputs
|
||||
couponManager.fillInRuleInputs = function() {
|
||||
// Fill in condition inputs
|
||||
$.couponManager.fillInConditionInputs = function() {
|
||||
var operatorId = null;
|
||||
var valueId = null;
|
||||
var idName = null;
|
||||
|
||||
var id = couponManager.ruleToUpdateId;
|
||||
var id = $.couponManager.conditionToUpdateId;
|
||||
if(id) {
|
||||
couponManager.ruleToSave = couponManager.rulesToSave[id];
|
||||
$.couponManager.conditionToSave = $.couponManager.conditionsToSave[id];
|
||||
}
|
||||
|
||||
for (idName in couponManager.ruleToSave.operators) {
|
||||
for (idName in $.couponManager.conditionToSave.operators) {
|
||||
// Setting idName operator select
|
||||
operatorId = idName + '-operator';
|
||||
$('#' + operatorId).val(couponManager.ruleToSave.operators[idName]);
|
||||
$('#' + operatorId).val($.couponManager.conditionToSave.operators[idName]);
|
||||
|
||||
// Setting idName value input
|
||||
valueId = idName + '-value';
|
||||
$('#' + valueId).val(couponManager.ruleToSave.values[idName]);
|
||||
$('#' + valueId).val($.couponManager.conditionToSave.values[idName]);
|
||||
}
|
||||
};
|
||||
|
||||
// Save rules on click
|
||||
couponManager.onClickSaveRule = function() {
|
||||
// Save conditions on click
|
||||
$.couponManager.onClickSaveCondition = function() {
|
||||
$('#constraint-save-btn').on('click', function () {
|
||||
if($('#category-rule').val() == 'thelia.constraint.rule.available_for_everyone') {
|
||||
// @todo translate + modal
|
||||
var r= confirm("Do you really want to set this coupon available to everyone ?");
|
||||
if($('#category-rule').val() == 'thelia.condition.match_for_everyone') {
|
||||
// // @todo translate message + put it in modal
|
||||
var r = confirm("Do you really want to set this coupon available to everyone ?");
|
||||
if (r == true) {
|
||||
couponManager.createOrUpdateRuleAjax();
|
||||
$.couponManager.createOrUpdateConditionAjax();
|
||||
}
|
||||
} else {
|
||||
$.couponManager.createOrUpdateConditionAjax();
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
couponManager.onClickSaveRule();
|
||||
$.couponManager.onClickSaveCondition();
|
||||
|
||||
// Remove rule on click
|
||||
couponManager.onClickDeleteRule = function() {
|
||||
// Remove condition on click
|
||||
$.couponManager.onClickDeleteCondition = function() {
|
||||
$('.constraint-delete-btn').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
var $this = $(this);
|
||||
couponManager.removeRuleAjax($this.attr('data-int'));
|
||||
$.couponManager.removeConditionAjax($this.attr('data-int'));
|
||||
});
|
||||
};
|
||||
couponManager.onClickDeleteRule();
|
||||
$.couponManager.onClickDeleteCondition();
|
||||
|
||||
// Update rule on click
|
||||
couponManager.onClickUpdateRule = function() {
|
||||
$('.constraint-update-btn').on('click', function (e) {
|
||||
// Update condition on click
|
||||
$.couponManager.onClickUpdateCondition = function() {
|
||||
$('.condition-update-btn').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
var $this = $(this);
|
||||
couponManager.updateRuleSelectAjax($this.attr('data-int'));
|
||||
$.couponManager.updateConditionSelectAjax($this.attr('data-int'));
|
||||
|
||||
// Hide row being updated
|
||||
$this.parent().parent().remove();
|
||||
});
|
||||
};
|
||||
couponManager.onClickUpdateRule();
|
||||
$.couponManager.onClickUpdateCondition();
|
||||
|
||||
// Reload effect inputs when changing effect
|
||||
couponManager.onEffectChange = function() {
|
||||
$.couponManager.onEffectChange = function() {
|
||||
var optionSelected = $("option:selected", this);
|
||||
$('#effectToolTip').html(optionSelected.attr("data-description"));
|
||||
$('#effect').on('change', function () {
|
||||
@@ -122,51 +136,47 @@ $(function($){
|
||||
$('#effectToolTip').html(optionSelected.attr("data-description"));
|
||||
});
|
||||
};
|
||||
couponManager.onEffectChange();
|
||||
$.couponManager.onEffectChange();
|
||||
|
||||
// Reload rule inputs when changing effect
|
||||
couponManager.onRuleChange = function() {
|
||||
// Reload condition inputs when changing effect
|
||||
$.couponManager.onConditionChange = function() {
|
||||
$('#category-rule').on('change', function () {
|
||||
couponManager.loadRuleInputs($(this).val(), function() {});
|
||||
$.couponManager.loadConditionInputs($(this).val(), function() {});
|
||||
});
|
||||
};
|
||||
couponManager.onRuleChange();
|
||||
$.couponManager.onConditionChange();
|
||||
|
||||
// Fill in ready to be saved rule array
|
||||
// Fill in ready to be saved condition array
|
||||
// var onInputsChange = function()
|
||||
// In AJAX response
|
||||
|
||||
// Set max usage to unlimited or not
|
||||
couponManager.onUsageUnlimitedChange = function() {
|
||||
if (!$('#max-usage').parent().hasClass('has-error')) {
|
||||
$('#max-usage').hide().attr('value', '-1');
|
||||
$.couponManager.onUsageUnlimitedChange = function() {
|
||||
var isUnlimited = $('#is-unlimited');
|
||||
if ($('#max-usage').val() == -1) {
|
||||
isUnlimited.prop('checked', true);
|
||||
$('#max-usage').hide();
|
||||
$('#max-usage-label').hide();
|
||||
} else {
|
||||
$isUnlimited.prop('checked', false);
|
||||
$('#max-usage').show();
|
||||
$('#max-usage-label').show();
|
||||
}
|
||||
$('#is-unlimited').change(function(){
|
||||
|
||||
isUnlimited.change(function(){
|
||||
var $this = $(this);
|
||||
if ($this.is(':checked')) {
|
||||
$('#max-usage').hide().attr('value', '-1');
|
||||
$('#max-usage').hide().val('-1');
|
||||
$('#max-usage-label').hide();
|
||||
} else {
|
||||
$('#max-usage').show().val('').attr('value', '');
|
||||
$('#max-usage').show().val('');
|
||||
$('#max-usage-label').show();
|
||||
}
|
||||
});
|
||||
};
|
||||
couponManager.onUsageUnlimitedChange();
|
||||
$.couponManager.onUsageUnlimitedChange();
|
||||
|
||||
});
|
||||
|
||||
// Rule to save
|
||||
|
||||
var couponManager = {};
|
||||
// Rule to be saved
|
||||
couponManager.ruleToSave = {};
|
||||
couponManager.ruleToSave.serviceId = false;
|
||||
couponManager.ruleToSave.operators = {};
|
||||
couponManager.ruleToSave.values = {};
|
||||
// Rules payload to save
|
||||
couponManager.rulesToSave = [];
|
||||
// Rule being updated id
|
||||
couponManager.ruleToUpdateId = false;
|
||||
|
||||
|
||||
100
templates/admin/default/assets/js/document-upload.js
Normal file
100
templates/admin/default/assets/js/document-upload.js
Normal file
@@ -0,0 +1,100 @@
|
||||
$(function($){
|
||||
// Manage document upload
|
||||
$.documentUploadManager = {};
|
||||
|
||||
Dropzone.autoDiscover = false;
|
||||
|
||||
|
||||
|
||||
// Remove image on click
|
||||
$.documentUploadManager.initDocumentDropZone = function() {
|
||||
$.documentUploadManager.onClickDeleteDocument();
|
||||
|
||||
var documentDropzone = new Dropzone("#documents-dropzone", {
|
||||
dictDefaultMessage : $('.btn-browse').html(),
|
||||
uploadMultiple: false,
|
||||
maxFilesize: 8
|
||||
});
|
||||
|
||||
var totalFiles = 0,
|
||||
completedFiles = 0;
|
||||
|
||||
documentDropzone.on("addedfile", function(file){
|
||||
totalFiles += 1;
|
||||
|
||||
if(totalFiles == 1){
|
||||
$('.dz-message').hide();
|
||||
}
|
||||
});
|
||||
|
||||
documentDropzone.on("complete", function(file){
|
||||
completedFiles += 1;
|
||||
|
||||
if (completedFiles === totalFiles){
|
||||
$('.dz-message').slideDown();
|
||||
}
|
||||
});
|
||||
|
||||
documentDropzone.on("success", function(file) {
|
||||
documentDropzone.removeFile(file);
|
||||
$.documentUploadManager.updateDocumentListAjax();
|
||||
$.documentUploadManager.onClickDeleteDocument();
|
||||
});
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
// Update picture list via AJAX call
|
||||
$.documentUploadManager.updateDocumentListAjax = function() {
|
||||
var $documentListArea = $(".document-manager .existing-document");
|
||||
$documentListArea.html('<div class="loading" ></div>');
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: documentListUrl,
|
||||
statusCode: {
|
||||
404: function() {
|
||||
$documentListArea.html(
|
||||
documentListErrorMessage
|
||||
);
|
||||
}
|
||||
}
|
||||
}).done(function(data) {
|
||||
$documentListArea.html(
|
||||
data
|
||||
);
|
||||
$.documentUploadManager.onClickDeleteDocument();
|
||||
});
|
||||
};
|
||||
|
||||
// Remove image on click
|
||||
$.documentUploadManager.onClickDeleteDocument = function() {
|
||||
$('.document-manager .document-delete-btn').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
var $this = $(this);
|
||||
var $parent = $this.parent();
|
||||
$parent.find('a').remove();
|
||||
$parent.append('<div class="loading" ></div>');
|
||||
var $url = $this.attr("href");
|
||||
var errorMessage = $this.attr("data-error-message");
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: $url,
|
||||
statusCode: {
|
||||
404: function() {
|
||||
$(".document-manager .message").html(
|
||||
errorMessage
|
||||
);
|
||||
}
|
||||
}
|
||||
}).done(function(data) {
|
||||
$parent.parents('tr').remove();
|
||||
|
||||
$(".document-manager .message").html(
|
||||
data
|
||||
);
|
||||
});
|
||||
return false;
|
||||
});
|
||||
};
|
||||
});
|
||||
1758
templates/admin/default/assets/js/dropzone.js
Normal file
1758
templates/admin/default/assets/js/dropzone.js
Normal file
File diff suppressed because it is too large
Load Diff
102
templates/admin/default/assets/js/image-upload.js
Normal file
102
templates/admin/default/assets/js/image-upload.js
Normal file
@@ -0,0 +1,102 @@
|
||||
$(function($){
|
||||
// Manage picture upload
|
||||
$.imageUploadManager = {};
|
||||
|
||||
Dropzone.autoDiscover = false;
|
||||
|
||||
|
||||
|
||||
// Remove image on click
|
||||
$.imageUploadManager.initImageDropZone = function() {
|
||||
$.imageUploadManager.onClickDeleteImage();
|
||||
|
||||
var imageDropzone = new Dropzone("#images-dropzone", {
|
||||
dictDefaultMessage : $('.btn-browse').html(),
|
||||
uploadMultiple: false,
|
||||
maxFilesize: 8,
|
||||
acceptedFiles: 'image/png, image/gif, image/jpeg'
|
||||
});
|
||||
|
||||
var totalFiles = 0,
|
||||
completedFiles = 0;
|
||||
|
||||
imageDropzone.on("addedfile", function(file){
|
||||
totalFiles += 1;
|
||||
|
||||
if(totalFiles == 1){
|
||||
$('.dz-message').hide();
|
||||
}
|
||||
});
|
||||
|
||||
imageDropzone.on("complete", function(file){
|
||||
completedFiles += 1;
|
||||
|
||||
if (completedFiles === totalFiles){
|
||||
$('.dz-message').slideDown();
|
||||
}
|
||||
});
|
||||
|
||||
imageDropzone.on("success", function(file) {
|
||||
imageDropzone.removeFile(file);
|
||||
$.imageUploadManager.updateImageListAjax();
|
||||
$.imageUploadManager.onClickDeleteImage();
|
||||
});
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
// Update picture list via AJAX call
|
||||
$.imageUploadManager.updateImageListAjax = function() {
|
||||
var $imageListArea = $(".image-manager .existing-image");
|
||||
$imageListArea.html('<div class="loading" ></div>');
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: imageListUrl,
|
||||
statusCode: {
|
||||
404: function() {
|
||||
$imageListArea.html(
|
||||
imageListErrorMessage
|
||||
);
|
||||
}
|
||||
}
|
||||
}).done(function(data) {
|
||||
$imageListArea.html(
|
||||
data
|
||||
);
|
||||
$.imageUploadManager.onClickDeleteImage();
|
||||
});
|
||||
};
|
||||
|
||||
// Remove image on click
|
||||
$.imageUploadManager.onClickDeleteImage = function() {
|
||||
$('.image-manager .image-delete-btn').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
var $this = $(this);
|
||||
var $parent = $this.parent();
|
||||
var $greatParent = $parent.parent();
|
||||
|
||||
$greatParent.append('<div class="loading" ></div>');
|
||||
$greatParent.find('.btn-group').remove();
|
||||
var $url = $this.attr("href");
|
||||
var errorMessage = $this.attr("data-error-message");
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: $url,
|
||||
statusCode: {
|
||||
404: function() {
|
||||
$(".image-manager .message").html(
|
||||
errorMessage
|
||||
);
|
||||
}
|
||||
}
|
||||
}).done(function(data) {
|
||||
$greatParent.remove();
|
||||
$(".image-manager .message").html(
|
||||
data
|
||||
);
|
||||
});
|
||||
return false;
|
||||
});
|
||||
};
|
||||
});
|
||||
6
templates/admin/default/assets/js/libs/jquery.js
vendored
Normal file
6
templates/admin/default/assets/js/libs/jquery.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -54,23 +54,36 @@
|
||||
|
||||
// -- Confirm Box --
|
||||
if($('[data-toggle="confirm"]').length){
|
||||
$('[data-toggle="confirm"]').click(function(e){
|
||||
$('[data-toggle="confirm"]').click(function(e){
|
||||
|
||||
var $link = $(this);
|
||||
var modal = $(this).data('target');
|
||||
var $this = $(this);
|
||||
var $modal = $($this.data('target'));
|
||||
|
||||
$(modal).modal('show');
|
||||
$modal.modal('show');
|
||||
|
||||
$(modal).on('shown', function () {
|
||||
$('[data-confirm]').attr('href', $link.attr('href'));
|
||||
$modal.on('shown', function () {
|
||||
if($this.data('script')){
|
||||
|
||||
$('[data-confirm]').click(function(){
|
||||
|
||||
eval($this.data('script'));
|
||||
|
||||
$modal.modal('hide');
|
||||
return false;
|
||||
});
|
||||
|
||||
}
|
||||
else{
|
||||
$('[data-confirm]').attr('href', $this.attr('href'));
|
||||
}
|
||||
});
|
||||
|
||||
if($(modal).is(':hidden')){
|
||||
if($modal.is(':hidden')){
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// -- Mini browser --
|
||||
miniBrowser = function (root, url){
|
||||
|
||||
160
templates/admin/default/assets/less/thelia/dropzone.less
Normal file
160
templates/admin/default/assets/less/thelia/dropzone.less
Normal file
@@ -0,0 +1,160 @@
|
||||
.dropzone{
|
||||
cursor: pointer;
|
||||
border: 4px dashed @gray-lighter;
|
||||
padding: 70px;
|
||||
margin: 20px 0;
|
||||
|
||||
&.dz-drag-hover{
|
||||
border-color: @brand-primary;
|
||||
}
|
||||
|
||||
.dz-message {
|
||||
text-align: center;
|
||||
|
||||
span{
|
||||
font-size: @font-size-large;
|
||||
display: block;
|
||||
color: @gray;
|
||||
|
||||
span{
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
margin: 10px 0;
|
||||
font-size: @font-size-small;
|
||||
}
|
||||
|
||||
button{
|
||||
span{
|
||||
display: inline-block;
|
||||
font-size: @font-size-base;
|
||||
margin: 0;
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dz-error{
|
||||
.alert();
|
||||
.alert-danger();
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.dz-preview,
|
||||
.dropzone-previews .dz-preview {
|
||||
background: rgba(255,255,255,0.8);
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
margin: 17px;
|
||||
vertical-align: top;
|
||||
border: 1px solid #acacac;
|
||||
padding: 6px 6px 6px 6px;
|
||||
}
|
||||
.dz-preview.dz-file-preview [data-dz-thumbnail],
|
||||
.dropzone-previews .dz-preview.dz-file-preview [data-dz-thumbnail] {
|
||||
display: none;
|
||||
}
|
||||
.dz-preview .dz-details,
|
||||
.dropzone-previews .dz-preview .dz-details {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
position: relative;
|
||||
background: #ebebeb;
|
||||
padding: 5px;
|
||||
margin-bottom: 22px;
|
||||
}
|
||||
.dz-preview .dz-details .dz-filename,
|
||||
.dropzone-previews .dz-preview .dz-details .dz-filename {
|
||||
overflow: hidden;
|
||||
height: 100%;
|
||||
}
|
||||
.dz-preview .dz-details img,
|
||||
.dropzone-previews .dz-preview .dz-details img {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
.dz-preview .dz-details .dz-size,
|
||||
.dropzone-previews .dz-preview .dz-details .dz-size {
|
||||
position: absolute;
|
||||
bottom: -28px;
|
||||
left: 3px;
|
||||
height: 28px;
|
||||
line-height: 28px;
|
||||
}
|
||||
.dz-preview.dz-error .dz-error-mark,
|
||||
.dropzone-previews .dz-preview.dz-error .dz-error-mark {
|
||||
display: block;
|
||||
}
|
||||
.dz-preview.dz-success .dz-success-mark,
|
||||
.dropzone-previews .dz-preview.dz-success .dz-success-mark {
|
||||
display: block;
|
||||
}
|
||||
.dz-preview:hover .dz-details img,
|
||||
.dropzone-previews .dz-preview:hover .dz-details img {
|
||||
display: none;
|
||||
}
|
||||
.dz-preview .dz-success-mark,
|
||||
.dropzone-previews .dz-preview .dz-success-mark,
|
||||
.dz-preview .dz-error-mark,
|
||||
.dropzone-previews .dz-preview .dz-error-mark {
|
||||
display: none;
|
||||
position: absolute;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
font-size: 30px;
|
||||
text-align: center;
|
||||
right: -10px;
|
||||
top: -10px;
|
||||
}
|
||||
.dz-preview .dz-success-mark,
|
||||
.dropzone-previews .dz-preview .dz-success-mark {
|
||||
color: #8cc657;
|
||||
}
|
||||
.dz-preview .dz-error-mark,
|
||||
.dropzone-previews .dz-preview .dz-error-mark {
|
||||
color: #ee162d;
|
||||
}
|
||||
.dz-preview .dz-progress,
|
||||
.dropzone-previews .dz-preview .dz-progress {
|
||||
position: absolute;
|
||||
top: 100px;
|
||||
left: 6px;
|
||||
right: 6px;
|
||||
height: 6px;
|
||||
background: #d7d7d7;
|
||||
display: none;
|
||||
}
|
||||
.dz-preview .dz-progress .dz-upload,
|
||||
.dropzone-previews .dz-preview .dz-progress .dz-upload {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 0%;
|
||||
background-color: #8cc657;
|
||||
}
|
||||
.dz-preview.dz-processing .dz-progress,
|
||||
.dropzone-previews .dz-preview.dz-processing .dz-progress {
|
||||
display: block;
|
||||
}
|
||||
.dz-preview .dz-error-message,
|
||||
.dropzone-previews .dz-preview .dz-error-message {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: -5px;
|
||||
left: -20px;
|
||||
background: rgba(245,245,245,0.8);
|
||||
padding: 8px 10px;
|
||||
color: #800;
|
||||
min-width: 140px;
|
||||
max-width: 500px;
|
||||
z-index: 500;
|
||||
}
|
||||
.dz-preview:hover.dz-error .dz-error-message,
|
||||
.dropzone-previews .dz-preview:hover.dz-error .dz-error-message {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,19 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tbody {
|
||||
tr.active, tr {
|
||||
td.td-unstyled {
|
||||
background-color: white;
|
||||
border-top: none;
|
||||
border-right: 1px solid @table-border-color;
|
||||
}
|
||||
td.last {
|
||||
border-bottom: 1px solid @table-border-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -55,10 +68,6 @@ tfoot{
|
||||
}
|
||||
}
|
||||
|
||||
// td, th {
|
||||
// text-align: center;
|
||||
// }
|
||||
|
||||
td.object-title, th.object-title {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
@import "bootstrap-switch.less";
|
||||
@import "bootstrap-select.less";
|
||||
@import "jqplot.less";
|
||||
@import "dropzone.less";
|
||||
|
||||
// -- Base styling ------------------------------------------------------------
|
||||
|
||||
@@ -192,6 +193,11 @@
|
||||
padding: 1em;
|
||||
margin-bottom: 20px;
|
||||
|
||||
.select-fixed-width {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
|
||||
// The block title
|
||||
.title {
|
||||
color: #5A6876;
|
||||
@@ -226,6 +232,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
.tab-content {
|
||||
// Center loading indicator
|
||||
.loading {
|
||||
margin: 8em auto;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
// The overall form container
|
||||
.form-container {
|
||||
|
||||
@@ -275,81 +289,33 @@
|
||||
.loading{
|
||||
background: url("@{imgDir}/ajax-loader.gif") no-repeat;
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
line-height: 30px;
|
||||
padding-left: 40px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
// -- Drag & drop --
|
||||
.take{
|
||||
|
||||
.draggable{
|
||||
border: 2px dashed @gray-light;
|
||||
margin-bottom: 10px;
|
||||
padding: 10px;
|
||||
|
||||
&:last-child{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.over{
|
||||
.drop-message{
|
||||
border-color: @brand-primary;
|
||||
color: @brand-primary;
|
||||
}
|
||||
.existing-image .col-sm-6{
|
||||
position: relative;
|
||||
margin-bottom: 30px;
|
||||
|
||||
.btn-group{
|
||||
position: absolute;
|
||||
bottom: 5px;
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
.loading{
|
||||
position: absolute;
|
||||
bottom: 5px;
|
||||
right: 20px;
|
||||
display: block;
|
||||
line-height: 1;
|
||||
padding: 0;
|
||||
margin: 0 auto;
|
||||
z-index: 2;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
.place{
|
||||
|
||||
.over{
|
||||
.drop-message{
|
||||
border-color: @brand-primary;
|
||||
color: @brand-primary;
|
||||
}
|
||||
}
|
||||
|
||||
.panel-body{
|
||||
|
||||
.draggable, .drag{
|
||||
margin: 5px 0;
|
||||
padding: 10px;
|
||||
border: 1px dashed @gray-light;
|
||||
}
|
||||
|
||||
.drop-group{
|
||||
padding: 10px;
|
||||
border: 2px dashed @gray-light;
|
||||
margin-bottom: 10px;
|
||||
|
||||
&:last-child{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.take, .place{
|
||||
|
||||
.drop-message{
|
||||
width: 50%;
|
||||
margin: 10px auto;
|
||||
padding: 10px;
|
||||
color: @gray;
|
||||
border: 2px dashed @gray;
|
||||
text-align: center;
|
||||
.opacity(0.5);
|
||||
|
||||
.glyphicon{
|
||||
display: block;
|
||||
font-size: @font-size-large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.ui-draggable-dragging{
|
||||
z-index: 100;
|
||||
}
|
||||
}
|
||||
@@ -303,7 +303,7 @@
|
||||
placement : 'left',
|
||||
success : function(response, newValue) {
|
||||
// The URL template
|
||||
var url = "{url path='/admin/configuration/attributes-av/update-position' attributeav_id='__ID__' position='__POS__' attribute_id=$attribute_id}";
|
||||
var url = "{url noamp='1' path='/admin/configuration/attributes-av/update-position' attributeav_id='__ID__' position='__POS__' attribute_id=$attribute_id}";
|
||||
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id')).replace('__POS__', newValue);
|
||||
|
||||
@@ -312,7 +312,7 @@
|
||||
placement : 'left',
|
||||
success : function(response, newValue) {
|
||||
// The URL template
|
||||
var url = "{url path='/admin/configuration/attributes/update-position' attribute_id='__ID__' position='__POS__'}";
|
||||
var url = "{url noamp='1' path='/admin/configuration/attributes/update-position' attribute_id='__ID__' position='__POS__'}";
|
||||
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id'))
|
||||
|
||||
@@ -256,7 +256,7 @@
|
||||
}
|
||||
</th>
|
||||
|
||||
<th> </th>
|
||||
<th class="actions">{intl l="Actions"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -303,7 +303,7 @@
|
||||
}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.product.edit"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Edit this product'}" href="{url path='/admin/products/update' product_id=$ID}"><i class="glyphicon glyphicon-edit"></i></a>
|
||||
@@ -445,7 +445,7 @@
|
||||
{form_field form=$form field='title'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
{loop type="lang" name="default-lang" default_only="1"}
|
||||
{loop type="lang" name="default-lang" default_only="1" backend_context="1"}
|
||||
<div class="input-group">
|
||||
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Title'}">
|
||||
<span class="input-group-addon"><img src="{image file="assets/img/flags/{$CODE}.gif"}" alt="$TITLE" /></span>
|
||||
@@ -463,6 +463,64 @@
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='price'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
{loop type="currency" name="default-currency" default_only="1" backend_context="1"}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-4">
|
||||
<div class="input-group">
|
||||
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" class="col-lg-2 form-control" value="{$value}" title="{$label}" placeholder="{intl l='Product price'}">
|
||||
<span class="input-group-addon">{$SYMBOL}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="help-block">{intl l='Enter here the product price in the default currency (%title)' title=$NAME}</div>
|
||||
|
||||
{form_field form=$form field='currency'}
|
||||
<input type="hidden" name="{$name}" value="{$ID}" />
|
||||
{/form_field}
|
||||
|
||||
{/loop}
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='tax_rule'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
<div class="form-group">
|
||||
<select id="{$label_attr.for}" required="required" name="{$name}" class="form-control">
|
||||
<option value="">{intl l="Select a tax tule"}</option>
|
||||
{loop name="tax" type="tax-rule" backend_context="1"}
|
||||
<option value="{$ID}" {if $IS_DEFAULT}selected="selected"{/if}>{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="help-block">{intl l='Select here the tax applicable to this product'}</div>
|
||||
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='weight'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label}: </label>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-4">
|
||||
<div class="input-group">
|
||||
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Product weight'}">
|
||||
<span class="input-group-addon">{intl l="Kg"}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="help-block">{intl l='Enter here the product weight, in Kilogrammes'}</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='visible'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<div class="checkbox">
|
||||
@@ -604,7 +662,7 @@
|
||||
placement : 'left',
|
||||
success : function(response, newValue) {
|
||||
// The URL template
|
||||
var url = "{url path='/admin/categories/update-position' category_id='__ID__' position='__POS__'}";
|
||||
var url = "{url noamp='1' path='/admin/categories/update-position' category_id='__ID__' position='__POS__'}";
|
||||
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id'))
|
||||
@@ -623,7 +681,7 @@
|
||||
placement : 'left',
|
||||
success : function(response, newValue) {
|
||||
// The URL template
|
||||
var url = "{url path='/admin/products/update-position' product_id='__ID__' position='__POS__'}";
|
||||
var url = "{url noamp='1' path='/admin/products/update-position' product_id='__ID__' position='__POS__'}";
|
||||
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id'))
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<select name="folder_id" id="folder_id" class="form-control">
|
||||
<option value="">Select a folder...</option>
|
||||
<option value="">{intl l='Select a folder...'}</option>
|
||||
{loop name="folders" type="folder-tree" folder="0" backend_context="1" lang="$edit_language_id"}
|
||||
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px">{$TITLE}</option>
|
||||
{/loop}
|
||||
@@ -176,7 +176,7 @@
|
||||
<div id="content_selector" class="hide">
|
||||
<div class="input-group">
|
||||
<select required="required" name="content_id" id="content_id" class="form-control">
|
||||
<option value="">Select a folder content...</option>
|
||||
<option value="">{intl l='Select a folder content...'}</option>
|
||||
</select>
|
||||
<span class="input-group-btn" id="content_add_button">
|
||||
<button class="btn btn-default btn-primary action-btn" type="submit"><span class="glyphicon glyphicon-plus-sign"></span></button>
|
||||
@@ -256,9 +256,11 @@
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade {if $current_tab == 'images'}active in{/if}" id="images">
|
||||
</div>
|
||||
{include file='includes/image-upload-form.html' imageType='category' parentId=$category_id}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade {if $current_tab == 'documents'}active in{/if}" id="documents">
|
||||
{include file='includes/document-upload-form.html' documentType='category' parentId=$category_id}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade {if $current_tab == 'modules'}active in{/if}" id="modules">
|
||||
@@ -296,6 +298,17 @@
|
||||
{/block}
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
{javascripts file='assets/js/dropzone.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
{javascripts file='assets/js/image-upload.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
{javascripts file='assets/js/document-upload.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
|
||||
|
||||
<script src="{url file='/tinymce/tinymce.min.js'}"></script>
|
||||
<script>
|
||||
@@ -315,11 +328,10 @@
|
||||
filemanager_title:"{intl l='Files manager'}" ,
|
||||
external_plugins: { "filemanager" : "{url file='/tinymce/plugins/filemanager/plugin.min.js'}"}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
$(function() {
|
||||
$.imageUploadManager.initImageDropZone();
|
||||
$.documentUploadManager.initDocumentDropZone();
|
||||
|
||||
$('.use_default_rewriten_url').click(function(ev) {
|
||||
alert("Not functionnal");
|
||||
|
||||
9
templates/admin/default/configs/variables.conf
Normal file
9
templates/admin/default/configs/variables.conf
Normal file
@@ -0,0 +1,9 @@
|
||||
#order
|
||||
max_displayed_orders = 20
|
||||
|
||||
#order status
|
||||
order_not_paid = 'warning'
|
||||
order_paid = 'success'
|
||||
order_processing = 'primary'
|
||||
order_sent = 'info'
|
||||
order_canceled = 'danger'
|
||||
261
templates/admin/default/content-edit.html
Normal file
261
templates/admin/default/content-edit.html
Normal file
@@ -0,0 +1,261 @@
|
||||
{extends file="admin-layout.tpl"}
|
||||
|
||||
{block name="check-permissions"}admin.content.view{/block}
|
||||
|
||||
{block name="page-title"}{intl l='Edit content'}{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="folder edit-folder">
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
{include file="includes/folder-breadcrumb.html" editing_category="false" editing_content="true"}
|
||||
|
||||
<div class="row">
|
||||
{loop name="content_edit" type="content" visible="*" id="{$content_id}" backend_context="1" lang="$edit_language_id"}
|
||||
<div class="col-md-12 general-block-decorator">
|
||||
<div class="row">
|
||||
<div class="col-md-7 title">
|
||||
{intl l='Edit content %title' title=$TITLE}
|
||||
</div>
|
||||
|
||||
<div class="col-md-5 actions">
|
||||
|
||||
{if $HAS_PREVIOUS != 0}
|
||||
<a href="{url path="/admin/content/update/$PREVIOUS"}" class="btn btn-default" title="{intl l='Edit previous content'}"><span class="glyphicon glyphicon-arrow-left"></span></a>
|
||||
{else}
|
||||
<a href="#" disabled="disabled" class="btn btn-default"><span class="glyphicon glyphicon-arrow-left"></span></a>
|
||||
{/if}
|
||||
|
||||
<a href="{$URL}" target="_blank" class="btn btn-default" title="{intl l='Preview folder page'}"><span class="glyphicon glyphicon-eye-open"></span></a>
|
||||
|
||||
{if $HAS_NEXT != 0}
|
||||
<a href="{url path="/admin/content/update/$NEXT"}" class="btn btn-default" title="{intl l='Edit next content'}"><span class="glyphicon glyphicon-arrow-right"></span></a>
|
||||
{else}
|
||||
<a href="#" disabled="disabled" class="btn btn-default"><span class="glyphicon glyphicon-arrow-right"></span></a>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<ul class="nav nav-tabs" id="tabbed-menu">
|
||||
<li class="active"><a href="#general" data-toggle="tab">{intl l="General description"}</a></li>
|
||||
|
||||
<li><a href="#association" data-toggle="tab">{intl l="Associations"}</a></li>
|
||||
<li><a href="#images" data-toggle="tab">{intl l="Images"}</a></li>
|
||||
<li><a href="#documents" data-toggle="tab">{intl l="Documents"}</a></li>
|
||||
<li><a href="#modules" data-toggle="tab">{intl l="Modules"}</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
|
||||
<div class="tab-pane fade active in" id="general">
|
||||
|
||||
<div class="form-container">
|
||||
|
||||
{form name="thelia.admin.content.modification"}
|
||||
<form method="POST" action="{url path='/admin/content/save'}" {form_enctype form=$form} class="clearfix">
|
||||
|
||||
{include file="includes/inner-form-toolbar.html" close_url="{url path='/admin/folders' parent=$DEFAULT_FOLDER}"}
|
||||
|
||||
{* Be sure to get the folder ID, even if the form could not be validated *}
|
||||
<input type="hidden" name="content_id" value="{$content_id}" />
|
||||
|
||||
<input type="hidden" name="current_tab" value="general" />
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
<input type="hidden" name="{$name}" value="{url path="/admin/content/update{$ID}"}" />
|
||||
{/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_field form=$form field='url'}
|
||||
<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}" required="required" name="{$name}" value="{$value}" title="{intl l='Rewritten URL'}" placeholder="{intl l='Rewriten URL'}" class="form-control">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
{form_field form=$form field='default_folder'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
|
||||
<label for="{$label_attr.for}" class="control-label">
|
||||
{intl l="{$label}"} :
|
||||
</label>
|
||||
|
||||
<select id="{$label_attr.for}" required="required" name="{$name}" class="form-control">
|
||||
<option value="0">{intl l="Top level"}</option>
|
||||
|
||||
{$myparent=$DEFAULT_FOLDER}
|
||||
{loop name="fold-parent" type="folder-tree" visible="*" folder="0"}
|
||||
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px" {if $myparent == $ID}selected="selected"{/if}>{$TITLE}</option>
|
||||
{/loop }
|
||||
|
||||
</select>
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
{form_field form=$form field='visible'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l='Visibility'}</label>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" id="{$label_attr.for}" name="{$name}" value="1" {if $value != 0}checked="checked"{/if}>
|
||||
{$label}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="control-group">
|
||||
<lablel> </lablel>
|
||||
<div class="controls">
|
||||
<p>{intl l='Colder created on %date_create. Last modification: %date_change' date_create="{format_date date=$CREATE_DATE}" date_change="{format_date date=$UPDATE_DATE}"}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
{/form}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="association">
|
||||
{include file="includes/content-folder-management.html"}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="images">
|
||||
{include file='includes/image-upload-form.html' imageType='content' parentId=$content_id}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="documents">
|
||||
{include file='includes/document-upload-form.html' documentType='content' parentId=$content_id}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="modules">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/loop}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{* Delete category confirmation dialog *}
|
||||
|
||||
{capture "delete_folder_dialog"}
|
||||
<input type="hidden" name="content_id" value="{$content_id}" />
|
||||
<input type="hidden" name="additional_folder_id" id="additional_folder_delete_id" value="" />
|
||||
|
||||
<input type="hidden" name="current_tab" value="association" />
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
|
||||
dialog_id = "delete_folder_dialog"
|
||||
dialog_title = {intl l="Remove associated folder"}
|
||||
dialog_message = {intl l="Do you really want to remove the content from this folder ?"}
|
||||
|
||||
form_action = {url path='/admin/content/folder/delete'}
|
||||
form_content = {$smarty.capture.delete_folder_dialog nofilter}
|
||||
}
|
||||
{/block}
|
||||
|
||||
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
{javascripts file='assets/js/dropzone.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
{javascripts file='assets/js/image-upload.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
{javascripts file='assets/js/document-upload.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$.imageUploadManager.initImageDropZone();
|
||||
$.documentUploadManager.initDocumentDropZone();
|
||||
|
||||
$('.use_default_rewriten_url').click(function(ev) {
|
||||
alert("Not functionnal");
|
||||
|
||||
ev.preventDefault();
|
||||
});
|
||||
|
||||
// Show proper tab, if defined
|
||||
{if ! empty($current_tab)}
|
||||
$('#tabbed-menu a[href="#{$current_tab}"]').tab('show')
|
||||
{/if}
|
||||
|
||||
$('a.delete-folder').click(function(e) {
|
||||
$('#additional_folder_delete_id').val($(this).data('id'));
|
||||
});
|
||||
|
||||
// Set proper content ID in delete content from
|
||||
$('a.delete-content').click(function(ev) {
|
||||
$('#content_delete_id').val($(this).data('id'));
|
||||
$('#folder_delete_id').val($('#folder_id').val());
|
||||
});
|
||||
|
||||
// Load content on folder selection
|
||||
$('#folder_id').change(function(event) {
|
||||
$.ajax({
|
||||
url : '{url path="/admin/folder/$folder_id/available-related-content/"}' + $(this).val() + '.xml',
|
||||
type : 'get',
|
||||
dataType : 'json',
|
||||
success : function(json) {
|
||||
$('#content_id :not(:first-child)').remove();
|
||||
|
||||
var have_content = false;
|
||||
|
||||
$.each(json, function(idx, value) {
|
||||
$('#content_id').append($('<option>').text(value.title).attr('value', value.id));
|
||||
|
||||
have_content = true; // Lame...
|
||||
});
|
||||
|
||||
if (have_content)
|
||||
$('#content_selector').removeClass('hide');
|
||||
else
|
||||
$('#content_selector').addClass('hide');
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Initialize folder (id={$folder_id}) select value
|
||||
{if $folder_id != 0}
|
||||
$('#folder_id').val("{$folder_id}").change();
|
||||
{/if}
|
||||
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
@@ -8,7 +8,7 @@
|
||||
<nav>
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="{url path='admin/home'}">{intl l='Home'}</a></li>
|
||||
<li><a href="{url path='admin/coupon/'}">{intl l='Coupon'}</a></li>
|
||||
<li><a href="{url path='admin/coupon'}">{intl l='Coupon'}</a></li>
|
||||
<li>{intl l='Create'}</li>
|
||||
</ul>
|
||||
</nav>
|
||||
@@ -18,7 +18,7 @@
|
||||
</div>
|
||||
|
||||
{form name="thelia.admin.coupon.creation"}
|
||||
{include file='coupon/form.html' formAction={url path={$formAction}} noRules=true}
|
||||
{include file='coupon/form.html' formAction={url path={$formAction}} noConditions=true}
|
||||
{/form}
|
||||
</section> <!-- #wrapper -->
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<nav>
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="{url path='admin/home'}">{intl l='Home'}</a></li>
|
||||
<li><a href="{url path='admin/coupon/'}">{intl l='Coupon'}</a></li>
|
||||
<li><a href="{url path='admin/coupon'}">{intl l='Coupon'}</a></li>
|
||||
<li>{intl l='Browse'}</li>
|
||||
</ul>
|
||||
</nav>
|
||||
@@ -31,7 +31,7 @@
|
||||
<tr>
|
||||
<th>{block name="coupon-label-code"}{intl l='Code'}{/block}</th>
|
||||
<th>{block name="coupon-label-title"}{intl l='Title'}{/block}</th>
|
||||
<th>{block name="coupon-label-expiration-date"}{intl l='Expiration date'}{/block}</th>
|
||||
<th>{block name="coupon-label-expiration-date"}{intl l='Days before expiration'}{/block}</th>
|
||||
<th>{block name="coupon-label-usage-left"}{intl l='Usage left'}{/block}</th>
|
||||
<th class="sorter-false filter-false">{block name="coupon-label-action"}{/block}</th>
|
||||
</tr>
|
||||
@@ -39,13 +39,29 @@
|
||||
<tbody>
|
||||
{loop type="coupon" name="list_coupon" is_enabled="1" backend_context="true"}
|
||||
<tr>
|
||||
<td>{block name="coupon-code"}<a href="{$urlReadCoupon|replace:'couponId':$ID}">{$CODE}</a>{/block}</td>
|
||||
<td>{block name="coupon-code"}<a href="{$urlReadCoupon|replace:'0':$ID}">{$CODE}</a>{/block}</td>
|
||||
<td>{block name="coupon-title"}{$TITLE}{/block}</td>
|
||||
<td>{block name="coupon-expiration-date"}{$EXPIRATION_DATE}{/block}</td>
|
||||
<td>{block name="coupon-usage-left"}{$USAGE_LEFT}{/block}</td>
|
||||
<td>{block name="coupon-expiration-date"}{$DAY_LEFT_BEFORE_EXPIRATION}{/block}</td>
|
||||
<td>
|
||||
{block name="coupon-usage-left"}
|
||||
{if $USAGE_LEFT == -1}
|
||||
<span class="label label-success">
|
||||
{intl l="Unlimited"}
|
||||
</span>
|
||||
{elseif $USAGE_LEFT}
|
||||
<span class="label label-success">
|
||||
{$USAGE_LEFT}
|
||||
</span>
|
||||
{else}
|
||||
<span class="label label-warning">
|
||||
0
|
||||
</span>
|
||||
{/if}
|
||||
{/block}
|
||||
</td>
|
||||
<td>
|
||||
{block name="coupon-action"}
|
||||
<a href="{$urlEditCoupon|replace:'couponId':$ID}" class="btn btn-default btn-primary btn-medium">
|
||||
<a href="{$urlEditCoupon|replace:'0':$ID}" class="btn btn-default btn-primary btn-medium">
|
||||
<span class="glyphicon glyphicon-edit"></span> {intl l='Edit'}
|
||||
</a>
|
||||
{/block}
|
||||
@@ -80,7 +96,23 @@
|
||||
<td>{block name="coupon-code"}<a href="{$urlReadCoupon|replace:'couponId':$ID}">{$CODE}</a>{/block}</td>
|
||||
<td>{block name="coupon-title"}{$TITLE}{/block}</td>
|
||||
<td>{block name="coupon-expiration-date"}{$EXPIRATION_DATE}{/block}</td>
|
||||
<td>{block name="coupon-usage-left"}{$USAGE_LEFT}{/block}</td>
|
||||
<td>
|
||||
{block name="coupon-usage-left"}
|
||||
{if $USAGE_LEFT == -1}
|
||||
<span class="label label-success">
|
||||
{intl l="Unlimited"}
|
||||
</span>
|
||||
{elseif $USAGE_LEFT}
|
||||
<span class="label label-success">
|
||||
{$USAGE_LEFT}
|
||||
</span>
|
||||
{else}
|
||||
<span class="label label-warning">
|
||||
0
|
||||
</span>
|
||||
{/if}
|
||||
{/block}
|
||||
</td>
|
||||
<td>
|
||||
{block name="coupon-action"}
|
||||
<a href="{$urlEditCoupon|replace:'couponId':$ID}" class="btn btn-default btn-primary btn-medium">
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<nav>
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="{url path='admin/home'}">{intl l='Home'}</a></li>
|
||||
<li><a href="{url path='admin/coupon/'}">{intl l='Coupon'}</a></li>
|
||||
<li><a href="{url path='admin/coupon'}">{intl l='Coupon'}</a></li>
|
||||
<li>{$CODE}</li>
|
||||
</ul>
|
||||
</nav>
|
||||
@@ -64,7 +64,11 @@
|
||||
<tr>
|
||||
<td>{intl l='Usage left'}</td>
|
||||
<td>
|
||||
{if $USAGE_LEFT}
|
||||
{if $USAGE_LEFT == -1}
|
||||
<span class="label label-success">
|
||||
{intl l="Unlimited"}
|
||||
</span>
|
||||
{elseif $USAGE_LEFT}
|
||||
<span class="label label-success">
|
||||
{$USAGE_LEFT}
|
||||
</span>
|
||||
@@ -118,11 +122,11 @@
|
||||
<td>{intl l='Application field'}</td>
|
||||
<td>
|
||||
<ul class="list-unstyled">
|
||||
{foreach from=$APPLICATION_CONDITIONS item=rule name=rulesForeach}
|
||||
{if !$smarty.foreach.rulesForeach.first}
|
||||
{foreach from=$APPLICATION_CONDITIONS item=condition name=conditionsForeach}
|
||||
{if !$smarty.foreach.conditionsForeach.first}
|
||||
<li><span class="label label-info">{intl l='And'}</span></li>
|
||||
{/if}
|
||||
<li>{$rule nofilter}</li>
|
||||
<li>{$condition nofilter}</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</td>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<nav>
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="{url path='admin/home'}">{intl l='Home'}</a></li>
|
||||
<li><a href="{url path='admin/coupon/'}">{intl l='Coupon'}</a></li>
|
||||
<li><a href="{url path='admin/coupon'}">{intl l='Coupon'}</a></li>
|
||||
<li>{intl l='Update'} {$couponCode}</li>
|
||||
</ul>
|
||||
</nav>
|
||||
@@ -18,14 +18,12 @@
|
||||
</div>
|
||||
|
||||
{form name="thelia.admin.coupon.creation"}
|
||||
{include file='coupon/form.html' formAction={url path={$formAction}} form=$form noRules=false}
|
||||
{include file='coupon/form.html' formAction={url path={$formAction}} form=$form noConditions=false}
|
||||
{/form}
|
||||
|
||||
</section> <!-- #wrapper -->
|
||||
{/block}
|
||||
|
||||
{include file='includes/confirmation-modal.html'}
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
{javascripts file='assets/bootstrap-datepicker/js/bootstrap-datepicker.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
@@ -47,87 +45,87 @@
|
||||
$(function($){
|
||||
miniBrowser(0, '/test_to_remove/datas_coupon_edit.json');
|
||||
|
||||
// Init Rules
|
||||
couponManager.initRules = function() {
|
||||
var rules = [];
|
||||
{foreach from=$rulesObject key=k item=rule}
|
||||
// Init rule
|
||||
var rule = {};
|
||||
rule['serviceId'] = '{$rule.serviceId nofilter}';
|
||||
rule['operators'] = {};
|
||||
rule['values'] = {};
|
||||
// Init Conditions
|
||||
$.couponManager.initConditions = function() {
|
||||
var conditions = [];
|
||||
{foreach from=$conditionsObject key=k item=condition}
|
||||
// Init condition
|
||||
var condition = {};
|
||||
condition['serviceId'] = '{$condition.serviceId nofilter}';
|
||||
condition['operators'] = {};
|
||||
condition['values'] = {};
|
||||
|
||||
{foreach from=$rule.validators.setOperators key=input item=operator}
|
||||
rule['operators']['{$input nofilter}'] = '{$operator nofilter}';
|
||||
rule['values']['{$input nofilter}'] = '{$rule.validators.setValues[$input] nofilter}';
|
||||
{foreach from=$condition.validators.setOperators key=input item=operator}
|
||||
condition['operators']['{$input nofilter}'] = '{$operator nofilter}';
|
||||
condition['values']['{$input nofilter}'] = '{$condition.validators.setValues[$input] nofilter}';
|
||||
{/foreach}
|
||||
|
||||
// Add rule
|
||||
rules.push(rule);
|
||||
// Add condition
|
||||
conditions.push(condition);
|
||||
{/foreach}
|
||||
|
||||
return rules;
|
||||
return conditions;
|
||||
};
|
||||
|
||||
// Save Rules AJAX
|
||||
couponManager.saveRuleAjax = function() {
|
||||
$('#constraint-add-operators-values').html('<div class="loading" ></div>');
|
||||
var $url = '{$urlAjaxUpdateRules}';
|
||||
// Save Conditions AJAX
|
||||
$.couponManager.saveConditionAjax = function() {
|
||||
$('#condition-add-operators-values').html('<div class="loading" ></div>');
|
||||
var $url = '{$urlAjaxUpdateConditions}';
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: $url,
|
||||
data: {literal}{{/literal}rules:JSON.stringify(couponManager.rulesToSave){literal}}{/literal},
|
||||
data: {literal}{{/literal}conditions:JSON.stringify($.couponManager.conditionsToSave){literal}}{/literal},
|
||||
statusCode: {
|
||||
404: function() {
|
||||
$('#constraint-add-operators-values').html(
|
||||
$('#condition-add-operators-values').html(
|
||||
'{intl l='Please retry'}'
|
||||
);
|
||||
}
|
||||
}
|
||||
}).done(function(data) {
|
||||
$('#constraint-list').html(data);
|
||||
$('#constraint-add-operators-values').html('');
|
||||
// Set the rule selector
|
||||
$("#category-rule option").filter(function() {
|
||||
return $(this).val() == 'thelia.constraint.rule.available_for_everyone';
|
||||
$('#condition-list').html(data);
|
||||
$('#condition-add-operators-values').html('');
|
||||
// Set the condition selector
|
||||
$("#category-condition option").filter(function() {
|
||||
return $(this).val() == 'thelia.condition.match_for_everyone';
|
||||
}).prop('selected', true);
|
||||
|
||||
couponManager.onClickUpdateRule();
|
||||
couponManager.onClickDeleteRule();
|
||||
$.couponManager.onClickUpdateCondition();
|
||||
$.couponManager.onClickDeleteCondition();
|
||||
});
|
||||
};
|
||||
|
||||
// Reload rule inputs
|
||||
couponManager.loadRuleInputs = function(ruleId, callBack) {
|
||||
$('#constraint-add-operators-values').html('<div class="loading" ></div>');
|
||||
var url = "{$urlAjaxGetRuleInput}";
|
||||
url = url.replace('ruleId', ruleId)
|
||||
// Reload condition inputs
|
||||
$.couponManager.loadConditionInputs = function(conditionId, callBack) {
|
||||
$('#condition-add-operators-values').html('<div class="loading" ></div>');
|
||||
var url = "{$urlAjaxGetConditionInput}";
|
||||
url = url.replace('conditionId', conditionId)
|
||||
$.ajax({
|
||||
url: url,
|
||||
statusCode: {
|
||||
404: function() {
|
||||
$('#constraint-add-operators-values').html(
|
||||
'{intl l='Please select another rule'}'
|
||||
$('#condition-add-operators-values').html(
|
||||
'{intl l='Please select another condition'}'
|
||||
);
|
||||
}
|
||||
}
|
||||
}).done(function(data) {
|
||||
$('#constraint-add-operators-values').html(data);
|
||||
couponManager.ruleToSave.serviceId = ruleId;
|
||||
if (ruleId == -1) {
|
||||
$('#condition-add-operators-values').html(data);
|
||||
$.couponManager.conditionToSave.serviceId = conditionId;
|
||||
if (conditionId == -1) {
|
||||
// Placeholder can't be saved
|
||||
$('#constraint-save-btn').hide();
|
||||
$('#condition-save-btn').hide();
|
||||
} else {
|
||||
$('#constraint-save-btn').show();
|
||||
$('#condition-save-btn').show();
|
||||
}
|
||||
return callBack();
|
||||
});
|
||||
};
|
||||
|
||||
// Rules which will be saved
|
||||
couponManager.rulesToSave = couponManager.initRules();
|
||||
// Conditions which will be saved
|
||||
$.couponManager.conditionsToSave = $.couponManager.initConditions();
|
||||
|
||||
$('#constraint-save-btn').hide();
|
||||
$('#condition-save-btn').hide();
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -71,34 +71,34 @@
|
||||
|
||||
<script>
|
||||
|
||||
// Init Rules to set
|
||||
// Update only if no rule are already set
|
||||
if(!couponManager.ruleToSave){
|
||||
couponManager.ruleToSave['serviceId'] = '{$ruleId}';
|
||||
couponManager.ruleToSave['operators'] = {literal}{}{/literal};
|
||||
couponManager.ruleToSave['values'] = {literal}{}{/literal};
|
||||
// Init conditions to set
|
||||
// Update only if no condition are already set
|
||||
if(!$.couponManager.conditionToSave){
|
||||
$.couponManager.conditionToSave['serviceId'] = '{$conditionId}';
|
||||
$.couponManager.conditionToSave['operators'] = {literal}{}{/literal};
|
||||
$.couponManager.conditionToSave['values'] = {literal}{}{/literal};
|
||||
} else {
|
||||
}
|
||||
{foreach from=$inputs.inputs key=name item=input}
|
||||
couponManager.ruleToSave['operators']['{$name nofilter}'] = '{foreach from=$inputs.inputs[$name].availableOperators key=keyOperator item=valueOperator name=operators}{if $smarty.foreach.operators.first}{$keyOperator nofilter}{/if}{/foreach}';
|
||||
couponManager.ruleToSave['values']['{$name nofilter}'] = '{if count($inputs.inputs[$name].availableValues) != 0}{foreach from=$inputs.inputs[$name].availableValues key=keyValue item=valueValue name=values}{if $smarty.foreach.values.first}{$keyValue nofilter}{/if}{/foreach}{else}to set{/if}';
|
||||
$.couponManager.conditionToSave['operators']['{$name nofilter}'] = '{foreach from=$inputs.inputs[$name].availableOperators key=keyOperator item=valueOperator name=operators}{if $smarty.foreach.operators.first}{$keyOperator nofilter}{/if}{/foreach}';
|
||||
$.couponManager.conditionToSave['values']['{$name nofilter}'] = '{if count($inputs.inputs[$name].availableValues) != 0}{foreach from=$inputs.inputs[$name].availableValues key=keyValue item=valueValue name=values}{if $smarty.foreach.values.first}{$keyValue nofilter}{/if}{/foreach}{else}to set{/if}';
|
||||
{/foreach}
|
||||
|
||||
|
||||
// Fill in ready to be saved rule array
|
||||
couponManager.onInputsChange = function() {literal}{{/literal}
|
||||
// Fill in ready to be saved condition array
|
||||
$.couponManager.onInputsChange = function() {literal}{{/literal}
|
||||
{foreach from=$inputs.inputs key=name item=input}
|
||||
// Operator selector
|
||||
$('#{$name}-operator').change(function (e) {
|
||||
var $this = $(this);
|
||||
couponManager.ruleToSave['operators']['{$name nofilter}'] = $this.val();
|
||||
$.couponManager.conditionToSave['operators']['{$name nofilter}'] = $this.val();
|
||||
});
|
||||
// Value input
|
||||
$('#{$name}-value').change(function (e) {
|
||||
var $this = $(this);
|
||||
couponManager.ruleToSave['values']['{$name nofilter}'] = $this.val();
|
||||
$.couponManager.conditionToSave['values']['{$name nofilter}'] = $this.val();
|
||||
});
|
||||
{/foreach}
|
||||
{literal}}{/literal}
|
||||
couponManager.onInputsChange();
|
||||
$.couponManager.onInputsChange();
|
||||
</script>
|
||||
20
templates/admin/default/coupon/conditions.html
Normal file
20
templates/admin/default/coupon/conditions.html
Normal file
@@ -0,0 +1,20 @@
|
||||
{foreach from=$conditions item=condition key=i name=conditionsForeach}
|
||||
<tr>
|
||||
<td>
|
||||
{if !$smarty.foreach.conditionsForeach.first}
|
||||
<span class="label label-info">{intl l='And'}</span>
|
||||
{/if}
|
||||
{$condition nofilter}
|
||||
</td>
|
||||
<td>
|
||||
<a data-int="{$i}" class="btn btn-default btn-primary btn-medium condition-update-btn" href="{$urlEdit}">
|
||||
<span class="glyphicon glyphicon-edit"></span> {intl l='Edit'}
|
||||
</a>
|
||||
{if $conditions|count != 1}
|
||||
<a data-int="{$i}" data-target="#delete" data-toggle="confirm" class="btn btn-default btn-danger btn-medium condition-delete-btn" href="{$urlDelete}">
|
||||
<span class="glyphicon glyphicon-remove"></span> {intl l='Delete'}
|
||||
</a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
@@ -11,7 +11,7 @@
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/coupon/update/{id}/'}" />
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/coupon/update/{id}'}" />
|
||||
{/form_field}
|
||||
|
||||
<div class="span4">
|
||||
@@ -36,7 +36,7 @@
|
||||
{form_field form=$form field='isEnabled'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="is-enabled" class="checkbox control-label">
|
||||
<input id="is-enabled" type="checkbox" name="{$name}" {if $value}value="1" checked{else}value="0"{/if} >
|
||||
<input id="is-enabled" type="checkbox" name="{$name}" {if $value}value="1" checked{/if} />
|
||||
{if $error}{$message}{/if}
|
||||
{intl l='Is enabled'}
|
||||
</label>
|
||||
@@ -45,8 +45,9 @@
|
||||
|
||||
{form_field form=$form field='isAvailableOnSpecialOffers'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
{$value|var_dump}
|
||||
<label for="is-available-on-special-offers" class="checkbox control-label">
|
||||
<input id="is-available-on-special-offers" type="checkbox" name="{$name}" {if $value}value="1" checked{else}value="0"{/if} >
|
||||
<input id="is-available-on-special-offers" type="checkbox" name="{$name}" {if $value}value="1" checked{/if} />
|
||||
{if $error}{$message}{/if}
|
||||
{intl l='Is available on special offers'}
|
||||
</label>
|
||||
@@ -56,7 +57,7 @@
|
||||
{form_field form=$form field='isCumulative'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="is-cumulative" class="checkbox control-label">
|
||||
<input id="is-cumulative" type="checkbox" name="{$name}" {if $value}value="1" checked{else}value="0"{/if} >
|
||||
<input id="is-cumulative" type="checkbox" name="{$name}" {if $value}value="1" checked{/if} />
|
||||
{if $error}{$message}{/if}
|
||||
{intl l='Is cumulative'}
|
||||
</label>
|
||||
@@ -66,7 +67,7 @@
|
||||
{form_field form=$form field='isRemovingPostage'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="is-removing-postage" class="checkbox control-label">
|
||||
<input id="is-removing-postage" type="checkbox" name="{$name}" {if $value}value="1" checked{else}value="0"{/if} >
|
||||
<input id="is-removing-postage" type="checkbox" name="{$name}" {if $value}value="1" checked{/if} />
|
||||
{if $error}{$message}{/if}
|
||||
{intl l='Is removing postage'}
|
||||
</label>
|
||||
@@ -88,11 +89,11 @@
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
|
||||
<label for="is-unlimited" class="checkbox control-label">
|
||||
<input id="is-unlimited" type="checkbox" name="is-unlimited" {if $error}{else}checked{/if} >
|
||||
<input id="is-unlimited" type="checkbox" name="is-unlimited" >
|
||||
{intl l='Is unlimited'}
|
||||
</label>
|
||||
<label id="max-usage-label" for="max-usage" class="control-label">{intl l='Max usage :'}</label>
|
||||
<input id="max-usage" type="text" class="form-control" name="{$name}" value="{$value}" placeholder="{intl l='max usage'}">
|
||||
<input id="max-usage" type="text" class="form-control" name="{$name}" value="{if !$value}-1{else}{$value}{/if}" placeholder="{intl l='max usage'}">
|
||||
{if $error}{$message}{/if}
|
||||
</div>
|
||||
{/form_field}
|
||||
@@ -101,17 +102,19 @@
|
||||
<div class="col-md-8">
|
||||
<div class="well clearfix">
|
||||
<div class="col-md-6">
|
||||
{form_field form=$form field='effect'}
|
||||
{form_field form=$form field='type'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="effect" class="control-label">{intl l='Effect :'}</label>
|
||||
<select name="{$name}" value="{$value}" id="effect" class="col-md-12 form-control">
|
||||
<option value="-1" data-description="">{intl l='Please select an effect'}</option>
|
||||
<label for="type" class="control-label">{intl l='Type :'}</label>
|
||||
<select name="{$name}" id="type" class="col-md-12 form-control">
|
||||
<option value="-1" data-description="">{intl l='Please select a coupon type'}</option>
|
||||
{foreach from=$availableCoupons item=availableCoupon}
|
||||
<option value="{$availableCoupon.serviceId}" data-description="{$availableCoupon.toolTip}" {if $value == $availableCoupon.serviceId}selected="selected"{/if}>{$availableCoupon.name}</option>
|
||||
<option value="{$availableCoupon.serviceId}" data-description="{$availableCoupon.toolTip}" {if $value == $availableCoupon.serviceId}selected{/if}>
|
||||
{$availableCoupon.name}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
{if $error}{$message}{/if}
|
||||
<span id="effectToolTip" class="help-block">{$availableCoupons.0.toolTip}</span>
|
||||
<span id="typeToolTip" class="help-block">{$availableCoupons.0.toolTip}</span>
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
@@ -164,14 +167,14 @@
|
||||
|
||||
</div>
|
||||
</section>
|
||||
{if $noRules}
|
||||
{include file='includes/notifications.html' message={intl l='Please save your Coupon in oder to affect it some application fields'}}
|
||||
{if $noConditions}
|
||||
{include file='includes/notifications.html' message={intl l='Please save your Coupon in oder to affect it some conditions'}}
|
||||
{else}
|
||||
<section class="row">
|
||||
<div class="col-md-12 general-block-decorator">
|
||||
<table class="table table-striped">
|
||||
<caption class="clearfix">
|
||||
{intl l='Rules'}
|
||||
{intl l='Conditions'}
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -179,8 +182,8 @@
|
||||
<th>{intl l='Actions'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="constraint-list">
|
||||
{include file='coupon/rules.html' rules=$rules}
|
||||
<tbody id="condition-list">
|
||||
{include file='coupon/conditions.html' conditions=$conditions}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -188,11 +191,11 @@
|
||||
|
||||
<section class="row">
|
||||
<div class="col-md-12 general-block-decorator clearfix">
|
||||
<a id="constraint-save-btn" title="{intl l='Save this rule'}" class="btn btn-default btn-primary pull-right">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span> {intl l='Save this rule'}
|
||||
<a id="condition-save-btn" title="{intl l='Save this condition'}" class="btn btn-default btn-primary pull-right" data-toggle="confirm" data-script="">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span> {intl l='Save this condition'}
|
||||
</a>
|
||||
|
||||
<div id="rule-add-organizer" class="form-group col-md-2">
|
||||
<div id="condition-add-organizer" class="form-group col-md-2">
|
||||
<label for="type">{intl l='Condition type :'}</label>
|
||||
<label class="radio">
|
||||
<input type="radio" name="type" class="form-control" id="type" value="1" checked> {intl l='And'}
|
||||
@@ -202,17 +205,17 @@
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div id="rule-add-type" class="form-group col-md-4">
|
||||
<label for="categoryRule">{intl l='Rule\'s category :'}</label>
|
||||
<select name="categoryRule" id="category-rule" class="form-control">
|
||||
<option value="-1" >{intl l='Please select a rule category'}</option>
|
||||
{foreach from=$availableRules item=availableRule}
|
||||
<option value="{$availableRule.serviceId}" data-description="{$availableRule.toolTip}">{$availableRule.name}</option>
|
||||
<div id="condition-add-type" class="form-group col-md-4">
|
||||
<label for="categoryCondition">{intl l='Condition\'s category :'}</label>
|
||||
<select name="categoryCondition" id="category-condition" class="form-control">
|
||||
<option value="-1" >{intl l='Please select a condition category'}</option>
|
||||
{foreach from=$availableConditions item=availableCondition}
|
||||
<option value="{$availableCondition.serviceId}" data-description="{$availableCondition.toolTip}">{$availableCondition.name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div id="constraint-add-operators-values" class="form-group col-md-6">
|
||||
<div id="condition-add-operators-values" class="form-group col-md-6">
|
||||
{*<label for="operator">{intl l='Operator :'}</label>*}
|
||||
{*<div class="row">*}
|
||||
{*<div class="col-lg-6">*}
|
||||
@@ -283,4 +286,3 @@
|
||||
</section>
|
||||
{/if}
|
||||
</form>
|
||||
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
{foreach from=$rules item=rule key=i name=rulesForeach}
|
||||
<tr>
|
||||
<td>
|
||||
{if !$smarty.foreach.rulesForeach.first}
|
||||
<span class="label label-info">{intl l='And'}</span>
|
||||
{/if}
|
||||
{$rule nofilter}
|
||||
</td>
|
||||
<td>
|
||||
<a data-int="{$i}" class="btn btn-default btn-primary btn-medium constraint-update-btn" href="{$urlEdit}">
|
||||
<span class="glyphicon glyphicon-edit"></span> {intl l='Edit'}
|
||||
</a>
|
||||
<a data-int="{$i}" data-target="#delete" data-toggle="confirm" class="btn btn-default btn-danger btn-medium constraint-delete-btn" href="{$urlDelete}">
|
||||
<span class="glyphicon glyphicon-remove"></span> {intl l='Delete'}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
@@ -331,7 +331,7 @@
|
||||
placement : 'left',
|
||||
success : function(response, newValue) {
|
||||
// The URL template
|
||||
var url = "{url path='/admin/configuration/currencies/update-position' currency_id='__ID__' position='__POS__'}";
|
||||
var url = "{url noamp='1' path='/admin/configuration/currencies/update-position' currency_id='__ID__' position='__POS__'}";
|
||||
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id'))
|
||||
|
||||
@@ -64,9 +64,21 @@
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="customer_list" type="customer" current="false" visible="*" last_order="1" backend_context="1" page={$customer_page} limit={$display_customer}}
|
||||
{loop name="customer_list" type="customer" current="false" visible="*" backend_context="1" page={$customer_page} limit={$display_customer}}
|
||||
{assign "lastOrderDate" ''}
|
||||
{assign "lastOrderAmount" ''}
|
||||
{assign "lastOrderCurrency" ''}
|
||||
|
||||
{loop type="order" name="last-order" customer=$ID order="create-date-reverse" limit="1"}
|
||||
{assign "lastOrderDate" "{format_date date=$CREATE_DATE}"}
|
||||
{assign "lastOrderAmount" "{format_number number=$TOTAL_TAXED_AMOUNT}"}
|
||||
{loop type="currency" name="order-currency" id=$CURRENCY}
|
||||
{assign "lastOrderCurrency" $SYMBOL}
|
||||
{/loop}
|
||||
{/loop}
|
||||
|
||||
<tr>
|
||||
<td><a href="{url path="/admin/customer/update/{$ID}" }">{$REF}</a></td>
|
||||
<td><a href="{url path="/admin/customer/update/{$ID}"}">{$REF}</a></td>
|
||||
|
||||
<td>
|
||||
{$COMPANY}
|
||||
@@ -79,11 +91,11 @@
|
||||
{module_include location='customer_list_row'}
|
||||
|
||||
<td>
|
||||
{format_date date=$LASTORDER_DATE}
|
||||
{$lastOrderDate}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{format_number number=$LASTORDER_AMOUNT}
|
||||
{$lastOrderCurrency} {$lastOrderAmount}
|
||||
</td>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
|
||||
162
templates/admin/default/document-edit.html
Normal file
162
templates/admin/default/document-edit.html
Normal file
@@ -0,0 +1,162 @@
|
||||
{extends file="admin-layout.tpl"}
|
||||
|
||||
{block name="page-title"}{intl l='Edit a document'}{/block}
|
||||
|
||||
{block name="check-permissions"}admin.document.edit{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="documents edit-document">
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
{loop type="document" name="document_edit" source="{$documentType}" id="{$documentId}" 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="{$redirectUrl}"}">{intl l="Document"}</a></li>
|
||||
<li>{intl l='Editing document "%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 document $TITLE"}
|
||||
</div>
|
||||
|
||||
<div class="form-container">
|
||||
<div class="col-md-12">
|
||||
{form name="$formId"}
|
||||
<form method="POST" action="{url path="/admin/document/type/{$documentType}/{$ID}/update"}" enctype="multipart/form-data" class="clearfix">
|
||||
|
||||
<div class="row inner-toolbar clearfix">
|
||||
<div class="col-md-6 inner-actions pull-right">
|
||||
<a href="{url path="{$redirectUrl}"}" class="btn btn-default btn-info">{intl l='Back'} <span class="glyphicon glyphicon-remove"></span></a>
|
||||
<button type="submit" name="save_mode" value="stay" class="btn btn-default btn-primary" title="{intl l='Save'}">{intl l='Save'} <span class="glyphicon glyphicon-ok"></span></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
<input type="hidden" name="{$name}" value="{url path="/admin/document/type/{$documentType}/{$ID}/update"}" />
|
||||
{/form_field}
|
||||
|
||||
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
|
||||
|
||||
<p class="title title-without-tabs">{intl l="Document informations"}</p>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label">{intl l="File"} : </label>
|
||||
<p><a href="{$DOCUMENT_PATH}" title="{$TITLE}" target="_blank">{$TITLE}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
{form_field form=$form field='file'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||
<input type="file" id="{$label_attr.for}" name="{$name}" class="form-control" value="" title="{intl l="{$label}"}" placeholder="{intl l='File'}">
|
||||
</div>
|
||||
{/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="{$TITLE}" title="{intl l="{$label}"}" placeholder="{intl l='Title'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='chapo'}
|
||||
<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='Chapo'}">{$CHAPO}</textarea>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='postscriptum'}
|
||||
<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='Post Scriptum'}">{$POSTSCRIPTUM}</textarea>
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{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 wysiwyg" title="{intl l="{$label}"}" placeholder="{intl l='Description'}">{$DESCRIPTION}</textarea>
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row inner-toolbar clearfix">
|
||||
<div class="col-md-6 inner-actions pull-right">
|
||||
<a href="{url path="{$redirectUrl}"}" class="btn btn-default btn-info">{intl l='Back'} <span class="glyphicon glyphicon-remove"></span></a>
|
||||
<button type="submit" name="save_mode" value="stay" class="btn btn-default btn-primary" title="{intl l='Save'}">{intl l='Save'} <span class="glyphicon glyphicon-ok"></span></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{/form}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="document_edit"}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="row inner-toolbar clearfix">
|
||||
<div class="col-md-6 inner-actions pull-right">
|
||||
<a href="{url path="{$redirectUrl}"}" class="btn btn-default btn-info">{intl l='Back'} <span class="glyphicon glyphicon-remove"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="alert alert-error">
|
||||
{intl l="Sorry, document ID=$documentId was not found."}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/elseloop}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
{javascripts file='assets/js/main.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
<script src="{url file='/tinymce/tinymce.min.js'}"></script>
|
||||
<script>
|
||||
tinymce.init({
|
||||
selector: ".wysiwyg",
|
||||
theme: "modern",
|
||||
menubar : false,
|
||||
language: "",
|
||||
plugins: [
|
||||
"advlist autolink link image lists charmap print preview hr anchor pagebreak",
|
||||
"searchreplace wordcount visualblocks visualchars insertdatetime media nonbreaking",
|
||||
"table contextmenu directionality emoticons paste textcolor filemanager"
|
||||
],
|
||||
toolbar1: "undo redo | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | styleselect | filemanager | link unlink anchor | image media | forecolor backcolor | print preview code ",
|
||||
image_advtab: true ,
|
||||
external_filemanager_path:"{url file='/tinymce/plugins/filemanager/'}'",
|
||||
filemanager_title:"{intl l='Files manager'}" ,
|
||||
external_plugins: { "filemanager" : "{url file='/tinymce/plugins/filemanager/plugin.min.js'}"}
|
||||
});
|
||||
</script>
|
||||
|
||||
{/block}
|
||||
@@ -1,6 +1,6 @@
|
||||
{extends file="admin-layout.tpl"}
|
||||
|
||||
{block name="page-title"}{intl l='Edit an feature'}{/block}
|
||||
{block name="page-title"}{intl l='Edit a feature'}{/block}
|
||||
|
||||
{block name="check-permissions"}admin.configuration.features.edit{/block}
|
||||
|
||||
@@ -75,9 +75,9 @@
|
||||
</p>
|
||||
|
||||
<div class="alert alert-info">
|
||||
{intl l="Enter here all possible feature values."}
|
||||
{intl l="Enter here all possible feature values. To get a free text feature in product forms, don't add any value."}
|
||||
</div>
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<thead>
|
||||
@@ -122,7 +122,7 @@
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="list" type="feature_availability" feature=$feature_id backend_context="1" lang=$edit_language_id order=$featureav_order}
|
||||
{loop name="list" type="feature-availability" feature=$feature_id backend_context="1" lang=$edit_language_id order=$featureav_order}
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
|
||||
@@ -303,7 +303,7 @@
|
||||
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}";
|
||||
var url = "{url noamp='1' 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);
|
||||
|
||||
@@ -312,7 +312,7 @@
|
||||
placement : 'left',
|
||||
success : function(response, newValue) {
|
||||
// The URL template
|
||||
var url = "{url path='/admin/configuration/features/update-position' feature_id='__ID__' position='__POS__'}";
|
||||
var url = "{url noamp='1' path='/admin/configuration/features/update-position' feature_id='__ID__' position='__POS__'}";
|
||||
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id'))
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<div class="folder edit-folder">
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
{* include file="includes/folder-breadcrumb.html" editing_category="true" *}
|
||||
{include file="includes/folder-breadcrumb.html" editing_category="true" }
|
||||
|
||||
<div class="row">
|
||||
{loop name="folder_edit" type="folder" visible="*" id="{$folder_id}" backend_context="1" lang="$edit_language_id"}
|
||||
@@ -21,7 +21,7 @@
|
||||
<div class="col-md-5 actions">
|
||||
|
||||
{if $HAS_PREVIOUS != 0}
|
||||
<a href="{url path='/admin/folders/update' folder_id=$PREVIOUS}" class="btn btn-default" title="{intl l='Edit previous folder'}"><span class="glyphicon glyphicon-arrow-left"></span></a>
|
||||
<a href="{url path="/admin/folders/update/$PREVIOUS"}" class="btn btn-default" title="{intl l='Edit previous folder'}"><span class="glyphicon glyphicon-arrow-left"></span></a>
|
||||
{else}
|
||||
<a href="#" disabled="disabled" class="btn btn-default"><span class="glyphicon glyphicon-arrow-left"></span></a>
|
||||
{/if}
|
||||
@@ -29,7 +29,7 @@
|
||||
<a href="{$URL}" target="_blank" class="btn btn-default" title="{intl l='Preview folder page'}"><span class="glyphicon glyphicon-eye-open"></span></a>
|
||||
|
||||
{if $HAS_NEXT != 0}
|
||||
<a href="{url path='/admin/folders/update' folder_id=$NEXT}" class="btn btn-default" title="{intl l='Edit next folder'}"><span class="glyphicon glyphicon-arrow-right"></span></a>
|
||||
<a href="{url path="/admin/folders/update/$NEXT"}" class="btn btn-default" title="{intl l='Edit next folder'}"><span class="glyphicon glyphicon-arrow-right"></span></a>
|
||||
{else}
|
||||
<a href="#" disabled="disabled" class="btn btn-default"><span class="glyphicon glyphicon-arrow-right"></span></a>
|
||||
{/if}
|
||||
@@ -67,7 +67,7 @@
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/folder' folder_id={$folder_id}}" />
|
||||
<input type="hidden" name="{$name}" value="{url path="/admin/folders/update{$ID}"}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='locale'}
|
||||
@@ -101,9 +101,9 @@
|
||||
<option value="0">{intl l="Top level"}</option>
|
||||
|
||||
{$myparent=$PARENT}
|
||||
{loop name="fold-parent" type="folder-tree" visible="*" folder="0"}
|
||||
{* loop name="fold-parent" type="folder-tree" visible="*" folder="0"}
|
||||
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px" {if $myparent == $ID}selected="selected"{/if} {if $folder_id == $ID}disabled="disabled"{/if}>{$TITLE}</option>
|
||||
{/loop}
|
||||
{/loop *}
|
||||
|
||||
</select>
|
||||
</div>
|
||||
@@ -161,7 +161,7 @@
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<select name="folder_id" id="folder_id" class="form-control">
|
||||
<option value="">Select a folder...</option>
|
||||
<option value="">{intl l='Select a folder...'}</option>
|
||||
{loop name="folders" type="folder" backend_context="1" lang="$edit_language_id"}
|
||||
<option value="{$ID}">{$TITLE}</option>
|
||||
{/loop}
|
||||
@@ -174,7 +174,7 @@
|
||||
<div id="content_selector" class="hide">
|
||||
<div class="input-group">
|
||||
<select required="required" name="content_id" id="content_id" class="form-control">
|
||||
<option value="">Select a folder content...</option>
|
||||
<option value="">{intl l='Select a folder content...'}</option>
|
||||
</select>
|
||||
<span class="input-group-btn" id="content_add_button">
|
||||
<button class="btn btn-default btn-primary action-btn" type="submit"><span class="glyphicon glyphicon-plus-sign"></span></button>
|
||||
@@ -209,7 +209,7 @@
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="assigned_contents" type="associated_content" folder="$folder_id" backend_context="1" lang="$edit_language_id"}
|
||||
{*loop name="assigned_contents" type="associated_content" folder="$folder_id" backend_context="1" lang="$edit_language_id"}
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
|
||||
@@ -239,16 +239,18 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/elseloop}
|
||||
{/elseloop*}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="images">
|
||||
{include file='includes/image-upload-form.html' imageType='folder' parentId=$folder_id}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="documents">
|
||||
{include file='includes/document-upload-form.html' documentType='folder' parentId=$folder_id}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="modules">
|
||||
@@ -286,59 +288,70 @@
|
||||
{/block}
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
<script>
|
||||
{javascripts file='assets/js/dropzone.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
{javascripts file='assets/js/image-upload.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
{javascripts file='assets/js/document-upload.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
$(function() {
|
||||
<script>
|
||||
$(function() {
|
||||
$.imageUploadManager.initImageDropZone();
|
||||
$.documentUploadManager.initDocumentDropZone();
|
||||
|
||||
$('.use_default_rewriten_url').click(function(ev) {
|
||||
alert("Not functionnal");
|
||||
$('.use_default_rewriten_url').click(function(ev) {
|
||||
alert("Not functionnal");
|
||||
|
||||
ev.preventDefault();
|
||||
});
|
||||
ev.preventDefault();
|
||||
});
|
||||
|
||||
// Show proper tab, if defined
|
||||
{if ! empty($current_tab)}
|
||||
$('#tabbed-menu a[href="#{$current_tab}"]').tab('show')
|
||||
{/if}
|
||||
// Show proper tab, if defined
|
||||
{if ! empty($current_tab)}
|
||||
$('#tabbed-menu a[href="#{$current_tab}"]').tab('show')
|
||||
{/if}
|
||||
|
||||
|
||||
// Set proper content ID in delete content from
|
||||
$('a.delete-content').click(function(ev) {
|
||||
$('#content_delete_id').val($(this).data('id'));
|
||||
$('#folder_delete_id').val($('#folder_id').val());
|
||||
});
|
||||
// Set proper content ID in delete content from
|
||||
$('a.delete-content').click(function(ev) {
|
||||
$('#content_delete_id').val($(this).data('id'));
|
||||
$('#folder_delete_id').val($('#folder_id').val());
|
||||
});
|
||||
|
||||
// Load content on folder selection
|
||||
$('#folder_id').change(function(event) {
|
||||
$.ajax({
|
||||
url : '{url path="/admin/folder/$folder_id/available-related-content/"}' + $(this).val() + '.xml',
|
||||
type : 'get',
|
||||
dataType : 'json',
|
||||
success : function(json) {
|
||||
$('#content_id :not(:first-child)').remove();
|
||||
// Load content on folder selection
|
||||
$('#folder_id').change(function(event) {
|
||||
$.ajax({
|
||||
url : '{url path="/admin/folder/$folder_id/available-related-content/"}' + $(this).val() + '.xml',
|
||||
type : 'get',
|
||||
dataType : 'json',
|
||||
success : function(json) {
|
||||
$('#content_id :not(:first-child)').remove();
|
||||
|
||||
var have_content = false;
|
||||
var have_content = false;
|
||||
|
||||
$.each(json, function(idx, value) {
|
||||
$('#content_id').append($('<option>').text(value.title).attr('value', value.id));
|
||||
$.each(json, function(idx, value) {
|
||||
$('#content_id').append($('<option>').text(value.title).attr('value', value.id));
|
||||
|
||||
have_content = true; // Lame...
|
||||
});
|
||||
have_content = true; // Lame...
|
||||
});
|
||||
|
||||
if (have_content)
|
||||
$('#content_selector').removeClass('hide');
|
||||
else
|
||||
$('#content_selector').addClass('hide');
|
||||
if (have_content)
|
||||
$('#content_selector').removeClass('hide');
|
||||
else
|
||||
$('#content_selector').addClass('hide');
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Initialize folder (id={$folder_id}) select value
|
||||
{if $folder_id != 0}
|
||||
$('#folder_id').val("{$folder_id}").change();
|
||||
{/if}
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Initialize folder (id={$folder_id}) select value
|
||||
{if $folder_id != 0}
|
||||
$('#folder_id').val("{$folder_id}").change();
|
||||
{/if}
|
||||
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
{/block}
|
||||
@@ -5,332 +5,337 @@
|
||||
{block name="check-permissions"}admin.folders.view{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="folders">
|
||||
<div class="folders">
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
{* include file="includes/folder-breadcrumb.html" *}
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
{module_include location='folders_top'}
|
||||
{include file="includes/folder-breadcrumb.html" folder_id=$parent }
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="general-block-decorator">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed" id="folder_list">
|
||||
<caption>
|
||||
{* display parent folder name, and get current folder ID *}
|
||||
{loop name="folder_title" type="folder" visible="*" id=$folder_id}
|
||||
{intl l="Folders in %fold" fold=$TITLE}
|
||||
{$fold_id = $ID}
|
||||
{/loop}
|
||||
{elseloop rel="folder_title"}
|
||||
{intl l="Top level folders"}
|
||||
{/elseloop}
|
||||
{module_include location='folders_top'}
|
||||
|
||||
{module_include location='folder_list_caption'}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="general-block-decorator">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed" id="folder_list">
|
||||
<caption>
|
||||
{* display parent folder name, and get current folder ID *}
|
||||
{loop name="folder_title" type="folder" visible="*" id=$parent}
|
||||
{intl l="Folders in %fold" fold=$TITLE}
|
||||
{$fold_id = $ID}
|
||||
{/loop}
|
||||
{elseloop rel="folder_title"}
|
||||
{intl l="Top level folders"}
|
||||
{/elseloop}
|
||||
{*
|
||||
<td class="object-title">
|
||||
<a href="{url path='admin/folders' parent=$ID}" title="{intl l='Browse this folder'}">
|
||||
{$TITLE}
|
||||
</a>
|
||||
</td>*}
|
||||
{module_include location='folder_list_caption'}
|
||||
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.folders.create"}
|
||||
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new folder'}" href="#folder_creation_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</caption>
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.folders.create"}
|
||||
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new folder'}" href="#folder_creation_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</caption>
|
||||
|
||||
{ifloop rel="folder_list"}
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="object-title">
|
||||
{admin_sortable_header
|
||||
current_order=$folder_order
|
||||
order='id'
|
||||
reverse_order='id_reverse'
|
||||
path={url path='/admin/folders' id_folder=$folder_id}
|
||||
request_parameter_name='folder_order'
|
||||
label="{intl l='ID'}"
|
||||
}
|
||||
</th>
|
||||
{ifloop rel="folder_list"}
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="object-title">
|
||||
{admin_sortable_header
|
||||
current_order=$folder_order
|
||||
order='id'
|
||||
reverse_order='id_reverse'
|
||||
path={url path='/admin/folders' parent=$parent}
|
||||
request_parameter_name='folder_order'
|
||||
label="{intl l='ID'}"
|
||||
}
|
||||
</th>
|
||||
|
||||
<th class="object-image"> </th>
|
||||
<th class="object-image"> </th>
|
||||
|
||||
<th class="object-title">
|
||||
{admin_sortable_header
|
||||
current_order=$folder_order
|
||||
order='alpha'
|
||||
reverse_order='alpha_reverse'
|
||||
path={url path='/admin/folders' id_folder=$folder_id}
|
||||
request_parameter_name='folder_order'
|
||||
label="{intl l='Folder title'}"
|
||||
}
|
||||
</th>
|
||||
<th class="object-title">
|
||||
{admin_sortable_header
|
||||
current_order=$folder_order
|
||||
order='alpha'
|
||||
reverse_order='alpha_reverse'
|
||||
path={url path='/admin/folders' parent=$parent}
|
||||
request_parameter_name='folder_order'
|
||||
label="{intl l='Folder title'}"
|
||||
}
|
||||
</th>
|
||||
|
||||
{module_include location='folder_list_header'}
|
||||
{module_include location='folder_list_header'}
|
||||
|
||||
<th>
|
||||
{admin_sortable_header
|
||||
current_order=$folder_order
|
||||
order='visible'
|
||||
reverse_order='visible_reverse'
|
||||
path={url path='/admin/folders' id_folder=$folder_id}
|
||||
request_parameter_name='folder_order'
|
||||
label="{intl l='Online'}"
|
||||
}
|
||||
</th>
|
||||
<th>
|
||||
{admin_sortable_header
|
||||
current_order=$folder_order
|
||||
order='visible'
|
||||
reverse_order='visible_reverse'
|
||||
path={url path='/admin/folders' parent=$parent}
|
||||
request_parameter_name='folder_order'
|
||||
label="{intl l='Online'}"
|
||||
}
|
||||
</th>
|
||||
|
||||
<th>
|
||||
{admin_sortable_header
|
||||
current_order=$folder_order
|
||||
order='manual'
|
||||
reverse_order='manual_reverse'
|
||||
path={url path='/admin/folders' id_folder=$folder_id}
|
||||
request_parameter_name='folder_order'
|
||||
label="{intl l='Position'}"
|
||||
}
|
||||
</th>
|
||||
<th>
|
||||
{admin_sortable_header
|
||||
current_order=$folder_order
|
||||
order='manual'
|
||||
reverse_order='manual_reverse'
|
||||
path={url path='/admin/folders' parent=$parent}
|
||||
request_parameter_name='folder_order'
|
||||
label="{intl l='Position'}"
|
||||
}
|
||||
</th>
|
||||
|
||||
<th class="actions">{intl l='Actions'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<th class="actions">{intl l='Actions'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="folder_list" type="folder" visible="*" parent=$folder_id order=$folder_order backend_context="1" lang=$lang_id}
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
<tbody>
|
||||
{loop name="folder_list" type="folder" visible="*" parent=$parent order=$folder_order backend_context="1" lang=$lang_id}
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
|
||||
<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/folder' folder_id=$ID}" title="{intl l='Browse this folder'}"><img class="img-thumbnail" src="{$IMAGE_URL}" alt="{$TITLE}" /></a>
|
||||
{/loop}
|
||||
</td>
|
||||
<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>
|
||||
{/loop}
|
||||
</td>
|
||||
|
||||
<td class="object-title">
|
||||
<a href="{url path='admin/folder' folder_id=$ID}" title="{intl l='Browse this folder'}">
|
||||
{$TITLE}
|
||||
</a>
|
||||
</td>
|
||||
<td class="object-title">
|
||||
<a href="{url path='admin/folders' parent=$ID}" title="{intl l='Browse this folder'}">
|
||||
{$TITLE}
|
||||
</a>
|
||||
</td>
|
||||
|
||||
{module_include location='folder_list_row'}
|
||||
{module_include location='folder_list_row'}
|
||||
|
||||
<td>
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.folders.edit"}
|
||||
<div class="make-switch switch-small folderVisibleToggle" data-id="{$ID}" 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" class="folderVisibleToggle" {if $VISIBLE == 1}checked="checked"{/if}>
|
||||
</div>
|
||||
{/loop}
|
||||
<td>
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.folders.edit"}
|
||||
<div class="make-switch switch-small folderVisibleToggle" data-id="{$ID}" 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" class="folderVisibleToggle" {if $VISIBLE == 1}checked="checked"{/if}>
|
||||
</div>
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="can_change"}
|
||||
<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" class="disabled" disabled="disabled" {if $VISIBLE == 1}checked="checked"{/if}>
|
||||
</div>
|
||||
{/elseloop}
|
||||
</td>
|
||||
{elseloop rel="can_change"}
|
||||
<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" class="disabled" disabled="disabled" {if $VISIBLE == 1}checked="checked"{/if}>
|
||||
</div>
|
||||
{/elseloop}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{admin_position_block
|
||||
permission="admin.folders.edit"
|
||||
path={url path='admin/folders/update-position' folder_id=$ID}
|
||||
url_parameter="folder_id"
|
||||
in_place_edit_class="folderPositionChange"
|
||||
position=$POSITION
|
||||
id=$ID
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
{admin_position_block
|
||||
permission="admin.folders.edit"
|
||||
path={url path='admin/folders/update-position' folder_id=$ID}
|
||||
url_parameter="folder_id"
|
||||
in_place_edit_class="folderPositionChange"
|
||||
position=$POSITION
|
||||
id=$ID
|
||||
}
|
||||
</td>
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Browse this folder'}" href="{url path='admin/folder' folder_id=$ID}"><i class="glyphicon glyphicon-folder-open"></i></a>
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Browse this folder'}" href="{url path='admin/folders' parent=$ID}"><i class="glyphicon glyphicon-folder-open"></i></a>
|
||||
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.folders.edit"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Edit this folder'}" href="{url path='/admin/folders/update' folder_id=$ID}"><i class="glyphicon glyphicon-edit"></i></a>
|
||||
{/loop}
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.folders.edit"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Edit this folder'}" href="{url path="/admin/folders/update/{$ID}"}"><i class="glyphicon glyphicon-edit"></i></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.folders.delete"}
|
||||
<a class="btn btn-default btn-xs folder-delete" title="{intl l='Delete this folder and all its contents'}" href="#folder_delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
{/ifloop}
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.folders.delete"}
|
||||
<a class="btn btn-default btn-xs folder-delete" title="{intl l='Delete this folder and all its contents'}" href="#folder_delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
{/ifloop}
|
||||
|
||||
{elseloop rel="folder_list"}
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="message">
|
||||
<div class="alert alert-info">
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.folders.create"}
|
||||
{intl l="This folder has no sub-folders. To create a new one, click the + button above."}
|
||||
{/loop}
|
||||
{elseloop rel="folder_list"}
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="message">
|
||||
<div class="alert alert-info">
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.folders.create"}
|
||||
{intl l="This folder has no sub-folders. To create a new one, click the + button above."}
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="can_create"}
|
||||
{elseloop rel="can_create"}
|
||||
{intl l="This folder has no sub-folders."}
|
||||
{/elseloop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
{/elseloop}
|
||||
</table>
|
||||
</div>
|
||||
{/elseloop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
{/elseloop}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* -- CONTENT MANAGEMENT ---------------------------------------------------- *}
|
||||
{* -- CONTENT MANAGEMENT ---------------------------------------------------- *}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="general-block-decorator">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="general-block-decorator">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed">
|
||||
<caption>
|
||||
{* display parent folder name *}
|
||||
{loop name="folder_title" type="folder" visible="*" id=$folder_id}
|
||||
{intl l="Contents in %fold" fold=$TITLE}
|
||||
{/loop}
|
||||
<table class="table table-striped table-condensed">
|
||||
<caption>
|
||||
{* display parent folder name *}
|
||||
{loop name="folder_title" type="folder" visible="*" id=$parent}
|
||||
{intl l="Contents in %fold" fold=$TITLE}
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="folder_title"}
|
||||
{intl l="Top level Contents"}
|
||||
{/elseloop}
|
||||
{elseloop rel="folder_title"}
|
||||
{intl l="Top level Contents"}
|
||||
{/elseloop}
|
||||
|
||||
{module_include location='content_list_caption'}
|
||||
{module_include location='content_list_caption'}
|
||||
|
||||
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new content'}" href="#content_creation_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
</a>
|
||||
</caption>
|
||||
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new content'}" href="#content_creation_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
</a>
|
||||
</caption>
|
||||
|
||||
{ifloop rel="content_list"}
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="object-title">
|
||||
{admin_sortable_header
|
||||
{ifloop rel="content_list"}
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="object-title">
|
||||
{admin_sortable_header
|
||||
current_order=$content_order
|
||||
order='id'
|
||||
reverse_order='id_reverse'
|
||||
path={url path='/admin/folders' id_folder=$folder_id target='contents'}
|
||||
path={url path='/admin/folders' parent=$parent target='contents'}
|
||||
label="{intl l='ID'}"
|
||||
}
|
||||
}
|
||||
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
|
||||
<th class="object-title">
|
||||
{admin_sortable_header
|
||||
<th class="object-title">
|
||||
{admin_sortable_header
|
||||
current_order=$content_order
|
||||
order='alpha'
|
||||
reverse_order='alpha_reverse'
|
||||
path={url path='/admin/folders' id_folder=$folder_id target='contents'}
|
||||
path={url path='/admin/folders' parent=$parent target='contents'}
|
||||
label="{intl l='Content title'}"
|
||||
}
|
||||
}
|
||||
|
||||
{module_include location='content_list_header'}
|
||||
{module_include location='content_list_header'}
|
||||
|
||||
<th>
|
||||
{admin_sortable_header
|
||||
<th>
|
||||
{admin_sortable_header
|
||||
current_order=$content_order
|
||||
order='visible'
|
||||
reverse_order='visible_reverse'
|
||||
path={url path='/admin/folders' id_folder=$folder_id target='contents'}
|
||||
path={url path='/admin/folders' parent=$parent target='contents'}
|
||||
label="{intl l='Online'}"
|
||||
}
|
||||
</th>
|
||||
}
|
||||
</th>
|
||||
|
||||
<th>
|
||||
{admin_sortable_header
|
||||
<th>
|
||||
{admin_sortable_header
|
||||
current_order=$content_order
|
||||
order='manual'
|
||||
reverse_order='manual_reverse'
|
||||
path={url path='/admin/folders' id_folder=$folder_id target='contents'}
|
||||
path={url path='/admin/folders' parent=$parent target='contents'}
|
||||
label="{intl l='Position'}"
|
||||
}
|
||||
</th>
|
||||
}
|
||||
</th>
|
||||
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="content_list" type="content" visible="*" folder_default=$folder_id order=$content_order}
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
<tbody>
|
||||
{loop name="content_list" type="content" visible="*" folder_default=$parent order=$content_order}
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
|
||||
<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/edit' id=$ID}" title="{intl l='Edit this content'}">
|
||||
<img src="{$IMAGE_URL}" alt="{$TITLE}" />
|
||||
</a>
|
||||
{/loop}
|
||||
<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'}">
|
||||
<img src="{$IMAGE_URL}" alt="{$TITLE}" />
|
||||
</a>
|
||||
{/loop}
|
||||
|
||||
<td class="object-title"><a href="{url path="/admin/content/update/$ID"}" title="{intl l='Edit this content'}">{$TITLE}</a></td>
|
||||
<td class="object-title"><a href="{url path="/admin/content/update/$ID"}" title="{intl l='Edit this content'}">{$TITLE}</a></td>
|
||||
|
||||
{module_include location='content_list_row'}
|
||||
{module_include location='content_list_row'}
|
||||
|
||||
<td>
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.contents.edit"}
|
||||
<div class="make-switch switch-small contentVisibleToggle" data-id="{$ID}" 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" class="contentVisibleToggle" {if $VISIBLE == 1}checked="checked"{/if}>
|
||||
<td>
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.contents.edit"}
|
||||
<div class="make-switch switch-small contentVisibleToggle" data-id="{$ID}" 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" class="contentVisibleToggle" {if $VISIBLE == 1}checked="checked"{/if}>
|
||||
</div>
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="can_change"}
|
||||
<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" class="disabled" disabled="disabled" {if $VISIBLE == 1}checked="checked"{/if}>
|
||||
</div>
|
||||
{/elseloop}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{admin_position_block
|
||||
permission="admin.content.edit"
|
||||
path={url path='/admin/content/update-position' content_id=$ID}
|
||||
url_parameter="content_id"
|
||||
in_place_edit_class="contentPositionChange"
|
||||
position=$POSITION
|
||||
id=$ID
|
||||
}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.content.edit"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Edit this content'}" href="{url path="admin/content/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.content.delete"}
|
||||
<a class="btn btn-default btn-xs content-delete" title="{intl l='Delete this content'}" href="#content_delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
|
||||
{/loop}
|
||||
</div>
|
||||
{/loop}
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
{/ifloop}
|
||||
|
||||
{elseloop rel="can_change"}
|
||||
<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" class="disabled" disabled="disabled" {if $VISIBLE == 1}checked="checked"{/if}>
|
||||
</div>
|
||||
{/elseloop}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{admin_position_block
|
||||
permission="admin.content.edit"
|
||||
path={url path='/admin/contents/update-position' content_id=$ID}
|
||||
url_parameter="content_id"
|
||||
in_place_edit_class="contentPositionChange"
|
||||
position=$POSITION
|
||||
id=$ID
|
||||
}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.content.edit"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Edit this content'}" href="{url path="admin/content/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.content.delete"}
|
||||
<a class="btn btn-default btn-xs content-delete" title="{intl l='Delete this content'}" href="#content_delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
{/ifloop}
|
||||
|
||||
{elseloop rel="content_list"}
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="message"><div class="alert alert-info">{intl l="This folder doesn't contains any contents. To add a new content, <strong>click the + button</strong> above."}</div></td>
|
||||
</tr>
|
||||
</thead>
|
||||
{/elseloop}
|
||||
</table>
|
||||
{elseloop rel="content_list"}
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="message"><div class="alert alert-info">{intl l="This folder doesn't contains any contents. To add a new content, <strong>click the + button</strong> above."}</div></td>
|
||||
</tr>
|
||||
</thead>
|
||||
{/elseloop}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{module_include location='folders_bottom'}
|
||||
{module_include location='folders_bottom'}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{* -- Adding a new folder ------------------------------------------------- *}
|
||||
|
||||
{form name="thelia.admin.folder.creation"}
|
||||
{form name="thelia.admin.folder.creation"}
|
||||
|
||||
{* Capture the dialog body, to pass it to the generic dialog *}
|
||||
{capture "folder_creation_dialog"}
|
||||
@@ -338,12 +343,12 @@
|
||||
{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/folders/update' folder_id='_ID_'}" />
|
||||
{* 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/folders/update/_ID_'}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='parent'}
|
||||
<input type="hidden" name="{$name}" value="{$folder_id}" />
|
||||
<input type="hidden" name="{$name}" value="{$parent}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='title'}
|
||||
@@ -357,12 +362,12 @@
|
||||
|
||||
<div class="help-block">{intl l='Enter here the folder name in the default language (%title)' title="$TITLE"}</div>
|
||||
|
||||
{* Switch edition to the current locale *}
|
||||
{* 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}
|
||||
{form_field form=$form field='locale'}
|
||||
<input type="hidden" name="{$name}" value="{$LOCALE}" />
|
||||
{/form_field}
|
||||
{/loop}
|
||||
</div>
|
||||
{/form_field}
|
||||
@@ -382,55 +387,55 @@
|
||||
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
{include
|
||||
file = "includes/generic-create-dialog.html"
|
||||
|
||||
dialog_id = "folder_creation_dialog"
|
||||
dialog_title = {intl l="Create a new folder"}
|
||||
dialog_body = {$smarty.capture.folder_creation_dialog nofilter}
|
||||
|
||||
dialog_ok_label = {intl l="Create this folder"}
|
||||
dialog_ok_label = {intl l="Create this folder"}
|
||||
|
||||
form_action = {url path='/admin/folders/create'}
|
||||
form_enctype = {form_enctype form=$form}
|
||||
form_error_message = $form_error_message
|
||||
form_action = {url path='/admin/folders/create'}
|
||||
form_enctype = {form_enctype form=$form}
|
||||
form_error_message = $form_error_message
|
||||
}
|
||||
{/form}
|
||||
{/form}
|
||||
|
||||
{* -- Adding a new content -------------------------------------------------- *}
|
||||
|
||||
{form name="thelia.admin.content.creation"}
|
||||
{form name="thelia.admin.content.creation"}
|
||||
|
||||
{* Capture the dialog body, to pass it to the generic dialog *}
|
||||
{capture "content_creation_dialog"}
|
||||
{capture "content_creation_dialog"}
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{* Be sure to get the folder_id, even if the form could not be validated *}
|
||||
<input type="hidden" name="folder_id" value="{$folder_id}" />
|
||||
{* Be sure to get the folder_id, even if the form could not be validated *}
|
||||
<input type="hidden" name="parent" value="{$parent}" />
|
||||
|
||||
{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/contents/update' content_id='_ID_'}" />
|
||||
{/form_field}
|
||||
{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/content/update/_ID_' }" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='default_folder'}
|
||||
<input type="hidden" name="{$name}" value="{$folder_id}" />
|
||||
{/form_field}
|
||||
{form_field form=$form field='default_folder'}
|
||||
<input type="hidden" name="{$name}" value="{$parent}" />
|
||||
{/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">{$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="{$label}" placeholder="{intl l='Title'}">
|
||||
{form_field form=$form field='title'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$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="{$label}" placeholder="{intl l='Title'}">
|
||||
<span class="input-group-addon"><img src="{image file="assets/img/flags/{$CODE}.gif"}" alt="$TITLE" /></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="help-block">{intl l='Enter here the content name in the default language (%title)' title="$TITLE"}</div>
|
||||
<div class="help-block">{intl l='Enter here the content name in the default language (%title)' title="$TITLE"}</div>
|
||||
|
||||
{* Switch edition to the current locale *}
|
||||
<input type="hidden" name="edit_language_id" value="{$ID}" />
|
||||
{* 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}" />
|
||||
@@ -455,18 +460,18 @@
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-create-dialog.html"
|
||||
file = "includes/generic-create-dialog.html"
|
||||
|
||||
dialog_id = "content_creation_dialog"
|
||||
dialog_title = {intl l="Create a new content"}
|
||||
dialog_body = {$smarty.capture.content_creation_dialog nofilter}
|
||||
dialog_id = "content_creation_dialog"
|
||||
dialog_title = {intl l="Create a new content"}
|
||||
dialog_body = {$smarty.capture.content_creation_dialog nofilter}
|
||||
|
||||
dialog_ok_label = {intl l="Create this content"}
|
||||
dialog_ok_label = {intl l="Create this content"}
|
||||
|
||||
form_action = {url path='/admin/contents/create'}
|
||||
form_enctype = {form_enctype form=$form}
|
||||
form_error_message = $form_error_message
|
||||
}
|
||||
form_action = {url path='/admin/content/create'}
|
||||
form_enctype = {form_enctype form=$form}
|
||||
form_error_message = $form_error_message
|
||||
}
|
||||
{/form}
|
||||
|
||||
{* -- Delete folder confirmation dialog ----------------------------------- *}
|
||||
@@ -479,36 +484,36 @@
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
|
||||
dialog_id = "folder_delete_dialog"
|
||||
dialog_title = {intl l="Delete folder"}
|
||||
dialog_message = {intl l="Do you really want to delete this folder and all its content ?"}
|
||||
dialog_id = "folder_delete_dialog"
|
||||
dialog_title = {intl l="Delete folder"}
|
||||
dialog_message = {intl l="Do you really want to delete this folder and all its content ?"}
|
||||
|
||||
form_action = {url path='/admin/folders/delete'}
|
||||
form_content = {$smarty.capture.folder_delete_dialog nofilter}
|
||||
}
|
||||
form_action = {url path='/admin/folders/delete'}
|
||||
form_content = {$smarty.capture.folder_delete_dialog nofilter}
|
||||
}
|
||||
|
||||
{* -- Delete content confirmation dialog ------------------------------------ *}
|
||||
|
||||
{capture "content_delete_dialog"}
|
||||
<input type="hidden" name="content_id" id="content_delete_id" value="" />
|
||||
<input type="hidden" name="folder_id" value="{$folder_id}" />
|
||||
<input type="hidden" name="folder_id" value="{$parent}" />
|
||||
|
||||
{module_include location='content_delete_form'}
|
||||
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
|
||||
dialog_id = "content_delete_dialog"
|
||||
dialog_title = {intl l="Delete content"}
|
||||
dialog_message = {intl l="Do you really want to delete this content ?"}
|
||||
dialog_id = "content_delete_dialog"
|
||||
dialog_title = {intl l="Delete content"}
|
||||
dialog_message = {intl l="Do you really want to delete this content ?"}
|
||||
|
||||
form_action = {url path='/admin/contents/delete'}
|
||||
form_content = {$smarty.capture.content_delete_dialog nofilter}
|
||||
}
|
||||
form_action = {url path='/admin/content/delete'}
|
||||
form_content = {$smarty.capture.content_delete_dialog nofilter}
|
||||
}
|
||||
{/block}
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
@@ -536,23 +541,23 @@
|
||||
|
||||
// JS stuff for creation form
|
||||
{include
|
||||
file = "includes/generic-js-dialog.html"
|
||||
dialog_id = "folder_creation_dialog"
|
||||
form_name = "thelia.admin.folder.creation"
|
||||
}
|
||||
file = "includes/generic-js-dialog.html"
|
||||
dialog_id = "folder_creation_dialog"
|
||||
form_name = "thelia.admin.folder.creation"
|
||||
}
|
||||
|
||||
{include
|
||||
file = "includes/generic-js-dialog.html"
|
||||
dialog_id = "content_creation_dialog"
|
||||
form_name = "thelia.admin.content.creation"
|
||||
}
|
||||
file = "includes/generic-js-dialog.html"
|
||||
dialog_id = "content_creation_dialog"
|
||||
form_name = "thelia.admin.content.creation"
|
||||
}
|
||||
|
||||
{* Toggle object visibility *}
|
||||
|
||||
$(".folderVisibleToggle").on('switch-change', function(event, data) {
|
||||
$.ajax({
|
||||
url : "{url path='admin/folders/toggle-online'}",
|
||||
data : {
|
||||
data : {
|
||||
folder_id : $(this).data('id'),
|
||||
action : 'visibilityToggle'
|
||||
}
|
||||
@@ -562,7 +567,7 @@
|
||||
|
||||
$(".contentVisibleToggle").on('switch-change', function(event, data) {
|
||||
$.ajax({
|
||||
url : "{url path='admin/contents/toggle-online'}",
|
||||
url : "{url path='admin/content/toggle-online'}",
|
||||
data : {
|
||||
content_id : $(this).data('id'),
|
||||
action : 'visibilityToggle'
|
||||
@@ -570,9 +575,9 @@
|
||||
});
|
||||
});
|
||||
|
||||
{* Inline editing of object position using bootstrap-editable *}
|
||||
{* Inline editing of object position using bootstrap-editable *}
|
||||
|
||||
$('.folderPositionChange').editable({
|
||||
$('.folderPositionChange').editable({
|
||||
type : 'text',
|
||||
title : '{intl l="Enter new folder position"}',
|
||||
mode : 'popup',
|
||||
@@ -582,16 +587,16 @@
|
||||
// The URL template
|
||||
var url = "{url path='/admin/folders/update-position' folder_id='__ID__' position='__POS__'}";
|
||||
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id'))
|
||||
.replace('__POS__', newValue);
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id'))
|
||||
.replace('__POS__', newValue);
|
||||
|
||||
// Reload the page
|
||||
location.href = url;
|
||||
}
|
||||
});
|
||||
// Reload the page
|
||||
location.href = url;
|
||||
}
|
||||
});
|
||||
|
||||
$('.contentPositionChange').editable({
|
||||
$('.contentPositionChange').editable({
|
||||
type : 'text',
|
||||
title : '{intl l="Enter new content position"}',
|
||||
mode : 'popup',
|
||||
|
||||
167
templates/admin/default/image-edit.html
Normal file
167
templates/admin/default/image-edit.html
Normal file
@@ -0,0 +1,167 @@
|
||||
{extends file="admin-layout.tpl"}
|
||||
|
||||
{block name="page-title"}{intl l='Edit an image'}{/block}
|
||||
|
||||
{block name="check-permissions"}admin.image.edit{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="documents edit-image">
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
{loop type="image" name="image_edit" source="{$imageType}" id="{$imageId}" width="580" 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="{$redirectUrl}"}">{intl l="Image"}</a></li>
|
||||
<li>{intl l='Editing image "%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 image $TITLE"}
|
||||
</div>
|
||||
|
||||
<div class="form-container">
|
||||
<div class="col-md-12">
|
||||
|
||||
{form name="$formId"}
|
||||
<form method="POST" action="{url path="/admin/image/type/{$imageType}/{$ID}/update"}" {form_enctype form=$form} class="clearfix">
|
||||
|
||||
<div class="row inner-toolbar clearfix">
|
||||
<div class="col-md-6 inner-actions pull-right">
|
||||
<a href="{url path="{$redirectUrl}"}" class="btn btn-default btn-info">{intl l='Back'} <span class="glyphicon glyphicon-remove"></span></a>
|
||||
<button type="submit" name="save_mode" value="stay" class="btn btn-default btn-primary" title="{intl l='Save'}">{intl l='Save'} <span class="glyphicon glyphicon-ok"></span></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
<input type="hidden" name="{$name}" value="{url path="/admin/image/type/{$imageType}/{$ID}/update"}" />
|
||||
{/form_field}
|
||||
|
||||
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
|
||||
|
||||
<p class="title title-without-tabs">{intl l="Image informations"}</p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label">{intl l="Preview"} : </label>
|
||||
<p>
|
||||
<a href="{$ORIGINAL_IMAGE_URL}" alt="{$TITLE}" target="_blank">
|
||||
<img src="{$IMAGE_URL}" alt="{$TITLE}" class="img-thumbnail">
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
{form_field form=$form field='file'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
||||
<input type="file" id="{$label_attr.for}" name="{$name}" class="form-control" value="" title="{intl l="{$label}"}" placeholder="{intl l='File'}">
|
||||
</div>
|
||||
{/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="{$TITLE}" title="{intl l="{$label}"}" placeholder="{intl l='Title'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='chapo'}
|
||||
<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='Chapo'}">{$CHAPO}</textarea>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='postscriptum'}
|
||||
<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='Post Scriptum'}">{$POSTSCRIPTUM}</textarea>
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{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 wysiwyg" title="{intl l="{$label}"}" placeholder="{intl l='Description'}">{$DESCRIPTION}</textarea>
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row inner-toolbar clearfix">
|
||||
<div class="col-md-6 inner-actions pull-right">
|
||||
<a href="{url path="{$redirectUrl}"}" class="btn btn-default btn-info">{intl l='Back'} <span class="glyphicon glyphicon-remove"></span></a>
|
||||
<button type="submit" name="save_mode" value="stay" class="btn btn-default btn-primary" title="{intl l='Save'}">{intl l='Save'} <span class="glyphicon glyphicon-ok"></span></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
{/form}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="image_edit"}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="row inner-toolbar clearfix">
|
||||
<div class="col-md-6 inner-actions pull-right">
|
||||
<a href="{url path="{$redirectUrl}"}" class="btn btn-default btn-info">{intl l='Back'} <span class="glyphicon glyphicon-remove"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="alert alert-error">
|
||||
{intl l="Sorry, image ID=$imageId was not found."}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/elseloop}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
{javascripts file='assets/js/main.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
<script src="{url file='/tinymce/tinymce.min.js'}"></script>
|
||||
<script>
|
||||
tinymce.init({
|
||||
selector: ".wysiwyg",
|
||||
theme: "modern",
|
||||
menubar : false,
|
||||
language: "",
|
||||
plugins: [
|
||||
"advlist autolink link image lists charmap print preview hr anchor pagebreak",
|
||||
"searchreplace wordcount visualblocks visualchars insertdatetime media nonbreaking",
|
||||
"table contextmenu directionality emoticons paste textcolor filemanager"
|
||||
],
|
||||
toolbar1: "undo redo | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | styleselect | filemanager | link unlink anchor | image media | forecolor backcolor | print preview code ",
|
||||
image_advtab: true ,
|
||||
external_filemanager_path:"{url file='/tinymce/plugins/filemanager/'}'",
|
||||
filemanager_title:"{intl l='Files manager'}" ,
|
||||
external_plugins: { "filemanager" : "{url file='/tinymce/plugins/filemanager/plugin.min.js'}"}
|
||||
});
|
||||
</script>
|
||||
|
||||
{/block}
|
||||
@@ -1,8 +1,8 @@
|
||||
{* Breadcrumb for categories browsing and editing *}
|
||||
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="{url path='admin/home'}">Home</a></li>
|
||||
<li><a href="{url path='admin/catalog'}">Catalog</a></li>
|
||||
<li><a href="{url path='admin/home'}">{intl l="Home"}</a></li>
|
||||
<li><a href="{url path='admin/catalog'}">{intl l="Catalog"}</a></li>
|
||||
|
||||
{ifloop rel="category_path"}
|
||||
{loop name="category_path" type="category-path" visible="*" category=$category_id}
|
||||
|
||||
102
templates/admin/default/includes/content-folder-management.html
Normal file
102
templates/admin/default/includes/content-folder-management.html
Normal file
@@ -0,0 +1,102 @@
|
||||
<div class="form-container">
|
||||
<div class="row">
|
||||
{* -- Begin folders management ----------------------------------- *}
|
||||
<div class="col-md-6">
|
||||
<div class="well well-sm">
|
||||
<div class="form-group">
|
||||
<form method="POST" action="{url path='/admin/content/folder/add'}" id="related_content_form">
|
||||
|
||||
<p class="title title-without-tabs">{intl l='Additional categories'}</p>
|
||||
<p>{intl l='A content could be attached to more than one folder. Select here the additional fodlers for this content.'}
|
||||
{loop name="default_folder" type="folder" id=$DEFAULT_FOLDER}
|
||||
{intl l='You can change the default folder (%title) in the "General" tab.' title=$TITLE}
|
||||
{/loop}
|
||||
|
||||
{$exclude_from_tree = "-1"}
|
||||
{loop name="additional_folders" type="folder" exclude=$DEFAULT_FOLDER content=$content_id backend_context="1" lang="$edit_language_id"}
|
||||
{$exclude_from_tree = "$exclude_from_tree,$ID"}
|
||||
{/loop}
|
||||
<input type="hidden" name="content_id" value="{$content_id}" />
|
||||
<input type="hidden" name="current_tab" value="association" />
|
||||
|
||||
{ifloop rel="folders"}
|
||||
<div class="input-group">
|
||||
|
||||
<select name="additional_folder_id" id="additional_folder_id" class="form-control">
|
||||
<option value="">{intl l='Select a folder...'}</option>
|
||||
{loop name="folders" type="folder-tree" folder="0" exclude=$exclude_from_tree backend_context="1" lang="$edit_language_id"}
|
||||
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px" {if $DEFAULT_FOLDER==$ID}disabled="disabled"{/if}>
|
||||
{$TITLE} {if $DEFAULT_FOLDER==$ID}{intl l=' (default)'}{/if}
|
||||
</option>
|
||||
{/loop}
|
||||
</select>
|
||||
|
||||
<span class="input-group-btn" id="content_add_button">
|
||||
<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 a folder and click (+) to add it to the additional folder list'}</span>
|
||||
{/ifloop}
|
||||
|
||||
{elseloop rel="folders"}
|
||||
<div class="alert alert-info">{intl l="No Folders found"}</div>
|
||||
{/elseloop}
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{intl l='ID'}</th>
|
||||
|
||||
<th>{intl l='Folder title'}</th>
|
||||
|
||||
{module_include location='product_folders_table_header'}
|
||||
|
||||
<th class="actions">{intl l="Actions"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="additional_folders" type="folder" content=$content_id exclude=$DEFAULT_FOLDER backend_context="1" lang="$edit_language_id"}
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
|
||||
<td>
|
||||
{$TITLE}
|
||||
</td>
|
||||
|
||||
{module_include location='product_folders_table_row'}
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.product.category.delete"}
|
||||
<a class="btn btn-default btn-xs delete-folder" title="{intl l='Remove the product from this category'}" href="#delete_folder_dialog" data-id="{$ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="additional_folders"}
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<div class="alert alert-info">
|
||||
{intl l="This product doesn't belong to any additional folder."}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/elseloop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{* -- End folders management ------------------------------------- *}
|
||||
</div>
|
||||
</div>
|
||||
36
templates/admin/default/includes/document-upload-form.html
Normal file
36
templates/admin/default/includes/document-upload-form.html
Normal file
@@ -0,0 +1,36 @@
|
||||
{*
|
||||
A generic document upload form
|
||||
|
||||
Parameters:
|
||||
documentType = Document type (category, product, folder, content, module)
|
||||
parentId = Document parent id, ex: category id
|
||||
|
||||
*}
|
||||
|
||||
<div class="document-manager" >
|
||||
<form action="{url path="/admin/document/type/$documentType/$parentId/save-ajax"}" class="dropzone" id="documents-dropzone" enctype="multipart/form-data">
|
||||
<div class="fallback">
|
||||
<input name="file" type="file" />
|
||||
<button type="submit" class="btn btn-info btn-upload"><span class="glyphicon glyphicon-send"></span> {intl l="Send files"}</button>
|
||||
</div>
|
||||
|
||||
<div class="btn-browse hide">
|
||||
{intl l="Drop files to upload"}
|
||||
<span>Or</span>
|
||||
<button type="button" class="btn btn-info btn-upload"><span class="glyphicon glyphicon-upload"></span> {intl l="Browse files"}</button>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
<div class="existing-document">
|
||||
{include file='includes/document-upload-list-ajax.html'}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var documentDropZoneUrl = "{url path="/admin/document/type/$documentType/$parentId/save-ajax"}";
|
||||
var documentListUrl = "{url path="/admin/document/type/$documentType/$parentId/list-ajax"}";
|
||||
var documentListErrorMessage = "{intl l='Can\'t load documents, please refresh this page.'}";
|
||||
</script>
|
||||
@@ -0,0 +1,31 @@
|
||||
{*
|
||||
|
||||
A generic document upload form
|
||||
|
||||
Parameters:
|
||||
documentType = Document type (category, product, folder, content, module)
|
||||
parentId = Document parent id, ex: category id
|
||||
|
||||
*}
|
||||
|
||||
{ifloop rel="document"}
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
{loop type="document" name="document" source="{$documentType}" order="manual-reverse" source_id="{$parentId}"}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{$DOCUMENT_PATH}" title="{$TITLE}" class="" target="_blank">{$TITLE}</a>
|
||||
</td>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
<a class="document-update-btn btn btn-default btn-xs" href="{url path="/admin/document/type/$documentType/$ID/update"}" data-error-message="{intl l='Please retry'}">
|
||||
<span class="glyphicon glyphicon-edit"></span>
|
||||
</a>
|
||||
<a class="document-delete-btn btn btn-default btn-xs" href="{url path="/admin/document/type/$documentType/delete/$ID"}" data-error-message="{intl l='Please retry'}">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
</div>
|
||||
<td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</table>
|
||||
{/ifloop}
|
||||
@@ -1,26 +1,28 @@
|
||||
{* Breadcrumb for folders browsing and editing *}
|
||||
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="{url path='admin/home'}">Home</a></li>
|
||||
<li><a href="{url path='admin/folders'}">Folders</a>
|
||||
<li><a href="{url path='admin/home'}">{intl l="Home"}</a></li>
|
||||
<li><a href="{url path='admin/folders'}">{intl l="Folders"}</a></li>
|
||||
|
||||
{ifloop rel="folder_path"}</li>
|
||||
{ifloop rel="folder_path"}
|
||||
{loop name="folder_path" type="folder-path" visible="*" folder=$folder_id}
|
||||
{if $ID == $folder_id}
|
||||
{if $ID == $parent}
|
||||
<li class="active">
|
||||
{if $editing_folder == true}
|
||||
{intl l='Editing %fold' fold="{$TITLE}"}
|
||||
{else}
|
||||
{$TITLE} <a href="{url path='/admin/folders/update' folder_id=$ID}" title="{intl l='Edit this folder'}">{intl l="(edit)"}</a>
|
||||
{$TITLE} <a href="{url path="/admin/folders/update/$ID"}" title="{intl l='Edit this folder'}">{intl l="(edit)"}</a>
|
||||
{/if}
|
||||
</li>
|
||||
{else}
|
||||
<li><a href="{url path='/admin/folders' folder_id=" $ID" action='browse'}">{$TITLE}</a></li>
|
||||
<li><a href="{url path='/admin/folders' parent="$ID" }">{$TITLE}</a></li>
|
||||
{/if}
|
||||
{/loop}
|
||||
{/ifloop}
|
||||
|
||||
{elseloop rel="folder_path"}
|
||||
</li>
|
||||
{/elseloop}
|
||||
{if $editing_content == true}
|
||||
{loop name="content_path" type="content" visible="*" id=$content_id}
|
||||
<li>{intl l="Editing %title" title="$TITLE"}</li>
|
||||
{/loop}
|
||||
{/if}
|
||||
</ul>
|
||||
@@ -29,7 +29,7 @@ Parameters:
|
||||
{$dialog_message nofilter}
|
||||
</div>
|
||||
|
||||
<form method="{$form_method|default:POST}" action="{$form_action}" id="{$form_id}">
|
||||
<form method="{$form_method|default:POST}" action="{$form_action}" id="{$form_id|default:"{$dialog_id}_form"}">
|
||||
|
||||
{$form_content nofilter}
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@ A generic modal creation dialog template. Parameters
|
||||
form_action = The form action URL. Form is submitted when OK button is clicked
|
||||
form_enctype = The form encoding
|
||||
form_error_message = The form error message (optional)
|
||||
|
||||
ok_button_id (optionnal) = the id of the OK button
|
||||
*}
|
||||
<div class="modal fade" id="{$dialog_id}" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
|
||||
@@ -33,7 +35,7 @@ A generic modal creation dialog template. Parameters
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal" aria-hidden="true"><span class="glyphicon glyphicon-remove"></span> {$dialog_cancel_label|default:{intl l='Cancel'}}</button>
|
||||
<button type="submit" class="btn btn-default btn-primary"><span class="glyphicon glyphicon-check"></span> {$dialog_ok_label|default:{intl l='OK'}}</button>
|
||||
<button {if ! empty($ok_button_id)}id="{$ok_button_id}"{/if} type="submit" class="btn btn-default btn-primary"><span class="glyphicon glyphicon-check"></span> {$dialog_ok_label|default:{intl l='OK'}}</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
@@ -31,5 +31,5 @@ $('#{$dialog_id}').on('hidden.bs.modal', function() {
|
||||
$("#{$dialog_id} .error").removeClass('error');
|
||||
|
||||
// Empty field values
|
||||
$("#{$dialog_id} input[type=text]").val('');
|
||||
$("#{$dialog_id} input[type=text], #{$dialog_id} select").val('');
|
||||
});
|
||||
36
templates/admin/default/includes/image-upload-form.html
Normal file
36
templates/admin/default/includes/image-upload-form.html
Normal file
@@ -0,0 +1,36 @@
|
||||
{*
|
||||
A generic image upload form
|
||||
|
||||
Parameters:
|
||||
imageType = Image type (category, product, folder, content, module)
|
||||
parentId = Image parent id, ex: category id
|
||||
|
||||
*}
|
||||
|
||||
<div class="image-manager" >
|
||||
<form action="{url path="/admin/image/type/$imageType/$parentId/save-ajax"}" class="dropzone" id="images-dropzone" enctype="multipart/form-data">
|
||||
<div class="fallback">
|
||||
<input name="file" type="file" />
|
||||
<button type="submit" class="btn btn-info btn-upload"><span class="glyphicon glyphicon-send"></span> {intl l="Send files"}</button>
|
||||
</div>
|
||||
|
||||
<div class="btn-browse hide">
|
||||
{intl l="Drop files to upload"}
|
||||
<span>Or</span>
|
||||
<button type="button" class="btn btn-info btn-upload"><span class="glyphicon glyphicon-upload"></span> {intl l="Browse files"}</button>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
<div class="existing-image">
|
||||
{include file='includes/image-upload-list-ajax.html'}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var imageDropZoneUrl = "{url path="/admin/image/type/$imageType/$parentId/save-ajax"}";
|
||||
var imageListUrl = "{url path="/admin/image/type/$imageType/$parentId/list-ajax"}";
|
||||
var imageListErrorMessage = "{intl l='Can\'t load images, please refresh this page.'}";
|
||||
</script>
|
||||
30
templates/admin/default/includes/image-upload-list-ajax.html
Normal file
30
templates/admin/default/includes/image-upload-list-ajax.html
Normal file
@@ -0,0 +1,30 @@
|
||||
{*
|
||||
|
||||
A generic image upload form
|
||||
|
||||
Parameters:
|
||||
imageType = Image type (category, product, folder, content, module)
|
||||
parentId = Image parent id, ex: category id
|
||||
|
||||
*}
|
||||
|
||||
{ifloop rel="image"}
|
||||
<div class="row">
|
||||
{loop type="image" name="image" source="{$imageType}" order="manual-reverse" source_id="{$parentId}" width="200" height="100" resize_mode="borders"}
|
||||
<div class="col-sm-6 col-md-3" >
|
||||
<a href="{url path="/admin/image/type/$imageType/$ID/update"}" alt="{intl l='Update this image'}" class="thumbnail">
|
||||
<img src="{$IMAGE_URL}" alt="{$TITLE}">
|
||||
</a>
|
||||
|
||||
<div class="btn-group" >
|
||||
<a class="image-update-btn btn btn-default btn-xs" href="{url path="/admin/image/type/$imageType/$ID/update"}" data-error-message="{intl l='Please retry'}">
|
||||
<span class="glyphicon glyphicon-edit"></span>
|
||||
</a>
|
||||
<a class="image-delete-btn btn btn-default btn-xs" href="{url path="/admin/image/type/$imageType/delete/$ID"}" data-error-message="{intl l='Please retry'}">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{/loop}
|
||||
</div>
|
||||
{/ifloop}
|
||||
@@ -1,32 +1,50 @@
|
||||
{*
|
||||
A toolbar displayed in forms, to display language change flags, submit and close buttons.
|
||||
|
||||
Parameters:
|
||||
|
||||
- hide_submit_buttons: true / false. If true, only the close button will be deplayed.
|
||||
- show_currencies: true/false. If true, show the currency selection bar
|
||||
- page_url: the current page URL. Dafault id $current_url. Used to switchedition anguage.
|
||||
- close_url: no default. URL displayed when close button is clicked. If empty, the close button is not displayed.
|
||||
*}
|
||||
|
||||
<div class="row inner-toolbar">
|
||||
<div class="col-md-6 inner-actions">
|
||||
{* Display the top form toolbar, with edition flags, and save buttons *}
|
||||
|
||||
{* When creating a new object, only default language is displayed *}
|
||||
{if $action == 'create'}
|
||||
{$default_only = 1}
|
||||
{else}
|
||||
{$default_only = 0}
|
||||
{/if}
|
||||
|
||||
<div class="col-md-3 inner-actions">
|
||||
<ul class="nav nav-pills">
|
||||
{loop name="lang_list" type="lang" default_only={$default_only}}
|
||||
{loop name="lang_list" type="lang"}
|
||||
<li {if $ID == $edit_language_id}class="active"{/if}>
|
||||
<a href="{url path=$current_url edit_language_id=$ID}" title="{intl l="Edit information in %lng" lng=$TITLE}">
|
||||
<a href="{url path={$page_url|default:$current_url} edit_language_id=$ID}" title="{intl l='Edit information in %lng' lng=$TITLE}">
|
||||
<img src="{image file="../assets/img/flags/{$CODE}.gif"}" alt="{intl l=$TITLE}" />
|
||||
</a>
|
||||
</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 inner-actions">
|
||||
<div class="col-md-3 inner-actions">
|
||||
{if $show_currencies == true}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="button-group">
|
||||
{loop name="currency_list" type="currency"}
|
||||
<a class="btn btn-sm {if $ID == $edit_currency_id}btn-primary{else}btn-default{/if}" href="{url noamp=1 path='/admin/products/update' edit_currency_id=$ID product_id=$product_id current_tab='details'}" title="{intl l='Edit prices in %curr' curr=$NAME}">
|
||||
{$SYMBOL}
|
||||
</a>
|
||||
{/loop}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 inner-actions">
|
||||
{if $hide_submit_buttons != true}
|
||||
<button type="submit" name="save_mode" value="stay" class="btn btn-default btn-success" title="{intl l='Save'}">{intl l='Save'} <span class="glyphicon glyphicon-ok"></span></button>
|
||||
<button type="submit" name="save_mode" value="close" class="btn btn-default btn-info" title="{intl l='Save and close'}">{intl l='Save and close'} <span class="glyphicon glyphicon-remove"></span></button>
|
||||
<button type="submit" name="save_mode" value="stay" class="btn btn-default btn-success" title="{intl l='Save'}">{intl l='Save'} <span class="glyphicon glyphicon-ok"></span></button>
|
||||
<button type="submit" name="save_mode" value="close" class="btn btn-default btn-info" title="{intl l='Save and close'}">{intl l='Save and close'} <span class="glyphicon glyphicon-remove"></span></button>
|
||||
{/if}
|
||||
{if ! empty($close_url)}
|
||||
<a href="{$close_url}" class="btn btn-default">{intl l='Close'} <span class="glyphicon glyphicon-remove"></span></a>
|
||||
<a href="{$close_url}" class="btn btn-default">{intl l='Close'} <span class="glyphicon glyphicon-remove"></span></a>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
389
templates/admin/default/includes/product-details-tab.html
Normal file
389
templates/admin/default/includes/product-details-tab.html
Normal file
@@ -0,0 +1,389 @@
|
||||
<div class="form-container">
|
||||
|
||||
{loop name="product.sales.elements.test" type="product_sale_elements" product=$product_id currency=$edit_currency_id backend_context="1"}
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="product.sales.elements.test"}
|
||||
{form name="thelia.admin.product.details.modification"}
|
||||
<form method="POST" action="{url path='/admin/product/default-price/update'}" {form_enctype form=$form} class="clearfix">
|
||||
|
||||
{include
|
||||
file = "includes/inner-form-toolbar.html"
|
||||
hide_submit_buttons = false
|
||||
show_currencies = true
|
||||
|
||||
page_url = "{url path='/admin/products/update' product_id=$ID}"
|
||||
close_url = "{url path='/admin/categories' category_id=$DEFAULT_CATEGORY}"
|
||||
}
|
||||
|
||||
{* Be sure to get the product ID, even if the form could not be validated *}
|
||||
<input type="hidden" name="product_id" value="{$product_id}" />
|
||||
|
||||
<input type="hidden" name="current_tab" value="details" />
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{form_field form=$form field='id'}
|
||||
<input type="hidden" name="{$name}" value="{$value}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/categories' category_id=$DEFAULT_CATEGORY}" />
|
||||
{/form_field}
|
||||
|
||||
{loop type="currency" name="product-currency" id=$edit_currency_id backend_context="1"}
|
||||
|
||||
{$currency_symbol = $SYMBOL}
|
||||
{$currency_name = $NAME}
|
||||
|
||||
{form_field form=$form field='currency'}
|
||||
<input type="hidden" name="{$name}" value="{$ID}" />
|
||||
{/form_field}
|
||||
{/loop}
|
||||
|
||||
<p class="title title-without-tabs">{intl l='Default pricing'}</p>
|
||||
|
||||
<p>{intl l="The default pricing is used with product that do not have any combinations. It is also used for product with combinations which share the same pricing information"}</p>
|
||||
|
||||
<div class="row">
|
||||
|
||||
{* -- Pricing ------------------------------------------------------- *}
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="well well-sm">
|
||||
<p class="title title-without-tabs">{intl l='Pricing'}</p>
|
||||
|
||||
<p></p> <!-- LAME !!! FIXME -->
|
||||
|
||||
{form_field form=$form field='price'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
|
||||
<div class="input-group">
|
||||
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Product price'}">
|
||||
<span class="input-group-addon">{$currency_symbol}</span>
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='tax_rule'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
<div class="form-group">
|
||||
<select id="{$label_attr.for}" required="required" name="{$name}" class="form-control">
|
||||
<option value="">{intl l="Select a tax tule"}</option>
|
||||
{loop name="tax" type="tax-rule" backend_context="1"}
|
||||
<option value="{$ID}" {if $IS_DEFAULT}selected="selected"{/if}>{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='price_with_tax'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
<div class="input-group">
|
||||
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Product price'}">
|
||||
<span class="input-group-addon">{$currency_symbol}</span>
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{module_include location='product_details_pricing_form'}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{* -- Promotion ------------------------------------------------- *}
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="well well-sm">
|
||||
<p class="title title-without-tabs">{intl l='Promotion'}</p>
|
||||
|
||||
{form_field form=$form field='sale_price'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
|
||||
<div class="input-group">
|
||||
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Product price'}">
|
||||
<span class="input-group-addon">{$currency_symbol}</span>
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='onsale'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" id="{$label_attr.for}" name="{$name}" value="1" {if $value != 0}checked="checked"{/if}>
|
||||
{$label}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='isnew'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" id="{$label_attr.for}" name="{$name}" value="1" {if $value != 0}checked="checked"{/if}>
|
||||
{$label}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{module_include location='product_details_promotion_form'}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{* -- Shipping -------------------------------------------------- *}
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="well well-sm">
|
||||
<p class="title title-without-tabs">{intl l='Shipping'}</p>
|
||||
|
||||
{form_field form=$form field='weight'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
|
||||
<div class="input-group">
|
||||
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Product weight'}">
|
||||
<span class="input-group-addon">{intl l="Kg"}</span>
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{module_include location='product_details_shipping_form'}
|
||||
|
||||
<p class="title title-without-tabs">{intl l='Quantity'}</p>
|
||||
|
||||
{form_field form=$form field='quantity'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
|
||||
<div class="form-group">
|
||||
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Current quantity'}">
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{module_include location='product_details_quantity_form'}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{/form}
|
||||
{/elseloop}
|
||||
|
||||
{* -- Attribute combinations -------------------------------------------- *}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
{ifloop rel="product.sales.elements"}
|
||||
<form method="POST" action="{url path='/admin/product/combinations/update'}">
|
||||
|
||||
{include
|
||||
file = "includes/inner-form-toolbar.html"
|
||||
hide_submit_buttons = false
|
||||
show_currencies = true
|
||||
page_url = "{url path='/admin/products/update' product_id=$ID}"
|
||||
close_url = "{url path='/admin/categories' category_id=$DEFAULT_CATEGORY}"
|
||||
}
|
||||
|
||||
{module_include location='product_before_combinations'}
|
||||
|
||||
<table class="table table-striped table-condensed" id="category_list">
|
||||
<caption>
|
||||
{intl l='Attribute Combinations'}
|
||||
|
||||
{module_include location='product_combinations_list_caption'}
|
||||
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.products.update"}
|
||||
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new combination'}" href="#combination_creation_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</caption>
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{intl l='Attributes'}</th>
|
||||
<th class="text-center">{intl l='Quantity'}</th>
|
||||
<th class="text-center">{intl l='Price<br />w/o taxes (%currency)' currency=$currency_symbol}</th>
|
||||
<th class="text-center">{intl l='Price<br />w/ taxes (%currency)' currency=$currency_symbol}</th>
|
||||
<th class="text-center">{intl l='Weight (Kg)'}</th>
|
||||
<th class="text-center">{intl l='Default'}</th>
|
||||
<th class="text-center">{intl l='Is new'}</th>
|
||||
<th class="text-center">{intl l='On sale'}</th>
|
||||
<th class="text-center">{intl l='Sale price<br />w/o taxes (%currency)' currency=$currency_symbol}</th>
|
||||
<th class="text-center">{intl l='Sale price<br />w/ taxes (%currency)' currency=$currency_symbol}</th>
|
||||
<th class="actions">{intl l='Actions'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="product.sales.elements" type="product_sale_elements" product=$product_id currency=$edit_currency_id backend_context="1"}
|
||||
<tr>
|
||||
<td>
|
||||
{loop name="product.sales.elements.combinations" type="attribute_combination" product_sale_elements=$ID backend_context="1"}
|
||||
{$ATTRIBUTE_TITLE}
|
||||
{/loop}
|
||||
</td>
|
||||
|
||||
<td><input class="form-control text-right" type="text" name="quantity[{$ID}]" value="{$QUANTITY}" /></td>
|
||||
<td><input class="form-control text-right" type="text" name="price_wo_taxes[{$ID}]" value="{format_number number=$PRICE}" /></td>
|
||||
<td><input class="form-control text-right" type="text" name="price_w_taxes[{$ID}]" value="{format_number number=$TAXED_PRICE}" /></td>
|
||||
<td><input class="form-control text-right" type="text" name="weight[{$ID}]" value="{$WEIGHT}" /></td>
|
||||
|
||||
<td class="text-center">
|
||||
<input class="form-control" type="radio" name="default" value="{$ID}" {if $IS_DEFAULT}checked="checked"{/if}/>
|
||||
</td>
|
||||
|
||||
<td class="text-center">
|
||||
<input class="form-control" type="checkbox" name="on_sale[{$ID}]" value="{$ID}" {if $IS_PROMO}checked="checked"{/if}/>
|
||||
</td>
|
||||
|
||||
<td class="text-center">
|
||||
<input class="form-control" type="checkbox" name="is_new[{$ID}]" value="{$ID}" {if $IS_NEW}checked="checked"{/if}/>
|
||||
</td>
|
||||
|
||||
<td><input class="form-control text-right" type="text" name="sale_price_wo_taxes[{$ID}]" value="{format_number number=$PROMO_PRICE}" /></td>
|
||||
<td><input class="form-control text-right" type="text" name="sale_price_w_taxes[{$ID}]" value="{format_number number=$TAXED_PROMO_PRICE}" /></td>
|
||||
|
||||
<td class="actions">
|
||||
<a class="btn btn-default btn-xs combination-delete" title="{intl l='Delete this combination'}" href="#combination_delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{module_include location='product_after_combinations'}
|
||||
</form>
|
||||
|
||||
{/ifloop}
|
||||
|
||||
{elseloop rel="product.sales.elements"}
|
||||
<p class="title title-without-tabs">{intl l='Attribute Combinations'}</p>
|
||||
|
||||
<div class="alert alert-info">
|
||||
{intl
|
||||
l='This product has no combination. The default price is used. <a data-toggle="modal" href="%url">Click here to create a new combination</a>'
|
||||
url='#combination_creation_dialog'
|
||||
}
|
||||
</div>
|
||||
{/elseloop}
|
||||
|
||||
{module_include location='product_after_combinations'}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* -- Adding a new combination ------------------------------------------------- *}
|
||||
|
||||
{* Capture the dialog body, to pass it to the generic dialog *}
|
||||
|
||||
{capture "combination_creation_dialog"}
|
||||
|
||||
<input type="hidden" name="product_id" value="{$product_id}" />
|
||||
<input type="hidden" name="current_tab" value="details" />
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label">{intl l="Attribute"} : </label>
|
||||
<select name="attribute_id" id="attribute_id" class="form-control">
|
||||
<option value="">{intl l='Select an attribute...'}</option>
|
||||
{loop name="product-attributes" type="attribute" product=$product_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 view available values'}</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="attribute_value_selector" class="hide">
|
||||
<div class="input-group">
|
||||
{* <label class="control-label">{intl l="Attribute values"} : </label> *}
|
||||
|
||||
<select rname="attribute_value_id" id="attribute_value_id" class="form-control">
|
||||
<option value="">{intl l='Select an attribute value...'}</option>
|
||||
</select>
|
||||
|
||||
<span class="input-group-btn" id="add_attr_value_button">
|
||||
<button class="btn btn-default btn-primary action-btn add-value-to-combination" type="button"><span class="glyphicon glyphicon-plus-sign"></span></button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<span class="help-block">{intl l='Select a value click (+) to add it to the combination'}</span>
|
||||
</div>
|
||||
|
||||
<div id="attribute_value_selector_empty" class="hide">
|
||||
<div class="alert alert-info">
|
||||
{intl l="No available value for this attribute"}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="alert alert-danger hide" id="combination_attributes_error"></div>
|
||||
|
||||
<select required="required" multiple="multiple" size="5" name="combination_attributes[]" id="combination_attributes" class="form-control">
|
||||
</select>
|
||||
|
||||
<div class="help-block">
|
||||
{intl l='To remove a value from the combination, select it and click "remove"'}
|
||||
|
||||
<div class="pull-right">
|
||||
<button class="btn btn-info btn-xs remove-value-from-combination" type="button">
|
||||
{intl l="Remove selected values"} <span class="glyphicon glyphicon-minus-sign"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-create-dialog.html"
|
||||
|
||||
dialog_id = "combination_creation_dialog"
|
||||
dialog_title = {intl l="Create a new combination"}
|
||||
dialog_body = {$smarty.capture.combination_creation_dialog nofilter}
|
||||
|
||||
dialog_ok_label = {intl l="Create this combination"}
|
||||
|
||||
form_action = {url path='/admin/product/combination/add'}
|
||||
form_enctype = ''
|
||||
form_error_message = ''
|
||||
|
||||
ok_button_id = "combination_creation_dialog_ok"
|
||||
}
|
||||
|
||||
|
||||
{* -- Delete combination confirmation dialog ----------------------------------- *}
|
||||
|
||||
{capture "combination_delete_dialog"}
|
||||
|
||||
<input type="hidden" name="product_id" value="{$product_id}" />
|
||||
<input type="hidden" name="current_tab" value="details" />
|
||||
|
||||
<input type="hidden" name="product_sale_element_id" id="combination_delete_id" value="" />
|
||||
|
||||
{module_include location='category_delete_form'}
|
||||
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
|
||||
dialog_id = "combination_delete_dialog"
|
||||
dialog_title = {intl l="Delete a combunation"}
|
||||
dialog_message = {intl l="Do you really want to delete this combination ?"}
|
||||
|
||||
form_action = {url path='/admin/product/combination/delete'}
|
||||
form_content = {$smarty.capture.combination_delete_dialog nofilter}
|
||||
}
|
||||
112
templates/admin/default/includes/product-general-tab.html
Normal file
112
templates/admin/default/includes/product-general-tab.html
Normal file
@@ -0,0 +1,112 @@
|
||||
<div class="form-container">
|
||||
|
||||
{form name="thelia.admin.product.modification"}
|
||||
<form method="POST" action="{url path='/admin/products/save'}" {form_enctype form=$form} class="clearfix">
|
||||
|
||||
{include
|
||||
file = "includes/inner-form-toolbar.html"
|
||||
hide_submit_buttons = false
|
||||
|
||||
page_url = "{url path='/admin/products/update' product_id=$ID}"
|
||||
close_url = "{url path='/admin/categories' category_id=$DEFAULT_CATEGORY}"
|
||||
}
|
||||
|
||||
{* Be sure to get the product ID, even if the form could not be validated *}
|
||||
<input type="hidden" name="product_id" value="{$product_id}" />
|
||||
|
||||
<input type="hidden" name="current_tab" value="general" />
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{form_field form=$form field='id'}
|
||||
<input type="hidden" name="{$name}" value="{$value}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/categories' category_id=$DEFAULT_CATEGORY}" />
|
||||
{/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}
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label">
|
||||
{intl l='Product reference'} :
|
||||
</label>
|
||||
|
||||
<div class="well well-sm">{$REF}</div>
|
||||
|
||||
{form_field form=$form field='ref'}
|
||||
<input type="hidden" name="{$name}" value="{$value}" />
|
||||
{/form_field}
|
||||
|
||||
</div>
|
||||
|
||||
{include file="includes/standard-description-form-fields.html"}
|
||||
|
||||
{form_field form=$form field='url'}
|
||||
<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}" required="required" name="{$name}" value="{$value}" title="{intl l='Rewritten URL'}" placeholder="{intl l='Rewriten URL'}" class="form-control">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
{form_field form=$form field='default_category'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
|
||||
<label for="{$label_attr.for}" class="control-label">
|
||||
{intl l="{$label}"} :
|
||||
</label>
|
||||
|
||||
<select id="{$label_attr.for}" required="required" name="{$name}" class="form-control">
|
||||
<option value="0">{intl l="Top level"}</option>
|
||||
|
||||
{loop name="cat-parent" type="category-tree" category="0" visible="*" product="0"}
|
||||
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px" {if $DEFAULT_CATEGORY == $ID}selected="selected"{/if}>{$TITLE}</option>
|
||||
{/loop}
|
||||
|
||||
</select>
|
||||
<span class="help-block">{intl l='You can attach this product to more categories in the details tab.'}</span>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
{form_field form=$form field='visible'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l='Visibility'}</label>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" id="{$label_attr.for}" name="{$name}" value="1" {if $value != 0}checked="checked"{/if}>
|
||||
{$label}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="control-group">
|
||||
<label> </label>
|
||||
<div class="controls">
|
||||
<p>{intl l='Product created on %date_create. Last modification: %date_change' date_create="{format_date date=$CREATE_DATE}" date_change="{format_date date=$UPDATE_DATE}"}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
{/form}
|
||||
</div>
|
||||
@@ -1,4 +1,6 @@
|
||||
{* The standard description fields, used by many Thelia objects *}
|
||||
{*
|
||||
The standard description fields, used by many Thelia objects
|
||||
*}
|
||||
|
||||
{form_field form=$form field='title'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
@@ -22,7 +24,7 @@
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">
|
||||
{intl l="{$label}"} :
|
||||
<span class="label-help-block">{intl l="The détailed description."}</span>
|
||||
<span class="label-help-block">{intl l="The detailed description."}</span>
|
||||
</label>
|
||||
|
||||
<textarea name="{$name}" id="{$label_attr.for}" rows="10" class="form-control wysiwyg">{$value}</textarea>
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
{block name="check-permissions"}admin.order.edit{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
|
||||
{assign oder_tab {$smarty.get.tab|default:"cart"}}
|
||||
|
||||
<div class="orders edit-order">
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
@@ -17,325 +20,327 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="general-block-decorator">
|
||||
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#cart" data-toggle="tab"><span class="glyphicon glyphicon-shopping-cart"></span> {intl l="Cart"}</a></li>
|
||||
<li><a href="#bill" data-toggle="tab"><span class="glyphicon glyphicon-list-alt"></span> {intl l="Bill"}</a></li>
|
||||
<li><a href="#carriage" data-toggle="tab"><span class="glyphicon glyphicon-send"></span> {intl l="Carriage"}</a></li>
|
||||
<li><a href="#settlement" data-toggle="tab"><span class="glyphicon glyphicon-credit-card"></span> {intl l="Settlement"}</a></li>
|
||||
<li><a href="#address" data-toggle="tab"><span class="glyphicon glyphicon-home"></span> {intl l="Address"}</a></li>
|
||||
<li><a href="#supplements" data-toggle="tab"><span class="glyphicon glyphicon-info-sign"></span> {intl l="Further information"}</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade active in" id="cart">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<caption class="clearfix">
|
||||
{intl l='Information about order 01201303540354'}
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{intl l="Designation"}</th>
|
||||
<th>{intl l="Price"}</th>
|
||||
<th>{intl l="Quantity"}</th>
|
||||
<th>{intl l="Total"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<div class="general-block-decorator">
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="#">T-Shirt F T1</a></td>
|
||||
<td>20.00 €</td>
|
||||
<td>3</td>
|
||||
<td>60.00 €</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#">T-Shirt F T1</a></td>
|
||||
<td>20.00 €</td>
|
||||
<td>3</td>
|
||||
<td>60.00 €</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="#">T-Shirt F T1</a></td>
|
||||
<td>20.00 €</td>
|
||||
<td>3</td>
|
||||
<td>60.00 €</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr class="active">
|
||||
<td colspan="3"><strong>Total</strong></td>
|
||||
<td><strong>180.00 €</strong></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div> <!-- #cart -->
|
||||
{ifloop rel='the-order'}
|
||||
|
||||
<div class="tab-pane fade" id="bill">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<caption>
|
||||
{intl l='Information about the bill'}
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{intl l="Bill n°"}</th>
|
||||
<th>{intl l="Compagny"}</th>
|
||||
<th>{intl l="Firstname & Lastname"}</th>
|
||||
<th>{intl l="Date & Hour"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{loop type="order" name="the-order" id=$order_id customer="*"}
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="#">0001</a></td>
|
||||
<td>Thelia</td>
|
||||
<td>Dupont Jean</td>
|
||||
<td>11/01/2013 14:11:00</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div> <!-- #bill -->
|
||||
{loop type="currency" name="order-currency" id=$CURRENCY}
|
||||
{assign "orderCurrency" $SYMBOL}
|
||||
{/loop}
|
||||
|
||||
<div class="tab-pane fade" id="carriage">
|
||||
<p class="title title-without-tabs clearfix">
|
||||
{intl l='Information about the carriage'}
|
||||
<a class="btn btn-default btn-primary pull-right" title="{intl l='Download pdf bill'}" href="#">
|
||||
<span class="glyphicon glyphicon-cloud-download"></span> {intl l='Download pdf bill'}
|
||||
</a>
|
||||
</p>
|
||||
{assign "orderStatusId" $STATUS}
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>{intl l="Mode of transportation"}</dt>
|
||||
<dd>Colissimo</dd>
|
||||
</dl>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>{intl l="Description"}</dt>
|
||||
<dd>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ut, error, necessitatibus ipsam dolores ad quisquam provident sed repudiandae ullam quasi quae perferendis numquam voluptates doloribus laborum possimus dicta similique in?</dd>
|
||||
</dl>
|
||||
</div> <!-- #carriage -->
|
||||
<div class="lead clearfix">
|
||||
<span class='label label-default pull-left'>{$REF}</span>
|
||||
<div class="pull-right select-fixed-width">
|
||||
<form id="order-update-status-form" action="{url path="/admin/order/update/$ID/status"}" method="post">
|
||||
<input class="js-current-tab" type="hidden" name="tab" value="{$oder_tab}">
|
||||
<select class="js-update-order-status" name="status_id" data-toggle="selectpicker">
|
||||
{loop type="order-status" name="all-status"}
|
||||
{assign "orderStatusLabel" "order_$CODE"}
|
||||
<option {if $ID == $orderStatusId}selected="selected" {/if} value="{$ID}" data-content="<span class='label label-{#$orderStatusLabel#}'>{$TITLE}</span>">{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="settlement">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<caption class="clearfix">
|
||||
{intl l='Information about the settlement'}
|
||||
</caption>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{intl l="Type of payment"}</th>
|
||||
<td>Unknown</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{intl l="Transaction reference"}</th>
|
||||
<td>141100</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{intl l="Total order before discount"}</th>
|
||||
<td>60 €</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{intl l="Discount"}</th>
|
||||
<td>10%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{intl l="Coupon code"}</th>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{intl l="Total with discount"}</th>
|
||||
<td>50 €</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{intl l="Freight"}</th>
|
||||
<td>6 €</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{intl l="Total"}</th>
|
||||
<td>56 €</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div> <!-- #settlement -->
|
||||
<ul class="nav nav-tabs clearfix">
|
||||
<li {if $oder_tab == 'cart'}class="active"{/if}><a href="#cart" data-tab-name="cart" data-toggle="tab"><span class="glyphicon glyphicon-shopping-cart"></span> {intl l="Ordered products"}</a></li>
|
||||
<li {if $oder_tab == 'bill'}class="active"{/if}><a href="#bill" data-tab-name="bill" data-toggle="tab"><span class="glyphicon glyphicon-list-alt"></span> {intl l="Invoice and Delivery"}</a></li>
|
||||
|
||||
<div class="tab-pane fade clearfix" id="address">
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<caption class="clearfix">
|
||||
{intl l='Billing address'}
|
||||
<a class="btn btn-default btn-primary pull-right" title="{intl l='Edit this billing address'}" href="#edit_address_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-edit"></span>
|
||||
</a>
|
||||
</caption>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{intl l="Title"}</th>
|
||||
<td>Mr</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{intl l="Compagny"}</th>
|
||||
<td>Thelia</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{intl l="Firstname"}</th>
|
||||
<td>Espeche</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{intl l="Lastname"}</th>
|
||||
<td>Michaël</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{intl l="Street address"}</th>
|
||||
<td>5, rue Rochon</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{intl l="Additional address"}</th>
|
||||
<td>Lorem ipsum dolor sit amet</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{intl l="Additional address"}</th>
|
||||
<td>Lorem ipsum dolor sit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{intl l="Zip code"}</th>
|
||||
<td>63000</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{intl l="City"}</th>
|
||||
<td>Clermont-Fd</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{intl l="Country"}</th>
|
||||
<td>France</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{intl l="Phone"}</th>
|
||||
<td>01 02 03 04 05</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<caption class="clearfix">
|
||||
{intl l='Delivery address'}
|
||||
<a class="btn btn-default btn-primary pull-right" title="{intl l='Edit this delivery address'}" href="#edit_address_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-edit"></span>
|
||||
</a>
|
||||
</caption>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{intl l="Title"}</th>
|
||||
<td>Mr</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{intl l="Compagny"}</th>
|
||||
<td>Thelia</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{intl l="Firstname"}</th>
|
||||
<td>Espeche</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{intl l="Lastname"}</th>
|
||||
<td>Michaël</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{intl l="Street address"}</th>
|
||||
<td>5, rue Rochon</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{intl l="Additional address"}</th>
|
||||
<td>Lorem ipsum dolor sit amet</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{intl l="Additional address"}</th>
|
||||
<td>Lorem ipsum dolor sit</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{intl l="Zip code"}</th>
|
||||
<td>63000</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{intl l="City"}</th>
|
||||
<td>Clermont-Fd</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{intl l="Country"}</th>
|
||||
<td>France</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{intl l="Phone"}</th>
|
||||
<td>01 02 03 04 05</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> <!-- #address -->
|
||||
|
||||
<div class="tab-pane fade clearfix" id="supplements">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<caption>
|
||||
{intl l='Further information'}
|
||||
</caption>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><label for="">{intl l='Status'}</label></th>
|
||||
<td>
|
||||
<form action="" method="">
|
||||
<div class="row">
|
||||
<div class="col-lg-4">
|
||||
<select name="" id="" class="form-control">
|
||||
<option value="">Status 1</option>
|
||||
<option value="">Status 2</option>
|
||||
<option value="">Status 3</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="">{intl l='Order Tracking'}</label></th>
|
||||
<td>
|
||||
<form action="" method="">
|
||||
<div class="row">
|
||||
<div class="col-lg-4">
|
||||
<input type="text" id="" name="" class="form-control" value="" title="" placeholder="">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-ok"></span></button>
|
||||
</div>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{intl l='Bill'}</th>
|
||||
<td><a href="#" class="btn btn-default btn-primary"><span class="glyphicon glyphicon-cloud-download"></span> {intl l='Download bill to pdf'}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{intl l='Delivery'}</th>
|
||||
<td><a href="#" class="btn btn-default btn-primary"><span class="glyphicon glyphicon-cloud-download"></span> {intl l='Download delivery to pdf'}</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div> <!-- #supplements -->
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade {if $oder_tab == 'cart'}active in{/if}" id="cart">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<caption class="clearfix">
|
||||
{intl l='Cart'}
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-7">{intl l="Product"}</th>
|
||||
<th class="col-md-1">{intl l="Unit. price"}</th>
|
||||
<th class="col-md-1">{intl l="Tax"}</th>
|
||||
<th class="col-md-1">{intl l="Unit taxed price"}</th>
|
||||
<th class="col-md-1">{intl l="Quantity"}</th>
|
||||
<th class="col-md-1">{intl l="Taxed total"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
</div>
|
||||
<tbody>
|
||||
{loop type="order_product" name="order-products" order=$ID}
|
||||
{if $WAS_IN_PROMO == 1}
|
||||
{assign "realPrice" $PROMO_PRICE}
|
||||
{assign "realTax" $PROMO_PRICE_TAX}
|
||||
{assign "realTaxedPrice" $TAXED_PROMO_PRICE}
|
||||
{else}
|
||||
{assign "realPrice" $PRICE}
|
||||
{assign "realTax" $PRICE_TAX}
|
||||
{assign "realTaxedPrice" $TAXED_PRICE}
|
||||
{/if}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="#">{$TITLE}</a>
|
||||
{ifloop rel="combinations"}
|
||||
<dl class="dl-horizontal">
|
||||
{loop type="order_product_attribute_combination" name="combinations" order_product=$ID}
|
||||
<dt>{$ATTRIBUTE_TITLE}</dt>
|
||||
<dd>{$ATTRIBUTE_AVAILABILITY_TITLE}</dd>
|
||||
{/loop}
|
||||
</dl>
|
||||
{/ifloop}
|
||||
</td>
|
||||
<td>{$orderCurrency} {$realPrice}</td>
|
||||
<td>{$orderCurrency} {$realTax}</td>
|
||||
<td>{$orderCurrency} {$realTaxedPrice}</td>
|
||||
<td>{$QUANTITY}</td>
|
||||
<td>{$orderCurrency} {$realTaxedPrice * $QUANTITY}</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
<tbody class="table-condensed">
|
||||
<tr class="active">
|
||||
<td colspan="2" class="td-unstyled"></td>
|
||||
<td colspan="3"><strong>{intl l="Total without discount"}</strong></td>
|
||||
<td><strong>{$orderCurrency} {$TOTAL_TAXED_AMOUNT-$POSTAGE}</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="td-unstyled"></td>
|
||||
<td colspan="3"><strong>{intl l="Discount"}</strong></td>
|
||||
<td><strong>{$orderCurrency} 0</strong></td>
|
||||
</tr>
|
||||
<tr class="active">
|
||||
<td colspan="2" class="td-unstyled"></td>
|
||||
<td colspan="3"><strong>{intl l="Coupon code"}</strong></td>
|
||||
<td><strong>{$orderCurrency} 0</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="td-unstyled"></td>
|
||||
<td colspan="3"><strong>{intl l="Total including discount"}</strong></td>
|
||||
<td><strong>{$orderCurrency} {$TOTAL_TAXED_AMOUNT-$POSTAGE}</strong></td>
|
||||
</tr>
|
||||
<tr class="active">
|
||||
<td colspan="2" class="td-unstyled"></td>
|
||||
<td colspan="3"><strong>{intl l="Postage"}</strong></td>
|
||||
<td><strong>{$orderCurrency} {$POSTAGE}</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="td-unstyled"></td>
|
||||
<td colspan="3" class="last"><strong>{intl l="Total"}</strong></td>
|
||||
<td class="last"><strong>{$orderCurrency} {$TOTAL_TAXED_AMOUNT}</strong></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<caption class="clearfix">
|
||||
{intl l='Payment information'}
|
||||
</caption>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{intl l="Payment module"}</th>
|
||||
<td>{loop name="payment-module" type="module" id=$PAYMENT_MODULE}{$TITLE}{/loop}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{intl l="Transaction reference"}</th>
|
||||
<td>{$TRANSACTION_REF}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div> <!-- #cart -->
|
||||
|
||||
<div class="tab-pane fade {if $oder_tab == 'bill'}active in{/if} clearfix" id="bill">
|
||||
|
||||
<div class="title title-without-tabs clearfix">
|
||||
{intl l='Delivery module'}
|
||||
<div class="pull-right col-md-3">
|
||||
<form action="{url path="/admin/order/update/$ID/delivery-ref"}" method="post">
|
||||
<input class="js-current-tab" type="hidden" name="tab" value="{$oder_tab}">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" name="delivery_ref" value="{$DELIVERY_REF}" placeholder="{intl l="tracking reference"}"/>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default btn-primary"><span class="glyphicon glyphicon-check"></span></button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{loop name="payment-module" type="module" id=$DELIVERY_MODULE}
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>{intl l="Name"}</dt>
|
||||
<dd>{$TITLE}</dd>
|
||||
</dl>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>{intl l="Description"}</dt>
|
||||
<dd>{$DESCRIPTION}</dd>
|
||||
</dl>
|
||||
|
||||
{/loop}
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<caption class="clearfix">
|
||||
{intl l='Invoice informations'}
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-default btn-primary" title="{intl l='Download invoice as PDF'}" href="#">
|
||||
<span class="glyphicon glyphicon-cloud-download"></span> {intl l='PDF | Invoice'}
|
||||
</a>
|
||||
<a class="btn btn-default btn-primary js-update-order-address" data-address-id="{$INVOICE_ADDRESS}" title="{intl l='Edit invoice address'}" href="#edit_order_address_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-edit"></span>
|
||||
</a>
|
||||
</div>
|
||||
</caption>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{intl l="Invoice reference"}</th>
|
||||
<td>{$INVOICE_REF}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{intl l="Invoice date"}</th>
|
||||
<td>{format_date date=$INVOICE_DATE output="date"}</td>
|
||||
</tr>
|
||||
|
||||
{loop type="order_address" name="order-invoice-address" id=$INVOICE_ADDRESS}
|
||||
<tr data-field-class="js-title" data-value="{$TITLE}">
|
||||
<th>{intl l="Title"}</th>
|
||||
<td>{loop type="title" name="order-invoice-address-title" id=$TITLE}{$LONG}{/loop}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-company">
|
||||
<th>{intl l="Company"}</th>
|
||||
<td>{$COMPANY}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-firstname">
|
||||
<th>{intl l="Firstname"}</th>
|
||||
<td>{$FIRSTNAME}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-lastname">
|
||||
<th>{intl l="Lastname"}</th>
|
||||
<td>{$LASTNAME}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-address1">
|
||||
<th>{intl l="Street address"}</th>
|
||||
<td>{$ADDRESS1}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-address2">
|
||||
<th>{intl l="Additional address"}</th>
|
||||
<td>{$ADDRESS2}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-address3">
|
||||
<th>{intl l="Additional address"}</th>
|
||||
<td>{$ADDRESS3}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-zipcode">
|
||||
<th>{intl l="Zip code"}</th>
|
||||
<td>{$ZIPCODE}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-city">
|
||||
<th>{intl l="City"}</th>
|
||||
<td>{$CITY}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-country" data-value="{$COUNTRY}">
|
||||
<th>{intl l="Country"}</th>
|
||||
<td>{loop type="country" name="order-invoice-address-country" id=$COUNTRY}{$TITLE}{/loop}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-phone">
|
||||
<th>{intl l="Phone"}</th>
|
||||
<td>{$PHONE}</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<caption class="clearfix">
|
||||
{intl l='Delivery address'}
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-default btn-primary" title="{intl l='Download purchase order as PDF'}" href="#">
|
||||
<span class="glyphicon glyphicon-cloud-download"></span> {intl l='PDF | Purchase order'}
|
||||
</a>
|
||||
<a class="btn btn-default btn-primary js-update-order-address" data-address-id="{$DELIVERY_ADDRESS}" title="{intl l='Edit delivery address'}" href="#edit_order_address_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-edit"></span>
|
||||
</a>
|
||||
</div>
|
||||
</caption>
|
||||
<tbody>
|
||||
{loop type="order_address" name="order-delivery-address" id=$DELIVERY_ADDRESS}
|
||||
<tr data-field-class="js-title" data-value="{$TITLE}">
|
||||
<th>{intl l="Title"}</th>
|
||||
<td>{loop type="title" name="order-delivery-address-title" id=$TITLE}{$LONG}{/loop}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-company">
|
||||
<th>{intl l="Company"}</th>
|
||||
<td>{$COMPANY}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-firstname">
|
||||
<th>{intl l="Firstname"}</th>
|
||||
<td>{$FIRSTNAME}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-lastname">
|
||||
<th>{intl l="Lastname"}</th>
|
||||
<td>{$LASTNAME}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-address1">
|
||||
<th>{intl l="Street address"}</th>
|
||||
<td>{$ADDRESS1}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-address2">
|
||||
<th>{intl l="Additional address"}</th>
|
||||
<td>{$ADDRESS2}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-address3">
|
||||
<th>{intl l="Additional address"}</th>
|
||||
<td>{$ADDRESS3}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-zipcode">
|
||||
<th>{intl l="Zip code"}</th>
|
||||
<td>{$ZIPCODE}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-city">
|
||||
<th>{intl l="City"}</th>
|
||||
<td>{$CITY}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-country" data-value="{$COUNTRY}">
|
||||
<th>{intl l="Country"}</th>
|
||||
<td>{loop type="country" name="order-delivery-address-country" id=$COUNTRY}{$TITLE}{/loop}</td>
|
||||
</tr>
|
||||
<tr data-field-class="js-phone">
|
||||
<th>{intl l="Phone"}</th>
|
||||
<td>{$PHONE}</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div> <!-- #bill -->
|
||||
|
||||
</div>
|
||||
{/loop}
|
||||
|
||||
{/ifloop}
|
||||
{elseloop rel="the-order"}
|
||||
|
||||
DOES NOT EXISTS
|
||||
|
||||
{/elseloop}
|
||||
|
||||
</div>
|
||||
|
||||
@@ -347,34 +352,31 @@
|
||||
|
||||
{* Update an Address *}
|
||||
|
||||
{form name="thelia.address.update"}
|
||||
{form name="thelia.order.update.address"}
|
||||
|
||||
{* Capture the dialog body, to pass it to the generic dialog *}
|
||||
{capture "edit_address_dialog"}
|
||||
{capture "edit_order_address_dialog"}
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{form_field form=$form field='label'}
|
||||
<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='Label'}">
|
||||
</div>
|
||||
{form_field form=$form field='id'}
|
||||
<input type="hidden" id="{$label_attr.for}" name="{$name}" class="js-order-address-id" value="{$value}">
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='company'}
|
||||
<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='Company'}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l=$label} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control js-company" value="{$value}" title="{intl l=$label}" placeholder="{intl l='Company'}">
|
||||
</div>
|
||||
{/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>
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l=$label} : </label>
|
||||
|
||||
<select name="{$name}" id="{$label_attr.for}" class="form-control">
|
||||
<select name="{$name}" id="{$label_attr.for}" class="form-control js-title">
|
||||
{loop type="title" name="title1"}
|
||||
<option value="{$ID}">{$LONG}</option>
|
||||
<option value='{$ID}'>{$LONG}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
</div>
|
||||
@@ -382,79 +384,128 @@
|
||||
|
||||
{form_field form=$form field='firstname'}
|
||||
<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='Firstname'}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l=$label} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control js-firstname" value="{$value}" title="{intl l=$label}" placeholder="{intl l='Firstname'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='lastname'}
|
||||
<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='Lastname'}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l=$label} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control js-lastname" value="{$value}" title="{intl l=$label}" placeholder="{intl l='Lastname'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='address1'}
|
||||
<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='Address'}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l=$label} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control js-address1" value="{$value}" title="{intl l=$label}" placeholder="{intl l='Address'}">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{form_field form=$form field='address2'}
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Additional address'}">
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control js-address2" value="{$value}" title="{intl l=$label}" placeholder="{intl l='Additional address'}">
|
||||
{/form_field}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{form_field form=$form field='address3'}
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Additional address'}">
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control js-address3" value="{$value}" title="{intl l=$label}" placeholder="{intl l='Additional address'}">
|
||||
{/form_field}
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='zipcode'}
|
||||
<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='Zip code'}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l=$label} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control js-zipcode" value="{$value}" title="{intl l=$label}" placeholder="{intl l='Zip code'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='city'}
|
||||
<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='City'}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l=$label} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control js-city" value="{$value}" title="{intl l=$label}" placeholder="{intl l='City'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='country'}
|
||||
<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">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l=$label} : </label>
|
||||
<select name="{$name}" id="{$label_attr.for}" class="form-control js-country">
|
||||
{loop type="country" name="country1"}
|
||||
<option value="{$ID}">{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
</div>
|
||||
{/form_field}
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='phone'}
|
||||
<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 js-phone" value="{$value}" title="{intl l=$label}" placeholder="{intl l='Phone'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-create-dialog.html"
|
||||
|
||||
dialog_id = "edit_address_dialog"
|
||||
dialog_title = {intl l="Edit an address"}
|
||||
dialog_body = {$smarty.capture.edit_address_dialog nofilter}
|
||||
dialog_id = "edit_order_address_dialog"
|
||||
dialog_title = {intl l="Edit order address"}
|
||||
dialog_body = {$smarty.capture.edit_order_address_dialog nofilter}
|
||||
|
||||
dialog_ok_label = {intl l="Edit this address"}
|
||||
dialog_ok_label = {intl l="Confirm changes"}
|
||||
dialog_cancel_label = {intl l="Cancel"}
|
||||
|
||||
form_action = {url path='/admin/address/update'}
|
||||
form_action = {url path="/admin/order/update/$order_id/address"}
|
||||
form_enctype = {form_enctype form=$form}
|
||||
form_error_message = $form_error_message
|
||||
form_id = 'updateOrderAddressForm'
|
||||
}
|
||||
|
||||
{/form}
|
||||
|
||||
{/block}
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
|
||||
{javascripts file='assets/js/bootstrap-select/bootstrap-select.js'}
|
||||
<script src='{$asset_url}'></script>
|
||||
{/javascripts}
|
||||
{javascripts file='assets/js/main.js'}
|
||||
<script src='{$asset_url}'></script>
|
||||
{/javascripts}
|
||||
|
||||
<script type="text/javascript">
|
||||
$(".js-update-order-status").change(function(e){
|
||||
e.preventDefault();
|
||||
$('#order-update-status-form').submit();
|
||||
});
|
||||
|
||||
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
|
||||
$(".js-current-tab").val($(e.target).data("tab-name"));
|
||||
});
|
||||
|
||||
$(".js-update-order-address").click(function(){
|
||||
$(".js-order-address-id").val(
|
||||
$(this).data("address-id")
|
||||
);
|
||||
|
||||
$(this).parents('table').find('tr').each(function(k, v) {
|
||||
if(!$(v).data('field-class')) {
|
||||
return true;
|
||||
}
|
||||
if($(v).data('value')) {
|
||||
var fieldValue = $(v).data('value');
|
||||
} else {
|
||||
var fieldValue = $(v).children('td').text();
|
||||
}
|
||||
|
||||
$('.' + $(v).data('field-class')).val(fieldValue);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
{/block}
|
||||
@@ -5,13 +5,15 @@
|
||||
{block name="check-permissions"}admin.orders.view{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
{assign order_page {$smarty.get.page|default:1}}
|
||||
{assign status_filter {$smarty.get.status|assertType:'IntListType'}}
|
||||
<div class="orders">
|
||||
|
||||
<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/orders'}">{intl l="Orders"}</a></li>
|
||||
<li><a href="#">{intl l="Orders"}</a></li>
|
||||
</ul>
|
||||
|
||||
{module_include location='orders_top'}
|
||||
@@ -23,17 +25,15 @@
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<caption class="clearfix">
|
||||
{intl l='Orders'}
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.orders.create"}
|
||||
<a class="btn btn-default btn-primary pull-right" title="{intl l='Create an order'}" href="#creation_dialog">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</caption>
|
||||
|
||||
{ifloop rel="order-list"}
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{intl l="Order n°"}</th>
|
||||
<th>{intl l="Date & Hour"}</th>
|
||||
<th>{intl l="Compagny"}</th>
|
||||
<th>{intl l="Company"}</th>
|
||||
<th>{intl l="Name"}</th>
|
||||
<th>{intl l="Amount"}</th>
|
||||
<th>{intl l="Status"}</th>
|
||||
@@ -45,88 +45,83 @@
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
{loop type="order" name="order-list" customer="*" backend_context="1" page={$order_page} limit={#max_displayed_orders#} status=$status_filter|default:'*'}
|
||||
|
||||
{loop type="order_address" name="order-invoice-address" id=$INVOICE_ADDRESS}
|
||||
{assign "orderInvoiceFirstName" $FIRSTNAME}
|
||||
{assign "orderInvoiceLastName" $LASTNAME}
|
||||
{assign "orderInvoiceCompany" $COMPANY}
|
||||
{/loop}
|
||||
|
||||
{loop type="order-status" name="order-status" id=$STATUS}
|
||||
{assign "orderStatus" $TITLE}
|
||||
{assign "orderStatusLabel" "order_$CODE"}
|
||||
{/loop}
|
||||
|
||||
<tr>
|
||||
|
||||
<td><a href="">01230450123045</a></td>
|
||||
<td>11/09/2013 10:24:31</td>
|
||||
<td>Thelia</td>
|
||||
<td><a href="">Dupont</a></td>
|
||||
<td>251 €</td>
|
||||
<td><span class="label label-success">Paid</span></td>
|
||||
<td><a href="{url path="/admin/order/update/$ID"}">{$REF}</a></td>
|
||||
<td>{format_date date=$CREATE_DATE}</td>
|
||||
<td>{$orderInvoiceCompany}</td>
|
||||
<td><a href="{url path="/admin/customer/update/$CUSTOMER"}">{$orderInvoiceFirstName|ucwords} {$orderInvoiceLastName|upper}</a></td>
|
||||
<td>{$TOTAL_TAXED_AMOUNT}</td>
|
||||
<td><span class="label label-{#$orderStatusLabel#}">{$orderStatus}</span></td>
|
||||
|
||||
{module_include location='orders_table_row'}
|
||||
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.edit"}
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.update"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Edit this order'}" href="{url path="/admin/order/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.orders.delete"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Delete this order'}" href="#delete_order_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td><a href="">01230450123045</a></td>
|
||||
<td>11/09/2013 10:24:31</td>
|
||||
<td>Thelia</td>
|
||||
<td><a href="">Dupont</a></td>
|
||||
<td>251 €</td>
|
||||
<td><span class="label label-danger">Canceled</span></td>
|
||||
|
||||
{module_include location='orders_table_row'}
|
||||
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.edit"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Edit this order'}" href="{url path="/admin/order/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.orders.delete"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Delete this order'}" href="#delete_order_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td><a href="">01230450123045</a></td>
|
||||
<td>11/09/2013 10:24:31</td>
|
||||
<td>Thelia</td>
|
||||
<td><a href="">Dupont</a></td>
|
||||
<td>251 €</td>
|
||||
<td><span class="label label-info">Current</span></td>
|
||||
|
||||
{module_include location='orders_table_row'}
|
||||
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.edit"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Edit this order'}" href="{url path="/admin/order/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.orders.delete"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Delete this order'}" href="#delete_order_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
|
||||
{if $STATUS !== 5}
|
||||
<a class="btn btn-default btn-xs order-cancel" title="{intl l='Cancel this order'}" href="#cancel_order_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-remove-sign"></span></a>
|
||||
{/if}
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- <tr>
|
||||
<td colspan="3">
|
||||
<div class="alert alert-info">
|
||||
{intl l="No mailing template has been created yet. Click the + button to create one."}
|
||||
</div>
|
||||
</td>
|
||||
</tr> -->
|
||||
{/loop}
|
||||
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="7">
|
||||
|
||||
<div class="text-center">
|
||||
<ul class="pagination pagination-centered">
|
||||
{if $order_page != 1}
|
||||
<li><a href="{url path="/admin/orders" page="1"}">«</a></li>
|
||||
{else}
|
||||
<li class="disabled"><a href="#">«</a></li>
|
||||
{/if}
|
||||
|
||||
{pageloop rel="order-list"}
|
||||
{if $PAGE != $CURRENT}
|
||||
<li><a href="{url path="/admin/orders" page=$PAGE}">{$PAGE}</a></li>
|
||||
|
||||
{else}
|
||||
<li class="active"><a href="#">{$PAGE}</a></li>
|
||||
{/if}
|
||||
|
||||
|
||||
{/pageloop}
|
||||
{if $PAGE == $LAST && $LAST != $CURRENT}
|
||||
<li><a href="{url path="/admin/orders" page="$PAGE"}">»</a></li>
|
||||
{else}
|
||||
<li class="disabled"><a href="#">»</a></li>
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
{/ifloop}
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -138,22 +133,34 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{* Delete order confirmation dialog *}
|
||||
{* Cancel order confirmation dialog *}
|
||||
|
||||
{capture "delete_order_dialog"}
|
||||
<input type="hidden" name="current_order_id" value="{$current_order_id}" />
|
||||
<input type="hidden" name="order_id" id="delete_order_id" value"" />
|
||||
{capture "cancel_order_dialog"}
|
||||
<input type="hidden" name="order_page" value="{$order_page}">
|
||||
<input type="hidden" name="order_id" id="cancel_order_id" />
|
||||
<input type="hidden" name="status_id" value="5" />
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
|
||||
dialog_id = "delete_order_dialog"
|
||||
dialog_id = "cancel_order_dialog"
|
||||
dialog_title = {intl l="Delete an order"}
|
||||
dialog_message = {intl l="Do you really want to delete this order ?"}
|
||||
dialog_message = {intl l="Do you really want to cancel this order ?"}
|
||||
|
||||
form_action = {url path='/admin/orders/delete'}
|
||||
form_content = {$smarty.capture.delete_order_dialog nofilter}
|
||||
form_action = {url path='/admin/order/update/status'}
|
||||
form_content = {$smarty.capture.cancel_order_dialog nofilter}
|
||||
form_id = "cancel-order-form"
|
||||
}
|
||||
|
||||
{/block}
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
|
||||
<script type="text/javascript">
|
||||
$(".order-cancel").click(function(){
|
||||
$("#cancel_order_id").val($(this).attr("data-id"));
|
||||
});
|
||||
</script>
|
||||
|
||||
{/block}
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="catalog edit-product">
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
{include file="includes/catalog-breadcrumb.html" editing_category="false" editing_product="true"}
|
||||
@@ -40,353 +41,73 @@
|
||||
<div class="col-md-12">
|
||||
|
||||
<ul class="nav nav-tabs" id="tabbed-menu">
|
||||
<li {if $current_tab == 'general'}class="active"{/if}><a href="#general" data-toggle="tab">{intl l="General description"}</a></li>
|
||||
<li {if $current_tab == 'details'}class="active"{/if}><a href="#details" data-toggle="tab">{intl l="Details"}</a></li>
|
||||
<li {if $current_tab == 'images'}class="active"{/if}><a href="#images" data-toggle="tab">{intl l="Images"}</a></li>
|
||||
<li {if $current_tab == 'documents'}class="active"{/if}><a href="#documents" data-toggle="tab">{intl l="Documents"}</a></li>
|
||||
<li {if $current_tab == 'modules'}class="active"{/if}><a href="#modules" data-toggle="tab">{intl l="Modules"}</a></li>
|
||||
<li>
|
||||
<a href="#general"
|
||||
{* data-href="{url path='/admin/products/general/tab' product_id=$product_id}" *}
|
||||
data-toggle="tab">{intl l="General"}</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#details" data-toggle="tab">{intl l="Details"}</a>
|
||||
</li>
|
||||
|
||||
<li><a href="#attributes"
|
||||
data-href="{url path='/admin/products/attributes/tab' product_id=$product_id}"
|
||||
data-toggle="tab">{intl l="Attributes & Features"}</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#related"
|
||||
data-href="{url path='/admin/products/related/tab' folder_id=$folder_id accessory_category_id=$accessory_category_id product_id=$product_id}"
|
||||
data-toggle="tab">{intl l="Associations"}</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#images"
|
||||
data-toggle="tab"
|
||||
data-href="{url path="/admin/image/type/product/{$product_id}/form-ajax"}"
|
||||
data-callback="$.imageUploadManager.initImageDropZone">
|
||||
{intl l="Images"}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#documents"
|
||||
data-toggle="tab"
|
||||
data-href="{url path="/admin/document/type/product/{$product_id}/form-ajax"}"
|
||||
data-callback="$.documentUploadManager.initDocumentDropZone">
|
||||
{intl l="Documents"}
|
||||
</a>
|
||||
<li><a href="#modules" data-toggle="tab">{intl l="Modules"}</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
|
||||
<div class="tab-pane fade {if $current_tab == 'general'}active in{/if}" id="general">
|
||||
|
||||
<div class="form-container">
|
||||
|
||||
{form name="thelia.admin.product.modification"}
|
||||
<form method="POST" action="{url path='/admin/products/save'}" {form_enctype form=$form} class="clearfix">
|
||||
|
||||
{include file="includes/inner-form-toolbar.html" close_url="{url path='/admin/products' product_id=$product_id}"}
|
||||
|
||||
{* Be sure to get the product ID, even if the form could not be validated *}
|
||||
<input type="hidden" name="product_id" value="{$product_id}" />
|
||||
|
||||
<input type="hidden" name="current_tab" value="general" />
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/product' product_id={$product_d}}" />
|
||||
{/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}
|
||||
|
||||
<div class="form-group">
|
||||
<label for="product_ref" class="control-label">
|
||||
{intl l='Product reference'} :
|
||||
</label>
|
||||
|
||||
<div class="well well-sm">{$REF}</div>
|
||||
</div>
|
||||
|
||||
{include file="includes/standard-description-form-fields.html"}
|
||||
|
||||
{form_field form=$form field='url'}
|
||||
<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}" required="required" name="{$name}" value="{$value}" title="{intl l='Rewritten URL'}" placeholder="{intl l='Rewriten URL'}" class="form-control">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
{form_field form=$form field='default_category'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
|
||||
<label for="{$label_attr.for}" class="control-label">
|
||||
{intl l="{$label}"} :
|
||||
</label>
|
||||
|
||||
<select id="{$label_attr.for}" required="required" name="{$name}" class="form-control">
|
||||
<option value="0">{intl l="Top level"}</option>
|
||||
|
||||
{loop name="cat-parent" type="category-tree" category="0" visible="*" product="0"}
|
||||
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px" {if $DEFAULT_CATEGORY == $ID}selected="selected"{/if} {if $product_id == $ID}disabled="disabled"{/if}>{$TITLE}</option>
|
||||
{/loop}
|
||||
|
||||
</select>
|
||||
<span class="help-block">{intl l='You can attach this product to more categories in the details tab.'}</span>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
{form_field form=$form field='visible'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{intl l='Visibility'}</label>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" id="{$label_attr.for}" name="{$name}" value="1" {if $value != 0}checked="checked"{/if}>
|
||||
{$label}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="control-group">
|
||||
<lablel> </lablel>
|
||||
<div class="controls">
|
||||
<p>{intl l='Product created on %date_create. Last modification: %date_change' date_create="{format_date date=$CREATE_DATE}" date_change="{format_date date=$UPDATE_DATE}"}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
{/form}
|
||||
</div>
|
||||
<div class="tab-pane fade" id="general">
|
||||
{include file="includes/product-general-tab.html"}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade {if $current_tab == 'details'}active in{/if}" id="details">
|
||||
<div class="form-container">
|
||||
<div class="tab-pane fade" id="details">
|
||||
{include file="includes/product-details-tab.html"}
|
||||
</div>
|
||||
|
||||
{include
|
||||
file="includes/inner-form-toolbar.html"
|
||||
hide_submit_buttons=true
|
||||
close_url="{url path='/admin/categories' category_id=$DEFAULT_CATEGORY}"
|
||||
}
|
||||
<div class="tab-pane fade" id="attributes">
|
||||
<div class="text-center"><span class="loading">{intl l="Please wait, loading"}</span></div>
|
||||
</div>
|
||||
|
||||
{* -- Begin related content management -- *}
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<form action="{url path='/admin/products/related-content/add'}" id="related_content_form">
|
||||
|
||||
<p class="title title-without-tabs">{intl l='Related content'}</p>
|
||||
<p>{intl l='You can attach here some content to this product'}</p>
|
||||
|
||||
<input type="hidden" name="product_id" value="{$product_id}" />
|
||||
<input type="hidden" name="current_tab" value="details" />
|
||||
|
||||
{ifloop rel="folders"}
|
||||
<div class="form-group">
|
||||
<select name="folder_id" id="folder_id" class="form-control">
|
||||
<option value="">Select a folder...</option>
|
||||
{loop name="folders" type="folder-tree" folder="0" backend_context="1" lang="$edit_language_id"}
|
||||
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px">{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
|
||||
<span class="help-block">{intl l='Select a folder to get its content'}</span>
|
||||
</div>
|
||||
|
||||
<div id="content_selector" class="hide">
|
||||
<div class="input-group">
|
||||
<select required="required" name="content_id" id="content_id" class="form-control">
|
||||
<option value="">Select a folder content...</option>
|
||||
</select>
|
||||
<span class="input-group-btn" id="content_add_button">
|
||||
<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 a content and click (+) to add it to this product'}</span>
|
||||
</div>
|
||||
|
||||
<div id="content_selector_empty" class="hide">
|
||||
<div class="alert alert-info">
|
||||
{intl l="No available content for this folder"}
|
||||
</div>
|
||||
</div>
|
||||
{/ifloop}
|
||||
|
||||
{elseloop rel="folders"}
|
||||
<div class="alert alert-info">{intl l="No folders found"}</div>
|
||||
{/elseloop}
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{intl l='ID'}</th>
|
||||
|
||||
<th>{intl l='Content title'}</th>
|
||||
|
||||
{module_include location='product_contents_table_header'}
|
||||
|
||||
<th class="actions">{intl l="Actions"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="assigned_contents" type="associated_content" product="$product_id" backend_context="1" lang="$edit_language_id"}
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
|
||||
<td>
|
||||
{$TITLE}
|
||||
</td>
|
||||
|
||||
{module_include location='product_contents_table_row'}
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.product.content.delete"}
|
||||
<a class="btn btn-default btn-xs delete-content" title="{intl l='Delete this content'}" href="#delete_content_dialog" data-id="{$ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="assigned_contents"}
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<div class="alert alert-info">
|
||||
{intl l="This product contains no contents"}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/elseloop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{* -- End related content management ---- *}
|
||||
|
||||
{* -- Begin accessories management ------ *}
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<form action="{url path='/admin/products/accessory/add'}" id="accessory_form">
|
||||
|
||||
<p class="title title-without-tabs">{intl l='Product accessories'}</p>
|
||||
<p>{intl l='Define here this product\'s accessories'}</p>
|
||||
|
||||
<input type="hidden" name="product_id" value="{$product_id}" />
|
||||
<input type="hidden" name="current_tab" value="details" />
|
||||
|
||||
{ifloop rel="categories"}
|
||||
<div class="form-group">
|
||||
<select name="accessory_category_id" id="accessory_category_id" class="form-control">
|
||||
<option value="">Select a category...</option>
|
||||
{loop name="categories" type="category-tree" category="0" backend_context="1" lang="$edit_language_id"}
|
||||
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px">{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
|
||||
<span class="help-block">{intl l='Select a category to get its products'}</span>
|
||||
</div>
|
||||
|
||||
<div id="accessory_selector" class="hide">
|
||||
<div class="input-group">
|
||||
<select required="required" name="accessory_id" id="accessory_id" class="form-control">
|
||||
<option value="">Select a product...</option>
|
||||
</select>
|
||||
<span class="input-group-btn" id="accessory_add_button">
|
||||
<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 a product and click (+) to add it as an accessory'}</span>
|
||||
</div>
|
||||
|
||||
<div id="accessory_selector_empty" class="hide">
|
||||
<div class="alert alert-info">
|
||||
{intl l="No available product in this category"}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/ifloop}
|
||||
|
||||
{elseloop rel="categories"}
|
||||
<div class="alert alert-info">{intl l="No categories found"}</div>
|
||||
{/elseloop}
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{intl l='ID'}</th>
|
||||
|
||||
<th>{intl l='Accessory title'}</th>
|
||||
|
||||
<th class="text-center">{intl l='Position'}</th>
|
||||
|
||||
{module_include location='product_accessories_table_header'}
|
||||
|
||||
<th class="actions">{intl l="Actions"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="assigned_accessories" order="accessory" type="accessory" product="$product_id" backend_context="1" lang="$edit_language_id"}
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
|
||||
<td>
|
||||
{$TITLE}
|
||||
</td>
|
||||
|
||||
<td class="text-center">
|
||||
{admin_position_block
|
||||
permission="admin.products.edit"
|
||||
path={url path='/admin/products/update-accessory-position' product_id=$ID}
|
||||
url_parameter="accessory_id"
|
||||
in_place_edit_class="accessoryPositionChange"
|
||||
position=$POSITION
|
||||
id=$ID
|
||||
}
|
||||
</td>
|
||||
|
||||
{module_include location='product_accessories_table_row'}
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.product.accessory.delete"}
|
||||
<a class="btn btn-default btn-xs delete-accessory" title="{intl l='Delete this accessory'}" href="#delete_accessory_dialog" data-id="{$ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="assigned_accessories"}
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<div class="alert alert-info">
|
||||
{intl l="This product contains no accessories"}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/elseloop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{* -- End accessories management -------- *}
|
||||
|
||||
</div>
|
||||
<div class="tab-pane fade" id="related">
|
||||
<div class="text-center"><span class="loading">{intl l="Please wait, loading"}</span></div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade {if $current_tab == 'images'}active in{/if}" id="images">
|
||||
<div class="tab-pane fade" id="images">
|
||||
<div class="text-center"><span class="loading">{intl l="Please wait, loading"}</span></div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade {if $current_tab == 'documents'}active in{/if}" id="documents">
|
||||
<div class="tab-pane fade" id="documents">
|
||||
<div class="text-center"><span class="loading">{intl l="Please wait, loading"}</span></div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade {if $current_tab == 'modules'}active in{/if}" id="modules">
|
||||
<div class="tab-pane fade" id="modules">
|
||||
<div class="text-center"><span class="loading">{intl l="Please wait, loading"}</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -397,53 +118,25 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{* Delete related content confirmation dialog *}
|
||||
|
||||
{capture "delete_content_dialog"}
|
||||
<input type="hidden" name="product_id" value="{$product_id}" />
|
||||
<input type="hidden" name="content_id" id="content_delete_id" value="" />
|
||||
<input type="hidden" name="folder_id" id="folder_delete_id" value="" />
|
||||
|
||||
<input type="hidden" name="current_tab" value="details" />
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
|
||||
dialog_id = "delete_content_dialog"
|
||||
dialog_title = {intl l="Remove related content"}
|
||||
dialog_message = {intl l="Do you really want to remove this related content from the product ?"}
|
||||
|
||||
form_action = {url path='/admin/products/related-content/delete'}
|
||||
form_content = {$smarty.capture.delete_content_dialog nofilter}
|
||||
}
|
||||
|
||||
{* Delete accessory confirmation dialog *}
|
||||
|
||||
{capture "delete_accessory_dialog"}
|
||||
<input type="hidden" name="product_id" value="{$product_id}" />
|
||||
<input type="hidden" name="accessory_id" id="accessory_delete_id" value="" />
|
||||
<input type="hidden" name="accessory_category_id" id="accessory_category_delete_id" value="" />
|
||||
|
||||
<input type="hidden" name="current_tab" value="details" />
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
|
||||
dialog_id = "delete_accessory_dialog"
|
||||
dialog_title = {intl l="Remove an accessory"}
|
||||
dialog_message = {intl l="Do you really want to remove this accessory from the product ?"}
|
||||
|
||||
form_action = {url path='/admin/products/accessory/delete'}
|
||||
form_content = {$smarty.capture.delete_accessory_dialog nofilter}
|
||||
}
|
||||
{/block}
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
|
||||
{javascripts file='assets/js/bootstrap-editable/bootstrap-editable.js'}
|
||||
{javascripts file='assets/js/dropzone.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
{javascripts file='assets/js/image-upload.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
{javascripts file='assets/js/document-upload.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
{javascripts file='assets/js/bootstrap-editable/bootstrap-editable.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
|
||||
{javascripts file='assets/js/bootstrap-switch/bootstrap-switch.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
@@ -470,130 +163,114 @@
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
$('.use_default_rewriten_url').click(function(ev) {
|
||||
alert("Not functionnal");
|
||||
|
||||
ev.preventDefault();
|
||||
// Atomatic ajax tab load, if data-href is defined.
|
||||
$('.nav-tabs a[data-href]').on('shown.bs.tab', function(ev) {
|
||||
var $this = $(this);
|
||||
$($this.attr('href')).load($this.data('href'), function(ev) {
|
||||
eval($this.data('callback') + '();');
|
||||
});
|
||||
});
|
||||
|
||||
// Set proper content ID in delete content from
|
||||
$('a.delete-content').click(function(ev) {
|
||||
$('#content_delete_id').val($(this).data('id'));
|
||||
$('#folder_delete_id').val($('#folder_id').val());
|
||||
});
|
||||
// Load active tab
|
||||
$('.nav-tabs a[href="#{$current_tab}"]').trigger("click");
|
||||
|
||||
// Set proper content ID in accessory delete from
|
||||
$('a.delete-accessory').click(function(ev) {
|
||||
$('#accessory_delete_id').val($(this).data('id'));
|
||||
$('#accessory_category_delete_id').val($('#accessory_category_id').val());
|
||||
});
|
||||
// -- Product details management tab ---------------------------------------
|
||||
|
||||
// Load value on attribute selection
|
||||
$('#attribute_id').change(function(event) {
|
||||
var val = $(this).val();
|
||||
|
||||
// Load content on folder selection
|
||||
$('#folder_id').change(function(event) {
|
||||
var val = $(this).val();
|
||||
|
||||
if (val != "") {
|
||||
if (val != "") {
|
||||
$.ajax({
|
||||
url : '{url path="/admin/product/$product_id/available-related-content/"}' + $(this).val() + '.xml',
|
||||
url : '{url path="/admin/product/$product_id/attribute-values/"}' + $(this).val() + '.xml',
|
||||
type : 'get',
|
||||
dataType : 'json',
|
||||
success : function(json) {
|
||||
$('#content_id :not(:first-child)').remove();
|
||||
$('#attribute_value_id :not(:first-child)').remove();
|
||||
|
||||
var have_content = false;
|
||||
|
||||
$.each(json, function(idx, value) {
|
||||
$('#content_id').append($('<option>').text(value.title).attr('value', value.id));
|
||||
$('#attribute_value_id').append($('<option>').text(value.title).attr('value', value.id));
|
||||
|
||||
have_content = true; // Lame...
|
||||
});
|
||||
|
||||
if (have_content) {
|
||||
$('#content_selector_empty').addClass('hide');
|
||||
$('#content_selector').removeClass('hide');
|
||||
}
|
||||
else {
|
||||
$('#content_selector_empty').removeClass('hide');
|
||||
$('#content_selector').addClass('hide');
|
||||
}
|
||||
if (have_content) {
|
||||
$('#attribute_value_selector_empty').addClass('hide');
|
||||
$('#attribute_value_selector').removeClass('hide');
|
||||
}
|
||||
else {
|
||||
$('#attribute_value_selector_empty').removeClass('hide');
|
||||
$('#attribute_value_selector').addClass('hide');
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
$('#content_selector_empty').addClass('hide');
|
||||
$('#content_selector').addClass('hide');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
$('#attribute_value_selector_empty').addClass('hide');
|
||||
$('#attribute_value_selector').addClass('hide');
|
||||
}
|
||||
});
|
||||
|
||||
// Add selected value to the combination
|
||||
$('.add-value-to-combination').click(function(event) {
|
||||
|
||||
// Hide error message
|
||||
$('#combination_attributes_error').text('').addClass('hide');
|
||||
|
||||
// Select all elements
|
||||
$('#combination_attributes option').prop('selected', 'selected');
|
||||
|
||||
$.ajax({
|
||||
url : '{url path="/admin/product/$product_id/add-attribute-value-to-combination/"}'
|
||||
+ $('#attribute_value_id').val()
|
||||
+ '/'
|
||||
+ $('#combination_attributes').val()
|
||||
+ '.xml',
|
||||
type : 'get',
|
||||
dataType : 'json',
|
||||
success : function(json) {
|
||||
$('#combination_attributes option').remove();
|
||||
|
||||
var have_content = false;
|
||||
|
||||
$.each(json, function(idx, value) {
|
||||
if (idx != 'error')
|
||||
$('#combination_attributes').append($('<option>').text(value.title).attr('value', value.id));
|
||||
});
|
||||
|
||||
if (json.error)
|
||||
$('#combination_attributes_error').text(json.error).removeClass('hide');
|
||||
|
||||
$('#attribute_id').val('').change();
|
||||
}
|
||||
});
|
||||
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
// Load content on folder selection
|
||||
$('#accessory_category_id').change(function(event) {
|
||||
var val = $(this).val();
|
||||
// Remove selected value from combination
|
||||
$('.remove-value-from-combination').click(function() {
|
||||
|
||||
if (val != "") {
|
||||
$.ajax({
|
||||
url : '{url path="/admin/product/$product_id/available-accessories/"}' + $(this).val() + '.xml',
|
||||
type : 'get',
|
||||
dataType : 'json',
|
||||
success : function(json) {
|
||||
$('#accessory_id :not(:first-child)').remove();
|
||||
$('#combination_attributes option:selected').remove();
|
||||
|
||||
var have_content = false;
|
||||
|
||||
$.each(json, function(idx, value) {
|
||||
$('#accessory_id').append($('<option>').text(value.title).attr('value', value.id));
|
||||
|
||||
have_content = true; // Lame...
|
||||
});
|
||||
|
||||
if (have_content) {
|
||||
$('#accessory_selector_empty').addClass('hide');
|
||||
$('#accessory_selector').removeClass('hide');
|
||||
}
|
||||
else {
|
||||
$('#accessory_selector_empty').removeClass('hide');
|
||||
$('#accessory_selector').addClass('hide');
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
$('#accessory_selector_empty').addClass('hide');
|
||||
$('#accessory_selector').addClass('hide');
|
||||
}
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
{* Inline editing of accessory position using bootstrap-editable *}
|
||||
|
||||
$('.accessoryPositionChange').editable({
|
||||
type : 'text',
|
||||
title : '{intl l="Enter new accessory position"}',
|
||||
mode : 'popup',
|
||||
inputclass : 'input-mini',
|
||||
placement : 'left',
|
||||
success : function(response, newValue) {
|
||||
// The URL template
|
||||
var url = "{url path='admin/product/update-accessory-position/' accessory_id='__ID__' product_id=$product_id position='__POS__'}";
|
||||
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id')).replace('__POS__', newValue);
|
||||
|
||||
// Reload the page
|
||||
location.href = url;
|
||||
}
|
||||
// Set proper category ID in combination delete from
|
||||
$('a.combination-delete').click(function(ev) {
|
||||
$('#combination_delete_id').val($(this).data('id'));
|
||||
});
|
||||
|
||||
// Initialize folder (id={$folder_id}) select value
|
||||
{if $folder_id != 0}
|
||||
$('#folder_id').val("{$folder_id}").change();
|
||||
{/if}
|
||||
// In create combination dialog, select all element of conbination list
|
||||
$('#combination_creation_dialog_ok').click(function() {
|
||||
$('#combination_attributes option').prop('selected', 'selected');
|
||||
});
|
||||
|
||||
// Initialize folder (id={$folder_id}) select value
|
||||
{if $accessory_category_id != 0}
|
||||
$('#accessory_category_id').val("{$accessory_category_id}").change();
|
||||
{/if}
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
{/block}
|
||||
@@ -59,30 +59,32 @@
|
||||
{/form}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="form-container">
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="form-container">
|
||||
<div class="col-md-6">
|
||||
<div class="well well-sm">
|
||||
<p class="title title-without-tabs">{intl l='Attributes'}</p>
|
||||
<p>Manage attributes included in this product templates</p>
|
||||
|
||||
<div id="attribute_list_management">
|
||||
<div class="loading"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-6">
|
||||
<div class="well well-sm">
|
||||
<p class="title title-without-tabs">{intl l='Features'}</p>
|
||||
<p>Manage features included in this product templates</p>
|
||||
|
||||
<div id="feature_list_management">
|
||||
<div class="loading"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -106,10 +108,14 @@
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
|
||||
{javascripts file='assets/js/bootstrap-editable/bootstrap-editable.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$('#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}");
|
||||
$('#feature_list_management').load("{url noamp='1' path='/admin/configuration/templates/features/list' template_id=$template_id}");
|
||||
$('#attribute_list_management').load("{url noamp='1' path='/admin/configuration/templates/attributes/list' template_id=$template_id}");
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
@@ -25,7 +25,7 @@
|
||||
{if ! empty($general_error) }
|
||||
<div class="alert alert-danger">{$general_error}</div>
|
||||
{/if}
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<caption>
|
||||
@@ -194,10 +194,6 @@
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
|
||||
{javascripts file='assets/js/bootstrap-editable/bootstrap-editable.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<nav class="nav-breadcrumb" role="navigation" aria-labelledby="breadcrumb-label">
|
||||
<strong id="breadcrumb-label">{intl l="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">{intl l="Home"}</span></a></li>
|
||||
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="{navigate to="index"}" itemprop="url"><span itemprop="title">{intl l="Home"}</span></a></li>
|
||||
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb" class="active"><span itemprop="title">{intl l="Account"}</span></li>
|
||||
</ul>
|
||||
</nav><!-- /.nav-breadcrumb -->
|
||||
|
||||
@@ -126,31 +126,14 @@
|
||||
}).filter(':has(:checked)').addClass('active');
|
||||
});
|
||||
|
||||
$('#limit-top').change(function(e){
|
||||
window.location = $(this).val()
|
||||
});
|
||||
|
||||
// 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
$('#sortby-top').change(function(e){
|
||||
window.location = $(this).val()
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
*/
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
<div class="main">
|
||||
<article id="cart" class="col-main" role="main" aria-labelledby="main-label">
|
||||
|
||||
<h1 id="main-label" class="page-header">Your Cart</h1>
|
||||
<h1 id="main-label" class="page-header">{intl l="Your Cart"}</h1>
|
||||
|
||||
<div class="btn-group checkout-progress">
|
||||
<a href="#" role="button" class="btn btn-step active"><span class="step-nb">1</span> <span class="step-label">Your Cart</span></a>
|
||||
<a href="#" role="button" class="btn btn-step disabled"><span class="step-nb">2</span> <span class="step-label">Billing and delivery</span></a>
|
||||
<a href="#" role="button" class="btn btn-step disabled"><span class="step-nb">3</span> <span class="step-label">Check my order</span></a>
|
||||
<a href="#" role="button" class="btn btn-step disabled"><span class="step-nb">4</span> <span class="step-label">Secure payment</span></a>
|
||||
<a href="#" role="button" class="btn btn-step active"><span class="step-nb">1</span> <span class="step-label">{intl l="Your Cart"}</span></a>
|
||||
<a href="#" role="button" class="btn btn-step disabled"><span class="step-nb">2</span> <span class="step-label">{intl l="Billing and delivery"}</span></a>
|
||||
<a href="#" role="button" class="btn btn-step disabled"><span class="step-nb">3</span> <span class="step-label">{intl l="Check my order"}</span></a>
|
||||
<a href="#" role="button" class="btn btn-step disabled"><span class="step-nb">4</span> <span class="step-label">{intl l="Secure payment"}</span></a>
|
||||
</div>
|
||||
|
||||
<table class="table table-cart">
|
||||
@@ -35,20 +35,20 @@
|
||||
<tr>
|
||||
<th class="image"> </th>
|
||||
<th class="product">
|
||||
<span class="hidden-xs">Product Name</span>
|
||||
<span class="visible-xs">Name</span>
|
||||
<span class="hidden-xs">{intl l="Product Name"}</span>
|
||||
<span class="visible-xs">{intl l="Name"}</span>
|
||||
</th>
|
||||
<th class="unitprice">
|
||||
<span class="hidden-xs">Unit Price</span>
|
||||
<span class="visible-xs">Price</span>
|
||||
<span class="hidden-xs">{intl l="Unit Price"}</span>
|
||||
<span class="visible-xs">{intl l="Price"}</span>
|
||||
</th>
|
||||
<th class="qty">
|
||||
<span class="hidden-xs">Quantity</span>
|
||||
<span class="visible-xs">Qty</span>
|
||||
<span class="hidden-xs">{intl l="Quantity"}</span>
|
||||
<span class="visible-xs">{intl l="Qty"}</span>
|
||||
</th>
|
||||
<th class="subprice">
|
||||
<span class="hidden-xs">Total <abbr title="Tax Inclusive">TTC</abbr></span>
|
||||
<span class="visible-xs">Total</span>
|
||||
<span class="hidden-xs">{intl l="Total"} <abbr title="{intl l="Tax Inclusive"}">{intl l="TTC"}</abbr></span>
|
||||
<span class="visible-xs">{intl l="Total"}</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -75,9 +75,9 @@
|
||||
</a></h3>
|
||||
<div class="product-options">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Available :</dt>
|
||||
<dd>In Stock</dd>
|
||||
<dt>No.</dt>
|
||||
<dt>{intl l="Available"} :</dt>
|
||||
<dd>{intl l="In Stock"}</dd>
|
||||
<dt>{intl l="No."}</dt>
|
||||
<dd>{$REF}</dd>
|
||||
{*<dt>Select Size</dt>
|
||||
<dd>Large</dd>
|
||||
@@ -87,13 +87,13 @@
|
||||
<dd>Option 1</dd>*}
|
||||
</dl>
|
||||
</div>
|
||||
<a href="{url path="/cart/delete/{$ITEM_ID}"}" class="btn btn-remove">Remove</a>
|
||||
<a href="{url path="/cart/delete/{$ITEM_ID}"}" class="btn btn-remove">{intl l="Remove"}</a>
|
||||
</td>
|
||||
<td class="unitprice">
|
||||
{if $IS_PROMO == 1}
|
||||
{assign "real_price" $PROMO_TAXED_PRICE}
|
||||
<div class="special-price"><span class="price">{currency attr="symbol"} {$PROMO_TAXED_PRICE}</span></div>
|
||||
<small class="old-price">instead of <span class="price">{currency attr="symbol"} {$TAXED_PRICE}</span></small>
|
||||
<small class="old-price">{intl l="instead of"} <span class="price">{currency attr="symbol"} {$TAXED_PRICE}</span></small>
|
||||
{else}
|
||||
{assign "real_price" $TAXED_PRICE}
|
||||
<div class="special-price"><span class="price">{currency attr="symbol"} {$TAXED_PRICE}</span></div>
|
||||
@@ -122,7 +122,7 @@
|
||||
<tfoot>
|
||||
<tr >
|
||||
<td colspan="3" class="empty"> </td>
|
||||
<th class="total">Total <abbr title="Tax Inclusive">TTC</abbr></th>
|
||||
<th class="total">{intl l="Total"} <abbr title="{intl l="Tax Inclusive"}">{intl l="TTC"}</abbr></th>
|
||||
<td class="total">
|
||||
<div class="total-price">
|
||||
<span class="price">{currency attr="symbol"} {cart attr="total_taxed_price"}</span>
|
||||
@@ -132,14 +132,14 @@
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
<a href="{navigate to="index"}" role="button" class="btn btn-continue-shopping"><span>Continue Shopping</span></a>
|
||||
<a href="{url path="/order/delivery"}" class="btn btn-checkout">Proceed checkout</a>
|
||||
<a href="{navigate to="index"}" role="button" class="btn btn-continue-shopping"><span>{intl l="Continue Shopping"}</span></a>
|
||||
<a href="{url path="/order/delivery"}" class="btn btn-checkout">{intl l="Proceed checkout"}</a>
|
||||
|
||||
</article>
|
||||
|
||||
<aside id="products-upsell" role="complementary" aria-labelledby="products-upsell-label">
|
||||
<div class="products-heading">
|
||||
<h3 id="products-upsell-label">Upsell Products</h3>
|
||||
<h3 id="products-upsell-label">{intl l="Upsell Products"}</h3>
|
||||
</div>
|
||||
|
||||
<div class="products-content">
|
||||
|
||||
51
templates/default/category.html
Normal file
51
templates/default/category.html
Normal file
@@ -0,0 +1,51 @@
|
||||
{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="{navigate to="index"}" itemprop="url"><span itemprop="title">{intl l="Home"}</span></a></li>
|
||||
{loop name="category_path" type="category-path" category="{category attr="id"}"}
|
||||
{if $ID == {category attr="id"}}
|
||||
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb" class="active">
|
||||
<span itemprop="title">{$TITLE}</span>
|
||||
</li>
|
||||
{else}
|
||||
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="{$URL}" itemprop="url"><span itemprop="title">{$TITLE}</span></a></li>
|
||||
{/if}
|
||||
{/loop}
|
||||
</ul>
|
||||
</nav><!-- /.nav-breadcrumb -->
|
||||
{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="main layout-col-2-left">
|
||||
{$limit={$smarty.get.limit|default:8}}
|
||||
{$product_page={$smarty.get.page|default:1}}
|
||||
{$product_order={$smarty.get.order|default:'alpha'}}
|
||||
<article class="col-main {$smarty.get.mode|default:"grid"}" role="main">
|
||||
{include file="includes/category-toolbar.html" toolbar="top" limit=$limit order=$product_order}
|
||||
<div id="category-products">
|
||||
<div class="products-content">
|
||||
<ul class="product-col-4">
|
||||
{loop type="product" name="product_list" category={category attr="id"} limit=$limit page=$product_page order=$product_order}
|
||||
{include file="includes/single-product.html" product_id=$ID hasBtn=true hasDescription=true width="218" height="146"}
|
||||
{/loop}
|
||||
</ul>
|
||||
</div>
|
||||
</div><!-- /#category-products -->
|
||||
{include file="includes/category-toolbar.html" toolbar="bottom"}
|
||||
</article>
|
||||
|
||||
<aside class="col-left" role="complementary" itemscope itemtype="http://schema.org/WPSideBar">
|
||||
|
||||
{include file="includes/menu.html"}
|
||||
|
||||
{include file="includes/categories-filters.html"}
|
||||
|
||||
</aside>
|
||||
|
||||
</div>
|
||||
|
||||
</div><!-- /.container -->
|
||||
{/block}
|
||||
77
templates/default/includes/categories-filters.html
Normal file
77
templates/default/includes/categories-filters.html
Normal file
@@ -0,0 +1,77 @@
|
||||
<section id="filters">
|
||||
<h3>Find <span>a product</span></h3>
|
||||
<form id="form-filters" action="" method="get" role="form">
|
||||
<div class="filter filter-type">
|
||||
<fieldset>
|
||||
<legend class="filter-heading">Type</legend>
|
||||
<div class="filter-content">
|
||||
<div class="checkbox">
|
||||
<label for="type0">
|
||||
<input type="checkbox" name="type0" id="type0" value="0"> Type 0
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label for="type1">
|
||||
<input type="checkbox" name="type1" id="type1" value="1"> Type 1
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label for="type2">
|
||||
<input type="checkbox" name="type2" id="type2" value="2"> Type 2
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div><!-- /Filter Type -->
|
||||
|
||||
<div class="filter filter-price">
|
||||
<fieldset>
|
||||
<legend class="filter-heading">Price</legend>
|
||||
<div class="filter-content">
|
||||
<div class="checkbox">
|
||||
<label for="price0">
|
||||
<input type="checkbox" name="price0" id="price0" value="0"> $0.00 - $99.99
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label for="price1">
|
||||
<input type="checkbox" name="price1" id="price1" value="1"> $100.00 - $199.99
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label for="price2">
|
||||
<input type="checkbox" name="price2" id="price2" value="2"> $200.00 and above
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div><!-- /Filter Price -->
|
||||
|
||||
<div class="filter filter-size">
|
||||
<fieldset>
|
||||
<legend class="filter-heading">Size</legend>
|
||||
<div class="filter-content">
|
||||
<div class="checkbox">
|
||||
<label for="size0">
|
||||
<input type="checkbox" name="size0" id="size0" value="0"> Large
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label for="size1">
|
||||
<input type="checkbox" name="size1" id="size1" value="1"> Medium
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label for="size2">
|
||||
<input type="checkbox" name="size2" id="size2" value="2"> Small
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div><!-- /Filter Size -->
|
||||
|
||||
<div class="group-btn">
|
||||
<button type="submit" class="btn btn-filter">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
</section><!-- /.filters -->
|
||||
67
templates/default/includes/category-toolbar.html
Normal file
67
templates/default/includes/category-toolbar.html
Normal file
@@ -0,0 +1,67 @@
|
||||
<div class="toolbar toolbar-{$toolbar}" role="toolbar">
|
||||
{if $toolbar == "top" }
|
||||
<div class="sorter-container">
|
||||
{*<span class="amount">9 {intl l="Item(s)"}</span>*}
|
||||
|
||||
<span class="limiter">
|
||||
<label for="limit-top">{intl l="Show"}</label>
|
||||
<select id="limit-top" name="limit">
|
||||
<option value="{url path="{category attr="url"}" limit="4"}" {if $limit==4}selected{/if}>4</option>
|
||||
<option value="{url path="{category attr="url"}" limit="8"}" {if $limit==8}selected{/if}>8</option>
|
||||
<option value="{url path="{category attr="url"}" limit="12"}" {if $limit==12}selected{/if}>12</option>
|
||||
<option value="{url path="{category attr="url"}" limit="50"}"{if $limit==50}selected{/if}>50</option>
|
||||
<option value="{url path="{category attr="url"}" limit="9999999999"}" {if $limit==9999999999}selected{/if}>All</option>
|
||||
</select>
|
||||
<span class="per-page">{intl l="per page"}</span>
|
||||
</span><!-- /.limiter -->
|
||||
|
||||
<span class="sort-by">
|
||||
<label for="sortby-top">{intl l="Sort By"}</label>
|
||||
<select id="sortby-top" name="sortby">
|
||||
{*<option value="{url path="{category attr="url"}" order="manual"}">{intl l="Position"}</option>*}
|
||||
<option value="{url path="{category attr="url"}" limit=$limit order="alpha"}" {if $order=="alpha"}selected{/if}>{intl l="Name ascending"}</option>
|
||||
<option value="{url path="{category attr="url"}" limit=$limit order="alpha_reverse"}" {if $order=="alpha_reverse"}selected{/if}>{intl l="Name descending"}</option>
|
||||
<option value="{url path="{category attr="url"}" limit=$limit order="min_price"}" {if $order=="min_price"}selected{/if}>{intl l="Price ascending"}</option>
|
||||
<option value="{url path="{category attr="url"}" limit=$limit order="max_price"}" {if $order=="max_price"}selected{/if}>{intl l="Price descending"}</option>
|
||||
{*<option value="{url path="{category attr="url"}" order="rating"}">{intl l="Rating"}</option>*}
|
||||
</select>
|
||||
</span><!-- /.sort-by -->
|
||||
|
||||
<span class="view-mode">
|
||||
<span class="view-mode-label">{intl l="View as"}:</span>
|
||||
<span class="view-mode-btn">
|
||||
<a href="{url path="{navigate to="current"}" mode="grid"}" data-toggle="view" role="button" class="btn btn-grid"><i class="icon-grid"></i></a>
|
||||
<a href="{url path="{navigate to="current"}" mode="list"}" data-toggle="view" role="button" class="btn btn-list "><i class="icon-list"></i></a>
|
||||
</span>
|
||||
</span><!-- /.view-mode -->
|
||||
|
||||
</div><!-- /.sorter -->
|
||||
{else}
|
||||
<div class="pagination-container" role="pagination" aria-labelledby="pagination-label-{$toolbar}}">
|
||||
<strong id="pagination-label-{$toolbar}}" class="pagination-label">{intl l="Pagination"}</strong>
|
||||
<ul class="pagination">
|
||||
|
||||
{if $product_page > 1}
|
||||
<li><a href="{url path={navigate to="current"} page={$product_page-1} }" class="prev"><i class="icon-prev"></i></a></li>
|
||||
{else}
|
||||
<li><a href="#" class="prev"><i class="icon-prev"></i></a></li>
|
||||
{/if}
|
||||
{pageloop rel="product_list"}
|
||||
{if $PAGE != $CURRENT}
|
||||
<li><a href="{url path={navigate to="current"} page=$PAGE }"> {$PAGE} </a></li>
|
||||
{else}
|
||||
<li class="active"><a href="#" tabindex="-1">{$PAGE}</a></li>
|
||||
{/if}
|
||||
{if $PAGE == $LAST}
|
||||
{if $CURRENT < $LAST}
|
||||
<li><a href="{url path={navigate to="current"} page={$CURRENT+1} }" class="next"><i class="icon-next"></i></a></li>
|
||||
{else}
|
||||
<li><a href="#" class="next"><i class="icon-next"></i></a></li>
|
||||
{/if}
|
||||
|
||||
{/if}
|
||||
{/pageloop}
|
||||
</ul>
|
||||
</div>
|
||||
{/if}
|
||||
</div><!-- /.toolbar toolbar-<?php echo $toolbar; ?> -->
|
||||
27
templates/default/includes/menu.html
Normal file
27
templates/default/includes/menu.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<section id="categories" class="block block-nav" role="navigation" aria-labelledby="categories-label">
|
||||
<div class="block-heading"><h3 class="block-title" id="categories-label">{intl l="Categories"}</h3></div>
|
||||
<div class="block-content">
|
||||
<nav class="nav-categories">
|
||||
<ul id="category" class="accordion">
|
||||
{assign "previousLevel" 0}
|
||||
{loop name="cat-parent" type="category-tree" category="0"}
|
||||
|
||||
{for $foo=1 to $previousLevel-$LEVEL}
|
||||
</ul>
|
||||
</li>
|
||||
{/for}
|
||||
|
||||
{if $CHILD_COUNT > 0 }
|
||||
<li><a class="accordion-toggle" data-toggle="collapse" data-parent="#category" href="{$URL}#collapse{$ID}">{$TITLE} <span class="amount">({$CHILD_COUNT})</span></a>
|
||||
|
||||
<ul id="collapse{$ID}" class="collapse">
|
||||
{else}
|
||||
|
||||
<li><a href="{$URL}">{$TITLE} <span class="amount">(0)</span></a></li>
|
||||
{/if}
|
||||
{assign "previousLevel" $LEVEL}
|
||||
{/loop}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</section>
|
||||
65
templates/default/includes/single-product.html
Normal file
65
templates/default/includes/single-product.html
Normal file
@@ -0,0 +1,65 @@
|
||||
<li class="item">
|
||||
<article itemscope itemtype="http://schema.org/Product">
|
||||
<!-- Use the meta tag to specify content that is not visible on the page in any way -->
|
||||
{loop name="brand.feature" type="feature" product=$ID title="brand"}
|
||||
{loop name="brand.value" type="feature_value" feature=$ID product=$product_id}
|
||||
<meta itemprop="brand" content="{$TITLE}">
|
||||
{/loop}
|
||||
{/loop}
|
||||
{loop name="brand.feature" type="feature" product=$ID title="isbn"}
|
||||
{loop name="brand.value" type="feature_value" feature=$ID product=$product_id}
|
||||
<meta itemprop="productID" content="isbn:{$TITLE}">
|
||||
{/loop}
|
||||
{/loop}
|
||||
|
||||
<a href="{$URL}" itemprop="url" tabindex="-1" class="product-image">
|
||||
{loop name="product_thumbnail" type="image" product=$ID width="{$width}" height="{$height}" resize_mode="borders" limit="1"}
|
||||
<img itemprop="image" src="{$IMAGE_URL}" alt="Product #{$LOOP_COUNT}">
|
||||
{/loop}
|
||||
{elseloop rel="product_thumbnail"}
|
||||
{images file="../assets/img/{$width}x{$height}.png"}<img itemprop="image" src="{$asset_url}" alt="Product #{$LOOP_COUNT}">{/images}
|
||||
{/elseloop}
|
||||
<span class="mask"></span>
|
||||
</a>
|
||||
|
||||
<div class="product-info">
|
||||
<h3 class="name"><a href="{$URL}"><span itemprop="name">{$TITLE}</span></a></h3>
|
||||
{if $hasDescription}
|
||||
<div class="description" itemprop="description">
|
||||
<p>{$DESCRIPTION}</p>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div class="product-price">
|
||||
<div class="price-container" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
|
||||
<meta itemprop="category" content="{category attr="title"}">
|
||||
<meta itemprop="itemCondition" itemscope itemtype="http://schema.org/NewCondition"> <!-- List of condition : NewCondition, DamagedCondition, UsedCondition, RefurbishedCondition -->
|
||||
<meta itemprop="priceCurrency" content="{currency attr="symbol"}"> <!-- 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" order="min_price"}
|
||||
{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="regular-price"><span itemprop="price" class="price">{format_number number=$BEST_TAXED_PRICE} {currency attr="symbol"}</span></span>
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
{if $hasBtn}
|
||||
<div class="product-btn">
|
||||
<button class="btn btn-cart">Add to cart</button>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</article><!-- /product -->
|
||||
</li>
|
||||
@@ -39,8 +39,17 @@
|
||||
<li class="item">
|
||||
<article 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">
|
||||
{$product_id=$ID}
|
||||
{loop name="brand.feature" type="feature" product="{$ID}" title="brand"}
|
||||
{loop name="brand.value" type="feature_value" feature="{$ID}" product="$product_id"}
|
||||
<meta itemprop="brand" content="{$TITLE}">
|
||||
{/loop}
|
||||
{/loop}
|
||||
{loop name="brand.feature" type="feature" product=$ID title="isbn"}
|
||||
{loop name="brand.value" type="feature_value" feature=$ID product=$product_id}
|
||||
<meta itemprop="productID" content="isbn:{$TITLE}">
|
||||
{/loop}
|
||||
{/loop}
|
||||
|
||||
<a href="{$URL}" itemprop="url" tabindex="-1" class="product-image">
|
||||
{ifloop rel="image_product_new" }
|
||||
@@ -62,7 +71,9 @@
|
||||
|
||||
<div class="product-price">
|
||||
<div class="price-container" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
|
||||
<meta itemprop="category" content="Category1">
|
||||
{loop type="category" name="category_tag" id=$DEFAULT_CATEGORY}
|
||||
<meta itemprop="category" content="{$TITLE}">
|
||||
{/loop}
|
||||
<meta itemprop="itemCondition" itemscope itemtype="http://schema.org/NewCondition"> <!-- List of condition : NewCondition, DamagedCondition, UsedCondition, RefurbishedCondition -->
|
||||
<meta itemprop="priceCurrency" content="{currency attr="code"}"> <!-- 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" />
|
||||
@@ -74,8 +85,7 @@
|
||||
preorder : http://schema.org/PreOrder
|
||||
online_only : http://schema.org/OnlineOnly
|
||||
-->
|
||||
<span class="regular-price"><span itemprop="price" class="price">{currency attr="symbol"} {format_number number="{$BEST_TAXED_PRICE}"}
|
||||
</span></span>
|
||||
<span class="regular-price"><span itemprop="price" class="price">{format_number number="{$BEST_TAXED_PRICE}"} {currency attr="symbol"}</span></span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
@@ -95,51 +105,7 @@
|
||||
<div class="products-content">
|
||||
<ul class="products-grid product-col-5 hover-effect">
|
||||
{loop name="product_promo" type="product" limit="5" promo="yes"}
|
||||
<li class="item">
|
||||
<article 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">
|
||||
|
||||
<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}" width="218" height="146" resize_mode="borders"}
|
||||
src="{$IMAGE_URL}"
|
||||
{/loop}
|
||||
alt="Product #{$LOOP_COUNT}" >
|
||||
{/ifloop}
|
||||
{elseloop rel="image_product_promo"}
|
||||
{images file='assets/img/218x146.png'}<img itemprop="image" src="{$asset_url}" alt="Promotion #{$LOOP_COUNT}">{/images}
|
||||
{/elseloop}
|
||||
<span class="mask"></span>
|
||||
</a>
|
||||
|
||||
<div class="product-info">
|
||||
<h3 class="name"><a href="{$URL}"><span itemprop="name">{$CHAPO}</span></a></h3>
|
||||
</div>
|
||||
|
||||
<div class="product-price">
|
||||
<div class="price-container" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
|
||||
<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="{currency attr="code"}"> <!-- 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
|
||||
-->
|
||||
{loop name="productSaleElements_promo" type="product_sale_elements" product="{$ID}" limit="1"}
|
||||
<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}
|
||||
</div>
|
||||
</div>
|
||||
</article><!-- /product -->
|
||||
</li>
|
||||
{include file="includes/single-product.html" product_id=$ID hasBtn=false hasDescription=false width="218" height="146"}
|
||||
{/loop}
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -66,8 +66,31 @@ URL: http://www.thelia.net
|
||||
<!-- Place everything within .nav-collapse to hide it until above 768px -->
|
||||
<nav class="navbar-collapse collapse nav-main" role="navigation" aria-label="Main Navigation">
|
||||
<ul class="nav navbar-nav navbar-categories">
|
||||
<<<<<<< HEAD
|
||||
<li><a href="{url path="/"}" class="home">{intl l="Home"}</a></li>
|
||||
{loop type="category" name="category.navigation" parent="0" limit="3"}
|
||||
=======
|
||||
<li class="active"><a href="{url path="/"}" class="home" tabindex="-1">Home</a></li>
|
||||
{* <li class="dropdown">
|
||||
<a href="" data-toggle="dropdown" class="dropdown-toggle">Pages</a>
|
||||
<ul class="dropdown-menu list-subnav" role="menu">
|
||||
<li class="active"><a href="index.html" tabindex="-1">Index</a></li>
|
||||
<li><a href="category.html">Category Grid</a></li>
|
||||
<li><a href="category-list.html">Category List</a></li>
|
||||
<li><a href="account.html">Account</a></li>
|
||||
<li><a href="login.html">Login</a></li>
|
||||
<li><a href="password.html">Forgot Password</a></li>
|
||||
<li><a href="register.html">Register</a></li>
|
||||
<li><a href="cart.html">Cart</a></li>
|
||||
<li><a href="cart-step2.html">Cart (Step 2)</a></li>
|
||||
<li><a href="cart-step3.html">Cart (Step 3)</a></li>
|
||||
<li><a href="cart-step4.html">Cart (Step 4)</a></li>
|
||||
<li><a href="product-details.html">Product details</a></li>
|
||||
<li><a href="address.html">New address</a></li>
|
||||
</ul>
|
||||
</li>*}
|
||||
{loop type="category" name="category.navigation" parent="0"}
|
||||
>>>>>>> master
|
||||
<li><a href="{$URL}">{$TITLE}</a></li>
|
||||
{/loop}
|
||||
</ul>
|
||||
@@ -77,13 +100,23 @@ URL: http://www.thelia.net
|
||||
<li><a href="{url path="/customer/account"}" class="account">{intl l="My Account"}</a></li>
|
||||
{/loop}
|
||||
|
||||
<<<<<<< HEAD
|
||||
{elseloop rel="customer_info_block" rel="customer_info_block"}
|
||||
<li><a href="{url path="/register"}" class="register">{intl l="Register"}!</a></li>
|
||||
<li><a href="{url path="/login"}" class="login">{intl l="Log In!"}</a></li>
|
||||
=======
|
||||
{elseloop rel="customer_info_block"}
|
||||
<li><a href="{url path="/register"}" class="register">{intl l="Register"}!</a></li>
|
||||
<li><a href="{url path="/login"}" class="login">{intl l="Log In!"}</a></li>
|
||||
>>>>>>> master
|
||||
{/elseloop}
|
||||
|
||||
<li class="dropdown">
|
||||
<<<<<<< HEAD
|
||||
<a href="{url path="/cart"}" class="cart" data-toggle="dropdown">
|
||||
=======
|
||||
<a href="{url path="/cart"}" class="dropdown-toggle cart" {*data-toggle="dropdown"*}>
|
||||
>>>>>>> master
|
||||
Cart <span class="badge">{cart attr="count_item"}</span>
|
||||
</a>
|
||||
</li>
|
||||
@@ -302,10 +335,10 @@ URL: http://www.thelia.net
|
||||
</address>
|
||||
</li>
|
||||
<li class="contact-phone">
|
||||
<span class="tel" itemprop="telephone">+33 09 08 07 06 05</span>
|
||||
<span class="tel" itemprop="telephone">+33 04 44 05 31 00</span>
|
||||
</li>
|
||||
<li class="contact-email">
|
||||
<a href="mailto:demo@thelia.net" class="email" itemprop="email">demo@thelia.net</a>
|
||||
<a href="mailto:demo@thelia.net" class="email" itemprop="email">info@thelia.net</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
{extends file="layout.tpl"}
|
||||
|
||||
<<<<<<< HEAD
|
||||
* Body Class *}
|
||||
{block name="body-class"}page-login{/block}
|
||||
=======
|
||||
{block name="breadcrumb"}
|
||||
<nav class="nav-breadcrumb" role="navigation" aria-labelledby="breadcrumb-label">
|
||||
<strong id="breadcrumb-label">{intl l="You are here"}: </strong>
|
||||
<ul class="breadcrumb" itemprop="breadcrumb">
|
||||
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="{navigate to="index"}" itemprop="url"><span itemprop="title">{intl l="Home"}</span></a></li>
|
||||
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb" class="active"><span itemprop="title">{intl l="Login"}</span></li>
|
||||
</ul>
|
||||
</nav><!-- /.nav-breadcrumb -->
|
||||
{/block}
|
||||
>>>>>>> master
|
||||
|
||||
{* Breadcrumb *}
|
||||
{block name='no-return-functions' append}
|
||||
|
||||
@@ -21,13 +21,13 @@
|
||||
<div class="main">
|
||||
<article id="cart" class="col-main" role="main" aria-labelledby="main-label">
|
||||
|
||||
<h1 id="main-label" class="page-header">Your Cart</h1>
|
||||
<h1 id="main-label" class="page-header">{intl l="Your Cart"}</h1>
|
||||
|
||||
<div class="btn-group checkout-progress">
|
||||
<a href="{url path="/cart"}" role="button" class="btn btn-step"><span class="step-nb">1</span> <span class="step-label">Your Cart</span></a>
|
||||
<a href="#" role="button" class="btn btn-step active"><span class="step-nb">2</span> <span class="step-label">Billing and delivery</span></a>
|
||||
<a href="#" role="button" class="btn btn-step disabled"><span class="step-nb">3</span> <span class="step-label">Check my order</span></a>
|
||||
<a href="#" role="button" class="btn btn-step disabled"><span class="step-nb">4</span> <span class="step-label">Secure payment</span></a>
|
||||
<a href="{url path="/cart"}" role="button" class="btn btn-step"><span class="step-nb">1</span> <span class="step-label">{intl l="Your Cart"}</span></a>
|
||||
<a href="#" role="button" class="btn btn-step active"><span class="step-nb">2</span> <span class="step-label">{intl l="Billing and delivery"}</span></a>
|
||||
<a href="#" role="button" class="btn btn-step disabled"><span class="step-nb">3</span> <span class="step-label">{intl l="Check my order"}</span></a>
|
||||
<a href="#" role="button" class="btn btn-step disabled"><span class="step-nb">4</span> <span class="step-label">{intl l="Secure payment"}</span></a>
|
||||
</div>
|
||||
|
||||
{form name="thelia.order.delivery"}
|
||||
@@ -41,8 +41,8 @@
|
||||
|
||||
<div id="delivery-address" class="panel">
|
||||
<div class="panel-heading clearfix">
|
||||
<a href="{url path="/address/create"}" class="btn btn-add-address">Add a new address</a>
|
||||
Chose your delivery address
|
||||
<a href="{url path="/address/create"}" class="btn btn-add-address">{intl l="Add a new address"}</a>
|
||||
{intl l="Chose your delivery address"}
|
||||
{if $error}
|
||||
<span class="help-block"><span class="icon-remove"></span> {$message}</span>
|
||||
{/if}
|
||||
@@ -96,7 +96,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<div class="group-btn">
|
||||
<a href="{url path="/address/update/{$ID}"}" class="btn btn-edit-address" data-toggle="tooltip" title="Edit this address"><i class="icon-pencil"></i> <span>{intl l="Edit"}</span></a>
|
||||
<a href="{url path="/address/update/{$ID}"}" class="btn btn-edit-address" data-toggle="tooltip" title="{intl l="Edit this address"}"><i class="icon-pencil"></i> <span>{intl l="Edit"}</span></a>
|
||||
{if $DEFAULT != 1}
|
||||
<a href="{url path="/address/delete/{$ID}"}" class="btn btn-remove-address js-remove-address" title="{intl l="Remove this address"}" data-toggle="tooltip"><i class="icon-remove"></i> <span>{intl l="Cancel"}</span></a>
|
||||
{/if}
|
||||
@@ -117,7 +117,7 @@
|
||||
|
||||
<div id="delivery-method" class="panel">
|
||||
<div class="panel-heading">
|
||||
Choose your delivery method
|
||||
{intl l="Choose your delivery method"}
|
||||
{if $error}
|
||||
<span class="help-block"><span class="icon-remove"></span> {$message}</span>
|
||||
{/if}
|
||||
@@ -138,8 +138,8 @@
|
||||
|
||||
{/form_field}
|
||||
|
||||
<a href="{url path="/cart"}" role="button" class="btn btn-back"><span>Back</span></a>
|
||||
<button type="submit" class="btn btn-checkout-next"><span>Next Step</span></button>
|
||||
<a href="{url path="/cart"}" role="button" class="btn btn-back"><span>{intl l="Back"}</span></a>
|
||||
<button type="submit" class="btn btn-checkout-next"><span>{intl l="Next Step"}</span></button>
|
||||
|
||||
</form>
|
||||
{/form}
|
||||
@@ -22,13 +22,13 @@
|
||||
<div class="main">
|
||||
<article class="col-main" role="main" aria-labelledby="main-label">
|
||||
|
||||
<h1 id="main-label" class="page-header">Your Cart</h1>
|
||||
<h1 id="main-label" class="page-header">{intl l="Your Cart"}</h1>
|
||||
|
||||
<div class="btn-group checkout-progress">
|
||||
<a href="{url path="/cart"}" role="button" class="btn btn-step"><span class="step-nb">1</span> <span class="step-label"> <span>Your Cart</span></a>
|
||||
<a href="{url path="/order/delivery"}" role="button" class="btn btn-step"><span class="step-nb">2</span> <span class="step-label">Billing and delivery</span></a>
|
||||
<a href="#" role="button" class="btn btn-step active"><span class="step-nb">3</span> <span class="step-label">Check my order</span></a>
|
||||
<a href="#" role="button" class="btn btn-step disabled"><span class="step-nb">4</span> <span class="step-label">Secure payment</span></a>
|
||||
<a href="{url path="/cart"}" role="button" class="btn btn-step"><span class="step-nb">1</span> <span class="step-label"> <span>{intl l="Your Cart"}</span></a>
|
||||
<a href="{url path="/order/delivery"}" role="button" class="btn btn-step"><span class="step-nb">2</span> <span class="step-label">{intl l="Billing and delivery"}</span></a>
|
||||
<a href="#" role="button" class="btn btn-step active"><span class="step-nb">3</span> <span class="step-label">{intl l="Check my order"}</span></a>
|
||||
<a href="#" role="button" class="btn btn-step disabled"><span class="step-nb">4</span> <span class="step-label">{intl l="Secure payment"}</span></a>
|
||||
</div>
|
||||
|
||||
{form name="thelia.order.payment"}
|
||||
@@ -50,20 +50,20 @@
|
||||
<tr>
|
||||
<th class="image"> </th>
|
||||
<th class="product">
|
||||
<span class="hidden-xs">Product Name</span>
|
||||
<span class="visible-xs">Name</span>
|
||||
<span class="hidden-xs">{intl l="Product Name"}</span>
|
||||
<span class="visible-xs">{intl l="Name"}</span>
|
||||
</th>
|
||||
<th class="unitprice">
|
||||
<span class="hidden-xs">Unit Price</span>
|
||||
<span class="visible-xs">Price</span>
|
||||
<span class="hidden-xs">{intl l="Unit Price"}</span>
|
||||
<span class="visible-xs">{intl l="Price"}</span>
|
||||
</th>
|
||||
<th class="qty">
|
||||
<span class="hidden-xs">Quantity</span>
|
||||
<span class="visible-xs">Quantity</span>
|
||||
<span class="hidden-xs">{intl l="Quantity"}</span>
|
||||
<span class="visible-xs">{intl l="Quantity"}</span>
|
||||
</th>
|
||||
<th class="subprice">
|
||||
<span class="hidden-xs">Total <abbr title="Tax Inclusive">TTC</abbr></span>
|
||||
<span class="visible-xs">Total</span>
|
||||
<span class="hidden-xs">{intl l="Total"} <abbr title="{intl l="Tax Inclusive"}">{intl l="TTC"}</abbr></span>
|
||||
<span class="visible-xs">{intl l="Total"}</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -87,13 +87,13 @@
|
||||
</td>
|
||||
<td class="product" >
|
||||
<h3 class="name">
|
||||
Product #{$cart_count}
|
||||
{$TITLE}
|
||||
</h3>
|
||||
<div class="product-options">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Available :</dt>
|
||||
<dd>In Stock</dd>
|
||||
<dt>No.</dt>
|
||||
<dt>{intl l="Available"} :</dt>
|
||||
<dd>{intl l="In Stock"}</dd>
|
||||
<dt>{intl l="No."}</dt>
|
||||
<dd>{$REF}</dd>
|
||||
{*<dt>Select Size</dt>
|
||||
<dd>Large</dd>
|
||||
@@ -108,7 +108,7 @@
|
||||
{if $IS_PROMO == 1}
|
||||
{assign "real_price" $PROMO_TAXED_PRICE}
|
||||
<div class="special-price"><span class="price">{currency attr="symbol"} {$PROMO_TAXED_PRICE}</span></div>
|
||||
<small class="old-price">instead of <span class="price">{currency attr="symbol"} {$TAXED_PRICE}</span></small>
|
||||
<small class="old-price">{intl l="instead of"} <span class="price">{currency attr="symbol"} {$TAXED_PRICE}</span></small>
|
||||
{else}
|
||||
{assign "real_price" $TAXED_PRICE}
|
||||
<div class="special-price"><span class="price">{currency attr="symbol"} {$TAXED_PRICE}</span></div>
|
||||
@@ -128,7 +128,7 @@
|
||||
<tfoot>
|
||||
<tr >
|
||||
<td rowspan="3" colspan="3" class="empty"> </td>
|
||||
<th class="shipping">Shipping Tax</th>
|
||||
<th class="shipping">{intl l="Shipping Tax"}</th>
|
||||
<td class="shipping">
|
||||
<div class="shipping-price">
|
||||
<span class="price">{currency attr="symbol"} {order attr="postage"}</span>
|
||||
@@ -136,18 +136,18 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr >
|
||||
<th class="coupon"><label for="coupon">Enter your coupon code if you have one</label></th>
|
||||
<th class="coupon"><label for="coupon">{intl l="You may have a coupon ?"}</label></th>
|
||||
<td class="coupon">
|
||||
<div class="input-group">
|
||||
<input type="text" name="coupon" id="coupon" class="form-control">
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-coupon">Ok</button>
|
||||
<button type="button" class="btn btn-coupon">{intl l="Ok"}</button>
|
||||
</span>
|
||||
</div><!-- /input-group -->
|
||||
</td>
|
||||
</tr>
|
||||
<tr >
|
||||
<th class="total">Total <abbr title="Tax Inclusive">TTC</abbr></th>
|
||||
<th class="total">{intl l="Total"} <abbr title="{intl l="Tax Inclusive"}">{intl l="TTC"}</abbr></th>
|
||||
<td class="total">
|
||||
<div class="total-price">
|
||||
<span class="price">{currency attr="symbol"} {{cart attr="total_taxed_price"} + {order attr="postage"}}</span>
|
||||
@@ -159,8 +159,8 @@
|
||||
|
||||
<div id="cart-address">
|
||||
<div class="panel">
|
||||
{loop type="address" name="delivery-address" id="{order attr="delivery_address"}"}
|
||||
<div class="panel-heading">Delivery address</div>
|
||||
{loop type="address" name="delivery-address" id={order attr="delivery_address"}}
|
||||
<div class="panel-heading">{intl l="Delivery address"}</div>
|
||||
<div class="panel-body">
|
||||
<span class="fn">{loop type="title" name="customer.title.info" id=$TITLE}{$SHORT}{/loop} {$LASTNAME|upper} {$FIRSTNAME|ucwords}</span>
|
||||
<span class="org">{$COMPANY}</span>
|
||||
@@ -182,7 +182,7 @@
|
||||
{form_field form=$form field='invoice-address'}
|
||||
|
||||
<div class="panel">
|
||||
<div class="panel-heading">Billing address</div>
|
||||
<div class="panel-heading">{intl l="Billing addres"}s</div>
|
||||
|
||||
{if $error}
|
||||
<span class="help-block"><span class="icon-remove"></span> {$message}</span>
|
||||
@@ -192,7 +192,17 @@
|
||||
|
||||
<table class="col-md-12">
|
||||
|
||||
{loop type="address" name="invoice-address" default="{if !$error && $value}*{else}true{/if}" id="{if !$error && $value}{$value}{else}*{/if}"}
|
||||
{if !$error && $value}
|
||||
{assign defaultParam '*'}
|
||||
{else}
|
||||
{assign defaultParam 'true'}
|
||||
{/if}
|
||||
{if !$error && $value}
|
||||
{assign idParam $value}
|
||||
{else}
|
||||
{assign idParam '*'}
|
||||
{/if}
|
||||
{loop type="address" name="invoice-address" default=$defaultParam id=$idParam}
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
@@ -218,14 +228,24 @@
|
||||
{if !$error}
|
||||
<tr class="js-change-invoice-address">
|
||||
<td colspan="2">
|
||||
<a href="#" class="btn btn-change-address">Change address</a>
|
||||
<a href="#" class="btn btn-change-address">{intl l="Change address"}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
{/loop}
|
||||
|
||||
{loop type="address" name="invoice-address" default="{if !$error && $value}*{else}false{/if}" exclude="{if !$error && $value}{$value}{else}none{/if}"}
|
||||
{if !$error && $value}
|
||||
{assign defaultParam '*'}
|
||||
{else}
|
||||
{assign defaultParam 'false'}
|
||||
{/if}
|
||||
{if !$error && $value}
|
||||
{assign excludeParam $value}
|
||||
{else}
|
||||
{assign excludeParam 'none'}
|
||||
{/if}
|
||||
{loop type="address" name="invoice-address" default=$defaultParam exclude=$excludeParam}
|
||||
|
||||
<tr class="js-other-invoice-address {if !$error}hidden{/if}">
|
||||
<td>
|
||||
@@ -262,7 +282,7 @@
|
||||
{form_field form=$form field='payment-module'}
|
||||
|
||||
<div id="payment-method" class="panel">
|
||||
<div class="panel-heading">Choose your payment method</div>
|
||||
<div class="panel-heading">{intl l="Choose your payment method"}</div>
|
||||
|
||||
{if $error}
|
||||
<span class="help-block"><span class="icon-remove"></span> {$message}</span>
|
||||
@@ -295,8 +315,8 @@
|
||||
|
||||
{/form_field}
|
||||
|
||||
<a href="{url path="/order/delivery"}" role="button" class="btn btn-back"><span>Back</span></a>
|
||||
<button type="submit" class="btn btn-checkout-next"><span>Next Step</span></button>
|
||||
<a href="{url path="/order/delivery"}" role="button" class="btn btn-back"><span>{intl l="Back"}</span></a>
|
||||
<button type="submit" class="btn btn-checkout-next"><span>{intl l="Next Step"}</span></button>
|
||||
</form>
|
||||
|
||||
{/form}
|
||||
@@ -16,46 +16,42 @@
|
||||
<div class="main">
|
||||
<article class="col-main clearfix" role="main" aria-labelledby="main-label">
|
||||
|
||||
<h1 id="main-label" class="page-header">Your Cart</h1>
|
||||
<h1 id="main-label" class="page-header">{intl l="Your Cart"}</h1>
|
||||
|
||||
<div class="btn-group checkout-progress">
|
||||
<a href="cart.php" role="button" class="btn btn-step disabled"><span class="step-nb">1</span> <span class="step-label">Your Cart</span></a>
|
||||
<a href="cart-step2.php" role="button" class="btn btn-step disabled"><span class="step-nb">2</span> <span class="step-label">Billing and delivery</span></a>
|
||||
<a href="cart-step3.php" role="button" class="btn btn-step disabled"><span class="step-nb">3</span> <span class="step-label">Check my order</span></a>
|
||||
<a href="cart-step4.php" role="button" class="btn btn-step active"><span class="step-nb">4</span> <span class="step-label">Secure payment</span></a>
|
||||
<a href="cart.php" role="button" class="btn btn-step disabled"><span class="step-nb">1</span> <span class="step-label">{intl l="Your Cart"}</span></a>
|
||||
<a href="cart-step2.php" role="button" class="btn btn-step disabled"><span class="step-nb">2</span> <span class="step-label">{intl l="Billing and delivery"}</span></a>
|
||||
<a href="cart-step3.php" role="button" class="btn btn-step disabled"><span class="step-nb">3</span> <span class="step-label">{intl l="Check my order"}</span></a>
|
||||
<a href="cart-step4.php" role="button" class="btn btn-step active"><span class="step-nb">4</span> <span class="step-label">{intl l="Secure payment"}</span></a>
|
||||
</div>
|
||||
|
||||
{loop type="order" name="placed-order" id=$placed_order_id}
|
||||
|
||||
<div id="payment-success" class="panel">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">You chose to pay by : <span class="payment-method">Cheque</span></h3>
|
||||
<h3 class="panel-title">{intl l="You chose to pay by"} : <span class="payment-method">{loop name="payment-module" type="module" id=$PAYMENT_MODULE}{$TITLE}{/loop}</span></h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<h3>Thank you for the trust you place in us.</h3>
|
||||
<p>A summary of your order email has been sent to the following address: email@toto.com</p>
|
||||
<p>Your order will be confirmed by us upon receipt of your payment.</p>
|
||||
<h3>{intl l="Thank you for the trust you place in us."}</h3>
|
||||
<p>{intl l="A summary of your order email has been sent to the following address"} : {customer attr="email"}</p>
|
||||
<p>{intl l="Your order will be confirmed by us upon receipt of your payment."}</p>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Order number : </dt>
|
||||
<dd>PRO123456788978979</dd>
|
||||
<dt>Date : </dt>
|
||||
<dd>02/12/2013</dd>
|
||||
<dt>Total : </dt>
|
||||
<dd>$216.25</dd>
|
||||
<dt>{intl l="Order number"} : </dt>
|
||||
<dd>{$REF}</dd>
|
||||
<dt>{intl l="Date"} : </dt>
|
||||
<dd>{format_date date=$CREATE_DATE output="date"}</dd>
|
||||
<dt>{intl l="Total"} : </dt>
|
||||
<dd>{loop type="currency" name="order-currency" id=$CURRENCY}{$SYMBOL}{/loop} {$TOTAL_TAXED_AMOUNT}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a href="{navigate to="index"}" role="button" class="btn btn-checkout-home"><span>Go home</span></a>
|
||||
{/loop}
|
||||
|
||||
<a href="{navigate to="index"}" role="button" class="btn btn-checkout-home"><span>{intl l="Go home"}</span></a>
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
<script type="text/javascript">
|
||||
jQuery(function($order) {
|
||||
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
@@ -1,5 +1,6 @@
|
||||
{extends file="layout.tpl"}
|
||||
|
||||
<<<<<<< HEAD
|
||||
{* Body Class *}
|
||||
{block name="body-class"}page-password{/block}
|
||||
|
||||
@@ -8,6 +9,16 @@
|
||||
{$breadcrumbs = [
|
||||
['name' => {intl l="Password"}, 'link'=>{url path="/password"}]
|
||||
]}
|
||||
=======
|
||||
{block name="breadcrumb"}
|
||||
<nav class="nav-breadcrumb" role="navigation" aria-labelledby="breadcrumb-label">
|
||||
<strong id="breadcrumb-label">{intl l="You are here"} </strong>
|
||||
<ul class="breadcrumb" itemprop="breadcrumb">
|
||||
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="{navigate to="index"}" itemprop="url"><span itemprop="title">{intl l="Home"}</span></a></li>
|
||||
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb" class="active"><span itemprop="title">{intl l="Password"}</span></li>
|
||||
</ul>
|
||||
</nav><!-- /.nav-breadcrumb -->
|
||||
>>>>>>> master
|
||||
{/block}
|
||||
|
||||
|
||||
@@ -18,7 +29,7 @@
|
||||
{form name="thelia.customer.lostpassword"}
|
||||
<form id="form-forgotpassword" action="{url path="/password"}" method="post" role="form">
|
||||
|
||||
<p>{intl l="Please enter your email address below." {intl l="You will receive a link to reset your password."}</p>
|
||||
<p>{intl l="Please enter your email address below."} {intl l="You will receive a link to reset your password."}</p>
|
||||
{form_field form=$form field="email"}
|
||||
<div class="form-group group-email {if $error}has-error{elseif !$error && $value != ""}has-success{/if}">
|
||||
<label for="{$label_attr.for}">{$label}</label>
|
||||
|
||||
@@ -4,12 +4,15 @@
|
||||
|
||||
{block name="breadcrumb"}
|
||||
<nav class="nav-breadcrumb" role="navigation" aria-labelledby="breadcrumb-label">
|
||||
<strong id="breadcrumb-label">You are here: </strong>
|
||||
<strong id="breadcrumb-label">{intl l="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>
|
||||
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="{navigate to="index"}" itemprop="url"><span itemprop="title">{intl l="Home"}</span></a></li>
|
||||
{loop type="product" name="product_breadcrumb" id="{product attr="id"}"}
|
||||
{loop name="category_path" type="category-path" category="{$DEFAULT_CATEGORY}"}
|
||||
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="{$URL}" itemprop="url"><span itemprop="title">{$TITLE}</span></a></li>
|
||||
{/loop}
|
||||
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb" class="active"><span itemprop="title">{$TITLE}</span></li>
|
||||
{/loop}
|
||||
</ul>
|
||||
</nav><!-- /.nav-breadcrumb -->
|
||||
{/block}
|
||||
@@ -25,11 +28,11 @@
|
||||
<meta itemprop="brand" content="{$TITLE}">
|
||||
{/loop}
|
||||
{/loop}
|
||||
|
||||
<!--
|
||||
activate this meta tag if you have isbn feature for exemple
|
||||
<meta itemprop="productID" content="isbn:925872">
|
||||
-->
|
||||
{loop name="brand.feature" type="feature" product=$ID title="isbn"}
|
||||
{loop name="brand.value" type="feature_value" feature=$ID product=$product_id}
|
||||
<meta itemprop="productID" content="isbn:{$TITLE}">
|
||||
{/loop}
|
||||
{/loop}
|
||||
|
||||
<section id="product-gallery">
|
||||
<figure class="product-image">
|
||||
@@ -57,10 +60,10 @@
|
||||
<div class="item">
|
||||
<ul>
|
||||
|
||||
{loop name="image.carouselsup" type="image" product="{$ID}" width="560" height="445" resize_mode="crop" offset="5"}
|
||||
{loop name="image.carouselsup" type="image" product="{$ID}" width="560" height="445" resize_mode="borders" offset="5"}
|
||||
<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"}
|
||||
{loop type="image" name="image.thumbssup" id="{$ID}" product="$OBJECT_ID" width="118" height="85" resize_mode="borders"}
|
||||
<img src="{$IMAGE_URL}" alt="{$TITLE}">
|
||||
{/loop}
|
||||
</a>
|
||||
@@ -92,7 +95,9 @@
|
||||
<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">
|
||||
{loop type="category" name="category_tag" id=$DEFAULT_CATEGORY}
|
||||
<meta itemprop="category" content="{$TITLE}">
|
||||
{/loop}
|
||||
<meta itemprop="itemCondition" itemscope itemtype="http://schema.org/NewCondition"> <!-- List of condition : NewCondition, DamagedCondition, UsedCondition, RefurbishedCondition -->
|
||||
<meta itemprop="priceCurrency" content="{currency attr="symbol"}"> <!-- 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" />
|
||||
@@ -110,7 +115,7 @@
|
||||
<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>
|
||||
<span class="regular-price"><span itemprop="price" class="price">{format_number number="{$BEST_TAXED_PRICE}"} {currency attr="symbol"}</span></span>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
@@ -195,7 +200,17 @@
|
||||
<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>
|
||||
{ifloop rel="feature_value_info"}
|
||||
<ul>
|
||||
{loop name="feature_info" type="feature" product="{$ID}"}
|
||||
<li> <strong>{$TITLE}</strong> :
|
||||
{loop name="feature_value_info" type="feature_value" feature="{$ID}" product="{product attr="id"}"}
|
||||
{$TITLE}
|
||||
{/loop}
|
||||
</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
{/ifloop}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
{* Breadcrumb *}
|
||||
{block name='no-return-functions' append}
|
||||
{$breadcrumbs = [['name' => {intl l="Account"}, 'link'=>{url path="/account"}]]}
|
||||
{$breadcrumbs = [['name' => {intl l="Register"}, 'link'=>{url path="/register"}]]}
|
||||
{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
|
||||
Reference in New Issue
Block a user