{loop type="auth" name="can_create" role="ADMIN" resource="admin.folder" access="CREATE"}
{intl l="This folder has no sub-folders. To create a new one, click the + button above."}
{/loop}
{elseloop rel="can_create"}
{intl l="This folder has no sub-folders."}
{/elseloop}
{/elseloop}
{* -- CONTENT MANAGEMENT ---------------------------------------------------- *}
{* No content outsie a folder *}
{if $parent > 0}
{* -- Adding a new folder ------------------------------------------------- *}
{form name="thelia.admin.folder.creation"}
{* Capture the dialog body, to pass it to the generic dialog *}
{capture "folder_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}
{form_field field='parent'}
{/form_field}
{form_field field='title'}
{intl l='Enter here the folder name in the default language (%title)' title="{$TITLE}"}
{* Switch edition to the current locale *}
{form_field field='locale'}
{/form_field}
{/loop}
{/form_field}
{form_field field='visible'}
{/form_field}
{hook name="folder.create-form" location="folder_create_form" }
{/capture}
{include
file = "includes/generic-create-dialog.html"
dialog_id = "folder_creation_dialog"
dialog_title = {intl l="Create a new folder"}
dialog_body = {$smarty.capture.folder_creation_dialog nofilter}
dialog_ok_label = {intl l="Create this folder"}
form_action = {url path='/admin/folders/create'}
form_enctype = {form_enctype}
form_error_message = $form_error_message
}
{/form}
{* -- Adding a new content -------------------------------------------------- *}
{form name="thelia.admin.content.creation"}
{* Capture the dialog body, to pass it to the generic dialog *}
{capture "content_creation_dialog"}
{form_hidden_fields}
{* Be sure to get the folder_id, even if the form could not be validated *}
{form_field field='success_url'}
{* on success, redirect to the edition page, _ID_ is replaced with the created object ID, see controller *}
{/form_field}
{form_field field='default_folder'}
{/form_field}
{form_field field='title'}