{extends file="admin-layout.tpl"} {block name="page-title"}{intl l='Administration profiles'}{/block} {block name="check-resource"}admin.configuration.profile{/block} {block name="check-access"}view{/block} {block name="main-content"}
{module_include location='profiles_top'}
{loop type="profile" name="profiles" backend_context="1"} {/loop}
{intl l="Administration profiles"} {loop type="auth" name="can_create" role="ADMIN" resource="admin.profile" access="CREATE"} {/loop}
{intl l="Name"} {intl l="Description"} {intl l="Actions"}
{$TITLE} {$DESCRIPTION}
{loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.profile" access="UPDATE"} {/loop} {assign linkedAdminCount {count name="linked-admin" type="admin" profile=$ID}} {loop type="auth" name="can_delete" role="ADMIN" resource="admin.configuration.profile" access="DELETE"} {/loop}
{module_include location='profiles_bottom'}
{* -- Add profile confirmation dialog ----------------------------------- *} {form name="thelia.admin.profile.add"} {if $form_error_message} {$profileCreateError = true} {else} {$profileCreateError = false} {/if} {* Capture the dialog body, to pass it to the generic dialog *} {capture "profile_create_dialog"} {form_hidden_fields form=$form} {form_field form=$form field='locale'} {/form_field} {form_field form=$form field='code'}
{/form_field} {form_field form=$form field='title'}
{/form_field} {form_field form=$form field='chapo'}
{/form_field} {form_field form=$form field='description'}
{/form_field} {form_field form=$form field='postscriptum'}
{/form_field} {/capture} {include file = "includes/generic-create-dialog.html" dialog_id = "profile_create_dialog" dialog_title = {intl l="Create a new profile"} dialog_body = {$smarty.capture.profile_create_dialog nofilter} dialog_ok_label = {intl l="Create"} dialog_cancel_label = {intl l="Cancel"} form_action = {url path="/admin/configuration/profiles/add"} form_enctype = {form_enctype form=$form} form_error_message = $form_error_message } {/form} {* -- Delete profile confirmation dialog ----------------------------------- *} {capture "profile_delete_dialog"} {module_include location='profile_delete_form'} {/capture} {include file = "includes/generic-confirm-dialog.html" dialog_id = "profile_delete_dialog" dialog_title = {intl l="Delete profile"} dialog_message = {intl l="Do you really want to delete this profile ?"} form_action = {url path='/admin/configuration/profiles/delete'} form_content = {$smarty.capture.profile_delete_dialog nofilter} } {include file = "includes/generic-warning-dialog.html" dialog_id = "profile_cannot_delete_dialog" dialog_title = {intl l="You can't delete this profile"} dialog_body = {intl l="They are some administrator which are linked to this profile. Please edit/remove them before deleting this profile."} } {/block} {block name="javascript-initialization"} {javascripts file='assets/js/bootstrap-select/bootstrap-select.js'} {/javascripts} {javascripts file='assets/js/main.js'} {/javascripts} {/block}