199 lines
9.4 KiB
HTML
199 lines
9.4 KiB
HTML
{extends file="admin-layout.tpl"}
|
|
|
|
{block name="after-admin-css"}
|
|
{stylesheets file='assets/js/image-picker/image-picker.css'}
|
|
<link rel="stylesheet" href="{$asset_url}">
|
|
{/stylesheets}
|
|
{/block}
|
|
|
|
{block name="no-return-functions"}
|
|
{$admin_current_location = 'tools'}
|
|
{/block}
|
|
|
|
{block name="check-resource"}admin.brand{/block}
|
|
{block name="check-access"}view{/block}
|
|
|
|
{block name="page-title"}{intl l='Edit brand'}{/block}
|
|
|
|
{block name="main-content"}
|
|
<div class="brand edit-brand">
|
|
<div id="wrapper" class="container">
|
|
{loop name="brand_edit" type="brand" visible="*" id="{$brand_id}" backend_context="1" lang="$edit_language_id"}
|
|
|
|
<nav>
|
|
<ul class="breadcrumb">
|
|
<li><a href="{url path='admin/home'}">{intl l='Home'}</a></li>
|
|
<li><a href="{url path='admin/tools'}">{intl l='Tools'}</a></li>
|
|
<li><a href="{url path='admin/brand'}">{intl l='Brands'}</a></li>
|
|
<li>{intl l='Editing brand "%title"' title="$TITLE"}</li>
|
|
</ul>
|
|
</nav>
|
|
|
|
<div class="row">
|
|
<div class="col-md-12 general-block-decorator">
|
|
<div class="row">
|
|
<div class="col-md-7 title">
|
|
{intl l='Edit brand %title' title={$TITLE}}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
|
|
<ul class="nav nav-tabs" id="tabbed-menu">
|
|
<li class="active">
|
|
<a href="#general" data-toggle="tab">{intl l="General description"}</a>
|
|
</li>
|
|
<li><a href="#seo" data-toggle="tab">{intl l="SEO"}</a></li>
|
|
<li><a href="#images" data-toggle="tab">{intl l="Images"}</a></li>
|
|
<li><a href="#documents" data-toggle="tab">{intl l="Documents"}</a></li>
|
|
<li><a href="#modules" data-toggle="tab">{intl l="Modules"}</a></li>
|
|
</ul>
|
|
|
|
<div class="tab-content">
|
|
|
|
<div class="tab-pane fade active in" id="general">
|
|
|
|
<div class="form-container">
|
|
|
|
{form name="thelia.admin.brand.modification"}
|
|
|
|
<form method="POST" action="{url path="/admin/brand/save/{$ID}"}" {form_enctype form=$form} class="clearfix">
|
|
|
|
{include file="includes/inner-form-toolbar.html" close_url={url path='/admin/brand'}}
|
|
|
|
<input type="hidden" name="current_tab" value="general"/>
|
|
|
|
{* Be sure to get the currency ID, even if the form could not be validated *}
|
|
<input type="hidden" name="brand_id" value="{$ID}" />
|
|
|
|
{form_hidden_fields form=$form}
|
|
|
|
{render_form_field form=$form field="success_url" value={url path="/admin/brand"}}
|
|
{render_form_field form=$form field="locale" value={$edit_language_locale}}
|
|
|
|
{if $form_error}
|
|
<div class="alert alert-danger">{$form_error_message}</div>
|
|
{/if}
|
|
|
|
<div class="row">
|
|
<div class="col-md-8">
|
|
{include file="includes/standard-description-form-fields.html"}
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
{render_form_field form=$form field="visible"}
|
|
|
|
{custom_render_form_field form=$form field='logo_image_id'}
|
|
<select {form_field_attributes form=$form field='logo_image_id' extra_class='brand-image-selector'} >
|
|
<option value="">{intl l="No logo image"}</option>
|
|
|
|
{loop name="brand-images" type="image" brand=$ID width="90" height="90" resize_mode="crop"}
|
|
<option value="{$ID}" data-img-src="{$IMAGE_URL}" {if $LOGO_IMAGE_ID == $ID}selected="selected"{/if}>{$TITLE}</option>
|
|
{/loop}
|
|
</select>
|
|
{/custom_render_form_field}
|
|
</div>
|
|
</div>
|
|
|
|
{include
|
|
file="includes/inner-form-toolbar.html"
|
|
hide_submit_buttons = false
|
|
hide_flags = true
|
|
|
|
close_url={url path="/admin/brand"}
|
|
}
|
|
|
|
<small>{intl l='Brand created on %date_create. Last modification: %date_change' date_create={format_date date=$CREATE_DATE} date_change={format_date date=$UPDATE_DATE} }</small>
|
|
</form>
|
|
{/form}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="tab-pane fade" id="seo">
|
|
{form name="thelia.admin.seo"}
|
|
{include
|
|
file = "includes/seo-tab.html"
|
|
form = $form
|
|
formAction = {url path='/admin/brand/seo/save'}
|
|
closeUrl = {url path='/admin/brand'}
|
|
current_id = $brand_id
|
|
}
|
|
{/form}
|
|
</div>
|
|
|
|
<div class="tab-pane fade" id="images">
|
|
{include file='includes/image-upload-form.html' imageType='brand' parentId=$brand_id}
|
|
</div>
|
|
|
|
<div class="tab-pane fade" id="documents">
|
|
{include file='includes/document-upload-form.html' documentType='brand' parentId=$brand_id}
|
|
</div>
|
|
|
|
<div class="tab-pane fade" id="modules">
|
|
<div class="form-container">
|
|
{include
|
|
file = "includes/inner-form-toolbar.html"
|
|
hide_submit_buttons = true
|
|
page_url = {$pageUrl}
|
|
close_url = {$closeUrl}
|
|
current_tab = "modules"
|
|
}
|
|
</div>
|
|
|
|
{include file="includes/module-tab-content.html" location="brand-edit"}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{/loop}
|
|
</div>
|
|
</div>
|
|
{/block}
|
|
|
|
|
|
|
|
{block name="javascript-initialization"}
|
|
{javascripts file='assets/js/dropzone.js'}
|
|
<script src="{$asset_url}"></script>
|
|
{/javascripts}
|
|
{javascripts file='assets/js/image-upload.js'}
|
|
<script src="{$asset_url}"></script>
|
|
{/javascripts}
|
|
{javascripts file='assets/js/document-upload.js'}
|
|
<script src="{$asset_url}"></script>
|
|
{/javascripts}
|
|
{javascripts file='assets/js/jquery-ui-1.10.3.custom.min.js'}
|
|
<script src="{$asset_url}"></script>
|
|
{/javascripts}
|
|
{javascripts file='assets/js/image-picker/image-picker.min.js'}
|
|
<script src="{$asset_url}"></script>
|
|
{/javascripts}
|
|
<script>
|
|
$(function() {
|
|
// Load active tab
|
|
|
|
$.imageUploadManager.initImageDropZone();
|
|
$.documentUploadManager.initDocumentDropZone();
|
|
|
|
$('.use_default_rewriten_url').click(function(ev) {
|
|
alert("Not functionnal");
|
|
|
|
ev.preventDefault();
|
|
});
|
|
|
|
// Show proper tab, if defined
|
|
{if ! empty($current_tab)}
|
|
$('.nav-tabs a[href="#{$current_tab}"]').trigger("click");
|
|
{/if}
|
|
|
|
$('.brand-image-selector').imagepicker();
|
|
});
|
|
</script>
|
|
{/block}
|
|
|
|
{block name="javascript-last-call"}
|
|
{module_include location='brand-edit-js'}
|
|
{/block} |