Added category creation and deletion
This commit is contained in:
@@ -124,7 +124,7 @@ hr {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.modal-footer {
|
||||
.footer {
|
||||
background: none repeat scroll 0 0 transparent;
|
||||
border: medium none;
|
||||
box-shadow: none;
|
||||
@@ -375,6 +375,7 @@ hr {
|
||||
padding: 10px 20px;
|
||||
}
|
||||
}
|
||||
|
||||
// -- Login form --------------------------------------------------------------
|
||||
|
||||
.form-signin {
|
||||
@@ -394,157 +395,157 @@ textarea:focus, input[type="text"]:focus, input[type="password"]:focus, input[ty
|
||||
|
||||
// -- Allow inline forms validation states ------------------------------------
|
||||
|
||||
.form-inline .warning .control-label,
|
||||
.form-inline .warning .help-block,
|
||||
.form-inline .warning .help-inline {
|
||||
form .warning .control-label,
|
||||
form .warning .help-block,
|
||||
form .warning .help-inline {
|
||||
color: #c09853;
|
||||
}
|
||||
|
||||
.form-inline .warning .checkbox,
|
||||
.form-inline .warning .radio,
|
||||
.form-inline .warning input,
|
||||
.form-inline .warning select,
|
||||
.form-inline .warning textarea {
|
||||
form .warning .checkbox,
|
||||
form .warning .radio,
|
||||
form .warning input,
|
||||
form .warning select,
|
||||
form .warning textarea {
|
||||
color: #c09853;
|
||||
}
|
||||
|
||||
.form-inline .warning input,
|
||||
.form-inline .warning select,
|
||||
.form-inline .warning textarea {
|
||||
form .warning input,
|
||||
form .warning select,
|
||||
form .warning textarea {
|
||||
border-color: #c09853;
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
}
|
||||
|
||||
.form-inline .warning input:focus,
|
||||
.form-inline .warning select:focus,
|
||||
.form-inline .warning textarea:focus {
|
||||
form .warning input:focus,
|
||||
form .warning select:focus,
|
||||
form .warning textarea:focus {
|
||||
border-color: #a47e3c;
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
|
||||
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
|
||||
}
|
||||
|
||||
.form-inline .warning .input-prepend .add-on,
|
||||
.form-inline .warning .input-append .add-on {
|
||||
form .warning .input-prepend .add-on,
|
||||
form .warning .input-append .add-on {
|
||||
color: #c09853;
|
||||
background-color: #fcf8e3;
|
||||
border-color: #c09853;
|
||||
}
|
||||
|
||||
.form-inline .error .control-label,
|
||||
.form-inline .error .help-block,
|
||||
.form-inline .error .help-inline {
|
||||
form .error .control-label,
|
||||
form .error .help-block,
|
||||
form .error .help-inline {
|
||||
color: #b94a48;
|
||||
}
|
||||
|
||||
.form-inline .error .checkbox,
|
||||
.form-inline .error .radio,
|
||||
.form-inline .error input,
|
||||
.form-inline .error select,
|
||||
.form-inline .error textarea {
|
||||
form .error .checkbox,
|
||||
form .error .radio,
|
||||
form .error input,
|
||||
form .error select,
|
||||
form .error textarea {
|
||||
color: #b94a48;
|
||||
}
|
||||
|
||||
.form-inline .error input,
|
||||
.form-inline .error select,
|
||||
.form-inline .error textarea {
|
||||
form .error input,
|
||||
form .error select,
|
||||
form .error textarea {
|
||||
border-color: #b94a48;
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
}
|
||||
|
||||
.form-inline .error input:focus,
|
||||
.form-inline .error select:focus,
|
||||
.form-inline .error textarea:focus {
|
||||
form .error input:focus,
|
||||
form .error select:focus,
|
||||
form .error textarea:focus {
|
||||
border-color: #953b39;
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
|
||||
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
|
||||
}
|
||||
|
||||
.form-inline .error .input-prepend .add-on,
|
||||
.form-inline .error .input-append .add-on {
|
||||
form .error .input-prepend .add-on,
|
||||
form .error .input-append .add-on {
|
||||
color: #b94a48;
|
||||
background-color: #f2dede;
|
||||
border-color: #b94a48;
|
||||
}
|
||||
|
||||
.form-inline .success .control-label,
|
||||
.form-inline .success .help-block,
|
||||
.form-inline .success .help-inline {
|
||||
form .success .control-label,
|
||||
form .success .help-block,
|
||||
form .success .help-inline {
|
||||
color: #468847;
|
||||
}
|
||||
|
||||
.form-inline .success .checkbox,
|
||||
.form-inline .success .radio,
|
||||
.form-inline .success input,
|
||||
.form-inline .success select,
|
||||
.form-inline .success textarea {
|
||||
form .success .checkbox,
|
||||
form .success .radio,
|
||||
form .success input,
|
||||
form .success select,
|
||||
form .success textarea {
|
||||
color: #468847;
|
||||
}
|
||||
|
||||
.form-inline .success input,
|
||||
.form-inline .success select,
|
||||
.form-inline .success textarea {
|
||||
form .success input,
|
||||
form .success select,
|
||||
form .success textarea {
|
||||
border-color: #468847;
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
}
|
||||
|
||||
.form-inline .success input:focus,
|
||||
.form-inline .success select:focus,
|
||||
.form-inline .success textarea:focus {
|
||||
form .success input:focus,
|
||||
form .success select:focus,
|
||||
form .success textarea:focus {
|
||||
border-color: #356635;
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
|
||||
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
|
||||
}
|
||||
|
||||
.form-inline .success .input-prepend .add-on,
|
||||
.form-inline .success .input-append .add-on {
|
||||
form .success .input-prepend .add-on,
|
||||
form .success .input-append .add-on {
|
||||
color: #468847;
|
||||
background-color: #dff0d8;
|
||||
border-color: #468847;
|
||||
}
|
||||
|
||||
.form-inline .info .control-label,
|
||||
.form-inline .info .help-block,
|
||||
.form-inline .info .help-inline {
|
||||
form .info .control-label,
|
||||
form .info .help-block,
|
||||
form .info .help-inline {
|
||||
color: #3a87ad;
|
||||
}
|
||||
|
||||
.form-inline .info .checkbox,
|
||||
.form-inline .info .radio,
|
||||
.form-inline .info input,
|
||||
.form-inline .info select,
|
||||
.form-inline .info textarea {
|
||||
form .info .checkbox,
|
||||
form .info .radio,
|
||||
form .info input,
|
||||
form .info select,
|
||||
form .info textarea {
|
||||
color: #3a87ad;
|
||||
}
|
||||
|
||||
.form-inline .info input,
|
||||
.form-inline .info select,
|
||||
.form-inline .info textarea {
|
||||
form .info input,
|
||||
form .info select,
|
||||
form .info textarea {
|
||||
border-color: #3a87ad;
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
}
|
||||
|
||||
.form-inline .info input:focus,
|
||||
.form-inline .info select:focus,
|
||||
.form-inline .info textarea:focus {
|
||||
form .info input:focus,
|
||||
form .info select:focus,
|
||||
form .info textarea:focus {
|
||||
border-color: #2d6987;
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
|
||||
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
|
||||
}
|
||||
|
||||
.form-inline .info .input-prepend .add-on,
|
||||
.form-inline .info .input-append .add-on {
|
||||
form .info .input-prepend .add-on,
|
||||
form .info .input-append .add-on {
|
||||
color: #3a87ad;
|
||||
background-color: #d9edf7;
|
||||
border-color: #3a87ad;
|
||||
@@ -560,6 +561,7 @@ textarea:focus, input[type="text"]:focus, input[type="password"]:focus, input[ty
|
||||
padding: 1em;
|
||||
margin-bottom: 20px;
|
||||
|
||||
// The block title
|
||||
.title {
|
||||
color: #5A6876;
|
||||
text-transform: uppercase;
|
||||
@@ -569,11 +571,53 @@ textarea:focus, input[type="text"]:focus, input[type="password"]:focus, input[ty
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
// The action bar on the right
|
||||
.actions {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
// Reduce bottom margin of admin tabs.
|
||||
.admin-tabs {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
// The overall form container
|
||||
.form-container {
|
||||
|
||||
// The inner toolbar (flags & save buttons)
|
||||
.inner-toolbar {
|
||||
|
||||
line-height: 30px;
|
||||
margin-bottom: 1em;
|
||||
|
||||
.inner-actions {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.nav-pills {
|
||||
margin-bottom: 0;
|
||||
|
||||
li a {
|
||||
padding: 4px;
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
li.active a {
|
||||
opacity: 1;
|
||||
background-color: #E7E7E7;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Modal dialog tweaking ------------------------------------------------------
|
||||
|
||||
.modal {
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
// -- Admin forms tweaking ----------------------------------------------------
|
||||
|
||||
label {
|
||||
@@ -584,6 +628,10 @@ label {
|
||||
}
|
||||
}
|
||||
|
||||
.input-append.input-block-level .add-on img {
|
||||
max-height: 18px;
|
||||
}
|
||||
|
||||
// Information in field label
|
||||
.label-help-block, .help-block {
|
||||
color: lighten(#595959, 20);
|
||||
|
||||
BIN
templates/admin/default/assets/img/flags/en.gif
Normal file
BIN
templates/admin/default/assets/img/flags/en.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
BIN
templates/admin/default/assets/img/flags/es.gif
Normal file
BIN
templates/admin/default/assets/img/flags/es.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
BIN
templates/admin/default/assets/img/flags/fr.gif
Normal file
BIN
templates/admin/default/assets/img/flags/fr.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
BIN
templates/admin/default/assets/img/flags/it.gif
Normal file
BIN
templates/admin/default/assets/img/flags/it.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
@@ -16,10 +16,10 @@
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="general-block-decorator">
|
||||
<table class="table table-striped">
|
||||
<table class="table table-striped table-condensed">
|
||||
<caption>
|
||||
{* display parent category name, and get current cat ID *}
|
||||
{loop name="category_title" type="category" id="{$current_category_id}"}
|
||||
{loop name="category_title" type="category" visible="*" id="{$current_category_id}"}
|
||||
{intl l="Categories in %cat" cat=$TITLE}
|
||||
{$cat_id = $ID}
|
||||
{/loop}
|
||||
@@ -29,9 +29,11 @@
|
||||
|
||||
{module_include location='category_list_caption'}
|
||||
|
||||
<a class="btn btn-primary btn-add-item" title="{intl l='Add a new category'}" href="{url path="admin/catalog/category/create/{$cat_id|default:0}"}">
|
||||
{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">
|
||||
<i class="icon-plus-sign icon-white"></i>
|
||||
</a>
|
||||
{/loop}
|
||||
</caption>
|
||||
|
||||
{ifloop rel="category_list"}
|
||||
@@ -48,9 +50,9 @@
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="category_list" type="category" parent="{$current_category_id}" order="manual"}
|
||||
{loop name="category_list" type="category" visible="*" parent="{$current_category_id}" order="manual"}
|
||||
<tr>
|
||||
<td class="object-title"><a href="{url path="admin/catalog/category/browse/$ID"}" title="{intl l='Browse this category'}">{$TITLE}</a></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'}
|
||||
|
||||
@@ -59,15 +61,27 @@
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<a href="{url path='admin/catalog/category/positionUp/{$ID}'}"><i class="icon-arrow-up"></i></a>
|
||||
<span class="object_classement_editable" data-action="changeCategoryPosition" data-name="category_id" data-id="{$ID}">{$POSITION}</span>
|
||||
<a href="{url path='admin/catalog/category/positionDown/{$ID}'}"><i class="icon-arrow-down"></i></a>
|
||||
{loop type="auth" name="can_change" context="admin" roles="ADMIN" permissions="admin.category.edit"}
|
||||
<a href="{url path='admin/catalog/category' id="{$ID}" action='positionUp'}"><i class="icon-arrow-up"></i></a>
|
||||
<span class="object_classement_editable" data-action="changeCategoryPosition" data-name="category_id" data-id="{$ID}">{$POSITION}</span>
|
||||
<a href="{url path='admin/catalog/category' id="{$ID}" action='positionDown'}"><i class="icon-arrow-down"></i></a>
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="can_change"}
|
||||
{$POSITION}
|
||||
{/elseloop}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<a class="btn btn-mini" title="{intl l='Browse this category'}" href="{url path="admin/catalog/category/browse/{$ID}"}"><i class="icon-folder-open"></i></a>
|
||||
<a class="btn btn-mini" title="{intl l='Edit this category'}" href="{url path="admin/catalog/category/edit/{$ID}"}"><i class="icon-edit"></i></a>
|
||||
<a class="btn btn-mini category-delete" title="{intl l='Delete this category and all its contents'}" href="{url path='admin/catalog/category/delete/{$ID}'}"><i class="icon-trash"></i></a>
|
||||
<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"}
|
||||
<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"}
|
||||
<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>
|
||||
</tr>
|
||||
{/loop}
|
||||
@@ -77,7 +91,17 @@
|
||||
{elseloop rel="category_list"}
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="message"><div class="alert alert-info">{intl l="This category has no sub-categories. To create a new one, click the + button above."}</div></td>
|
||||
<td class="message">
|
||||
<div class="alert alert-info">
|
||||
{loop type="auth" name="can_create" context="admin" roles="ADMIN" permissions="admin.category.create"}
|
||||
{intl l="This category has no sub-categories. To create a new one, click the + button above."}
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="can_create"}
|
||||
{intl l="This category has no sub-categories."}
|
||||
{/elseloop}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
{/elseloop}
|
||||
@@ -89,10 +113,10 @@
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="general-block-decorator">
|
||||
<table class="table table-striped">
|
||||
<table class="table table-striped table-condensed">
|
||||
<caption>
|
||||
{* display parent category name *}
|
||||
{loop name="category_title" type="category" id="{$current_category_id}"}
|
||||
{loop name="category_title" type="category" visible="*" id="{$current_category_id}"}
|
||||
{intl l="Products in %cat" cat=$TITLE}
|
||||
{/loop}
|
||||
{elseloop rel="category_title"}
|
||||
@@ -124,9 +148,9 @@
|
||||
<tbody>
|
||||
{loop name="product_list" type="product" category="{$current_category_id}" order="manual"}
|
||||
<tr>
|
||||
<td><a href="{url path="admin/catalog/product/edit/$ID"}" title="{intl l='Edit this product'}">Image !</a></td>
|
||||
<td><a href="{url path='admin/catalog/product' id="$ID" action='edit'}" title="{intl l='Edit this product'}">Image !</a></td>
|
||||
|
||||
<td class="object-title"><a href="{url path="admin/catalog/product/edit/$ID"}" title="{intl l='Edit this product'}">{$TITLE}</a></td>
|
||||
<td class="object-title"><a href="{url path='admin/catalog/product' id="$ID" action='edit'}" title="{intl l='Edit this product'}">{$TITLE}</a></td>
|
||||
|
||||
{module_include location='product_list_row'}
|
||||
|
||||
@@ -135,14 +159,14 @@
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<a href="{url path='admin/catalog/product/positionUp/{$ID}'}"><i class="icon-arrow-up"></i></a>
|
||||
<a href="{url path='admin/catalog/product' id="$ID" action='positionUn'}"><i class="icon-arrow-up"></i></a>
|
||||
<span class="object_classement_editable" data-action="changeProductPosition" data-name="product_id" data-id="{$ID}">{$POSITION}</span>
|
||||
<a href="{url path='admin/catalog/product/positionDown/{$ID}'}"><i class="icon-arrow-down"></i></a>
|
||||
<a href="{url path='admin/catalog/product' id="$ID" action='positionDown'}"><i class="icon-arrow-down"></i></a>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<a class="btn btn-mini" title="{intl l='Edit this category'}" href="{url path="admin/catalog/product/edit/{$ID}"}"><i class="icon-edit"></i></a>
|
||||
<a class="btn btn-mini product-delete" title="{intl l='Delete this product'}" href="{url path='admin/catalog/product/delete/{$ID}'}"><i class="icon-trash"></i></a>
|
||||
<a class="btn btn-mini" title="{intl l='Edit this category'}" href="{url path='admin/catalog/product' id="$ID" action='edit'}"><i class="icon-edit"></i></a>
|
||||
<a class="btn btn-mini product-delete" title="{intl l='Delete this product'}" href="{url path='admin/catalog/product' id="$ID" action='delete'}"><i class="icon-trash"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
@@ -165,6 +189,40 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{include file="includes/add-category-dialog.html"}
|
||||
{include file="includes/delete-category-dialog.html"}
|
||||
|
||||
{include file='includes/js.inc.html'}
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
{* display the form creation dialog if it contains errors *}
|
||||
|
||||
{form name="thelia.admin.category.creation"}
|
||||
{if #form_error}
|
||||
$('#add_category_dialog').modal();
|
||||
{/if}
|
||||
{/form}
|
||||
|
||||
{* Always reset dialog on close *}
|
||||
$('#add_category_dialog').on('hidden',function() {
|
||||
// Hide error message
|
||||
$('#add_category_dialog_error').remove();
|
||||
|
||||
// Clear error status
|
||||
$("#add_category_dialog .error").removeClass('error');
|
||||
|
||||
// Empty field values
|
||||
$("#add_category_dialog input[type=text]").val('');
|
||||
});
|
||||
|
||||
{* Set the proper category ID in the delete confirmation dialog *}
|
||||
$(document).on("click", ".category-delete", function () {
|
||||
$('#'+'delete-category-id').val($(this).data('id'));
|
||||
});
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
{include file='includes/footer.inc.html'}
|
||||
@@ -1,10 +1,6 @@
|
||||
{check_auth context="admin" roles="ADMIN" permissions="admin.catalog.view" login_tpl="/admin/login"}
|
||||
|
||||
{if $action == 'create'}
|
||||
{$page_title={intl l='Create a new category'}}
|
||||
{else}
|
||||
{$page_title={intl l='Edit category'}}
|
||||
{/if}
|
||||
{$page_title={intl l='Edit category'}}
|
||||
|
||||
{include file='includes/header.inc.html'}
|
||||
|
||||
@@ -19,29 +15,22 @@
|
||||
<div class="span12 general-block-decorator">
|
||||
<div class="row-fluid">
|
||||
<div class="span7 title">
|
||||
{if $action == 'create'}
|
||||
{intl l='Create a new category'}
|
||||
{else}
|
||||
{intl l='Edit category'}
|
||||
{/if}
|
||||
{intl l='Edit category'}
|
||||
</div>
|
||||
|
||||
<div class="span5 actions">
|
||||
<button class="btn btn-primary" title="{intl l='Save and stay on this page'}">{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'} <i class="icon icon-remove icon-white"></i></button>
|
||||
{if $action != 'create'}
|
||||
<button class="btn" title="{intl l='Edit previous category'}"><i class="icon icon-arrow-left"></i></button>
|
||||
<button class="btn" title="{intl l='Preview category page'}"><i class="icon icon-eye-open"></i></button>
|
||||
<button class="btn" title="{intl l='Edit next category'}"><i class="icon icon-arrow-right"></i></button>
|
||||
{/if}
|
||||
<button class="btn" title="{intl l='Edit previous category'}"><i class="icon icon-arrow-left"></i></button>
|
||||
<button class="btn" title="{intl l='Preview category page'}"><i class="icon icon-eye-open"></i></button>
|
||||
<button class="btn" title="{intl l='Edit next category'}"><i class="icon icon-arrow-right"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tabbable">
|
||||
<ul class="nav nav-tabs" id="tabbed_menu">
|
||||
<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>
|
||||
@@ -57,9 +46,13 @@
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="general_description">
|
||||
|
||||
<div class="tab-pane active form-container" id="general_description">
|
||||
<form class="form-horizontal span12">
|
||||
<fieldset>
|
||||
|
||||
{include file="includes/inner-form-toolbar.html"}
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div class="control-group">
|
||||
@@ -133,7 +126,12 @@
|
||||
|
||||
<div class="controls">
|
||||
<select required="required" name="parent" class="input-block-level">
|
||||
<option value="">{intl l="Choose a category"}</option>
|
||||
<option value="0">{intl l="Top level"}</option>
|
||||
|
||||
{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}
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -160,19 +158,22 @@
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="details">
|
||||
<p>Infos générales</p>
|
||||
<p>Détails divers</p>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="images">
|
||||
<p>Images</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>
|
||||
</div>
|
||||
|
||||
10
templates/admin/default/general_error.html
Normal file
10
templates/admin/default/general_error.html
Normal file
@@ -0,0 +1,10 @@
|
||||
{$page_title={intl l='AN error occured'}}
|
||||
|
||||
{include file='includes/header.inc.html'}
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
<h1>{intl l="Oops! An Error Occurred"}</h1>
|
||||
<p>{$error_message}</p>
|
||||
</div>
|
||||
|
||||
{include file='includes/footer.inc.html'}
|
||||
66
templates/admin/default/includes/add-category-dialog.html
Normal file
66
templates/admin/default/includes/add-category-dialog.html
Normal file
@@ -0,0 +1,66 @@
|
||||
|
||||
{* Adding a new Category *}
|
||||
|
||||
<div class="modal hide fade" id="add_category_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 category"}</h3>
|
||||
</div>
|
||||
|
||||
{form name="thelia.admin.category.creation"}
|
||||
<form method="POST" action="{url path='/admin/catalog/category'}" {form_enctype form=$form}>
|
||||
|
||||
{* the action processed by the controller *}
|
||||
<input type="hidden" name="action" value="create" />
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{form_field form=$form field='parent'}
|
||||
<input type="hidden" name="{$name}" value="{$current_category_id}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
{* on success, redirect to category change page. _ID_ is replaced with the ID of the created category (see Thelia\Action\Category.php) *}
|
||||
<input type="hidden" name="{$name}" value="{url path='admin/catalog/category' id="_ID_" action='edit'}" />
|
||||
{/form_field}
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
{if #form_error}<div class="alert alert-block alert-error" id="add_category_dialog_error">#form_error_message</div>{/if}
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
{intl l='Category Title *'}
|
||||
</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='Category title'}" placeholder="{intl l='Category title'}" 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 category title in the default language ($TITLE)"}</div>
|
||||
{/loop}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn" data-dismiss="modal" aria-hidden="true">{intl l="Cancel"}</button>
|
||||
<button type="submit" class="btn btn-primary">{intl l="Create this category"}</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
{/form}
|
||||
</div>
|
||||
@@ -1,16 +1,18 @@
|
||||
{* 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>
|
||||
|
||||
{ifloop rel="category_path"}
|
||||
<span class="divider">/</span></li>
|
||||
|
||||
{loop name="category_path" type="category-path" category="{$current_category_id}"}
|
||||
{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/edit/$ID"}" title="{intl l='Edit this category'}">{intl l="(edit)"}</a>
|
||||
{$TITLE} <a href="{url path="admin/catalog/category/edit/$ID"}" title="{intl l='Edit this category'}">{intl l="(edit)"}</a>
|
||||
{/if}
|
||||
</li>
|
||||
{else}
|
||||
@@ -18,11 +20,7 @@
|
||||
{/if}
|
||||
{/loop}
|
||||
{/ifloop}
|
||||
|
||||
{elseloop rel="category_path"}
|
||||
{if $action == 'create'}<span class="divider">/</span>{/if}</li>
|
||||
{/elseloop}
|
||||
|
||||
{if $action == 'create'}
|
||||
<li class="active">{intl l='Create a new category'}</li>
|
||||
{/if}
|
||||
|
||||
</li>
|
||||
{/elseloop}
|
||||
42
templates/admin/default/includes/delete-category-dialog.html
Normal file
42
templates/admin/default/includes/delete-category-dialog.html
Normal file
@@ -0,0 +1,42 @@
|
||||
|
||||
{* Adding a new Category *}
|
||||
|
||||
<div class="modal hide fade" id="delete_category_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 category"}</h3>
|
||||
</div>
|
||||
|
||||
{form name="thelia.admin.category.deletion"}
|
||||
<form method="POST" action="{url path='/admin/catalog/category'}" {form_enctype form=$form}>
|
||||
|
||||
{* the action processed by the controller *}
|
||||
<input type="hidden" name="action" value="delete" />
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{form_field form=$form field='id'}
|
||||
<input type="hidden" name="{$name}" id="delete-category-id" value="" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
{* on success, redirect to catalog. _ID_ is replaced with the ID of the deleted category parent id (see Thelia\Action\Category.php) *}
|
||||
<input type="hidden" name="{$name}" value="{url path='admin/catalog/category' id="_ID_" action='browse'}" />
|
||||
{/form_field}
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
{if #form_error}<div class="alert alert-block alert-error" id="add_category_dialog_error">#form_error_message</div>{/if}
|
||||
|
||||
<p>{intl l="Delete this category and all its contents ?"}</p>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn" data-dismiss="modal" aria-hidden="true">{intl l="No"}</button>
|
||||
<button type="submit" class="btn btn-primary">{intl l="Yes"}</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
{/form}
|
||||
</div>
|
||||
@@ -1,7 +1,7 @@
|
||||
{module_include location='before_footer'}
|
||||
|
||||
<hr />
|
||||
<footer class="modal-footer">
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<p>{intl l='© Thelia 2013'}
|
||||
- <a href="http://www.openstudio.fr/" target="_blank">{intl l='Édité par OpenStudio'}</a>
|
||||
|
||||
27
templates/admin/default/includes/inner-form-toolbar.html
Normal file
27
templates/admin/default/includes/inner-form-toolbar.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<div class="row-fluid inner-toolbar">
|
||||
<div class="span6 inner-actions">
|
||||
{* Display the top form toolbar, with edition flags, and save buttons *}
|
||||
|
||||
{* When creating a new object, only default language is displayed *}
|
||||
{if $action == 'create'}
|
||||
{$default_only = 1}
|
||||
{else}
|
||||
{$default_only = 0}
|
||||
{/if}
|
||||
|
||||
<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 for %lng" lng=$TITLE}">
|
||||
<img src="{image file="../assets/img/flags/{$CODE}.gif"}" alt="{intl l=$TITLE}" />
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
@@ -13,7 +13,7 @@
|
||||
<div class="hero-unit">
|
||||
<h1>{intl l='Thelia Back Office'}</h1>
|
||||
|
||||
{form name="thelia.admin.login" success_url="home" error_url="login"}
|
||||
{form name="thelia.admin.login"}
|
||||
<form action="{url path='/admin/checklogin'}" method="post" class="well form-inline" {form_enctype form=$form}>
|
||||
|
||||
{if #form_error}<div class="alert alert-error">#form_error_message</div>{/if}
|
||||
|
||||
Reference in New Issue
Block a user