{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"}

{if $error_message}
{$error_message}
{/if} {loop type="hook" name="hook" order=$hook_order backend_context=1}
{$ID}. {$TITLE} ({$CODE})
{include file="includes/module-hook-block.html" hook_id="{$ID}" by_module="{$BY_MODULE}"}
{/loop}
{* 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} } {/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}