Merge branch 'master' into tax
Conflicts: core/lib/Thelia/Core/Template/Loop/FeatureValue.php core/lib/Thelia/Model/Base/AttributeTemplate.php core/lib/Thelia/Model/Base/AttributeTemplateQuery.php core/lib/Thelia/Model/Map/AttributeTemplateTableMap.php install/thelia.sql local/config/schema.xml
This commit is contained in:
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>
|
||||
|
||||
@@ -85,7 +85,7 @@ $(function($){
|
||||
couponManager.createOrUpdateRuleAjax();
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
};
|
||||
couponManager.onClickSaveRule();
|
||||
@@ -96,6 +96,7 @@ $(function($){
|
||||
e.preventDefault();
|
||||
var $this = $(this);
|
||||
couponManager.removeRuleAjax($this.attr('data-int'));
|
||||
return false;
|
||||
});
|
||||
};
|
||||
couponManager.onClickDeleteRule();
|
||||
@@ -109,6 +110,7 @@ $(function($){
|
||||
|
||||
// Hide row being updated
|
||||
$this.parent().parent().remove();
|
||||
return false;
|
||||
});
|
||||
};
|
||||
couponManager.onClickUpdateRule();
|
||||
|
||||
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;
|
||||
});
|
||||
};
|
||||
});
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@
|
||||
@import "bootstrap-switch.less";
|
||||
@import "bootstrap-select.less";
|
||||
@import "jqplot.less";
|
||||
@import "dropzone.less";
|
||||
|
||||
// -- Base styling ------------------------------------------------------------
|
||||
|
||||
@@ -231,6 +232,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
.tab-content {
|
||||
// Center loading indicator
|
||||
.loading {
|
||||
margin: 8em auto;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
// The overall form container
|
||||
.form-container {
|
||||
|
||||
@@ -280,5 +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;
|
||||
}
|
||||
|
||||
|
||||
.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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -246,9 +246,11 @@
|
||||
</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">
|
||||
@@ -286,9 +288,20 @@ form_content = {$smarty.capture.delete_content_dialog nofilter}
|
||||
{/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}
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$.imageUploadManager.initImageDropZone();
|
||||
$.documentUploadManager.initDocumentDropZone();
|
||||
|
||||
$('.use_default_rewriten_url').click(function(ev) {
|
||||
alert("Not functionnal");
|
||||
|
||||
@@ -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'))
|
||||
|
||||
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'))
|
||||
|
||||
@@ -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>
|
||||
@@ -246,9 +246,11 @@
|
||||
</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}
|
||||
@@ -7,8 +7,8 @@
|
||||
{block name="main-content"}
|
||||
<div class="folders">
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
{* include file="includes/folder-breadcrumb.html" *}
|
||||
|
||||
{module_include location='folders_top'}
|
||||
@@ -20,7 +20,7 @@
|
||||
<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}
|
||||
{loop name="folder_title" type="folder" visible="*" id=$folder_id}
|
||||
{intl l="Folders in %fold" fold=$TITLE}
|
||||
{$fold_id = $ID}
|
||||
{/loop}
|
||||
@@ -28,11 +28,6 @@
|
||||
{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"}
|
||||
@@ -50,7 +45,7 @@
|
||||
current_order=$folder_order
|
||||
order='id'
|
||||
reverse_order='id_reverse'
|
||||
path={url path='/admin/folders' parent=$parent}
|
||||
path={url path='/admin/folders' id_folder=$folder_id}
|
||||
request_parameter_name='folder_order'
|
||||
label="{intl l='ID'}"
|
||||
}
|
||||
@@ -63,7 +58,7 @@
|
||||
current_order=$folder_order
|
||||
order='alpha'
|
||||
reverse_order='alpha_reverse'
|
||||
path={url path='/admin/folders' parent=$parent}
|
||||
path={url path='/admin/folders' id_folder=$folder_id}
|
||||
request_parameter_name='folder_order'
|
||||
label="{intl l='Folder title'}"
|
||||
}
|
||||
@@ -76,7 +71,7 @@
|
||||
current_order=$folder_order
|
||||
order='visible'
|
||||
reverse_order='visible_reverse'
|
||||
path={url path='/admin/folders' parent=$parent}
|
||||
path={url path='/admin/folders' id_folder=$folder_id}
|
||||
request_parameter_name='folder_order'
|
||||
label="{intl l='Online'}"
|
||||
}
|
||||
@@ -87,7 +82,7 @@
|
||||
current_order=$folder_order
|
||||
order='manual'
|
||||
reverse_order='manual_reverse'
|
||||
path={url path='/admin/folders' parent=$parent}
|
||||
path={url path='/admin/folders' id_folder=$folder_id}
|
||||
request_parameter_name='folder_order'
|
||||
label="{intl l='Position'}"
|
||||
}
|
||||
@@ -98,18 +93,18 @@
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="folder_list" type="folder" visible="*" parent=$parent order=$folder_order backend_context="1" lang=$lang_id}
|
||||
{loop name="folder_list" type="folder" visible="*" parent=$folder_id 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/folders' parent=$ID}" title="{intl l='Browse this folder'}"><img class="img-thumbnail" src="{$IMAGE_URL}" alt="{$TITLE}" /></a>
|
||||
<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 class="object-title">
|
||||
<a href="{url path='admin/folders' parent=$ID}" title="{intl l='Browse this folder'}">
|
||||
<a href="{url path='admin/folder' folder_id=$ID}" title="{intl l='Browse this folder'}">
|
||||
{$TITLE}
|
||||
</a>
|
||||
</td>
|
||||
@@ -143,10 +138,10 @@
|
||||
|
||||
<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>
|
||||
<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>
|
||||
|
||||
{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>
|
||||
<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_delete" roles="ADMIN" permissions="admin.folders.delete"}
|
||||
@@ -191,7 +186,7 @@
|
||||
<table class="table table-striped table-condensed">
|
||||
<caption>
|
||||
{* display parent folder name *}
|
||||
{loop name="folder_title" type="folder" visible="*" id=$parent}
|
||||
{loop name="folder_title" type="folder" visible="*" id=$folder_id}
|
||||
{intl l="Contents in %fold" fold=$TITLE}
|
||||
{/loop}
|
||||
|
||||
@@ -214,18 +209,18 @@
|
||||
current_order=$content_order
|
||||
order='id'
|
||||
reverse_order='id_reverse'
|
||||
path={url path='/admin/folders' parent=$parent target='contents'}
|
||||
path={url path='/admin/folders' id_folder=$folder_id target='contents'}
|
||||
label="{intl l='ID'}"
|
||||
}
|
||||
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
|
||||
<th class="object-title">
|
||||
{admin_sortable_header
|
||||
current_order=$content_order
|
||||
order='alpha'
|
||||
reverse_order='alpha_reverse'
|
||||
path={url path='/admin/folders' parent=$parent target='contents'}
|
||||
path={url path='/admin/folders' id_folder=$folder_id target='contents'}
|
||||
label="{intl l='Content title'}"
|
||||
}
|
||||
|
||||
@@ -236,7 +231,7 @@
|
||||
current_order=$content_order
|
||||
order='visible'
|
||||
reverse_order='visible_reverse'
|
||||
path={url path='/admin/folders' parent=$parent target='contents'}
|
||||
path={url path='/admin/folders' id_folder=$folder_id target='contents'}
|
||||
label="{intl l='Online'}"
|
||||
}
|
||||
</th>
|
||||
@@ -246,7 +241,7 @@
|
||||
current_order=$content_order
|
||||
order='manual'
|
||||
reverse_order='manual_reverse'
|
||||
path={url path='/admin/folders' parent=$parent target='contents'}
|
||||
path={url path='/admin/folders' id_folder=$folder_id target='contents'}
|
||||
label="{intl l='Position'}"
|
||||
}
|
||||
</th>
|
||||
@@ -256,13 +251,13 @@
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="content_list" type="content" visible="*" folder_default=$parent order=$content_order}
|
||||
{loop name="content_list" type="content" visible="*" folder_default=$folder_id 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/update/$ID"}" title="{intl l='Edit this content'}">
|
||||
<a href="{url path='admin/content/edit' id=$ID}" title="{intl l='Edit this content'}">
|
||||
<img src="{$IMAGE_URL}" alt="{$TITLE}" />
|
||||
</a>
|
||||
{/loop}
|
||||
@@ -344,11 +339,11 @@
|
||||
|
||||
{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/_ID_'}" />
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/folders/update' folder_id='_ID_'}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='parent'}
|
||||
<input type="hidden" name="{$name}" value="{$parent}" />
|
||||
<input type="hidden" name="{$name}" value="{$folder_id}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='title'}
|
||||
@@ -412,16 +407,16 @@
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{* Be sure to get the folder_id, even if the form could not be validated *}
|
||||
<input type="hidden" name="parent" value="{$parent}" />
|
||||
<input type="hidden" name="folder_id" value="{$folder_id}" />
|
||||
|
||||
{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_' }" />
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/contents/update' content_id='_ID_'}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='default_folder'}
|
||||
<input type="hidden" name="{$name}" value="{$parent}" />
|
||||
{/form_field}
|
||||
<input type="hidden" name="{$name}" value="{$folder_id}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='title'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
@@ -468,7 +463,7 @@
|
||||
|
||||
dialog_ok_label = {intl l="Create this content"}
|
||||
|
||||
form_action = {url path='/admin/content/create'}
|
||||
form_action = {url path='/admin/contents/create'}
|
||||
form_enctype = {form_enctype form=$form}
|
||||
form_error_message = $form_error_message
|
||||
}
|
||||
@@ -498,7 +493,7 @@
|
||||
|
||||
{capture "content_delete_dialog"}
|
||||
<input type="hidden" name="content_id" id="content_delete_id" value="" />
|
||||
<input type="hidden" name="folder_id" value="{$parent}" />
|
||||
<input type="hidden" name="folder_id" value="{$folder_id}" />
|
||||
|
||||
{module_include location='content_delete_form'}
|
||||
|
||||
@@ -585,7 +580,7 @@
|
||||
placement : 'left',
|
||||
success : function(response, newValue) {
|
||||
// The URL template
|
||||
var url = "{url path='/admin/folders/update-position' folder_id='__ID__' position='__POS__'}";
|
||||
var url = "{url noamp='1' path='/admin/folders/update-position' folder_id='__ID__' position='__POS__'}";
|
||||
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id'))
|
||||
@@ -604,7 +599,7 @@
|
||||
placement : 'left',
|
||||
success : function(response, newValue) {
|
||||
// The URL template
|
||||
var url = "{url path='/admin/contents/update-position' content_id='__ID__' position='__POS__'}";
|
||||
var url = "{url noamp='1' path='/admin/contents/update-position' content_id='__ID__' position='__POS__'}";
|
||||
|
||||
// Perform subtitutions
|
||||
url = url.replace('__ID__', $(this).data('id'))
|
||||
|
||||
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"}" 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/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}
|
||||
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}
|
||||
@@ -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>
|
||||
|
||||
@@ -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() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user