{extends file="layout.html"} {block name=title}LMS: {$layout.pagetitle|striphtml}{/block} {block name=module_content}

{$layout.pagetitle}

{trans("Promotion:")} {$schema['promotionname']}

{if !empty($schema.attachments)} {/if}
{icon name="money"} {trans("Name")}
{icon name="calendar"} {trans("Periods")} {foreach $schema.periods as $key => $period} {/foreach} {if empty($schema.assignmentcount) || ConfigHelper::checkPrivilege('superuser')} {if count($schema.periods) < 2} {$visible = false} {else} {$visible = true} {/if} {button type="link" icon="delete" tip="Delete" id="perioddel" visible=$visible} {button type="link" icon="add" tip="Add" id="periodadd"} {/if}
{icon name="period"} {trans("Period")} {trans("from")} {trans("to")}
{icon name="info"} {trans("Description")}
{icon name="import"} {trans("New files")} {$item_custom_contents = array()} {foreach $fileupload.attachments as $fileidx => $file} {capture assign="item_custom_content"}{strip} {/strip}{/capture} {$item_custom_contents[] = $item_custom_content} {/foreach} {capture assign="new_item_custom_content"}{strip} {/strip}{/capture} {fileupload id="attachments" fileupload=$fileupload form="schemaedit" item_custom_contents=$item_custom_contents new_item_custom_content=$new_item_custom_content}
{icon name="import"} {trans("Attached files")} {foreach $schema.attachments as $schemaattach}
{$class = ""} {if $schema.attachments[$schemaattach.id].deleted} {$class = "blend"} {/if} {documentview id="{$schema.id}-{$schemaattach.id}" type=$schemaattach.contenttype name=$schemaattach.filename url="?m=promotionattachmentview&schemaid={$schema.id}&attachmentid={$schemaattach.id}" external=true class=$class }
{/foreach}
{button type="submit" icon="save" label="Submit" form="schemaedit"} {button icon="cancel" label="Cancel" href="?m=promotionschemainfo&id={$schema.id}"}
{/block}