{extends file="admin-layout.tpl"} {block name="no-return-functions"} {$admin_current_location = 'configuration'} {/block} {block name="page-title"}{intl l='Thelia Mailing Templates'}{/block} {block name="check-resource"}admin.configuration.message{/block} {block name="check-access"}view{/block} {block name="main-content"}
{hook name="messages.top" location="messages_top" }
{hook name="messages.table-header" location="messages_table_header" } {loop name="mailing-templates" type="message" secured="*" backend_context="1" lang="$lang_id"} {hook name="messages.table-row" location="messages_table_row" message_id={$ID} } {/loop} {elseloop rel="mailing-templates"} {/elseloop}
{intl l='Thelia mailing templates'} {include file='renderer/buttons.html' btn_group=false buttons=[ [ 'type' => 'create', 'class' => 'action-btn', 'title' => {intl l='Thelia mailing templates'}, 'href' => '#creation_dialog', 'auth' => ['resource' => 'admin.configuration.message'], 'data' => [ 'toggle' => 'modal' ] ] ]}
{intl l="Purpose"} {intl l="Name"} 
{$TITLE} {if ! $SECURED} {loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.message" access="UPDATE"} {$NAME} {/loop} {elseloop rel="can_change"} {$NAME} {/elseloop} {else} {$NAME} {/if} {if ! $SECURED} {include file='renderer/buttons.html' buttons=[ [ 'type' => 'edit', 'class' => 'message-change', 'title' => {intl l='Change this mailing template'}, 'href' => {url path="/admin/configuration/messages/update" message_id=$ID}, 'auth' => ['resource' => 'admin.configuration.message'] ], [ 'type' => 'delete', 'class' => 'message-delete', 'title' => {intl l='Delete this mailing template'}, 'href' => '#delete_dialog', 'data' => [ 'id' => $ID, 'toggle' => 'modal' ], 'auth' => ['resource' => 'admin.configuration.message'] ] ]} {else} {/if}
{intl l="No mailing template has been created yet. Click the + button to create one."}
{hook name="messages.bottom" location="messages_bottom" }
{* Adding a new message *} {form name="thelia.admin.message.creation"} {* Capture the dialog body, to pass it to the generic dialog *} {capture "creation_dialog"} {form_hidden_fields exclude="secured,success_url"} {render_form_field field="success_url" value={url path='/admin/configuration/messages/update' message_id='_ID_'}} {* We do not allow users to create secured messages from here *} {render_form_field field='secured' value='0'} {render_form_field field='name'} {custom_render_form_field field="title"} {loop type="lang" name="default-lang" default_only="1"} {* Switch edition to the current locale *} {render_form_field field="locale" value=$LOCALE}
{$TITLE}
{/loop} {/custom_render_form_field} {hook name="message.create-form" location="message_create_form" } {/capture} {include file = "includes/generic-create-dialog.html" dialog_id = "creation_dialog" dialog_title = {intl l="Create a new mailing template"} dialog_body = {$smarty.capture.creation_dialog nofilter} dialog_ok_label = {intl l="Create this mailing template"} form_action = {url path='/admin/configuration/messages/create'} form_enctype = {form_enctype} form_error_message = $form_error_message } {/form} {* Delete confirmation dialog *} {capture "delete_dialog"} {hook name="message.delete-form" location="message_delete_form" } {/capture} {include file = "includes/generic-confirm-dialog.html" dialog_id = "delete_dialog" dialog_title = {intl l="Delete mailing template"} dialog_message = {intl l="Do you really want to delete this mailing template ?"} form_action = {token_url path='/admin/configuration/messages/delete'} form_content = {$smarty.capture.delete_dialog nofilter} } {/block} {block name="javascript-initialization"} {/block} {block name="javascript-last-call"} {hook name="messages.js" location="messages-js" } {/block}