{if !isset($attachment_support_already_loaded)} {$attachment_support_already_loaded = true} {/if}
{tab_container id="attachmentbox-{$attachmenttype}"} {tab_header content_id="attachmentpanel-{$attachmenttype}"} {tab_header_cell icon="lms-ui-icon-fileupload"} {t a=$filecontainers[$attachmenttype].prefix b=$filecontainers[$attachmenttype].containers|@count|default:"0"}$a ($b):{/t} {/tab_header_cell} {/tab_header} {tab_contents id="attachmentpanel-{$attachmenttype}"} {tab_table} {if $filecontainers[$attachmenttype].containers}
{trans("Creation date:")}
{trans("Creator:")}
{trans("Description:")}
{trans("Files:")}
{/if} {$images = array()} {foreach $filecontainers[$attachmenttype].containers as $container} {$images = array_merge($images, $container.images)}
{$container.creationdate|date_format:"%Y/%m/%d %H:%M:%S"}
{$container.description|default:"---"}
{if count($container.images)} {button type="link" icon="gallery" class="container-gallery" tip="Attachment gallery" data_gallery="{json_encode($container.images)}"} {/if} {button type="link" href="#" class="container-edit" icon="edit" tip="Edit"} {button type="link" href="#" class="container-save" icon="save" tip="Save"} {button type="link" href="#" class="container-cancel" icon="cancel" tip="Cancel"} {button type="link" href="?m=attachments&attachmentaction=downloadzippedcontainer&type={$attachmenttype}&id={$container.id}" icon="fileupload" tip="Download file container as zip archive"} {button class="container-del" type="link" href="?m=attachments&attachmentaction=deletecontainer&type={$attachmenttype}&id={$container.id}{if isset($restore)}&restore=1&resourceid={$attachmentresourceid}{/if}" icon="delete" tip="Delete file container"}
{foreachelse}
{trans("There are no file containers in database.")}
{/foreach} {tab_button_panel} {tab_buttons} {trans("Description:")} {* $restore is used i.e for netdevicemodels to force backto *} {if isset($restore)} {/if} {fileupload id="files-{$attachmenttype}" fileupload=$fileupload form="upload-form-{$attachmenttype}"} {button icon="add" class="container-add-button" label="Add" form="upload-form-{$attachmenttype}"} {/tab_buttons} {if count($images)} {tab_buttons} {button icon="gallery" class="container-gallery" label="Attachment gallery" data_gallery="{json_encode($images)}"} {/tab_buttons} {/if} {/tab_button_panel} {/tab_table} {/tab_contents} {/tab_container}