121 lines
5.6 KiB
HTML
121 lines
5.6 KiB
HTML
{extends file="admin-layout.tpl"}
|
|
|
|
{block name="page-title"}{intl l='Edit a document'}{/block}
|
|
|
|
{block name="check-access"}update{/block}
|
|
|
|
{block name="main-content"}
|
|
<div class="documents edit-document">
|
|
|
|
<div id="wrapper" class="container">
|
|
|
|
{loop type="document" name="document_edit" source="{$documentType}" id="{$documentId}" backend_context="1" lang="$edit_language_id"}
|
|
<ul class="breadcrumb">
|
|
{foreach $breadcrumb as $label=>$link}
|
|
<li><a href="{$link}">{$label}</a></li>
|
|
{/foreach}
|
|
<li>{intl l='Editing document "%name"' name="{$TITLE}"}</li>
|
|
</ul>
|
|
|
|
<div class="row">
|
|
<div class="col-md-12 general-block-decorator">
|
|
<div class="row">
|
|
|
|
<div class="col-md-12 title title-without-tabs">
|
|
{intl l='Edit document "%name"' name="{$TITLE}"}
|
|
</div>
|
|
|
|
<div class="form-container">
|
|
<div class="col-md-12">
|
|
{form name="$formId"}
|
|
<form method="POST" action="{url path="/admin/document/type/{$documentType}/{$ID}/update"}" enctype="multipart/form-data" class="clearfix">
|
|
|
|
{include
|
|
file = "includes/inner-form-toolbar.html"
|
|
hide_submit_buttons = false
|
|
|
|
page_url = "{url path="/admin/document/type/{$documentType}/{$ID}/update"}"
|
|
close_url = "{url path="{$redirectUrl}" current_tab="documents" noamp=1}"
|
|
}
|
|
|
|
{form_hidden_fields form=$form}
|
|
|
|
{render_form_field form=$form field="success_url" value="{url path="/admin/document/type/{$documentType}/{$ID}/update"}"}
|
|
{render_form_field form=$form field="locale" value="$edit_language_locale"}
|
|
|
|
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
|
|
|
|
<p class="title title-without-tabs">{intl l="Document informations"}</p>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-6">
|
|
<div class="form-group">
|
|
<label class="control-label">{intl l="File"} : </label>
|
|
<p><a href="{$DOCUMENT_PATH}" title="{$TITLE}" target="_blank">{$TITLE}</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-6">
|
|
{render_form_field form=$form field="file"}
|
|
{render_form_field form=$form field="title" value=$TITLE}
|
|
{render_form_field form=$form field="chapo" value=$CHAPO}
|
|
{render_form_field form=$form field="postscriptum" value=$POSTSCRIPTUM}
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
{render_form_field form=$form field="description" value=$DESCRIPTION extra_class="wysiwyg"}
|
|
</div>
|
|
</div>
|
|
|
|
{include
|
|
file = "includes/inner-form-toolbar.html"
|
|
hide_submit_buttons = false
|
|
hide_flags = true
|
|
|
|
page_url = "{url path="/admin/document/type/{$documentType}/{$ID}/update"}"
|
|
close_url = "{url path="{$redirectUrl}" current_tab="documents"}"
|
|
}
|
|
</form>
|
|
{/form}
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{/loop}
|
|
|
|
{elseloop rel="document_edit"}
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="row inner-toolbar clearfix">
|
|
<div class="col-md-6 inner-actions pull-right">
|
|
<a href="{url path="{$redirectUrl}" current_tab="documents"}" class="btn btn-default btn-info">{intl l='Back'} <span class="glyphicon glyphicon-remove"></span></a>
|
|
</div>
|
|
</div>
|
|
<div class="alert alert-error">
|
|
{intl l="Sorry, document ID=%id was not found." id={$documentId}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{/elseloop}
|
|
|
|
</div>
|
|
</div>
|
|
{/block}
|
|
|
|
{block name="javascript-initialization"}
|
|
{javascripts file='assets/js/main.js'}
|
|
<script src="{$asset_url}"></script>
|
|
{/javascripts}
|
|
|
|
{/block}
|
|
|
|
{block name="javascript-last-call"}
|
|
{module_include location='document-edit-js'}
|
|
{/block} |