{extends file="admin-layout.tpl"} {block name="page-title"}{intl l='Modules attachments'}{/block} {block name="check-resource"}admin.module-hook{/block} {block name="check-access"}view{/block} {block name="main-content"}
{loop type="auth" name="can_create" role="ADMIN" resource="admin.module-hook" access="CREATE"}
{/loop}

{intl l="Modules attachments"}

{intl l="By status"}
{intl l="By module"}
{intl l="By type"}
{intl l="Hide empty hook"}
{intl l="Filter by hook name:"}
{if $error_message}
{$error_message}
{/if} {loop type="hook" name="hook" order=$hook_order backend_context=1}
{$ID}. {$TITLE} ({$CODE})
{if $DESCRIPTION} {$DESCRIPTION} {else} {intl l="No description for this hook"} {/if}
{intl l="Code:"} {$CODE}
{intl l="Type:"} {if $TYPE == 1}{intl l="Front Office"}{/if} {if $TYPE == 2}{intl l="Back Office"}{/if} {if $TYPE == 3}{intl l="pdf"}{/if} {if $TYPE == 4}{intl l="email"}{/if}
{intl l="By module:"} {if $BY_MODULE}{intl l="Yes"}{else}{intl l="No"}{/if}
{intl l="Block :"} {if $BLOCK}{intl l="Yes"}{else}{intl l="No"}{/if}
{include file="includes/module-hook-block.html" hook_id="{$ID}" by_module="{$BY_MODULE}"}
{/loop}
{intl l="Manage modules"} {intl l="Manage hooks"}
{* Adding a new Module Hook *} {form name="thelia.admin.module-hook.creation"} {* Capture the dialog body, to pass it to the generic dialog *} {capture "module_hook_creation_dialog"} {form_hidden_fields} {form_field field='success_url'} {* on success, redirect to the edition page, _ID_ is replaced with the created object ID, see controller *} {/form_field} {render_form_field field="module_id"} {render_form_field field="hook_id"} {custom_render_form_field field='classname'}
{/custom_render_form_field} {custom_render_form_field field='method'}
{/custom_render_form_field} {render_form_field field="templates"} {hook name="module-hook.create-form" location="module_hook_create_form" } {/capture} {include file = "includes/generic-create-dialog.html" dialog_id = "add_module_hook_dialog" dialog_title = {intl l="Add a module to a hook"} dialog_body = {$smarty.capture.module_hook_creation_dialog nofilter} dialog_ok_label = {intl l="Put module in hook"} dialog_cancel_label = {intl l="Cancel"} form_action = {url path='/admin/module-hooks/create'} form_enctype = {form_enctype} form_error_message = $form_error_message } {/form} {* Delete module confirmation dialog *} {capture "delete_module_dialog"} {hook name="module-hook.delete-form" location="module_hook_delete_form" } {/capture} {include file = "includes/generic-confirm-dialog.html" dialog_id = "delete_module_dialog" dialog_title = {intl l="Remove a module from a hook"} dialog_message = {intl l="Do you really want to remove this module from this hook ?"} form_action = {token_url path='/admin/module-hooks/delete'} form_content = {$smarty.capture.delete_module_dialog nofilter} }

### {intl l="An error occured"}

{/block} {block name="javascript-initialization"} {javascripts file='assets/js/bootstrap-switch/bootstrap-switch.js'}
{/javascripts} {javascripts file='assets/js/bootstrap-editable/bootstrap-editable.js'}
{/javascripts}
{/block} {block name="javascript-last-call"} {hook name="module-hook.js" location="module-hook-js" } {/block}