Commit 42191db9 authored by Tino Goratsch's avatar Tino Goratsch

use the Smarty block system much more to reduce code duplication for the admin panel template files

parent 18e4f19e
......@@ -24,17 +24,19 @@
<div class="col-sm-10"><input type="file" id="picture" name="picture"></div>
</div>
<div class="form-group">
<label for="module" class="col-sm-2 control-label required">{lang t="categories|module"}</label>
{block CATEGORIES_MODULE}
<div class="form-group">
<label for="module" class="col-sm-2 control-label required">{lang t="categories|module"}</label>
<div class="col-sm-10">
<select class="form-control" name="module" id="module">
{foreach $mod_list as $row}
<option value="{$row.id}"{$row.selected}>{$row.name}</option>
{/foreach}
</select>
<div class="col-sm-10">
<select class="form-control" name="module" id="module">
{foreach $mod_list as $row}
<option value="{$row.id}"{$row.selected}>{$row.name}</option>
{/foreach}
</select>
</div>
</div>
</div>
{/block}
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" name="submit" class="btn btn-primary">{lang t="system|submit"}</button>
......
{extends file="asset:layout.tpl"}
{extends file="asset:Categories/Admin/index.create.tpl"}
{block CONTENT}
{if isset($error_msg)}
{$error_msg}
{/if}
<form action="{$REQUEST_URI}" method="post" enctype="multipart/form-data" accept-charset="UTF-8" class="form-horizontal" data-ajax-form="true" data-ajax-form-loading-text="{lang t="system|loading_please_wait"}">
<div class="form-group">
<label for="title" class="col-sm-2 control-label required">{lang t="categories|title"}</label>
<div class="col-sm-10">
<input class="form-control" type="text" name="title" id="title" value="{$form.title}" maxlength="120" required>
</div>
</div>
<div class="form-group">
<label for="description" class="col-sm-2 control-label required">{lang t="system|description"}</label>
<div class="col-sm-10">
<input class="form-control" type="text" name="description" id="description" value="{$form.description}" maxlength="120" required>
</div>
</div>
<div class="form-group">
<label for="picture" class="col-sm-2 control-label">{lang t="categories|picture"}</label>
<div class="col-sm-10"><input type="file" id="picture" name="picture"></div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" name="submit" class="btn btn-primary">{lang t="system|submit"}</button>
<a href="{uri args="acp/categories"}" class="btn btn-default">{lang t="system|cancel"}</a>
{$form_token}
</div>
</div>
</form>
{javascripts}
{include_js module="system" file="forms"}
{/javascripts}
{/block}
\ No newline at end of file
{block CATEGORIES_MODULE}{/block}
\ No newline at end of file
......@@ -18,11 +18,13 @@
<input class="form-control" type="text" name="description" id="description" value="{$form.description}" maxlength="15">
</div>
</div>
<div class="form-group">
<label for="picture" class="col-sm-2 control-label required">{lang t="emoticons|picture"}</label>
{block EMOTICONS_PICTURE_UPLOAD}
<div class="form-group">
<label for="picture" class="col-sm-2 control-label required">{lang t="emoticons|picture"}</label>
<div class="col-sm-10"><input type="file" name="picture" id="picture"></div>
</div>
<div class="col-sm-10"><input type="file" name="picture" id="picture"></div>
</div>
{/block}
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" name="submit" class="btn btn-primary">{lang t="system|submit"}</button>
......
{extends file="asset:layout.tpl"}
{extends file="asset:Emoticons/Admin/index.create.tpl"}
{block CONTENT}
{if isset($error_msg)}
{$error_msg}
{/if}
<form action="{$REQUEST_URI}" method="post" enctype="multipart/form-data" accept-charset="UTF-8" class="form-horizontal" data-ajax-form="true" data-ajax-form-loading-text="{lang t="system|loading_please_wait"}">
<div class="form-group">
<label for="code" class="col-sm-2 control-label required">{lang t="emoticons|code"}</label>
{block EMOTICONS_PICTURE_UPLOAD}
<div class="form-group">
<label for="picture" class="col-sm-2 control-label">{lang t="emoticons|replace_picture"}</label>
<div class="col-sm-10">
<input class="form-control" type="text" name="code" id="code" value="{$form.code}" maxlength="10"></div>
</div>
<div class="form-group">
<label for="description" class="col-sm-2 control-label required">{lang t="system|description"}</label>
<div class="col-sm-10">
<input class="form-control" type="text" name="description" id="description" value="{$form.description}" maxlength="15">
</div>
</div>
<div class="form-group">
<label for="picture" class="col-sm-2 control-label">{lang t="emoticons|replace_picture"}</label>
<div class="col-sm-10"><input type="file" name="picture" id="picture"></div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" name="submit" class="btn btn-primary">{lang t="system|submit"}</button>
<a href="{uri args="acp/emoticons"}" class="btn btn-default">{lang t="system|cancel"}</a>
{$form_token}
</div>
</div>
</form>
{javascripts}
{include_js module="system" file="forms"}
{/javascripts}
<div class="col-sm-10"><input type="file" name="picture" id="picture"></div>
</div>
{/block}
\ No newline at end of file
......@@ -23,20 +23,22 @@
<input class="form-control" type="text" name="title" id="title" value="{$form.title}" maxlength="120">
</div>
</div>
<div class="form-group">
<label for="file-internal" class="col-sm-2 control-label required">{lang t="files|filename"}</label>
{block FILES_FILE_UPLOAD}
<div class="form-group">
<label for="file-internal" class="col-sm-2 control-label">{lang t="files|filename"}</label>
<div class="col-sm-10">
<div class="checkbox">
<label for="external">
<input type="checkbox" name="external" id="external" value="1"{$checked_external}>
{lang t="files|external_resource"}
</label>
<div class="col-sm-10">
<div class="checkbox">
<label for="external">
<input type="checkbox" name="external" id="external" value="1"{$checked_external}>
{lang t="files|external_resource"}
</label>
</div>
<input type="file" name="file_internal" id="file-internal">
<input class="form-control" type="url" name="file_external" id="file-external" value="{$form.file_external}" maxlength="120">
</div>
<input type="file" name="file_internal" id="file-internal">
<input class="form-control" type="url" name="file_external" id="file-external" value="{$form.file_external}" maxlength="120">
</div>
</div>
{/block}
<div id="external-filesize" class="form-group">
<label for="filesize" class="col-sm-2 control-label required">{lang t="files|filesize"}</label>
......@@ -56,12 +58,12 @@
</div>
</div>
<div class="form-group">
<label for="text" class="col-sm-2 control-label required">{lang t="system|description"}</label>
<label for="text" class="col-sm-2 control-label">{lang t="system|description"}</label>
<div class="col-sm-10">{wysiwyg name="text" value="`$form.text`" height="200" toolbar="simple"}</div>
</div>
<div class="form-group">
<label for="cat" class="col-sm-2 control-label required">{lang t="categories|category"}</label>
<label for="cat" class="col-sm-2 control-label">{lang t="categories|category"}</label>
<div class="col-sm-10">{$categories}</div>
</div>
......
{extends file="asset:layout.tpl"}
{extends file="asset:Files/Admin/index.create.tpl"}
{block CONTENT}
{if isset($error_msg)}
{$error_msg}
{/if}
<form action="{$REQUEST_URI}" method="post" enctype="multipart/form-data" accept-charset="UTF-8" class="form-horizontal" data-ajax-form="true" data-ajax-form-loading-text="{lang t="system|loading_please_wait"}">
<div class="tabbable">
<ul class="nav nav-tabs">
<li class="active"><a href="#tab-1" data-toggle="tab">{lang t="system|publication_period"}</a></li>
<li><a href="#tab-2" data-toggle="tab">{lang t="files|file_statements"}</a></li>
<li><a href="#tab-3" data-toggle="tab">{lang t="seo|seo"}</a></li>
</ul>
<div class="tab-content">
<div id="tab-1" class="tab-pane fade in active">
{datepicker name=['start', 'end'] value=[$form.start, $form.end]}
</div>
<div id="tab-2" class="tab-pane fade">
<div class="form-group">
<label for="title" class="col-sm-2 control-label required">{lang t="files|title"}</label>
{block FILES_FILE_UPLOAD}
<div class="form-group">
<label class="col-sm-2 control-label">{lang t="files|filename"}</label>
<div class="col-sm-10">
<input class="form-control" type="text" name="title" id="title" value="{$form.title}" maxlength="120">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">{lang t="files|filename"}</label>
<div class="col-sm-10">
<input class="form-control" type="text" value="{$current_file}" disabled="disabled"></div>
</div>
<div class="form-group">
<label for="file-internal" class="col-sm-2 control-label">{lang t="files|new_file"}</label>
<div class="col-sm-10">
<div class="checkbox">
<label for="external">
<input type="checkbox" name="external" id="external" value="1"{$checked_external}>
{lang t="files|external_resource"}
</label>
</div>
<input type="file" name="file_internal" id="file-internal">
<input class="form-control" type="url" name="file_external" id="file-external" value="" maxlength="120">
</div>
</div>
<div id="external-filesize" class="form-group">
<label for="filesize" class="col-sm-2 control-label required">{lang t="files|filesize"}</label>
<div class="col-sm-10">
<div class="row">
<div class="col-sm-6">
<input class="form-control" type="text" name="filesize" id="filesize" value="{$form.filesize}" maxlength="15">
</div>
<div class="col-sm-6">
<select class="form-control" name="unit" id="unit">
{foreach $units as $row}
<option value="{$row.value}"{$row.selected}>{$row.value}</option>
{/foreach}
</select>
</div>
</div>
</div>
</div>
<div class="form-group">
<label for="text" class="col-sm-2 control-label required">{lang t="system|description"}</label>
<div class="col-sm-10">{wysiwyg name="text" value="`$form.text`" height="200" toolbar="simple"}</div>
</div>
<div class="form-group">
<label for="cat" class="col-sm-2 control-label">{lang t="categories|category"}</label>
<div class="col-sm-10">{$categories}</div>
</div>
{if isset($options)}
<div class="form-group">
<label for="{$options.0.name}" class="col-sm-2 control-label">{lang t="system|options"}</label>
<div class="col-sm-10">
{foreach $options as $row}
<div class="checkbox">
<label for="{$row.name}">
<input type="checkbox" name="{$row.name}" id="{$row.name}" value="1"{$row.checked}>
{$row.lang}
</label>
</div>
{/foreach}
</div>
</div>
{/if}
</div>
<div id="tab-3" class="tab-pane fade">
{include file="asset:seo/seo_fields.tpl" seo=$SEO_FORM_FIELDS}
</div>
</div>
<div class="col-sm-10">
<input class="form-control" type="text" value="{$current_file}" disabled="disabled">
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" name="submit" class="btn btn-primary">{lang t="system|submit"}</button>
<a href="{uri args="acp/files"}" class="btn btn-default">{lang t="system|cancel"}</a>
{$form_token}
</div>
<div class="form-group">
<label for="file-internal" class="col-sm-2 control-label">{lang t="files|new_file"}</label>
<div class="col-sm-10">
<div class="checkbox">
<label for="external">
<input type="checkbox" name="external" id="external" value="1"{$checked_external}>
{lang t="files|external_resource"}
</label>
</div>
<input type="file" name="file_internal" id="file-internal">
<input class="form-control" type="url" name="file_external" id="file-external" value="" maxlength="120">
</div>
</form>
{javascripts}
{include_js module="files" file="admin/acp"}
{include_js module="system" file="forms"}
{/javascripts}
</div>
{/block}
\ No newline at end of file
......@@ -5,10 +5,12 @@
{$error_msg}
{/if}
<form action="{$REQUEST_URI}" method="post" enctype="multipart/form-data" accept-charset="UTF-8" class="form-horizontal" data-ajax-form="true" data-ajax-form-loading-text="{lang t="system|loading_please_wait"}">
<div class="form-group">
<label for="file" class="col-sm-2 control-label required">{lang t="gallery|select_picture"}</label>
<div class="col-sm-10"><input type="file" name="file" id="file" required></div>
</div>
{block GALLERY_PICTURE_UPLOAD}
<div class="form-group">
<label for="file" class="col-sm-2 control-label required">{lang t="gallery|select_picture"}</label>
<div class="col-sm-10"><input type="file" name="file" id="file" required></div>
</div>
{/block}
<div class="form-group">
<label for="description" class="col-sm-2 control-label">{lang t="system|description"}</label>
<div class="col-sm-10">{wysiwyg name="description" value="`$form.description`" height="150" toolbar="simple"}</div>
......
{extends file="asset:layout.tpl"}
{extends file="asset:Gallery/Admin/pictures.create.tpl"}
{block CONTENT}
{if isset($error_msg)}
{$error_msg}
{/if}
<form action="{$REQUEST_URI}" method="post" enctype="multipart/form-data" accept-charset="UTF-8" class="form-horizontal" data-ajax-form="true" data-ajax-form-loading-text="{lang t="system|loading_please_wait"}">
<div class="form-group">
<label for="file" class="col-sm-2 control-label">{lang t="gallery|select_new_picture"}</label>
<div class="col-sm-10"><input type="file" name="file" id="file"></div>
</div>
<div class="form-group">
<label for="description" class="col-sm-2 control-label">{lang t="system|description"}</label>
<div class="col-sm-10">{wysiwyg name="description" value="`$form.description`" height="150" toolbar="simple"}</div>
</div>
{if isset($options)}
<div class="form-group">
<label for="{$options.0.name}" class="col-sm-2 control-label">{lang t="system|options"}</label>
<div class="col-sm-10">
{foreach $options as $row}
<div class="checkbox">
<label for="{$row.name}">
<input type="checkbox" name="{$row.name}" id="{$row.name}" value="1"{$row.checked}>
{$row.lang}
</label>
</div>
{/foreach}
</div>
</div>
{/if}
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" name="submit" class="btn btn-primary">{lang t="system|submit"}</button>
<a href="{uri args="acp/gallery/edit/id_`$gallery_id`"}" class="btn btn-default">{lang t="system|cancel"}</a>
{$form_token}
</div>
</div>
</form>
{javascripts}
{include_js module="system" file="forms"}
{/javascripts}
{block GALLERY_PICTURE_UPLOAD}
<div class="form-group">
<label for="file" class="col-sm-2 control-label">{lang t="gallery|select_new_picture"}</label>
<div class="col-sm-10"><input type="file" name="file" id="file"></div>
</div>
{/block}
\ No newline at end of file
......@@ -5,17 +5,19 @@
{$error_msg}
{/if}
<form action="{$REQUEST_URI}" method="post" accept-charset="UTF-8" class="form-horizontal" data-ajax-form="true" data-ajax-form-loading-text="{lang t="system|loading_please_wait"}">
<div class="form-group">
<label for="modules" class="col-sm-2 control-label required">{lang t="system|module"}</label>
{block PERMISSIONS_RESOURCES_MODULE}
<div class="form-group">
<label for="modules" class="col-sm-2 control-label required">{lang t="system|module"}</label>
<div class="col-sm-10">
<select class="form-control" name="modules" id="modules">
{foreach $modules as $row}
<option value="{$row.dir}"{$row.selected}>{$row.name}</option>
{/foreach}
</select>
<div class="col-sm-10">
<select class="form-control" name="modules" id="modules">
{foreach $modules as $row}
<option value="{$row.dir}"{$row.selected}>{$row.name}</option>
{/foreach}
</select>
</div>
</div>
</div>
{/block}
<div class="form-group">
<label for="area" class="col-sm-2 control-label required">{lang t="permissions|area"}</label>
......@@ -51,7 +53,7 @@
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" name="submit" class="btn btn-primary">{lang t="system|submit"}</button>
<a href="{uri args="acp/permissions/index/index_resouces"}" class="btn btn-default">{lang t="system|cancel"}</a>
<a href="{uri args="acp/permissions/index/index_resources"}" class="btn btn-default">{lang t="system|cancel"}</a>
{$form_token}
</div>
</div>
......
{extends file="asset:layout.tpl"}
{extends file="asset:Permissions/Admin/resources.create.tpl"}
{block CONTENT}
{if isset($error_msg)}
{$error_msg}
{/if}
<form action="{$REQUEST_URI}" method="post" accept-charset="UTF-8" class="form-horizontal" data-ajax-form="true" data-ajax-form-loading-text="{lang t="system|loading_please_wait"}">
<div class="form-group">
<label for="area" class="col-sm-2 control-label required">{lang t="permissions|area"}</label>
<div class="col-sm-10">
<input class="form-control" type="text" name="area" id="area" value="{$form.area}" required>
</div>
</div>
<div class="form-group">
<label for="controller" class="col-sm-2 control-label required">{lang t="permissions|controller"}</label>
<div class="col-sm-10">
<input class="form-control" type="text" name="controller" id="controller" value="{$form.controller}" required>
</div>
</div>
<div class="form-group">
<label for="resource" class="col-sm-2 control-label required">{lang t="permissions|resource_name"}</label>
<div class="col-sm-10">
<input class="form-control" type="text" name="resource" id="resource" value="{$form.resource}" required>
</div>
</div>
<div class="form-group">
<label for="privileges" class="col-sm-2 control-label required">{lang t="permissions|assigned_privilege"}</label>
<div class="col-sm-10">
<select class="form-control" name="privileges" id="privileges">
{foreach $privileges as $row}
<option value="{$row.id}"{$row.selected}>{$row.key}{if !empty($row.description)} ({$row.description}){/if}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<input type="hidden" name="modules" value="{$form.modules}">
<button type="submit" name="submit" class="btn btn-primary">{lang t="system|submit"}</button>
<a href="{uri args="acp/permissions/index/index_resources"}" class="btn btn-default">{lang t="system|cancel"}</a>
{$form_token}
</div>
</div>
</form>
{javascripts}
{include_js module="system" file="forms"}
{/javascripts}
{block PERMISSIONS_RESOURCES_MODULE}
<input type="hidden" name="modules" value="{$form.modules}">
{/block}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment