Merge branch 'master' of https://github.com/thelia/thelia into coupon
# By franck (9) and others # Via franck (3) and Etienne Roudeix (1) * 'master' of https://github.com/thelia/thelia: Added get/setLangId() method in session Refactored VariableXxxxx.php as ConfigXxxx.php Added name duplication check when creating a variable Completed the backoffice variable management update propel version and dependencies add some phpdoc Fixed getUrl() Typo :( Intriducec BaseI18nLoop, started variable config management Fixed URL::absoluteUrl() Fixed customer front controller, events, addec admion config. rewriting specific rewrittend url retrievement product page url global substitution sid : rewriting rewriting tables start rewriting Conflicts: core/lib/Thelia/Config/Resources/routing/admin.xml core/lib/Thelia/Core/Event/TheliaEvents.php
This commit is contained in:
@@ -216,6 +216,10 @@ hr {
|
||||
width: 23px;
|
||||
height: @top-bar-height;
|
||||
}
|
||||
|
||||
a.profile {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.view-shop {
|
||||
@@ -233,10 +237,6 @@ hr {
|
||||
|
||||
.loginpage {
|
||||
|
||||
.brandbar {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.hero-unit {
|
||||
background-color: transparent !important;
|
||||
|
||||
@@ -316,6 +316,10 @@ hr {
|
||||
}
|
||||
}
|
||||
|
||||
.brandbar-wide {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
// -- Navigation bar ----------------------------------------------------------
|
||||
|
||||
.navbar {
|
||||
@@ -571,6 +575,11 @@ form .info .input-append .add-on {
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.title-without-tabs {
|
||||
border-bottom: 2px solid #A5CED8;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
// The action bar on the right
|
||||
.actions {
|
||||
text-align: right;
|
||||
@@ -590,6 +599,8 @@ form .info .input-append .add-on {
|
||||
|
||||
line-height: 30px;
|
||||
margin-bottom: 1em;
|
||||
border-bottom: 1px dotted #A5CED8;
|
||||
padding-bottom: 0.5em;
|
||||
|
||||
.inner-actions {
|
||||
text-align: right;
|
||||
@@ -629,7 +640,7 @@ label {
|
||||
}
|
||||
|
||||
.input-append.input-block-level .add-on img {
|
||||
max-height: 18px;
|
||||
max-height: 16px;
|
||||
}
|
||||
|
||||
// Information in field label
|
||||
@@ -699,9 +710,12 @@ label {
|
||||
|
||||
line-height: 30px;
|
||||
|
||||
.btn-add-item {
|
||||
.action-btn {
|
||||
display: block;
|
||||
float: right;
|
||||
margin-left: 10px;
|
||||
|
||||
text-transform: none;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -717,4 +731,59 @@ label {
|
||||
// Center the alert box (20px bottom margin) in the table cell
|
||||
padding: 20px 20px 0 20px;
|
||||
}
|
||||
|
||||
th {
|
||||
a {
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
td {
|
||||
vertical-align: middle;
|
||||
|
||||
img {
|
||||
border: 2px solid white;
|
||||
border-radius: 4px 4px 4px 4px;
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
&.actions {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.menu-list-table .table-striped {
|
||||
td, th {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
td:nth-child(2) {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
caption {
|
||||
background-color: #FFFFFF;
|
||||
border-bottom: 2px solid #A5CED8;
|
||||
color: #5A6876;
|
||||
font-weight: bold;
|
||||
line-height: 30px;
|
||||
text-align: left;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
}
|
||||
|
||||
.table-left-aligned {
|
||||
th, td {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
select, textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Modal is no longer limited
|
||||
.modal-body {
|
||||
max-height: none;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
{check_auth context="admin" roles="ADMIN" permissions="admin.catalog.view" login_tpl="/admin/login"}
|
||||
{check_auth roles="ADMIN" permissions="admin.catalog.view" login_tpl="/admin/login"}
|
||||
|
||||
{$page_title={intl l='Catalog'}}
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
|
||||
{module_include location='category_list_caption'}
|
||||
|
||||
{loop type="auth" name="can_create" context="admin" roles="ADMIN" permissions="admin.category.create"}
|
||||
<a class="btn btn-primary btn-add-item" title="{intl l='Add a new category'}" href="#add_category_dialog" data-toggle="modal">
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.category.create"}
|
||||
<a class="btn btn-primary action-btn" title="{intl l='Add a new category'}" href="#add_category_dialog" data-toggle="modal">
|
||||
<i class="icon-plus-sign icon-white"></i>
|
||||
</a>
|
||||
{/loop}
|
||||
@@ -41,25 +41,77 @@
|
||||
{ifloop rel="category_list"}
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="object-title">{intl l="Category title"}</th>
|
||||
<th class="object-image"> </th>
|
||||
<th class="object-title">
|
||||
{if $category_order == 'alpha'}
|
||||
<i class="icon icon-chevron-up"></i>
|
||||
{$order_change = 'alpha_reverse'}
|
||||
{elseif $category_order == 'alpha_reverse'}
|
||||
<i class="icon icon-chevron-down"></i>
|
||||
{$order_change = 'alpha'}
|
||||
{else}
|
||||
{$order_change = 'alpha'}
|
||||
{/if}
|
||||
<a href="{url path='/admin/catalog/category' id="{$current_category_id}" category_order="$order_change"}">
|
||||
{intl l="Category title"}
|
||||
</a>
|
||||
</th>
|
||||
|
||||
{module_include location='category_list_header'}
|
||||
|
||||
<th>{intl l="Online"}</th>
|
||||
<th>{intl l="Position"}</th>
|
||||
<th>
|
||||
{if $category_order == 'visible'}
|
||||
<i class="icon icon-chevron-up"></i>
|
||||
{$order_change = 'visible_reverse'}
|
||||
{elseif $category_order == 'visible_reverse'}
|
||||
<i class="icon icon-chevron-down"></i>
|
||||
{$order_change = 'visible'}
|
||||
{else}
|
||||
{$order_change = 'visible'}
|
||||
{/if}
|
||||
|
||||
<a href="{url path='admin/catalog/category' id="{$current_category_id}" category_order="$order_change"}">
|
||||
{intl l="Online"}
|
||||
</a>
|
||||
</th>
|
||||
|
||||
<th>
|
||||
{if $category_order == 'manual'}
|
||||
<i class="icon icon-chevron-up"></i>
|
||||
{$order_change = 'manual_reverse'}
|
||||
{elseif $category_order == 'manual_reverse'}
|
||||
<i class="icon icon-chevron-down"></i>
|
||||
{$order_change = 'manual'}
|
||||
{else}
|
||||
{$order_change = 'manual'}
|
||||
{/if}
|
||||
|
||||
<a href="{url path='admin/catalog/category' id="{$current_category_id}" category_order="$order_change"}">{intl l="Position"}</a>
|
||||
</th>
|
||||
|
||||
<th>{intl l="Actions"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="category_list" type="category" visible="*" parent="{$current_category_id}" order="manual"}
|
||||
{loop name="category_list" type="category" visible="*" parent="{$current_category_id}" order="$category_order"}
|
||||
<tr>
|
||||
<td class="object-title"><a href="{url path='admin/catalog/category' id="$ID" action='browse'}" title="{intl l='Browse this category'}">{$TITLE}</a></td>
|
||||
<td>
|
||||
{loop type="image" name="cat_image" source="category" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"}
|
||||
<a href="{url path='admin/catalog/category' id="$ID" action='browse'}" title="{intl l='Browse this category'}"><img src="#IMAGE_URL" alt="#TITLE" /></a>
|
||||
{/loop}
|
||||
</td>
|
||||
|
||||
<td class="object-title">
|
||||
<a href="{url path='admin/catalog/category' id="$ID" action='browse'}" title="{intl l='Browse this category'}">
|
||||
{$TITLE}
|
||||
</a>
|
||||
</td>
|
||||
|
||||
{module_include location='category_list_row'}
|
||||
|
||||
<td>
|
||||
{loop type="auth" name="can_change" context="admin" roles="ADMIN" permissions="admin.category.edit"}
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.category.edit"}
|
||||
<input type="checkbox" data-id="{$ID}" class="categoryVisibleToggle" {if $VISIBLE == 1}checked="checked"{/if}>
|
||||
{/loop}
|
||||
|
||||
@@ -69,7 +121,7 @@
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{loop type="auth" name="can_change" context="admin" roles="ADMIN" permissions="admin.category.edit"}
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.category.edit"}
|
||||
<a href="{url path='admin/catalog/category' category_id="{$ID}" action='positionUp'}"><i class="icon-arrow-up"></i></a>
|
||||
<span class="categoryPositionChange" data-id="{$ID}">{$POSITION}</span>
|
||||
<a href="{url path='admin/catalog/category' category_id="{$ID}" action='positionDown'}"><i class="icon-arrow-down"></i></a>
|
||||
@@ -83,11 +135,11 @@
|
||||
<td>
|
||||
<a class="btn btn-mini" title="{intl l='Browse this category'}" href="{url path='admin/catalog/category' id="$ID" action='browse'}"><i class="icon-folder-open"></i></a>
|
||||
|
||||
{loop type="auth" name="can_change" context="admin" roles="ADMIN" permissions="admin.category.edit"}
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.category.edit"}
|
||||
<a class="btn btn-mini" title="{intl l='Edit this category'}" href="{url path='admin/catalog/category' id="$ID" action='edit'}"><i class="icon-edit"></i></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_delete" context="admin" roles="ADMIN" permissions="admin.category.delete"}
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.category.delete"}
|
||||
<a class="btn btn-mini category-delete" title="{intl l='Delete this category and all its contents'}" href="#delete_category_dialog" data-id="{$ID}" data-toggle="modal"><i class="icon-trash"></i></a>
|
||||
{/loop}
|
||||
</td>
|
||||
@@ -101,7 +153,7 @@
|
||||
<tr>
|
||||
<td class="message">
|
||||
<div class="alert alert-info">
|
||||
{loop type="auth" name="can_create" context="admin" roles="ADMIN" permissions="admin.category.create"}
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.category.create"}
|
||||
{intl l="This category has no sub-categories. To create a new one, click the + button above."}
|
||||
{/loop}
|
||||
|
||||
@@ -133,7 +185,7 @@
|
||||
|
||||
{module_include location='product_list_caption'}
|
||||
|
||||
<a class="btn btn-primary btn-add-item" title="{intl l='Add a new product'}" href="#productAddModal" data-toggle="modal">
|
||||
<a class="btn btn-primary action-btn" title="{intl l='Add a new product'}" href="#productAddModal" data-toggle="modal">
|
||||
<i class="icon-plus-sign icon-white"></i>
|
||||
</a>
|
||||
</caption>
|
||||
@@ -141,7 +193,7 @@
|
||||
{ifloop rel="product_list"}
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{intl l="Image"}</th>
|
||||
<th> </th>
|
||||
|
||||
<th class="object-title">{intl l="Product title"}</th>
|
||||
|
||||
@@ -156,7 +208,12 @@
|
||||
<tbody>
|
||||
{loop name="product_list" type="product" category="{$current_category_id}" order="manual"}
|
||||
<tr>
|
||||
<td><a href="{url path='admin/catalog/product' id="$ID" action='edit'}" title="{intl l='Edit this product'}">Image !</a></td>
|
||||
<td>
|
||||
{loop type="image" name="cat_image" source="product" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"}
|
||||
<a href="{url path='admin/catalog/product' id="$ID" action='edit'}" title="{intl l='Edit this product'}">
|
||||
<img src="#IMAGE_URL" alt="#TITLE" />
|
||||
</a>
|
||||
{/loop}
|
||||
|
||||
<td class="object-title"><a href="{url path='admin/catalog/product' id="$ID" action='edit'}" title="{intl l='Edit this product'}">{$TITLE}</a></td>
|
||||
|
||||
|
||||
174
templates/admin/default/configuration.html
Normal file
174
templates/admin/default/configuration.html
Normal file
@@ -0,0 +1,174 @@
|
||||
{check_auth roles="ADMIN" permissions="admin.configuration.view" login_tpl="/admin/login"}
|
||||
|
||||
{$page_title={intl l='Configuration'}}
|
||||
|
||||
{include file='includes/header.inc.html'}
|
||||
|
||||
<div class="configuration">
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
{module_include location='configuration_top'}
|
||||
|
||||
<h2>{intl l="Thelia configuration"}</h2>
|
||||
|
||||
<div class="row-fluid">
|
||||
|
||||
<div class="span4">
|
||||
<div class="menu-list-table general-block-decorator">
|
||||
<table class="table table-striped table-condensed">
|
||||
<caption>{intl l='Product catalog configuration'}</caption>
|
||||
|
||||
{module_include location='catalog_configuration_top'}
|
||||
|
||||
{loop type="auth" name="pcc1" roles="ADMIN" permissions="admin.configuration.product_templates"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/product_templates'}">{intl l='Product templates'}</a></td>
|
||||
<td><a class="btn btn-mini" href="{url path='/admin/configuration/product_templates'}"><i class="icon-edit"></i></a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="pcc2" roles="ADMIN" permissions="admin.configuration.product_attributes"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/product_attributes'}">{intl l='Product attributes'}</a></td>
|
||||
<td><a class="btn btn-mini" href="{url path='/admin/configuration/product_attributes'}"><i class="icon-edit"></i></a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="pcc3" roles="ADMIN" permissions="admin.configuration.product_features"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/product_features'}">{intl l='Product features'}</a></td>
|
||||
<td><a class="btn btn-mini" href="{url path='/admin/configuration/product_features'}"><i class="icon-edit"></i></a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="pcc4" roles="ADMIN" permissions="admin.configuration.mailing_template"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/mailing_templates'}">{intl l='Mailing templates'}</a></td>
|
||||
<td><a class="btn btn-mini" href="{url path='/admin/configuration/mailing_templates'}"><i class="icon-edit"></i></a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="pcc5" roles="ADMIN" permissions="admin.configuration.currencies"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/currencies'}">{intl l='Currencies'}</a></td>
|
||||
<td><a class="btn btn-mini" href="{url path='/admin/configuration/currencies'}"><i class="icon-edit"></i></a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{module_include location='catalog_configuration_bottom'}
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="span4">
|
||||
<div class="menu-list-table general-block-decorator">
|
||||
<table class="table table-striped table-condensed">
|
||||
<caption>{intl l='Shipping configuration'}</caption>
|
||||
|
||||
{module_include location='shipping_configuration_top'}
|
||||
|
||||
{loop type="auth" name="pcc1" roles="ADMIN" permissions="admin.configuration.contries"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/countries'}">{intl l='Countries'}</a></td>
|
||||
<td><a class="btn btn-mini" href="{url path='/admin/configuration/countries'}"><i class="icon-edit"></i></a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="pcc2" roles="ADMIN" permissions="admin.configuration.shipping_zones"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/shipping_zones'}">{intl l='Shipping zones'}</a></td>
|
||||
<td><a class="btn btn-mini" href="{url path='/admin/configuration/shipping_zones'}"><i class="icon-edit"></i></a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="pcc3" roles="ADMIN" permissions="admin.configuration.shipping_configuration"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/shipping_configuration'}">{intl l='Shipping configuration'}</a></td>
|
||||
<td><a class="btn btn-mini" href="{url path='/admin/configuration/shipping_configuration'}"><i class="icon-edit"></i></a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{module_include location='shipping_configuration_bottom'}
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="span4">
|
||||
<div class="menu-list-table general-block-decorator">
|
||||
<table class="table table-striped table-condensed">
|
||||
<caption>{intl l='System parameters'}</caption>
|
||||
|
||||
{module_include location='system_configuration_top'}
|
||||
|
||||
{loop type="auth" name="pcc1" roles="ADMIN" permissions="admin.configuration.modules"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/modules'}">{intl l='Modules activation'}</a></td>
|
||||
<td><a class="btn btn-mini" href="{url path='/admin/configuration/modules'}"><i class="icon-edit"></i></a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="pcc2" roles="ADMIN" permissions="admin.configuration.variables"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/variables'}">{intl l='System variables'}</a></td>
|
||||
<td><a class="btn btn-mini" href="{url path='/admin/configuration/variables'}"><i class="icon-edit"></i></a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="pcc3" roles="ADMIN" permissions="admin.configuration.admin_profiles"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/admin_profiles'}">{intl l='Back-office profiles'}</a></td>
|
||||
<td><a class="btn btn-mini" href="{url path='/admin/configuration/admin_profiles'}"><i class="icon-edit"></i></a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="pcc4" roles="ADMIN" permissions="admin.configuration.admin_users"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/admin_users'}">{intl l='Back-office users'}</a></td>
|
||||
<td><a class="btn btn-mini" href="{url path='/admin/configuration/admin_users'}"><i class="icon-edit"></i></a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="pcc5" roles="ADMIN" permissions="admin.configuration.languages"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/languages'}">{intl l='Languages & URLs'}</a></td>
|
||||
<td><a class="btn btn-mini" href="{url path='/admin/configuration/languages'}"><i class="icon-edit"></i></a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="pcc6" roles="ADMIN" permissions="admin.configuration.mailing_system"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/mailing_system'}">{intl l='Mailing system'}</a></td>
|
||||
<td><a class="btn btn-mini" href="{url path='/admin/configuration/mailing_system'}"><i class="icon-edit"></i></a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="pcc7" roles="ADMIN" permissions="admin.configuration.admin_logs"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/admin_logs'}">{intl l='Administration logs'}</a></td>
|
||||
<td><a class="btn btn-mini" href="{url path='/admin/configuration/admin_logs'}"><i class="icon-edit"></i></a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="pcc8" roles="ADMIN" permissions="admin.configuration.system_logs"}
|
||||
<tr>
|
||||
<td><a href="{url path='/admin/configuration/system_logs'}">{intl l='System logs'}</a></td>
|
||||
<td><a class="btn btn-mini" href="{url path='/admin/configuration/system_logs'}"><i class="icon-edit"></i></a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
{module_include location='system_configuration_bottom'}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{module_include location='configuration_bottom'}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{include file='includes/js.inc.html'}
|
||||
|
||||
{include file='includes/footer.inc.html'}
|
||||
@@ -1,17 +1,17 @@
|
||||
{check_auth context="admin" roles="ADMIN" permissions="admin.catalog.view" login_tpl="/admin/login"}
|
||||
{check_auth roles="ADMIN" permissions="admin.catalog.view" login_tpl="/admin/login"}
|
||||
|
||||
{$page_title={intl l='Edit category'}}
|
||||
|
||||
{include file='includes/header.inc.html'}
|
||||
|
||||
<div class="catalog">
|
||||
<div class="catalog edit-category">
|
||||
<div id="wrapper" class="container">
|
||||
<ul class="breadcrumb">
|
||||
{include file="includes/category_breadcrumb.html"}
|
||||
</ul>
|
||||
|
||||
<div class="row-fluid">
|
||||
|
||||
{loop name="category_edit" type="category" visible="*" id="{$current_category_id}" backend_context="1" lang="$edition_language"}
|
||||
<div class="span12 general-block-decorator">
|
||||
<div class="row-fluid">
|
||||
<div class="span7 title">
|
||||
@@ -25,156 +25,187 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tabbable">
|
||||
<ul class="nav nav-tabs admin-tabs" id="tabbed_menu">
|
||||
<li class="active">
|
||||
<a href="#general_description">{intl l="General description"}</a>
|
||||
</li>
|
||||
<form method="post">
|
||||
<div class="tabbable">
|
||||
<ul class="nav nav-tabs admin-tabs" id="tabbed_menu">
|
||||
<li class="active">
|
||||
<a href="#general_description">{intl l="General description"}</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#details">{intl l="Details"}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#images">{intl l="Images"}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#documents">{intl l="Documents"}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#modules">{intl l="Modules"}</a>
|
||||
</li>
|
||||
</ul>
|
||||
<li>
|
||||
<a href="#details">{intl l="Details"}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#images">{intl l="Images"}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#documents">{intl l="Documents"}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#modules">{intl l="Modules"}</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-content">
|
||||
|
||||
<div class="tab-pane active form-container" id="general_description">
|
||||
<form class="form-horizontal span12">
|
||||
<fieldset>
|
||||
<div class="tab-pane active form-container" id="general_description">
|
||||
<div class="form-horizontal span12">
|
||||
<fieldset>
|
||||
|
||||
{include file="includes/inner-form-toolbar.html"}
|
||||
{include file="includes/inner-form-toolbar.html"}
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
{intl l='Title *'}
|
||||
</label>
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
{intl l='Title *'}
|
||||
</label>
|
||||
|
||||
<div class="controls">
|
||||
<input type="text" required="required" title="{intl l='Category title'}" placeholder="{intl l='Category title'}" class="input-block-level">
|
||||
</div>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<input type="text" required="required" title="{intl l='Category title'}" placeholder="{intl l='Category title'}" class="input-block-level" value="{$TITLE|htmlspecialchars}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
{intl l='Summary'}
|
||||
<span class="label-help-block">{intl l="A short category description, used when a summary or an introduction is required"}</span>
|
||||
</label>
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
{intl l='Summary'}
|
||||
<span class="label-help-block">{intl l="A short category description, used when a summary or an introduction is required"}</span>
|
||||
</label>
|
||||
|
||||
<div class="controls">
|
||||
<textarea name="summary" rows="3" title="{intl l='Short category description'}" placeholder="{intl l='Short category description'}" class="input-block-level"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<textarea name="summary" rows="3" title="{intl l='Short category description'}" placeholder="{intl l='Short category description'}" class="input-block-level">{$CHAPO|htmlspecialchars}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
{intl l='Detailed description'}
|
||||
<span class="label-help-block">{intl l="The détailed category description."}</span>
|
||||
</label>
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
{intl l='Detailed description'}
|
||||
<span class="label-help-block">{intl l="The détailed category description."}</span>
|
||||
</label>
|
||||
|
||||
<div class="controls">
|
||||
<textarea name="summary" rows="10" class="input-block-level"></textarea>
|
||||
<div class="controls">
|
||||
<textarea name="summary" rows="10" class="input-block-level">{$DESCRIPTION|htmlspecialchars}</textarea>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
{intl l='Conclusion'}
|
||||
<span class="label-help-block">{intl l="A short post-description information"}</span>
|
||||
</label>
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
{intl l='Conclusion'}
|
||||
<span class="label-help-block">{intl l="A short post-description information"}</span>
|
||||
</label>
|
||||
|
||||
<div class="controls">
|
||||
<textarea name="summary" rows="3" title="{intl l='Short category description'}" placeholder="{intl l='Short category description'}" class="input-block-level"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<textarea name="summary" rows="3" title="{intl l='Short category description'}" placeholder="{intl l='Short category description'}" class="input-block-level">{$POSTSCRIPTUM|htmlspecialchars}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
{intl l='Rewriten URL'}
|
||||
</label>
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
{intl l='Rewriten URL'}
|
||||
</label>
|
||||
|
||||
<div class="controls">
|
||||
<div class="input-append input-block-level">
|
||||
<input type="text" required="required" title="{intl l='Rewriten URL'}" placeholder="{intl l='Rewriten URL'}" class="input-block-level">
|
||||
<a class="btn add-on" href="#">{intl l='Use default'}</a>
|
||||
<div class="controls">
|
||||
<div class="input-append input-block-level">
|
||||
<input type="text" required="required" title="{intl l='Rewriten URL'}" placeholder="{intl l='Rewriten URL'}" class="input-block-level" value="{$URL|htmlspecialchars}">
|
||||
<a class="btn add-on use_default_rewriten_url" href="#">{intl l='Use default'}</a>
|
||||
</div>
|
||||
<div class="help-block">{intl l="The rewritten URL to the category page. Click \"Use Default\" button to use the default URL. Use only digits, letters, - and _ characters."}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="control-group">
|
||||
<lablel> </lablel>
|
||||
<div class="controls">
|
||||
<p>{intl l='Category created on %date_create. Last modification: %date_change' date_create=$CREATE_DATE->format($datetime_format) date_change=$UPDATE_DATE->format($datetime_format)}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane form-container" id="details">
|
||||
<div class="form-horizontal span12">
|
||||
<fieldset>
|
||||
{include file="includes/inner-form-toolbar.html"}
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span6">
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
{intl l='Category ID'}
|
||||
</label>
|
||||
|
||||
<div class="controls">
|
||||
<input type="text" name="id" disabled="disabled" value="#ID" />
|
||||
</div>
|
||||
<div class="help-block">{intl l="The rewritten URL to the category page. Click \"Use Default\" button to use the default URL. Use only digits, letters, - and _ characters."}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="span6">
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
{intl l='Parent category *'}
|
||||
</label>
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span6">
|
||||
<div class="controls">
|
||||
<select required="required" name="parent">
|
||||
<option value="0">{intl l="Top level"}</option>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
{intl l='Parent category *'}
|
||||
</label>
|
||||
{loop name="cat-parent" type="category-tree" visible="*" category="0" exclude="{$current_category_id}"}
|
||||
<option value="#ID" style="padding-left: {3 + $LEVEL * 20}px" {if $parent_category_id == $ID}selected="selected"{/if}>{$TITLE}</option>
|
||||
{/loop}
|
||||
|
||||
<div class="controls">
|
||||
<select required="required" name="parent" class="input-block-level">
|
||||
<option value="0">{intl l="Top level"}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{loop name="cat-parent" type="category-tree" visible="*" category="0" exclude="{$current_category_id}"}
|
||||
<option value="#ID" style="padding-left: {3 + $LEVEL * 20}px" {if $parent_category_id == $ID}selected="selected"{/if}>{$TITLE}</option>
|
||||
{/loop}
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
{intl l='Visibility'}
|
||||
</label>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" name="visible" {if $VISIBLE}checked="checked"{/if}> {intl l="Display this category on front-office"}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="span6">
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
{intl l='Visibility'}
|
||||
</label>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" name="visible"> {intl l="Display this category on front-office"}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p>aff Date creation ?</p>
|
||||
<p>aff date modif ?</p>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
<div class="tab-pane" id="images">
|
||||
<p>Images</p>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="details">
|
||||
<p>Détails divers</p>
|
||||
</div>
|
||||
<div class="tab-pane" id="documents">
|
||||
<p>Documents</p>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="images">
|
||||
<p>Images</p>
|
||||
</div>
|
||||
<div class="tab-pane" id="modules">
|
||||
<p>Modules</p>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="documents">
|
||||
<p>Documents</p>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="modules">
|
||||
<p>Modules</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{/loop}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -189,6 +220,12 @@ $(function() {
|
||||
e.preventDefault();
|
||||
$(this).tab('show');
|
||||
});
|
||||
|
||||
$('.use_default_rewriten_url').click(function(ev) {
|
||||
alert("Not functionnal");
|
||||
|
||||
ev.preventDefault();
|
||||
});
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{$page_title={intl l='AN error occured'}}
|
||||
{$page_title={intl l='An error occured'}}
|
||||
|
||||
{include file='includes/header.inc.html'}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{check_auth context="admin" roles="ADMIN" login_tpl="/admin/login"}
|
||||
{check_auth roles="ADMIN" login_tpl="/admin/login"}
|
||||
{$page_title={intl l='Home'}}
|
||||
{include file='includes/header.inc.html'}
|
||||
|
||||
|
||||
@@ -1,26 +1,13 @@
|
||||
{* Breadcrumb for categories browsing and editing *}
|
||||
|
||||
<li><a href="{url path='admin/home'}">Home</a> <span class="divider">/</span></li>
|
||||
<li><a href="{url path='admin/catalog'}">Catalog</a>
|
||||
<li><a href="{url path='admin/catalog'}">Catalog</a> {ifloop rel="category_path"} <span class="divider">/</span></li>
|
||||
|
||||
{ifloop rel="category_path"}
|
||||
<span class="divider">/</span></li>
|
||||
|
||||
{loop name="category_path" type="category-path" visible="*" category="{$current_category_id}"}
|
||||
{if $ID == $current_category_id}
|
||||
<li class="active">
|
||||
{if $action == 'edit'}
|
||||
{intl l='Editing %cat' cat="{$TITLE}"}
|
||||
{else}
|
||||
{$TITLE} <a href="{url path='admin/catalog/category' id="$ID" action='edit'}" title="{intl l='Edit this category'}">{intl l="(edit)"}</a>
|
||||
{/if}
|
||||
</li>
|
||||
{else}
|
||||
<li><a href="{url path='admin/catalog/category' id="$ID" action='browse'}">{$TITLE}</a> <span class="divider">/</span></li>
|
||||
{/if}
|
||||
{/loop}
|
||||
{/ifloop}
|
||||
|
||||
{elseloop rel="category_path"}
|
||||
</li>
|
||||
{/elseloop}
|
||||
{loop name="category_path" type="category-path" visible="*" category="{$current_category_id}"} {if $ID == $current_category_id}
|
||||
<li class="active">{if $action == 'edit'} {intl l='Editing %cat' cat="{$TITLE}"} {else} {$TITLE} <a href="{url path='admin/catalog/category' id=" $ID" action='edit' }" title="{intl l='Edit this category'}">{intl l="(edit)"}</a> {/if}
|
||||
</li>
|
||||
{else}
|
||||
<li><a href="{url path='admin/catalog/category' id=" $ID" action='browse'}">{$TITLE}</a> <span class="divider">/</span></li>
|
||||
{/if} {/loop} {/ifloop} {elseloop rel="category_path"}
|
||||
</li>
|
||||
{/elseloop}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{$lang}">
|
||||
<html lang="{$lang_code}">
|
||||
<head>
|
||||
<title>{intl l='Thelia Back Office'}{if ! empty($page_title)} - {$page_title}{/if}</title>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
{* display top bar once admin is connected *}
|
||||
|
||||
{loop name="top-bar-auth" type="auth" context="admin" roles="ADMIN"}
|
||||
{loop name="top-bar-auth" type="auth" roles="ADMIN"}
|
||||
|
||||
{module_include location='before_topbar'}
|
||||
|
||||
@@ -54,9 +54,11 @@
|
||||
|
||||
{module_include location='inside_topbar'}
|
||||
|
||||
<div class="user-info">{admin attr="firstname"} {admin attr="lastname"} <a class="logout" href="{url path='admin/logout'}" title="{intl l='Close administation session'}">{intl l="Logout"}</a></div>
|
||||
<div class="user-info">
|
||||
<a class="profile" href="{url path='admin/edit_profile'}">{admin attr="firstname"} {admin attr="lastname"}</a>
|
||||
<a class="logout" href="{url path='admin/logout'}" title="{intl l='Close administation session'}">{intl l="Logout"}</a></div>
|
||||
|
||||
{loop name="top-bar-search" type="auth" context="admin" roles="ADMIN" permissions="admin.search"}
|
||||
{loop name="top-bar-search" type="auth" roles="ADMIN" permissions="admin.search"}
|
||||
<form class="form-search pull-right" action="{url path='/admin/search'}">
|
||||
<div class="control-group">
|
||||
<div class="input-append">
|
||||
@@ -67,7 +69,7 @@
|
||||
</form>
|
||||
{/loop}
|
||||
|
||||
<div class="view-shop"><a href="{$INDEX_PAGE}" title="{intl l='View site'}" target="_blank"><i class="icon-white icon-eye-open"></i> {intl l="View shop"}</a></div>
|
||||
<div class="view-shop"><a href="{navigate to="index"}" title="{intl l='View site'}" target="_blank"><i class="icon-white icon-eye-open"></i> {intl l="View shop"}</a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -87,13 +89,13 @@
|
||||
<a href="{url path='/admin/home'}">{intl l="Home"}</a>
|
||||
</li>
|
||||
|
||||
{loop name="menu-auth-customer" type="auth" context="admin" roles="ADMIN" permissions="admin.customers.view"}
|
||||
{loop name="menu-auth-customer" type="auth" roles="ADMIN" permissions="admin.customers.view"}
|
||||
<li class="{if $admin_current_location == 'customer'}active{/if}" id="customers_menu">
|
||||
<a href="{url path='/admin/customers'}">{intl l="Customers"}</a>
|
||||
</li>
|
||||
{/loop}
|
||||
|
||||
{loop name="menu-auth-order" type="auth" context="admin" roles="ADMIN" permissions="admin.orders.view"}
|
||||
{loop name="menu-auth-order" type="auth" roles="ADMIN" permissions="admin.orders.view"}
|
||||
<li class="dropdown {if $admin_current_location == 'customer'}active{/if}" id="orders_menu" data-toggle="dropdown">
|
||||
|
||||
<a href="#">{intl l="Orders"} <span class="caret"></span></a>
|
||||
@@ -116,31 +118,31 @@
|
||||
</li>
|
||||
{/loop}
|
||||
|
||||
{loop name="menu-auth-catalog" type="auth" context="admin" roles="ADMIN" permissions="admin.catalog.view"}
|
||||
{loop name="menu-auth-catalog" type="auth" roles="ADMIN" permissions="admin.catalog.view"}
|
||||
<li class="{if $admin_current_location == 'catalog'}active{/if}" id="catalog_menu">
|
||||
<a href="{url path='/admin/catalog'}">{intl l="Catalog"}</a>
|
||||
</li>
|
||||
{/loop}
|
||||
|
||||
{loop name="menu-auth-content" type="auth" context="admin" roles="ADMIN" permissions="admin.content.view"}
|
||||
{loop name="menu-auth-content" type="auth" roles="ADMIN" permissions="admin.content.view"}
|
||||
<li class="{if $admin_current_location == 'content'}active{/if}" id="content_menu">
|
||||
<a href="{url path='/admin/content'}">{intl l="Content"}</a>
|
||||
</li>
|
||||
{/loop}
|
||||
|
||||
{loop name="menu-auth-discount" type="auth" context="admin" roles="ADMIN" permissions="admin.discount.view"}
|
||||
{loop name="menu-auth-discount" type="auth" roles="ADMIN" permissions="admin.discount.view"}
|
||||
<li class="{if $admin_current_location == 'discount'}active{/if}" id="discount_menu">
|
||||
<a href="{url path='/admin/discount'}">{intl l="Discount"}</a>
|
||||
</li>
|
||||
{/loop}
|
||||
|
||||
{loop name="menu-auth-config" type="auth" context="admin" roles="ADMIN" permissions="admin.config.view"}
|
||||
{loop name="menu-auth-config" type="auth" roles="ADMIN" permissions="admin.config.view"}
|
||||
<li class="{if $admin_current_location == 'configuration'}active{/if}" id="config_menu">
|
||||
<a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a>
|
||||
</li>
|
||||
{/loop}
|
||||
|
||||
{loop name="menu-auth-modules" type="auth" context="admin" roles="ADMIN" permissions="admin.modules.view"}
|
||||
{loop name="menu-auth-modules" type="auth" roles="ADMIN" permissions="admin.modules.view"}
|
||||
<li class="{if $admin_current_location == 'modules'}active{/if}" id="modules_menu">
|
||||
<a href="{url path='/admin/modules'}">{intl l="Modules"}</a>
|
||||
</li>
|
||||
@@ -156,4 +158,10 @@
|
||||
|
||||
{module_include location='after_top_menu'}
|
||||
|
||||
{/loop}
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="top-bar-auth"}
|
||||
<div class="brandbar brandbar-wide container">
|
||||
<a class="brand" href="{url path='/admin'}">{images file='../assets/img/logo-thelia-34px.png'}<img src="{$asset_url}" alt="{intl l='Thelia, solution e-commerce libre'}" />{/images}</a>
|
||||
</div>
|
||||
{/elseloop}
|
||||
|
||||
@@ -11,17 +11,17 @@
|
||||
|
||||
<ul class="nav nav-pills">
|
||||
{loop name="lang_list" type="lang" default_only={$default_only}}
|
||||
<li {if $IS_DEFAULT}class="active"{/if}>
|
||||
<a href="#" title="{intl l="Edit information in %lng" lng=$TITLE}">
|
||||
<li {if $ID == $edition_language}class="active"{/if}>
|
||||
<a href="{$current_url}&edition_language={$ID}" title="{intl l="Edit information in %lng" lng=$TITLE}">
|
||||
<img src="{image file="../assets/img/flags/{$CODE}.gif"}" alt="{intl l=$TITLE}" />
|
||||
</a>
|
||||
</a>
|
||||
</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="span6 inner-actions">
|
||||
<button class="btn btn-primary" title="{intl l='Save'}">{intl l='Save'} <i class="icon icon-white icon-ok"></i></button>
|
||||
<button class="btn btn-info" title="{intl l='Save and close'}">{intl l='Save and close'} <i class="icon icon-remove icon-white"></i></button>
|
||||
<button type="submit" name="save_mode" value="stay" class="btn btn-primary" title="{intl l='Save'}">{intl l='Save'} <i class="icon icon-white icon-ok"></i></button>
|
||||
<button type="submit" name="save_mode" value="close" class="btn btn-info" title="{intl l='Save and close'}">{intl l='Save and close'} <i class="icon icon-remove icon-white"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
{* The standard description fields, used by many Thelia objects *}
|
||||
|
||||
{form_field form=$form field='title'}
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
{intl l='Title *'}
|
||||
</label>
|
||||
|
||||
<div class="controls">
|
||||
<span {if $error}class="error"{/if}>
|
||||
<input type="text" name="{$name}" required="required" title="{intl l='Title'}" placeholder="{intl l='Title'}" class="input-block-level" value="{$value|htmlspecialchars}">
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='chapo'}
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
{intl l='Summary'}
|
||||
<span class="label-help-block">{intl l="A short description, used when a summary or an introduction is required"}</span>
|
||||
</label>
|
||||
|
||||
<div class="controls">
|
||||
<span {if $error}class="error"{/if}>
|
||||
<textarea name="{$name}" rows="3" title="{intl l='Short description'}" placeholder="{intl l='Short description'}" class="input-block-level">{$value|htmlspecialchars}</textarea>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='description'}
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
{intl l='Detailed description'}
|
||||
<span class="label-help-block">{intl l="The détailed description."}</span>
|
||||
</label>
|
||||
|
||||
<div class="controls">
|
||||
<span {if $error}class="error"{/if}>
|
||||
<textarea name="{$name}" rows="10" class="input-block-level">{$value|htmlspecialchars}</textarea>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='postscriptum'}
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
{intl l='Conclusion'}
|
||||
<span class="label-help-block">{intl l="A short post-description information"}</span>
|
||||
</label>
|
||||
|
||||
<div class="controls">
|
||||
<span {if $error}class="error"{/if}>
|
||||
<textarea name="{$name}" rows="3" title="{intl l='Short conclusion'}" placeholder="{intl l='Short conclusion'}" class="input-block-level">{$value|htmlspecialchars}</textarea>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
{/form_field}
|
||||
@@ -2,9 +2,6 @@
|
||||
{include file='includes/header.inc.html'}
|
||||
|
||||
<div class="loginpage">
|
||||
<div class="brandbar container">
|
||||
<a class="brand" href="index.php">{images file='assets/img/logo-thelia-34px.png'}<img src="{$asset_url}" alt="{intl l='Thelia, solution e-commerce libre'}" />{/images}</a>
|
||||
</div>
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
|
||||
136
templates/admin/default/variable-edit.html
Normal file
136
templates/admin/default/variable-edit.html
Normal file
@@ -0,0 +1,136 @@
|
||||
{check_auth roles="ADMIN" permissions="admin.configuration.variables.edit" login_tpl="/admin/login"}
|
||||
|
||||
{$page_title={intl l='Edit a system variable'}}
|
||||
|
||||
{include file='includes/header.inc.html'}
|
||||
|
||||
<div class="variables edit-variable">
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
{loop name="config_edit" type="config" hidden="*" id="$variable_id" backend_context="1" lang="$edition_language"}
|
||||
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a> <span class="divider">/</span></li>
|
||||
<li><a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a> <span class="divider">/</span></li>
|
||||
<li><a href="{url path='/admin/configuration/variables'}">{intl l="System variables"}</a> <span class="divider">/</span></li>
|
||||
<li>{intl l='Editing variable "%name"' name="{$NAME}"}</li>
|
||||
</ul>
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span12 general-block-decorator">
|
||||
<div class="row-fluid">
|
||||
|
||||
<div class="span12 title title-without-tabs">
|
||||
{intl l="Edit variable $NAME"}
|
||||
</div>
|
||||
|
||||
<div class="form-container">
|
||||
<div class="form-horizontal span12">
|
||||
<fieldset>
|
||||
|
||||
{form name="thelia.admin.config.modification"}
|
||||
<form method="POST" action="{url path='/admin/configuration/variables/save-change'}" {form_enctype form=$form}>
|
||||
|
||||
{* Be sure to get the variable ID, even if the form could not be validated *}
|
||||
<input type="hidden" name="variable_id" value="{$variable_id}" />
|
||||
|
||||
{include file="includes/inner-form-toolbar.html"}
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/configuration/variables'}" />
|
||||
{/form_field}
|
||||
|
||||
{* We do not allow creation of hidden variables *}
|
||||
|
||||
{form_field form=$form field='id'}
|
||||
<input type="hidden" name="{$name}" value="{$value|htmlspecialchars}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='hidden'}
|
||||
<input type="hidden" name="{$name}" value="{$value}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='locale'}
|
||||
<input type="hidden" name="{$name}" value="{$value|htmlspecialchars}" />
|
||||
{/form_field}
|
||||
|
||||
{if #form_error}<div class="alert alert-block alert-error">#form_error_message</div>{/if}
|
||||
|
||||
<div class="control-group">
|
||||
|
||||
<label class="control-label">
|
||||
{intl l='Name *'}
|
||||
</label>
|
||||
|
||||
<div class="controls">
|
||||
{form_field form=$form field='name'}
|
||||
<span {if $error}class="error"{/if}>
|
||||
<input type="text" required="required" name="{$name}" value="{$value|htmlspecialchars}" title="{intl l='Variable name'}" placeholder="{intl l='Variable name'}" class="input-block-level">
|
||||
</span>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
{intl l='Value'}
|
||||
</label>
|
||||
|
||||
<div class="controls">
|
||||
{form_field form=$form field='value'}
|
||||
<span {if $error}class="error"{/if}>
|
||||
<input type="text" name="{$name}" value="{$value|htmlspecialchars}" title="{intl l='Variable value'}" placeholder="{intl l='Variable value'}" class="input-block-level">
|
||||
</span>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
{intl l='Secured'}
|
||||
</label>
|
||||
|
||||
<div class="controls">
|
||||
{form_field form=$form field='secured'}
|
||||
<span {if $error}class="error"{/if}>
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" name="{$name}" value="1" {if $value == 1}checked="checked"{/if}>
|
||||
{intl l="Prevent variable modification or deletion, except for super-admin"}
|
||||
</label>
|
||||
</span>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{include file="includes/standard-description-form-fields.html"}
|
||||
|
||||
</form>
|
||||
{/form}
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="config_edit"}
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="alert alert-error">
|
||||
{intl l="Sorry, variable ID=$variable_id was not found."}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/elseloop}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{include file='includes/js.inc.html'}
|
||||
|
||||
{include file='includes/footer.inc.html'}
|
||||
284
templates/admin/default/variables.html
Normal file
284
templates/admin/default/variables.html
Normal file
@@ -0,0 +1,284 @@
|
||||
{check_auth roles="ADMIN" permissions="admin.configuration.variables.view" login_tpl="/admin/login"}
|
||||
|
||||
{$page_title={intl l='Thelia System Variables'}}
|
||||
|
||||
{include file='includes/header.inc.html'}
|
||||
|
||||
<div class="variables">
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
<ul class="breadcrumb">
|
||||
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a> <span class="divider">/</span></li>
|
||||
<li><a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a> <span class="divider">/</span></li>
|
||||
<li><a href="{url path='/admin/configuration/variables'}">{intl l="System variables"}</a></li>
|
||||
</ul>
|
||||
|
||||
{module_include location='variables_top'}
|
||||
|
||||
<div class="row-fluid">
|
||||
|
||||
<div class="span12">
|
||||
<form action="{url path='/admin/configuration/variables/change-values'}" method="post">
|
||||
<div class="general-block-decorator">
|
||||
<table class="table table-striped table-condensed table-left-aligned">
|
||||
<caption>
|
||||
{intl l='Thelia system variables'}
|
||||
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.variables.create"}
|
||||
<a class="btn btn-primary action-btn" title="{intl l='Add a new variable'}" href="#add_variable_dialog" data-toggle="modal">
|
||||
<i class="icon-plus-sign icon-white"></i>
|
||||
</a>
|
||||
<button class="btn btn-primary action-btn" title="{intl l='Save chages'}">{intl l='Save changes'} <i class="icon icon-white icon-ok"></i></button>
|
||||
{/loop}
|
||||
|
||||
</caption>
|
||||
<tr>
|
||||
<th>{intl l="Purpose"}</th>
|
||||
<th>{intl l="Name"}</th>
|
||||
<th>{intl l="Value"}</th>
|
||||
|
||||
{module_include location='variables_table_header'}
|
||||
|
||||
<th> </th>
|
||||
</tr>
|
||||
|
||||
{loop name="config" type="config" hidden="0" secured="*" backend_context="1" lang="$lang_id"}
|
||||
<tr>
|
||||
|
||||
<td>{$TITLE}</td>
|
||||
|
||||
<td>
|
||||
{if ! $SECURED}
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.variables.change"}
|
||||
<a title="{intl l='Change this variable'}" href="{url path='/admin/configuration/variables/change' variable_id="$ID"}">{$NAME}</a>
|
||||
{/loop}
|
||||
{elseloop rel="can_change"}
|
||||
{$NAME}
|
||||
{/elseloop}
|
||||
{else}
|
||||
{$NAME}
|
||||
{/if}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{if $SECURED}
|
||||
{$VALUE}
|
||||
{else}
|
||||
<input id="cancelable_edit_{$ID}" class="js-edit" data-id="{$ID}" type="text" name="variable[{$ID}]" value="{$VALUE|htmlspecialchars}" />
|
||||
{/if}
|
||||
</td>
|
||||
|
||||
{module_include location='variables_table_row'}
|
||||
|
||||
<td class="actions">
|
||||
{if ! $SECURED}
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-mini cancel-edit" id="cancel_edit_btn_{$ID}" data-id="{$ID}" title="{intl l='Cancel changes and revert to original value'}" href="#"><i class="icon-remove"></i></a>
|
||||
|
||||
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.variables.change"}
|
||||
<a class="btn btn-mini config-change" title="{intl l='Change this variable'}" href="{url path='/admin/configuration/variables/change' variable_id="$ID"}"><i class="icon-edit"></i></a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.variables.delete"}
|
||||
<a class="btn btn-mini config-delete" title="{intl l='Delete this variable'}" href="#delete_variable_dialog" data-id="{$ID}" data-toggle="modal"><i class="icon-trash"></i></a>
|
||||
{/loop}
|
||||
</div>
|
||||
{else}
|
||||
<i title="{intl l='This variable could not be changed.'}" class="icon icon-ban-circle"></i>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{module_include location='variables_bottom'}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{* Adding a new variable *}
|
||||
|
||||
<div class="modal hide fade" id="add_variable_dialog" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3>{intl l="Create a new variable"}</h3>
|
||||
</div>
|
||||
|
||||
{form name="thelia.admin.config.creation"}
|
||||
<form method="POST" action="{url path='/admin/configuration/variables/create'}" {form_enctype form=$form}>
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
{* on success, redirect to the edition page, _ID_ is replaced with the created variable ID, see controller *}
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/configuration/variables/change' variable_id='_ID_'}" />
|
||||
{/form_field}
|
||||
|
||||
{* We do not allow users to create hidden or secured variables from here *}
|
||||
|
||||
{form_field form=$form field='hidden'}
|
||||
<input type="hidden" name="{$name}" value="0" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='secured'}
|
||||
<input type="hidden" name="{$name}" value="0" />
|
||||
{/form_field}
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
{if #form_error}<div class="alert alert-block alert-error" id="add_variable_dialog_error">#form_error_message</div>{/if}
|
||||
|
||||
<div class="control-group">
|
||||
|
||||
<label class="control-label">
|
||||
{intl l='Name *'}
|
||||
</label>
|
||||
|
||||
<div class="controls">
|
||||
{form_field form=$form field='name'}
|
||||
<span {if $error}class="error"{/if}>
|
||||
<input type="text" required="required" name="{$name}" value="{$value}" title="{intl l='Variable name'}" placeholder="{intl l='Variable name'}" class="input-block-level">
|
||||
</span>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
|
||||
<label class="control-label">
|
||||
{intl l='Value'}
|
||||
</label>
|
||||
|
||||
<div class="controls">
|
||||
{form_field form=$form field='value'}
|
||||
<span {if $error}class="error"{/if}>
|
||||
<input type="text" name="{$name}" value="{$value}" title="{intl l='Variable value'}" placeholder="{intl l='Variable value'}" class="input-block-level">
|
||||
</span>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
{intl l='Purpose *'}
|
||||
</label>
|
||||
|
||||
<div class="controls">
|
||||
{loop type="lang" name="default-lang" default_only="1"}
|
||||
{form_field form=$form field='locale'}
|
||||
<input type="hidden" name="{$name}" value="{$LOCALE}" />
|
||||
{/form_field}
|
||||
|
||||
<div class="input-append input-block-level">
|
||||
{form_field form=$form field='title'}
|
||||
<span {if $error}class="error"{/if}>
|
||||
<input type="text" required="required" name="{$name}" value="{$value}" title="{intl l='Variable purpose'}" placeholder="{intl l='Variable purpose'}" class="input-block-level">
|
||||
</span>
|
||||
{/form_field}
|
||||
<span class="add-on"><img src="{image file="assets/img/flags/{$CODE}.gif"}" alt="{intl l=$TITLE}" /></span>
|
||||
</div>
|
||||
|
||||
<div class="help-block">{intl l="Enter here the variable purpose in the default language ($TITLE)"}</div>
|
||||
{/loop}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-primary">{intl l="Create this variable"}</button>
|
||||
<button type="button" class="btn" data-dismiss="modal" aria-hidden="true">{intl l="Cancel"}</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
{/form}
|
||||
</div>
|
||||
|
||||
|
||||
{* Delete confirmation dialog *}
|
||||
|
||||
<div class="modal hide fade" id="delete_variable_dialog" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3>{intl l="Delete a variable"}</h3>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<p>{intl l="Do you really want to delete this variable ?"}</p>
|
||||
</div>
|
||||
|
||||
<form method="post" action="{url path='/admin/configuration/variables/delete'}">
|
||||
<input type="hidden" name="variable_id" id="variable_delete_id" value="" />
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-primary">{intl l="Yes"}</button>
|
||||
<button type="button" class="btn" data-dismiss="modal" aria-hidden="true">{intl l="No"}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{include file='includes/js.inc.html'}
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
// Set proper variable ID in delete from
|
||||
$('a.config-delete').click(function(ev) {
|
||||
$('#variable_delete_id').val($(this).data('id'));
|
||||
});
|
||||
|
||||
{* display the form creation dialog if it contains errors *}
|
||||
|
||||
{form name="thelia.admin.config.creation"}
|
||||
{if #form_error}
|
||||
$('#add_variable_dialog').modal();
|
||||
{/if}
|
||||
{/form}
|
||||
|
||||
{* Always reset create dialog on close *}
|
||||
|
||||
$('#add_variable_dialog').on('hidden',function() {
|
||||
// Hide error message
|
||||
$('#add_variable_dialog_error').remove();
|
||||
|
||||
// Clear error status
|
||||
$("#add_variable_dialog .error").removeClass('error');
|
||||
|
||||
// Empty field values
|
||||
$("#add_variable_dialog input[type=text]").val('');
|
||||
});
|
||||
|
||||
// Edition canceling management
|
||||
$('.cancel-edit').each(function() {
|
||||
var zis = $(this);
|
||||
var field = $('#cancelable_edit_' + $(this).data('id'));
|
||||
|
||||
zis.addClass('disabled');
|
||||
zis.data('original-value', field.val());
|
||||
|
||||
zis.click(function(ev) {
|
||||
|
||||
if (!zis.is('.disabled')) {
|
||||
zis.addClass('disabled');
|
||||
field.val(zis.data('original-value'));
|
||||
}
|
||||
|
||||
ev.preventDefault();
|
||||
});
|
||||
})
|
||||
|
||||
$('.js-edit').keyup(function() {
|
||||
$('#cancel_edit_btn_' + $(this).data('id')).removeClass('disabled');
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
{include file='includes/footer.inc.html'}
|
||||
Reference in New Issue
Block a user