{extends file="admin-layout.tpl"} {block name="no-return-functions"} {$admin_current_location = 'configuration'} {/block} {block name="page-title"}{intl l='Thelia Product Features'}{/block} {block name="check-resource"}admin.configuration.feature{/block} {block name="check-access"}view{/block} {block name="main-content"}
{hook name="features.top" location="features_top" }
{hook name="features.table-header" location="features_table_header" } {loop name="list" type="feature" backend_context="1" lang=$lang_id order=$order} {hook name="features.table-row" location="features_table_row" feature_id={$ID} } {/loop} {elseloop rel="list"} {/elseloop}
{intl l='Thelia product features'} {include file='renderer/buttons.html' btn_group=false buttons=[ [ 'type' => 'create', 'class' => 'action-btn', 'title' => {intl l='Add a new product feature'}, 'href' => '#creation_dialog', 'auth' => ['resource' => 'admin.configuration.feature'], 'data' => [ 'toggle' => 'modal' ] ] ]}
{admin_sortable_header current_order=$order order='id' reverse_order='id_reverse' path='/admin/configuration/features' label="{intl l='ID'}" } {admin_sortable_header current_order=$order order='alpha' reverse_order='alpha_reverse' path='/admin/configuration/features' label="{intl l='Title'}" } {admin_sortable_header current_order=$order order='manual' reverse_order='manual_reverse' path='/admin/configuration/features' label="{intl l="Position"}" } {intl l="Actions"}
{$ID} {loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.feature" access="UPDATE"} {$TITLE} {/loop} {elseloop rel="can_change"} {$TITLE} {/elseloop} {admin_position_block resource="admin.configuration.feature" access="UPDATE" path="/admin/configuration/features/update-position" url_parameter="feature_id" in_place_edit_class="positionChange" position="$POSITION" id="$ID" } {include file='renderer/buttons.html' buttons=[ [ 'type' => 'remove', 'class' => 'feature-remove-from-all', 'title' => {intl l='Remove this feature from all product templates'}, 'href' => "#remove_from_all_dialog", 'auth' => ['resource' => 'admin.configuration.feature', 'access' => 'UPDATE'], 'data' => [ 'id' => $ID, 'toggle' => 'modal' ] ], [ 'type' => 'add', 'class' => 'feature-add-to-all', 'title' => {intl l='Add this feature to all product templates'}, 'href' => "#add_to_all_dialog", 'auth' => ['resource' => 'admin.configuration.feature', 'access' => 'UPDATE'], 'data' => [ 'id' => $ID, 'toggle' => 'modal' ] ], [ 'type' => 'edit', 'class' => 'feature-change', 'title' => {intl l='Change this product feature'}, 'href' => {url path='/admin/configuration/features/update' feature_id=$ID}, 'auth' => ['resource' => 'admin.configuration.feature'] ], [ 'type' => 'delete', 'class' => 'feature-delete', 'title' => {intl l='Delete this product feature'}, 'href' => '#delete_dialog', 'data' => [ 'id' => $ID, 'toggle' => 'modal' ], 'auth' => ['resource' => 'admin.brand'] ] ]}
{intl l="No product feature has been created yet. Click the + button to create one."}
{hook name="features.bottom" location="features_bottom" }
{* Adding a new feature *} {form name="thelia.admin.feature.creation"} {* Capture the dialog body, to pass it to the generic dialog *} {capture "creation_dialog"} {form_hidden_fields} {form_field field='success_url'} {* on success, redirect to the edition page, _ID_ is replaced with the created feature ID, see controller *} {/form_field} {form_field field='title'}
{loop type="lang" name="default-lang" default_only="1"}
{$TITLE}
{intl l="Enter here the feature name in the default language (%title)" title={$TITLE}}
{* Switch edition to the current locale *} {form_field field='locale'} {/form_field} {/loop}
{/form_field} {form_field field='add_to_all'}
{intl l='Check this box if you want to add this features to all product templates'}
{/form_field} {hook name="feature.create-form" location="feature_create_form" } {/capture} {include file = "includes/generic-create-dialog.html" dialog_id = "creation_dialog" dialog_title = {intl l="Create a new feature"} dialog_body = {$smarty.capture.creation_dialog nofilter} dialog_ok_label = {intl l="Create this feature"} form_action = {url path='/admin/configuration/features/create'} form_enctype = {form_enctype} form_error_message = $form_error_message } {/form} {* Delete confirmation dialog *} {capture "delete_dialog"} {hook name="feature.delete-form" location="feature_delete_form" } {/capture} {include file = "includes/generic-confirm-dialog.html" dialog_id = "delete_dialog" dialog_title = {intl l="Delete feature"} dialog_message = {intl l="Do you really want to delete this feature ? It will be removed from all product templates."} form_action = {token_url path='/admin/configuration/features/delete'} form_content = {$smarty.capture.delete_dialog nofilter} } {* Add to all dialog *} {capture "add_to_all_dialog"} {hook name="feature.add-to-all-form" location="feature_add_to_all_form" } {/capture} {include file = "includes/generic-confirm-dialog.html" dialog_id = "add_to_all_dialog" dialog_title = {intl l="Add to all product templates"} dialog_message = {intl l="Do you really want to add this feature to all product templates ?"} form_action = {token_url path='/admin/configuration/features/add-to-all-templates'} form_content = {$smarty.capture.add_to_all_dialog nofilter} } {* Remove from all dialog *} {capture "remove_from_all_dialog"} {hook name="feature.remove-to-all-form" location="feature_remove_to_all_form" } {/capture} {include file = "includes/generic-confirm-dialog.html" dialog_id = "remove_from_all_dialog" dialog_title = {intl l="Remove from all product templates"} dialog_message = {intl l="Do you really want to remove this feature from all product templates ? You'll loose all product related data for this feature."} form_action = {token_url path='/admin/configuration/features/remove-from-all-templates'} form_content = {$smarty.capture.remove_from_all_dialog nofilter} } {/block} {block name="javascript-initialization"} {javascripts file='assets/js/bootstrap-editable/bootstrap-editable.js'} {/javascripts} {/block} {block name="javascript-last-call"} {hook name="features.js" location="features-js" } {/block}