{extends file="admin-layout.tpl"} {block name="page-title"}{intl l='Thelia Mailing Templates'}{/block} {block name="check-permissions"}admin.configuration.messages.view{/block} {block name="main-content"}
{module_include location='messages_top'}
{module_include location='messages_table_header'} {loop name="mailing-templates" type="message" secured="*" backend_context="1" lang="$lang_id"} {module_include location='messages_table_row'} {/loop} {elseloop rel="mailing-templates"} {/elseloop}
{intl l='Thelia mailing templates'} {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.messages.create"} {/loop}
{intl l="Purpose"} {intl l="Name"} 
{$TITLE} {if ! $SECURED} {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.messages.change"} {$NAME} {/loop} {elseloop rel="can_change"} {$NAME} {/elseloop} {else} {$NAME} {/if} {if ! $SECURED}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.messages.change"} {/loop} {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.messages.delete"} {/loop}
{else} {/if}
{intl l="No mailing template has been created yet. Click the + button to create one."}
{module_include 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 form=$form} {form_field form=$form field='success_url'} {* on success, redirect to the edition page, _ID_ is replaced with the created message ID, see controller *} {/form_field} {* We do not allow users to create secured messages from here *} {form_field form=$form field='secured'} {/form_field} {form_field form=$form field='name'}
{/form_field} {form_field form=$form field='title'}
{loop type="lang" name="default-lang" default_only="1"} {* Switch edition to the current locale *}
{intl l=$TITLE}
{intl l="Enter here the mailing template purpose in the default language ($TITLE)"}
{form_field form=$form field='locale'} {/form_field} {/loop}
{/form_field} {/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=$form} form_error_message = $form_error_message } {/form} {* Delete confirmation dialog *} {capture "delete_dialog"} {/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 = {url path='/admin/configuration/messages/delete'} form_content = {$smarty.capture.delete_dialog nofilter} } {/block} {block name="javascript-initialization"} {/block}