Improved the dismmay on modules tab
This commit is contained in:
@@ -67,7 +67,7 @@ class Module extends AbstractSmartyPlugin
|
|||||||
if (false !== $location = $this->getParam($params, 'location', false)) {
|
if (false !== $location = $this->getParam($params, 'location', false)) {
|
||||||
|
|
||||||
if ($this->debug === true && $this->request->get('SHOW_INCLUDE')) {
|
if ($this->debug === true && $this->request->get('SHOW_INCLUDE')) {
|
||||||
echo sprintf('<div style="background-color: #C82D26; border-color: #000000; border: solid;">%s</div>', $location);
|
echo sprintf('<div style="background-color: #C82D26; color: #fff; border-color: #000000; border: solid;">%s</div>', $location);
|
||||||
}
|
}
|
||||||
|
|
||||||
$moduleLimit = $this->getParam($params, 'module', null);
|
$moduleLimit = $this->getParam($params, 'module', null);
|
||||||
@@ -83,12 +83,17 @@ class Module extends AbstractSmartyPlugin
|
|||||||
$file = sprintf("%s/AdminIncludes/%s.html", $module->getAbsoluteBaseDir(), $location);
|
$file = sprintf("%s/AdminIncludes/%s.html", $module->getAbsoluteBaseDir(), $location);
|
||||||
|
|
||||||
if (file_exists($file)) {
|
if (file_exists($file)) {
|
||||||
$content .= file_get_contents($file);
|
|
||||||
|
$output = trim(file_get_contents($file));
|
||||||
|
|
||||||
|
if (! empty($output)) {
|
||||||
|
$content .= $output;
|
||||||
|
|
||||||
$count++;
|
$count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (false !== $countvarname = $this->getParam($params, 'countvar', false)) {
|
if (false !== $countvarname = $this->getParam($params, 'countvar', false)) {
|
||||||
$template->assign($countvarname, $count);
|
$template->assign($countvarname, $count);
|
||||||
|
|||||||
@@ -271,13 +271,8 @@
|
|||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{module_include location='category-edit' countvar='module_count'}
|
{include file="includes/module-tab-content.html" location="category-edit"}
|
||||||
|
|
||||||
{if $module_count == 0}
|
|
||||||
<div class="alert alert-info">
|
|
||||||
{intl l="There is currently no active module here."}
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -41,7 +41,8 @@
|
|||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
|
||||||
<ul class="nav nav-tabs" id="tabbed-menu">
|
<ul class="nav nav-tabs" id="tabbed-menu">
|
||||||
<li class="active"><a href="#general" data-toggle="tab">{intl l="General description"}</a></li>
|
<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="#seo" data-toggle="tab">{intl l="SEO"}</a></li>
|
||||||
<li><a href="#association" data-toggle="tab">{intl l="Associations"}</a></li>
|
<li><a href="#association" data-toggle="tab">{intl l="Associations"}</a></li>
|
||||||
<li><a href="#images" data-toggle="tab">{intl l="Images"}</a></li>
|
<li><a href="#images" data-toggle="tab">{intl l="Images"}</a></li>
|
||||||
@@ -61,21 +62,22 @@
|
|||||||
{include file="includes/inner-form-toolbar.html" close_url="{url path='/admin/folders' parent=$DEFAULT_FOLDER}"}
|
{include file="includes/inner-form-toolbar.html" close_url="{url path='/admin/folders' parent=$DEFAULT_FOLDER}"}
|
||||||
|
|
||||||
{* Be sure to get the folder ID, even if the form could not be validated *}
|
{* Be sure to get the folder ID, even if the form could not be validated *}
|
||||||
<input type="hidden" name="content_id" value="{$content_id}" />
|
<input type="hidden" name="content_id" value="{$content_id}"/>
|
||||||
|
|
||||||
<input type="hidden" name="current_tab" value="general" />
|
<input type="hidden" name="current_tab" value="general"/>
|
||||||
|
|
||||||
{form_hidden_fields form=$form}
|
{form_hidden_fields form=$form}
|
||||||
|
|
||||||
{form_field form=$form field='success_url'}
|
{form_field form=$form field='success_url'}
|
||||||
<input type="hidden" name="{$name}" value="{url path="/admin/content/update{$ID}"}" />
|
<input type="hidden" name="{$name}" value="{url path="/admin/content/update{$ID}"}"/>
|
||||||
{/form_field}
|
{/form_field}
|
||||||
|
|
||||||
{form_field form=$form field='locale'}
|
{form_field form=$form field='locale'}
|
||||||
<input type="hidden" name="{$name}" value="{$edit_language_locale}" />
|
<input type="hidden" name="{$name}" value="{$edit_language_locale}"/>
|
||||||
{/form_field}
|
{/form_field}
|
||||||
|
|
||||||
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
|
{if $form_error}
|
||||||
|
<div class="alert alert-danger">{$form_error_message}</div>{/if}
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
@@ -106,6 +108,7 @@
|
|||||||
{form_field form=$form field='visible'}
|
{form_field form=$form field='visible'}
|
||||||
<div class="form-group {if $error}has-error{/if}">
|
<div class="form-group {if $error}has-error{/if}">
|
||||||
<label for="{$label_attr.for}" class="control-label">{intl l='Visibility'}</label>
|
<label for="{$label_attr.for}" class="control-label">{intl l='Visibility'}</label>
|
||||||
|
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" id="{$label_attr.for}" name="{$name}" value="1" {if $value != 0}checked="checked"{/if}>
|
<input type="checkbox" id="{$label_attr.for}" name="{$name}" value="1" {if $value != 0}checked="checked"{/if}>
|
||||||
@@ -166,13 +169,7 @@
|
|||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{module_include location='content-edit' countvar='module_count'}
|
{include file="includes/module-tab-content.html" location="content-edit"}
|
||||||
|
|
||||||
{if $module_count == 0}
|
|
||||||
<div class="alert alert-info">
|
|
||||||
{intl l="There is currently no active module here."}
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -182,15 +179,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{* Delete category confirmation dialog *}
|
||||||
|
|
||||||
{* Delete category confirmation dialog *}
|
|
||||||
|
|
||||||
{capture "delete_folder_dialog"}
|
{capture "delete_folder_dialog"}
|
||||||
<input type="hidden" name="content_id" value="{$content_id}" />
|
<input type="hidden" name="content_id" value="{$content_id}"/>
|
||||||
<input type="hidden" name="additional_folder_id" id="additional_folder_delete_id" value="" />
|
<input type="hidden" name="additional_folder_id" id="additional_folder_delete_id" value=""/>
|
||||||
|
<input type="hidden" name="current_tab" value="association"/>
|
||||||
<input type="hidden" name="current_tab" value="association" />
|
|
||||||
{/capture}
|
{/capture}
|
||||||
|
|
||||||
{include
|
{include
|
||||||
@@ -220,13 +214,12 @@ form_content = {$smarty.capture.delete_folder_dialog nofilter}
|
|||||||
{javascripts file='assets/js/jquery-ui-1.10.3.custom.min.js'}
|
{javascripts file='assets/js/jquery-ui-1.10.3.custom.min.js'}
|
||||||
<script src="{$asset_url}"></script>
|
<script src="{$asset_url}"></script>
|
||||||
{/javascripts}
|
{/javascripts}
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(function() {
|
$(function () {
|
||||||
$.imageUploadManager.initImageDropZone();
|
$.imageUploadManager.initImageDropZone();
|
||||||
$.documentUploadManager.initDocumentDropZone();
|
$.documentUploadManager.initDocumentDropZone();
|
||||||
|
|
||||||
$('.use_default_rewriten_url').click(function(ev) {
|
$('.use_default_rewriten_url').click(function (ev) {
|
||||||
alert("Not functionnal");
|
alert("Not functionnal");
|
||||||
|
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
@@ -237,28 +230,28 @@ form_content = {$smarty.capture.delete_folder_dialog nofilter}
|
|||||||
$('#tabbed-menu a[href="#{$current_tab}"]').tab('show')
|
$('#tabbed-menu a[href="#{$current_tab}"]').tab('show')
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
$('a.delete-folder').click(function(e) {
|
$('a.delete-folder').click(function (e) {
|
||||||
$('#additional_folder_delete_id').val($(this).data('id'));
|
$('#additional_folder_delete_id').val($(this).data('id'));
|
||||||
});
|
});
|
||||||
|
|
||||||
// Set proper content ID in delete content from
|
// Set proper content ID in delete content from
|
||||||
$('a.delete-content').click(function(ev) {
|
$('a.delete-content').click(function (ev) {
|
||||||
$('#content_delete_id').val($(this).data('id'));
|
$('#content_delete_id').val($(this).data('id'));
|
||||||
$('#folder_delete_id').val($('#folder_id').val());
|
$('#folder_delete_id').val($('#folder_id').val());
|
||||||
});
|
});
|
||||||
|
|
||||||
// Load content on folder selection
|
// Load content on folder selection
|
||||||
$('#folder_id').change(function(event) {
|
$('#folder_id').change(function (event) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url : '{url path="/admin/folder/$folder_id/available-related-content/"}' + $(this).val() + '.xml',
|
url: '{url path="/admin/folder/$folder_id/available-related-content/"}' + $(this).val() + '.xml',
|
||||||
type : 'get',
|
type: 'get',
|
||||||
dataType : 'json',
|
dataType: 'json',
|
||||||
success : function(json) {
|
success: function (json) {
|
||||||
$('#content_id :not(:first-child)').remove();
|
$('#content_id :not(:first-child)').remove();
|
||||||
|
|
||||||
var have_content = false;
|
var have_content = false;
|
||||||
|
|
||||||
$.each(json, function(idx, value) {
|
$.each(json, function (idx, value) {
|
||||||
$('#content_id').append($('<option>').text(value.title).attr('value', value.id));
|
$('#content_id').append($('<option>').text(value.title).attr('value', value.id));
|
||||||
|
|
||||||
have_content = true; // Lame...
|
have_content = true; // Lame...
|
||||||
@@ -273,7 +266,8 @@ form_content = {$smarty.capture.delete_folder_dialog nofilter}
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Initialize folder (id={$folder_id}) select value
|
// Initialize folder (id=
|
||||||
|
{$folder_id}) select value
|
||||||
{if $folder_id != 0}
|
{if $folder_id != 0}
|
||||||
$('#folder_id').val("{$folder_id}").change();
|
$('#folder_id').val("{$folder_id}").change();
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -152,13 +152,7 @@
|
|||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{module_include location='folder-edit' countvar='module_count'}
|
{include file="includes/module-tab-content.html" location="folder-edit"}
|
||||||
|
|
||||||
{if $module_count == 0}
|
|
||||||
<div class="alert alert-info">
|
|
||||||
{intl l="There is currently no active module here."}
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
<ul class="breadcrumb">
|
<ul class="breadcrumb">
|
||||||
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
|
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
|
||||||
<li><a href="{url path='/admin/orders'}">{intl l="Orders"}</a></li>
|
<li><a href="{url path='/admin/orders'}">{intl l="Orders"}</a></li>
|
||||||
|
<li>{intl l="Order details"}</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -35,7 +36,7 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-7 title">
|
<div class="col-md-7 title">
|
||||||
{intl l='Order %ref' ref=$REF}
|
{intl l='Order %ref - ID %id' id=$ID ref=$REF}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-5 actions">
|
<div class="col-md-5 actions">
|
||||||
@@ -352,13 +353,7 @@
|
|||||||
|
|
||||||
<div class="tab-pane fade {if $oder_tab == 'modules'}active in{/if} clearfix" id="modules">
|
<div class="tab-pane fade {if $oder_tab == 'modules'}active in{/if} clearfix" id="modules">
|
||||||
|
|
||||||
{module_include location='order-edit' countvar='module_count'}
|
{include file="includes/module-tab-content.html" location="order-edit"}
|
||||||
|
|
||||||
{if $module_count == 0}
|
|
||||||
<div class="alert alert-info">
|
|
||||||
{intl l="There is currently no active module here."}
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/loop}
|
{/loop}
|
||||||
|
|||||||
@@ -32,6 +32,16 @@
|
|||||||
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
<th class="object-title">
|
||||||
|
{admin_sortable_header
|
||||||
|
current_order=$orders_order
|
||||||
|
order='id'
|
||||||
|
reverse_order='id-reverse'
|
||||||
|
path={url path='/admin/orders'}
|
||||||
|
request_parameter_name='orders_order'
|
||||||
|
label="{intl l='ID'}"
|
||||||
|
} </th>
|
||||||
|
|
||||||
<th class="object-title">
|
<th class="object-title">
|
||||||
{admin_sortable_header
|
{admin_sortable_header
|
||||||
current_order=$orders_order
|
current_order=$orders_order
|
||||||
@@ -39,7 +49,7 @@
|
|||||||
reverse_order='reference-reverse'
|
reverse_order='reference-reverse'
|
||||||
path={url path='/admin/orders'}
|
path={url path='/admin/orders'}
|
||||||
request_parameter_name='orders_order'
|
request_parameter_name='orders_order'
|
||||||
label="{intl l='Order #'}"
|
label="{intl l='Reference'}"
|
||||||
} </th>
|
} </th>
|
||||||
|
|
||||||
<th class="object-title">
|
<th class="object-title">
|
||||||
@@ -111,6 +121,7 @@
|
|||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
|
<td><a href="{url path="/admin/order/update/$ID"}">{$ID}</a></td>
|
||||||
<td><a href="{url path="/admin/order/update/$ID"}">{$REF}</a></td>
|
<td><a href="{url path="/admin/order/update/$ID"}">{$REF}</a></td>
|
||||||
<td>{format_date date=$CREATE_DATE}</td>
|
<td>{format_date date=$CREATE_DATE}</td>
|
||||||
<td>{$orderInvoiceCompany}</td>
|
<td>{$orderInvoiceCompany}</td>
|
||||||
|
|||||||
@@ -119,13 +119,7 @@
|
|||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{module_include location='product-edit' countvar='module_count'}
|
{include file="includes/module-tab-content.html" location="product-edit"}
|
||||||
|
|
||||||
{if $module_count == 0}
|
|
||||||
<div class="alert alert-info">
|
|
||||||
{intl l="There is currently no active module here."}
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user