Merge branch 'master' into content

Conflicts:
	core/lib/Thelia/Core/Event/TheliaEvents.php
	templates/admin/default/folders.html
This commit is contained in:
Manuel Raynaud
2013-09-20 17:41:38 +02:00
143 changed files with 15038 additions and 2789 deletions

View File

@@ -51,27 +51,27 @@
<div class="container">
<div class="row">
<div class="col-md-6">
<div class="version-info">{intl l='Version %ver' ver="{$THELIA_VERSION}"}</div>
<div class="col-md-12 clearfix">
<div class="version-info pull-left">{intl l='Version %ver' ver="{$THELIA_VERSION}"}</div>
<div class="clearfix pull-right hidden-xs">
<div class="btn-group pull-right">
<a href="{navigate to="index"}" title="{intl l='View site'}" target="_blank" class="btn btn-default"><span class="glyphicon glyphicon-eye-open"></span> {intl l="View shop"}</a>
<button class="btn btn-default btn-primary"><span class="glyphicon glyphicon-user"></span> {admin attr="firstname"} {admin attr="lastname"}</button>
<button class="btn btn-default btn-primary dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a class="profile" href="{url path='admin/profile/update'}"><span class="glyphicon glyphicon-edit"></span> {intl l="Profil"}</a></li>
<li><a class="logout" href="{url path='admin/logout'}" title="{intl l='Close administation session'}"><span class="glyphicon glyphicon-off"></span> {intl l="Logout"}</a></li>
</ul>
</div>
</div>
</div>
{module_include location='inside_topbar'}
<div class="col-md-6 clearfix">
<div class="btn-group pull-right">
<a href="{navigate to="index"}" title="{intl l='View site'}" target="_blank" class="btn btn-default"><span class="glyphicon glyphicon-eye-open"></span> {intl l="View shop"}</a>
<button class="btn btn-default btn-primary"><span class="glyphicon glyphicon-user"></span> {admin attr="firstname"} {admin attr="lastname"}</button>
<button class="btn btn-default btn-primary dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a class="profile" href="{url path='admin/edit_profile'}"><span class="glyphicon glyphicon-edit"></span> {intl l="Profil"}</a></li>
<li><a class="logout" href="{url path='admin/logout'}" title="{intl l='Close administation session'}"><span class="glyphicon glyphicon-off"></span> {intl l="Logout"}</a></li>
</ul>
</div>
</div>
</div>
</div>
@@ -86,96 +86,98 @@
<nav class="navbar navbar-default" role="navigation">
<div class="container">
<div class="row">
<div class="navbar-header">
<button type="button" class="btn navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="navbar-header">
<button type="button" class="btn navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="collapse navbar-collapse navbar-collapse">
<ul class="nav navbar-nav">
<div class="collapse navbar-collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class="{if $admin_current_location == 'home'}active{/if}" id="home_menu">
<a href="{url path='/admin/home'}">{intl l="Home"}</a>
</li>
<li class="{if $admin_current_location == 'home'}active{/if}" id="home_menu">
<a href="{url path='/admin/home'}">{intl l="Home"}</a>
</li>
{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-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 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>
<ul class="dropdown-menu config_menu" role="menu">
<li role="menuitem"><a data-target="{url path='admin/orders'}" href="{url path='admin/orders'}">
{intl l="All orders"}
<span class="badge badge-important">{count type="order"}</span></a>
</li>
{loop name="order-status-list" type="order-status"}
<li role="menuitem">
<a data-target="{url path='admin/orders/$LABEL'}" href="{url path='admin/orders/$LABEL'}">
{$LABEL} <span class="badge badge-important">{count type="order" status="{$ID}"}</span>
</a>
</li>
{/loop}
</ul>
</li>
{/loop}
{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" roles="ADMIN" permissions="admin.folders.view"}
<li class="{if $admin_current_location == 'folder'}active{/if}" id="folders_menu">
<a href="{url path='/admin/folders'}">{intl l="Folders"}</a>
</li>
{/loop}
{loop name="menu-auth-coupon" type="auth" roles="ADMIN" permissions="admin.coupon.view"}
<li class="{if $admin_current_location == 'coupon'}active{/if}" id="coupon_menu">
<a href="{url path='/admin/coupon/'}">{intl l="Coupons"}</a>
</li>
{/loop}
{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" 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>
{module_include location='in_top_menu_items'}
{/loop}
</ul>
{loop name="top-bar-search" type="auth" roles="ADMIN" permissions="admin.search"}
<form class="navbar-form pull-right hidden-xs" action="{url path='/admin/search'}">
<div class="form-group">
<input type="text" class="form-control" id="search_term" name="search_term" placeholder="{intl l='Search'}">
</div>
<button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-search"></span></button>
</form>
{/loop}
{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>
<ul class="dropdown-menu config_menu" role="menu">
<li role="menuitem"><a data-target="{url path='admin/orders'}" href="{url path='admin/orders'}">
{intl l="All orders"}
<span class="badge badge-important">{count type="order"}</span></a>
</li>
{loop name="order-status-list" type="order-status"}
<li role="menuitem">
<a data-target="{url path='admin/orders/$LABEL'}" href="{url path='admin/orders/$LABEL'}">
{$LABEL} <span class="badge badge-important">{count type="order" status="{$ID}"}</span>
</a>
</li>
{/loop}
</ul>
</li>
{/loop}
{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" roles="ADMIN" permissions="admin.folders.view"}
<li class="{if $admin_current_location == 'folder'}active{/if}" id="folders_menu">
<a href="{url path='/admin/folders'}">{intl l="Folders"}</a>
</li>
{/loop}
{loop name="menu-auth-coupon" type="auth" roles="ADMIN" permissions="admin.coupon.view"}
<li class="{if $admin_current_location == 'coupon'}active{/if}" id="coupon_menu">
<a href="{url path='/admin/coupon/'}">{intl l="Coupons"}</a>
</li>
{/loop}
{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" 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>
{module_include location='in_top_menu_items'}
{/loop}
</ul>
{loop name="top-bar-search" type="auth" roles="ADMIN" permissions="admin.search"}
<form class="navbar-form pull-right" action="{url path='/admin/search'}">
<div class="form-group">
<input type="text" class="form-control" id="search_term" name="search_term" placeholder="{intl l='Search'}">
</div>
<button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-search"></span></button>
</form>
{/loop}
</div>
</div>
</div>
</div>
</nav>

View File

@@ -25,7 +25,8 @@
{/elseloop}
</div>
<table class="table table-striped table-condensed table-left-aligned">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<thead>
<tr>
<th>{intl l='ID'}</th>
@@ -72,7 +73,7 @@
{/elseloop}
</tbody>
</table>
</div>
{* Delete value confirmation dialog *}
{capture "delete_attribute_dialog"}

View File

@@ -25,7 +25,8 @@
{/elseloop}
</div>
<table class="table table-striped table-condensed table-left-aligned">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<thead>
<tr>
<th>{intl l='ID'}</th>
@@ -72,6 +73,7 @@
{/elseloop}
</tbody>
</table>
</div>
{* Delete value confirmation dialog *}

View File

@@ -0,0 +1,709 @@
/*!
* bootstrap-select v1.3.1
* http://silviomoreto.github.io/bootstrap-select/
*
* Copyright 2013 bootstrap-select
* Licensed under the MIT license
*/
!function($) {
"use strict";
$.expr[":"].icontains = $.expr.createPseudo(function(arg) {
return function( elem ) {
return $(elem).text().toUpperCase().indexOf(arg.toUpperCase()) >= 0;
};
});
var Selectpicker = function(element, options, e) {
if (e) {
e.stopPropagation();
e.preventDefault();
}
this.$element = $(element);
this.$newElement = null;
this.$button = null;
this.$menu = null;
//Merge defaults, options and data-attributes to make our options
this.options = $.extend({}, $.fn.selectpicker.defaults, this.$element.data(), typeof options == 'object' && options);
//If we have no title yet, check the attribute 'title' (this is missed by jq as its not a data-attribute
if (this.options.title == null) {
this.options.title = this.$element.attr('title');
}
//Expose public methods
this.val = Selectpicker.prototype.val;
this.render = Selectpicker.prototype.render;
this.refresh = Selectpicker.prototype.refresh;
this.setStyle = Selectpicker.prototype.setStyle;
this.selectAll = Selectpicker.prototype.selectAll;
this.deselectAll = Selectpicker.prototype.deselectAll;
this.init();
};
Selectpicker.prototype = {
constructor: Selectpicker,
init: function(e) {
this.$element.hide();
this.multiple = this.$element.prop('multiple');
var id = this.$element.attr('id');
this.$newElement = this.createView();
this.$element.after(this.$newElement);
this.$menu = this.$newElement.find('> .dropdown-menu');
this.$button = this.$newElement.find('> button');
this.$searchbox = this.$newElement.find('input');
if (id !== undefined) {
var that = this;
this.$button.attr('data-id', id);
$('label[for="' + id + '"]').click(function(e) {
e.preventDefault();
that.$button.focus();
});
}
this.checkDisabled();
this.checkTabIndex();
this.clickListener();
this.liveSearchListener();
this.render();
this.liHeight();
this.setStyle();
this.setWidth();
if (this.options.container) {
this.selectPosition();
}
this.$menu.data('this', this);
this.$newElement.data('this', this);
},
createDropdown: function() {
//If we are multiple, then add the show-tick class by default
var multiple = this.multiple ? ' show-tick' : '';
var header = this.options.header ? '<h3 class="popover-title">' + this.options.header + '<button type="button" class="close" aria-hidden="true">&times;</button></h3>' : '';
var searchbox = this.options.liveSearch ? '<div class="bootstrap-select-searchbox"><input type="text" class="input-block-level form-control" /></div>' : '';
var drop =
"<div class='btn-group bootstrap-select" + multiple + "'>" +
"<button type='button' class='btn dropdown-toggle' data-toggle='dropdown'>" +
"<div class='filter-option pull-left'></div>&nbsp;" +
"<div class='caret'></div>" +
"</button>" +
"<div class='dropdown-menu open'>" +
header +
searchbox +
"<ul class='dropdown-menu inner' role='menu'>" +
"</ul>" +
"</div>" +
"</div>";
return $(drop);
},
createView: function() {
var $drop = this.createDropdown();
var $li = this.createLi();
$drop.find('ul').append($li);
return $drop;
},
reloadLi: function() {
//Remove all children.
this.destroyLi();
//Re build
var $li = this.createLi();
this.$menu.find('ul').append( $li );
},
destroyLi: function() {
this.$menu.find('li').remove();
},
createLi: function() {
var that = this,
_liA = [],
_liHtml = '';
this.$element.find('option').each(function(index) {
var $this = $(this);
//Get the class and text for the option
var optionClass = $this.attr("class") || '';
var inline = $this.attr("style") || '';
var text = $this.data('content') ? $this.data('content') : $this.html();
var subtext = $this.data('subtext') !== undefined ? '<small class="muted">' + $this.data('subtext') + '</small>' : '';
var icon = $this.data('icon') !== undefined ? '<i class="glyphicon '+$this.data('icon')+'"></i> ' : '';
if (icon !== '' && ($this.is(':disabled') || $this.parent().is(':disabled'))) {
icon = '<span>'+icon+'</span>';
}
if (!$this.data('content')) {
//Prepend any icon and append any subtext to the main text.
text = icon + '<span class="text">' + text + subtext + '</span>';
}
if (that.options.hideDisabled && ($this.is(':disabled') || $this.parent().is(':disabled'))) {
_liA.push('<a style="min-height: 0; padding: 0"></a>');
} else if ($this.parent().is('optgroup') && $this.data('divider') != true) {
if ($this.index() == 0) {
//Get the opt group label
var label = $this.parent().attr('label');
var labelSubtext = $this.parent().data('subtext') !== undefined ? '<small class="muted">'+$this.parent().data('subtext')+'</small>' : '';
var labelIcon = $this.parent().data('icon') ? '<i class="'+$this.parent().data('icon')+'"></i> ' : '';
label = labelIcon + '<span class="text">' + label + labelSubtext + '</span>';
if ($this[0].index != 0) {
_liA.push(
'<div class="div-contain"><div class="divider"></div></div>'+
'<dt>'+label+'</dt>'+
that.createA(text, "opt " + optionClass, inline )
);
} else {
_liA.push(
'<dt>'+label+'</dt>'+
that.createA(text, "opt " + optionClass, inline ));
}
} else {
_liA.push(that.createA(text, "opt " + optionClass, inline ));
}
} else if ($this.data('divider') == true) {
_liA.push('<div class="div-contain"><div class="divider"></div></div>');
} else if ($(this).data('hidden') == true) {
_liA.push('');
} else {
_liA.push(that.createA(text, optionClass, inline ));
}
});
$.each(_liA, function(i, item) {
_liHtml += "<li rel=" + i + ">" + item + "</li>";
});
//If we are not multiple, and we dont have a selected item, and we dont have a title, select the first element so something is set in the button
if (!this.multiple && this.$element.find('option:selected').length==0 && !this.options.title) {
this.$element.find('option').eq(0).prop('selected', true).attr('selected', 'selected');
}
return $(_liHtml);
},
createA: function(text, classes, inline) {
return '<a tabindex="0" class="'+classes+'" style="'+inline+'">' +
text +
'<i class="glyphicon glyphicon-ok icon-ok check-mark"></i>' +
'</a>';
},
render: function() {
var that = this;
//Update the LI to match the SELECT
this.$element.find('option').each(function(index) {
that.setDisabled(index, $(this).is(':disabled') || $(this).parent().is(':disabled') );
that.setSelected(index, $(this).is(':selected') );
});
var selectedItems = this.$element.find('option:selected').map(function(index,value) {
var $this = $(this);
var icon = $this.data('icon') && that.options.showIcon ? '<i class="glyphicon ' + $this.data('icon') + '"></i> ' : '';
var subtext;
if (that.options.showSubtext && $this.attr('data-subtext') && !that.multiple) {
subtext = ' <small class="muted">'+$this.data('subtext') +'</small>';
} else {
subtext = '';
}
if ($this.data('content') && that.options.showContent) {
return $this.data('content');
} else if ($this.attr('title') != undefined) {
return $this.attr('title');
} else {
return icon + $this.html() + subtext;
}
}).toArray();
//Fixes issue in IE10 occurring when no default option is selected and at least one option is disabled
//Convert all the values into a comma delimited string
var title = !this.multiple ? selectedItems[0] : selectedItems.join(", ");
//If this is multi select, and the selectText type is count, the show 1 of 2 selected etc..
if (this.multiple && this.options.selectedTextFormat.indexOf('count') > -1) {
var max = this.options.selectedTextFormat.split(">");
var notDisabled = this.options.hideDisabled ? ':not([disabled])' : '';
if ( (max.length>1 && selectedItems.length > max[1]) || (max.length==1 && selectedItems.length>=2)) {
title = this.options.countSelectedText.replace('{0}', selectedItems.length).replace('{1}', this.$element.find('option:not([data-divider="true"]):not([data-hidden="true"])'+notDisabled).length);
}
}
//If we dont have a title, then use the default, or if nothing is set at all, use the not selected text
if (!title) {
title = this.options.title != undefined ? this.options.title : this.options.noneSelectedText;
}
this.$newElement.find('.filter-option').html(title);
},
setStyle: function(style, status) {
if (this.$element.attr('class')) {
this.$newElement.addClass(this.$element.attr('class').replace(/selectpicker|mobile-device/gi, ''));
}
var buttonClass = style ? style : this.options.style;
if (status == 'add') {
this.$button.addClass(buttonClass);
} else if (status == 'remove') {
this.$button.removeClass(buttonClass);
} else {
this.$button.removeClass(this.options.style);
this.$button.addClass(buttonClass);
}
},
liHeight: function() {
var selectClone = this.$newElement.clone();
selectClone.appendTo('body');
var $menuClone = selectClone.addClass('open').find('> .dropdown-menu');
var liHeight = $menuClone.find('li > a').outerHeight();
var headerHeight = this.options.header ? $menuClone.find('.popover-title').outerHeight() : 0;
selectClone.remove();
this.$newElement.data('liHeight', liHeight).data('headerHeight', headerHeight);
},
setSize: function() {
var that = this,
menu = this.$menu,
menuInner = menu.find('.inner'),
menuA = menuInner.find('li > a'),
selectHeight = this.$newElement.outerHeight(),
liHeight = this.$newElement.data('liHeight'),
headerHeight = this.$newElement.data('headerHeight'),
divHeight = menu.find('li .divider').outerHeight(true),
menuPadding = parseInt(menu.css('padding-top')) +
parseInt(menu.css('padding-bottom')) +
parseInt(menu.css('border-top-width')) +
parseInt(menu.css('border-bottom-width')),
notDisabled = this.options.hideDisabled ? ':not(.disabled)' : '',
$window = $(window),
menuExtras = menuPadding + parseInt(menu.css('margin-top')) + parseInt(menu.css('margin-bottom')) + 2,
menuHeight,
selectOffsetTop,
selectOffsetBot,
posVert = function() {
selectOffsetTop = that.$newElement.offset().top - $window.scrollTop();
selectOffsetBot = $window.height() - selectOffsetTop - selectHeight;
};
posVert();
if (this.options.header) menu.css('padding-top', 0);
if (this.options.size == 'auto') {
var getSize = function() {
var minHeight;
posVert();
menuHeight = selectOffsetBot - menuExtras;
that.$newElement.toggleClass('dropup', (selectOffsetTop > selectOffsetBot) && (menuHeight - menuExtras) < menu.height() && that.options.dropupAuto);
if (that.$newElement.hasClass('dropup')) {
menuHeight = selectOffsetTop - menuExtras;
}
if ((menu.find('li').length + menu.find('dt').length) > 3) {
minHeight = liHeight*3 + menuExtras - 2;
} else {
minHeight = 0;
}
menu.css({'max-height' : menuHeight + 'px', 'overflow' : 'hidden', 'min-height' : minHeight + 'px'});
menuInner.css({'max-height' : menuHeight - headerHeight- menuPadding + 'px', 'overflow-y' : 'auto', 'min-height' : minHeight - menuPadding + 'px'});
}
getSize();
$(window).resize(getSize);
$(window).scroll(getSize);
} else if (this.options.size && this.options.size != 'auto' && menu.find('li'+notDisabled).length > this.options.size) {
var optIndex = menu.find("li"+notDisabled+" > *").filter(':not(.div-contain)').slice(0,this.options.size).last().parent().index();
var divLength = menu.find("li").slice(0,optIndex + 1).find('.div-contain').length;
menuHeight = liHeight*this.options.size + divLength*divHeight + menuPadding;
this.$newElement.toggleClass('dropup', (selectOffsetTop > selectOffsetBot) && menuHeight < menu.height() && this.options.dropupAuto);
menu.css({'max-height' : menuHeight + headerHeight + 'px', 'overflow' : 'hidden'});
menuInner.css({'max-height' : menuHeight - menuPadding + 'px', 'overflow-y' : 'auto'});
}
},
setWidth: function() {
if (this.options.width == 'auto') {
this.$menu.css('min-width', '0');
// Get correct width if element hidden
var selectClone = this.$newElement.clone().appendTo('body');
var ulWidth = selectClone.find('> .dropdown-menu').css('width');
selectClone.remove();
this.$newElement.css('width', ulWidth);
} else if (this.options.width == 'fit') {
// Remove inline min-width so width can be changed from 'auto'
this.$menu.css('min-width', '');
this.$newElement.css('width', '').addClass('fit-width');
} else if (this.options.width) {
// Remove inline min-width so width can be changed from 'auto'
this.$menu.css('min-width', '');
this.$newElement.css('width', this.options.width);
} else {
// Remove inline min-width/width so width can be changed
this.$menu.css('min-width', '');
this.$newElement.css('width', '');
}
// Remove fit-width class if width is changed programmatically
if (this.$newElement.hasClass('fit-width') && this.options.width !== 'fit') {
this.$newElement.removeClass('fit-width');
}
},
selectPosition: function() {
var that = this,
drop = "<div />",
$drop = $(drop),
pos,
actualHeight,
getPlacement = function($element) {
$drop.addClass($element.attr('class')).toggleClass('dropup', $element.hasClass('dropup'));
pos = $element.offset();
actualHeight = $element.hasClass('dropup') ? 0 : $element[0].offsetHeight;
$drop.css({'top' : pos.top + actualHeight, 'left' : pos.left, 'width' : $element[0].offsetWidth, 'position' : 'absolute'});
};
this.$newElement.on('click', function(e) {
getPlacement($(this));
$drop.appendTo(that.options.container);
$drop.toggleClass('open', !$(this).hasClass('open'));
$drop.append(that.$menu);
});
$(window).resize(function() {
getPlacement(that.$newElement);
});
$(window).on('scroll', function(e) {
getPlacement(that.$newElement);
});
$('html').on('click', function(e) {
if ($(e.target).closest(that.$newElement).length < 1) {
$drop.removeClass('open');
}
});
},
mobile: function() {
this.$element.addClass('mobile-device').appendTo(this.$newElement);
if (this.options.container) this.$menu.hide();
},
refresh: function() {
this.reloadLi();
this.render();
this.setWidth();
this.setStyle();
this.checkDisabled();
this.liHeight();
},
setSelected: function(index, selected) {
this.$menu.find('li').eq(index).toggleClass('selected', selected);
},
setDisabled: function(index, disabled) {
if (disabled) {
this.$menu.find('li').eq(index).addClass('disabled').find('a').attr('href','#').attr('tabindex',-1);
} else {
this.$menu.find('li').eq(index).removeClass('disabled').find('a').removeAttr('href').attr('tabindex',0);
}
},
isDisabled: function() {
return this.$element.is(':disabled');
},
checkDisabled: function() {
var that = this;
if (this.isDisabled()) {
this.$button.addClass('disabled');
this.$button.attr('tabindex','-1');
} else if (this.$button.hasClass('disabled')) {
this.$button.removeClass('disabled');
this.$button.removeAttr('tabindex');
}
this.$button.click(function() {
return !that.isDisabled();
});
},
checkTabIndex: function() {
if (this.$element.is('[tabindex]')) {
var tabindex = this.$element.attr("tabindex");
this.$button.attr('tabindex', tabindex);
}
},
clickListener: function() {
var that = this;
$('body').on('touchstart.dropdown', '.dropdown-menu', function(e) {
e.stopPropagation();
});
this.$newElement.on('click', function() {
that.setSize();
});
this.$menu.on('click', 'li a', function(e) {
var clickedIndex = $(this).parent().index(),
$this = $(this).parent(),
prevValue = that.$element.val();
//Dont close on multi choice menu
if (that.multiple) {
e.stopPropagation();
}
e.preventDefault();
//Dont run if we have been disabled
if (!that.isDisabled() && !$(this).parent().hasClass('disabled')) {
var $options = that.$element.find('option');
var $option = $options.eq(clickedIndex);
//Deselect all others if not multi select box
if (!that.multiple) {
$options.prop('selected', false);
$option.prop('selected', true);
}
//Else toggle the one we have chosen if we are multi select.
else {
var state = $option.prop('selected');
$option.prop('selected', !state);
}
that.$button.focus();
// Trigger select 'change'
if (prevValue != that.$element.val()) {
that.$element.change();
}
}
});
this.$menu.on('click', 'li.disabled a, li dt, li .div-contain, h3.popover-title', function(e) {
if (e.target == this) {
e.preventDefault();
e.stopPropagation();
that.$button.focus();
}
});
this.$searchbox.on('click', function(e) {
e.stopPropagation();
});
this.$element.change(function() {
that.render()
});
},
liveSearchListener: function() {
var that = this;
this.$newElement.on('click.dropdown.data-api', function(e){
if(that.options.liveSearch) {
setTimeout(function() {
that.$searchbox.focus();
}, 10);
}
});
this.$searchbox.on('input', function() {
that.$newElement.find('li').show().not(':icontains(' + that.$searchbox.val() + ')').hide();
});
},
val: function(value) {
if (value != undefined) {
this.$element.val( value );
this.$element.change();
return this.$element;
} else {
return this.$element.val();
}
},
selectAll: function() {
this.$element.find('option').prop('selected', true).attr('selected', 'selected');
this.render();
},
deselectAll: function() {
this.$element.find('option').prop('selected', false).removeAttr('selected');
this.render();
},
keydown: function(e) {
var $this,
$items,
$parent,
index,
next,
first,
last,
prev,
nextPrev,
that;
$this = $(this);
$parent = $this.parent();
that = $parent.data('this');
if (that.options.container) $parent = that.$menu;
$items = $('[role=menu] li:not(.divider):visible a', $parent);
if (!$items.length) return;
if (/(38|40)/.test(e.keyCode)) {
index = $items.index($items.filter(':focus'));
first = $items.parent(':not(.disabled)').first().index();
last = $items.parent(':not(.disabled)').last().index();
next = $items.eq(index).parent().nextAll(':not(.disabled)').eq(0).index();
prev = $items.eq(index).parent().prevAll(':not(.disabled)').eq(0).index();
nextPrev = $items.eq(next).parent().prevAll(':not(.disabled)').eq(0).index();
if (e.keyCode == 38) {
if (index != nextPrev && index > prev) index = prev;
if (index < first) index = first;
}
if (e.keyCode == 40) {
if (index != nextPrev && index < next) index = next;
if (index > last) index = last;
if (index == -1) index = 0;
}
$items.eq(index).focus();
} else {
var keyCodeMap = {
48:"0", 49:"1", 50:"2", 51:"3", 52:"4", 53:"5", 54:"6", 55:"7", 56:"8", 57:"9", 59:";",
65:"a", 66:"b", 67:"c", 68:"d", 69:"e", 70:"f", 71:"g", 72:"h", 73:"i", 74:"j", 75:"k", 76:"l",
77:"m", 78:"n", 79:"o", 80:"p", 81:"q", 82:"r", 83:"s", 84:"t", 85:"u", 86:"v", 87:"w", 88:"x", 89:"y", 90:"z",
96:"0", 97:"1", 98:"2", 99:"3", 100:"4", 101:"5", 102:"6", 103:"7", 104:"8", 105:"9"
}
var keyIndex = [];
$items.each(function() {
if ($(this).parent().is(':not(.disabled)')) {
if ($.trim($(this).text().toLowerCase()).substring(0,1) == keyCodeMap[e.keyCode]) {
keyIndex.push($(this).parent().index());
}
}
});
var count = $(document).data('keycount');
count++;
$(document).data('keycount',count);
var prevKey = $.trim($(':focus').text().toLowerCase()).substring(0,1);
if (prevKey != keyCodeMap[e.keyCode]) {
count = 1;
$(document).data('keycount',count);
} else if (count >= keyIndex.length) {
$(document).data('keycount',0);
}
$items.eq(keyIndex[count - 1]).focus();
}
// select focused option if "Enter" or "Spacebar" are pressed
if (/(13|32)/.test(e.keyCode)) {
e.preventDefault();
$(':focus').click();
$(document).data('keycount',0);
}
},
hide: function() {
this.$newElement.hide();
},
show: function() {
this.$newElement.show();
},
destroy: function() {
this.$newElement.remove();
this.$element.remove();
}
};
$.fn.selectpicker = function(option, event) {
//get the args of the outer function..
var args = arguments;
var value;
var chain = this.each(function() {
if ($(this).is('select')) {
var $this = $(this),
data = $this.data('selectpicker'),
options = typeof option == 'object' && option;
if (!data) {
$this.data('selectpicker', (data = new Selectpicker(this, options, event)));
} else if (options) {
for(var i in options) {
data.options[i] = options[i];
}
}
if (typeof option == 'string') {
//Copy the value of option, as once we shift the arguments
//it also shifts the value of option.
var property = option;
if (data[property] instanceof Function) {
[].shift.apply(args);
value = data[property].apply(data, args);
} else {
value = data.options[property];
}
}
}
});
if (value != undefined) {
return value;
} else {
return chain;
}
};
$.fn.selectpicker.defaults = {
style: 'btn-default',
size: 'auto',
title: null,
selectedTextFormat : 'values',
noneSelectedText : 'Nothing selected',
countSelectedText: '{0} of {1} selected',
width: false,
container: false,
hideDisabled: false,
showSubtext: false,
showIcon: true,
showContent: true,
dropupAuto: true,
header: false,
liveSearch: false
}
$(document)
.data('keycount', 0)
.on('keydown', '[data-toggle=dropdown], [role=menu]' , Selectpicker.prototype.keydown)
}(window.jQuery);

View File

@@ -47,6 +47,11 @@
$('[rel="tooltip"]').tooltip();
}
// -- Bootstrap select --
if($('[data-toggle="selectpicker"]').length){
$('[data-toggle="selectpicker"]').selectpicker();
}
// -- Confirm Box --
if($('[data-toggle="confirm"]').length){
$('[data-toggle="confirm"]').click(function(e){

View File

@@ -0,0 +1,275 @@
/*!
* bootstrap-select v1.3.1
* http://silviomoreto.github.io/bootstrap-select/
*
* Copyright 2013 bootstrap-select
* Licensed under the MIT license
*/
.input-group{
.bootstrap-select.btn-group,
.bootstrap-select.btn-group[class*="span"] {
width: 100%;
margin-bottom: 0;
.btn{
.border-right-radius(0);
}
}
}
.bootstrap-select.btn-group,
.bootstrap-select.btn-group[class*="span"] {
float: none;
display: inline-block;
margin-bottom: 10px;
margin-left: 0;
}
.form-search .bootstrap-select.btn-group,
.form-inline .bootstrap-select.btn-group,
.form-horizontal .bootstrap-select.btn-group {
margin-bottom: 0;
}
.bootstrap-select.btn-group.pull-right,
.bootstrap-select.btn-group[class*="span"].pull-right,
.row-fluid .bootstrap-select.btn-group[class*="span"].pull-right {
float: right;
}
.input-append .bootstrap-select.btn-group {
margin-left: -1px;
}
.input-prepend .bootstrap-select.btn-group {
margin-right: -1px;
}
.bootstrap-select:not([class*="span"]) {
width: 100%;
}
.bootstrap-select {
/*width: 220px\9; IE8 and below*/
width: 100%\0; /*IE9 and below*/
}
.bootstrap-select > .btn {
width: 100%;
.form-control-focus();
}
.dropdown-menu {
z-index: 2000;
}
.bootstrap-select.show-menu-arrow.open > .btn {
z-index: 2051;
}
.bootstrap-select.btn-group .btn .filter-option {
overflow: hidden;
position: absolute;
left: 12px;
right: 25px;
text-align: left;
color: @input-color;
}
.bootstrap-select.btn-group .btn .caret {
position: absolute;
top: 50%;
right: 12px;
margin-top: -2px;
vertical-align: middle;
}
.bootstrap-select.btn-group > .disabled,
.bootstrap-select.btn-group .dropdown-menu li.disabled > a {
cursor: not-allowed;
}
.bootstrap-select.btn-group > .disabled:focus {
outline: none !important;
}
.bootstrap-select.btn-group[class*="span"] .btn {
width: 100%;
}
.bootstrap-select.btn-group .dropdown-menu {
min-width: 100%;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.bootstrap-select.btn-group .dropdown-menu.inner {
position: static;
border: 0;
padding: 0;
margin: 0;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
.bootstrap-select.btn-group .dropdown-menu dt {
display: block;
padding: 3px 20px;
cursor: default;
}
.bootstrap-select.btn-group .div-contain {
overflow: hidden;
}
.bootstrap-select.btn-group .dropdown-menu li a{
color: @input-color;
&:hover{
color: #FFF;
}
}
.bootstrap-select.btn-group .dropdown-menu li {
position: relative;
&:focus, a:focus{
outline: none;
}
}
.bootstrap-select.btn-group .dropdown-menu li > a.opt {
position: relative;
padding-left: 35px;
}
.bootstrap-select.btn-group .dropdown-menu li > a {
cursor: pointer;
}
.bootstrap-select.btn-group .dropdown-menu li > dt small {
font-weight: normal;
}
.bootstrap-select.btn-group.show-tick .dropdown-menu li.selected a i.check-mark {
display: inline-block;
position: absolute;
right: 15px;
margin-top: 2.5px;
}
.bootstrap-select.btn-group .dropdown-menu li a i.check-mark {
display: none;
}
.bootstrap-select.btn-group.show-tick .dropdown-menu li a span.text {
margin-right: 34px;
}
.bootstrap-select.btn-group .dropdown-menu li small {
padding-left: 0.5em;
}
.bootstrap-select.btn-group .dropdown-menu li:not(.disabled) > a:hover small,
.bootstrap-select.btn-group .dropdown-menu li:not(.disabled) > a:focus small {
color: #64b1d8;
color: rgba(255,255,255,0.4);
}
.bootstrap-select.btn-group .dropdown-menu li > dt small {
font-weight: normal;
}
.bootstrap-select.show-menu-arrow .dropdown-toggle:before {
content: '';
display: inline-block;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-bottom: 7px solid #CCC;
border-bottom-color: rgba(0, 0, 0, 0.2);
position: absolute;
bottom: -4px;
left: 9px;
display: none;
}
.bootstrap-select.show-menu-arrow .dropdown-toggle:after {
content: '';
display: inline-block;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid white;
position: absolute;
bottom: -4px;
left: 10px;
display: none;
}
.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:before {
bottom: auto;
top: -3px;
border-top: 7px solid #ccc;
border-bottom: 0;
border-top-color: rgba(0, 0, 0, 0.2);
}
.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:after {
bottom: auto;
top: -3px;
border-top: 6px solid #ffffff;
border-bottom: 0;
}
.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:before {
right: 12px;
left: auto;
}
.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:after {
right: 13px;
left: auto;
}
.bootstrap-select.show-menu-arrow.open > .dropdown-toggle:before,
.bootstrap-select.show-menu-arrow.open > .dropdown-toggle:after {
display: block;
}
.mobile-device {
position: absolute;
top: 0;
left: 0;
display: block !important;
width: 100%;
height: 100% !important;
opacity: 0;
}
.bootstrap-select.fit-width {
width: auto !important;
}
.bootstrap-select.btn-group.fit-width .btn .filter-option {
position: static;
}
.bootstrap-select.btn-group.fit-width .btn .caret {
position: static;
top: auto;
margin-top: -1px;
}
.control-group.error .bootstrap-select .dropdown-toggle{
border-color: #b94a48;
}
.bootstrap-select-searchbox {
padding: 4px 8px;
}

View File

@@ -167,6 +167,36 @@ form .info {
}
}
// Form validation states
//
// Used in forms.less to generate the form validation CSS for warnings, errors,
// and successes.
.form-control-validation(@text-color: #555; @border-color: #ccc; @background-color: #f5f5f5) {
// Color the label and help text
.help-block,
.control-label {
color: @text-color;
}
// Set the border and box shadow on specific inputs to match
.form-control, .bootstrap-select .btn {
border-color: @border-color;
.box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work
&:focus {
border-color: darken(@border-color, 10%);
@shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@border-color, 20%);
.box-shadow(@shadow);
}
}
// Set validation states also for addons
.input-group-addon {
color: @text-color;
border-color: @border-color;
background-color: @background-color;
}
}
// -- Sign in --
.form-signin{
// .form-control {

View File

@@ -0,0 +1,11 @@
@media (max-width: @screen-desktop) {
.navbar-form{
width: 100%;
.form-group{
width: 94%;
}
}
}

View File

@@ -30,4 +30,8 @@
.navbar-default .navbar-toggle .icon-bar{
background-color: @btn-primary-color;
}
.navbar-form{
padding: 0;
}

View File

@@ -7,8 +7,9 @@
// -------------------------
body {
background: #FFF url("@{imgDir}/bg.jpg") top left no-repeat;
background-size: cover;
// background: #FFF url("@{imgDir}/bg.jpg") top left no-repeat;
// background-size: cover;
background-color: #eee;
}

View File

@@ -1,3 +1,22 @@
// Baseline styles
.table {
// Cells
thead,
tbody,
tfoot {
> tr {
> th,
> td {
vertical-align: middle;
}
}
}
}
tfoot{
.pagination{

View File

@@ -2,6 +2,7 @@
@import "navbar.less";
@import "scaffolding.less";
@import "type.less";
@import "grid.less";
@import "breadcrumbs.less";
@import "forms.less";
@import "datepicker.less";
@@ -11,6 +12,7 @@
@import "wizard.less";
@import "bootstrap-editable.less";
@import "bootstrap-switch.less";
@import "bootstrap-select.less";
@import "jqplot.less";
// -- Base styling ------------------------------------------------------------

View File

@@ -77,95 +77,97 @@
<div class="alert alert-info">
{intl l="Enter here all possible attribute values."}
</div>
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<thead>
<tr>
<th>
{admin_sortable_header
current_order=$attributeav_order
order='id'
reverse_order='id_reverse'
request_parameter_name='attributeav_order'
path={url path='/admin/configuration/attributes/update' attribute_id=$attribute_id}
label="{intl l='ID'}"
}
</th>
<table class="table table-striped table-condensed table-left-aligned">
<thead>
<tr>
<th>
{admin_sortable_header
current_order=$attributeav_order
order='id'
reverse_order='id_reverse'
request_parameter_name='attributeav_order'
path={url path='/admin/configuration/attributes/update' attribute_id=$attribute_id}
label="{intl l='ID'}"
}
</th>
<th>
{admin_sortable_header
current_order=$attributeav_order
order='alpha'
reverse_order='alpha_reverse'
request_parameter_name='attributeav_order'
path={url path='/admin/configuration/attributes/update' attribute_id=$attribute_id}
label="{intl l='Value'}"
}
</th>
<th>
{admin_sortable_header
current_order=$attributeav_order
order='alpha'
reverse_order='alpha_reverse'
request_parameter_name='attributeav_order'
path={url path='/admin/configuration/attributes/update' attribute_id=$attribute_id}
label="{intl l='Value'}"
}
</th>
<th class="text-center">
{admin_sortable_header
current_order=$attributeav_order
order='manual'
reverse_order='manual_reverse'
request_parameter_name='attributeav_order'
path={url path='/admin/configuration/attributes/update' attribute_id=$attribute_id}
label="{intl l="Position"}"
}
</th>
<th class="text-center">
{admin_sortable_header
current_order=$attributeav_order
order='manual'
reverse_order='manual_reverse'
request_parameter_name='attributeav_order'
path={url path='/admin/configuration/attributes/update' attribute_id=$attribute_id}
label="{intl l="Position"}"
}
</th>
{module_include location='attributes_value_table_header'}
{module_include location='attributes_value_table_header'}
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
{loop name="list" type="attribute_availability" attribute=$attribute_id backend_context="1" lang=$edit_language_id order=$attributeav_order}
<tr>
<td>{$ID}</td>
<tbody>
{loop name="list" type="attribute_availability" attribute=$attribute_id backend_context="1" lang=$edit_language_id order=$attributeav_order}
<tr>
<td>{$ID}</td>
<td>
{* FIXME : integrate this in the encolsing form to provide standard form processing *}
<input class="js-edit form-control" type="text" name="attribute_values[{$ID}]" value="{$TITLE}" />
</td>
<td>
{* FIXME : integrate this in the encolsing form to provide standard form processing *}
<input class="js-edit form-control" type="text" name="attribute_values[{$ID}]" value="{$TITLE}" />
</td>
<td class="text-center">
{admin_position_block
permission="admin.attributes.edit"
path={url path='/admin/configuration/attributes-av/update-position' attribute_id=$attribute_id}
url_parameter="attributeav_id"
in_place_edit_class="positionChange"
position="$POSITION"
id="$ID"
}
</td>
<td class="text-center">
{admin_position_block
permission="admin.attributes.edit"
path={url path='/admin/configuration/attributes-av/update-position' attribute_id=$attribute_id}
url_parameter="attributeav_id"
in_place_edit_class="positionChange"
position="$POSITION"
id="$ID"
}
</td>
{module_include location='attributes_value_table_row'}
{module_include location='attributes_value_table_row'}
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.attribute-av.delete"}
<a class="btn btn-default btn-xs value-delete" title="{intl l='Delete this value'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
{/loop}
</div>
</td>
</tr>
{/loop}
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.attribute-av.delete"}
<a class="btn btn-default btn-xs value-delete" title="{intl l='Delete this value'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
{/loop}
</div>
</td>
</tr>
{/loop}
{elseloop rel="list"}
<tr>
<td colspan="4">
<div class="alert alert-info">
{intl l="No value has been created yet. Click the + button to create one."}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
{elseloop rel="list"}
<tr>
<td colspan="4">
<div class="alert alert-info">
{intl l="No value has been created yet. Click the + button to create one."}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
</div>
</div>
</form>
{/form}

View File

@@ -21,117 +21,119 @@
<div class="col-md-12">
<form action="#" method="post">
<div class="general-block-decorator">
<table class="table table-striped table-condensed table-left-aligned">
<caption>
{intl l='Thelia product attributes'}
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption>
{intl l='Thelia product attributes'}
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.attributes.create"}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new product attribute'}" href="#creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
<thead>
<tr>
<th>
{admin_sortable_header
current_order=$order
order='id'
reverse_order='id_reverse'
path='/admin/configuration/attributes'
label="{intl l='ID'}"
}
</th>
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.attributes.create"}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new product attribute'}" href="#creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
<thead>
<tr>
<th>
{admin_sortable_header
current_order=$order
order='id'
reverse_order='id_reverse'
path='/admin/configuration/attributes'
label="{intl l='ID'}"
}
</th>
<th>
{admin_sortable_header
current_order=$order
order='alpha'
reverse_order='alpha_reverse'
path='/admin/configuration/attributes'
label="{intl l='Title'}"
}
</th>
<th>
{admin_sortable_header
current_order=$order
order='alpha'
reverse_order='alpha_reverse'
path='/admin/configuration/attributes'
label="{intl l='Title'}"
}
</th>
<th class="text-center">
{admin_sortable_header
current_order=$order
order='manual'
reverse_order='manual_reverse'
path='/admin/configuration/attributes'
label="{intl l="Position"}"
}
</th>
<th class="text-center">
{admin_sortable_header
current_order=$order
order='manual'
reverse_order='manual_reverse'
path='/admin/configuration/attributes'
label="{intl l="Position"}"
}
</th>
{module_include location='attributes_table_header'}
{module_include location='attributes_table_header'}
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
{loop name="list" type="attribute" backend_context="1" lang=$lang_id order=$order}
<tr>
<td>{$ID}</td>
<tbody>
{loop name="list" type="attribute" backend_context="1" lang=$lang_id order=$order}
<tr>
<td>{$ID}</td>
<td>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.attributes.change"}
<a title="{intl l='Change this attribute'}" href="{url path='/admin/configuration/attributes/update' attribute_id=$ID}">{$TITLE}</a>
{/loop}
{elseloop rel="can_change"}
{$TITLE}
{/elseloop}
</td>
<td>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.attributes.change"}
<a title="{intl l='Change this attribute'}" href="{url path='/admin/configuration/attributes/update' attribute_id=$ID}">{$TITLE}</a>
{/loop}
{elseloop rel="can_change"}
{$TITLE}
{/elseloop}
</td>
<td class="text-center">
{admin_position_block
permission="admin.attributes.edit"
path="/admin/configuration/attributes/update-position"
url_parameter="attribute_id"
in_place_edit_class="positionChange"
position="$POSITION"
id="$ID"
}
</td>
<td class="text-center">
{admin_position_block
permission="admin.attributes.edit"
path="/admin/configuration/attributes/update-position"
url_parameter="attribute_id"
in_place_edit_class="positionChange"
position="$POSITION"
id="$ID"
}
</td>
{module_include location='attributes_table_row'}
{module_include location='attributes_table_row'}
<td class="actions">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.attributes.change"}
<div class="btn-group">
<a class="btn btn-default btn-xs attribute-remove-from-all" title="{intl l='Remove this attribute from all product templates'}" href="#remove_from_all_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-minus"></span>
</a>
<a class="btn btn-default btn-xs attribute-add-to-all" title="{intl l='Add this attribute to all product templates'}" href="#add_to_all_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-plus"></span>
</a>
</div>
{/loop}
<td class="actions">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.attributes.change"}
<div class="btn-group">
<a class="btn btn-default btn-xs attribute-remove-from-all" title="{intl l='Remove this attribute from all product templates'}" href="#remove_from_all_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-minus"></span>
</a>
<a class="btn btn-default btn-xs attribute-add-to-all" title="{intl l='Add this attribute to all product templates'}" href="#add_to_all_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-plus"></span>
</a>
</div>
{/loop}
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.attributes.change"}
<a class="btn btn-default btn-xs attribute-change" title="{intl l='Change this product attribute'}" href="{url path='/admin/configuration/attributes/update' attribute_id=$ID}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.attributes.change"}
<a class="btn btn-default btn-xs attribute-change" title="{intl l='Change this product attribute'}" href="{url path='/admin/configuration/attributes/update' attribute_id=$ID}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.attributes.delete"}
<a class="btn btn-default btn-xs attribute-delete" title="{intl l='Delete this product attribute'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
{/loop}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.attributes.delete"}
<a class="btn btn-default btn-xs attribute-delete" title="{intl l='Delete this product attribute'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
{/loop}
{elseloop rel="list"}
<tr>
<td colspan="4">
<div class="alert alert-info">
{intl l="No product attribute has been created yet. Click the + button to create one."}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
{elseloop rel="list"}
<tr>
<td colspan="4">
<div class="alert alert-info">
{intl l="No product attribute has been created yet. Click the + button to create one."}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
</div>
</div>
</form>
</div>

View File

@@ -15,163 +15,164 @@
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<table class="table table-striped table-condensed" id="category_list">
<caption>
{* display parent category name, and get current cat ID *}
{loop name="category_title" type="category" visible="*" id=$category_id}
{intl l="Categories in %cat" cat=$TITLE}
{$cat_id = $ID}
{/loop}
{elseloop rel="category_title"}
{intl l="Top level categories"}
{/elseloop}
{module_include location='category_list_caption'}
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.categories.create"}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new category'}" href="#category_creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
{ifloop rel="category_list"}
<thead>
<tr>
<th class="object-title">
{admin_sortable_header
current_order=$category_order
order='id'
reverse_order='id_reverse'
path={url path='/admin/categories' id_category=$category_id}
request_parameter_name='category_order'
label="{intl l='ID'}"
}
</th>
<th class="object-image">&nbsp;</th>
<th class="object-title">
{admin_sortable_header
current_order=$category_order
order='alpha'
reverse_order='alpha_reverse'
path={url path='/admin/categories' id_category=$category_id}
request_parameter_name='category_order'
label="{intl l='Category title'}"
}
</th>
{module_include location='category_list_header'}
<th>
{admin_sortable_header
current_order=$category_order
order='visible'
reverse_order='visible_reverse'
path={url path='/admin/categories' id_category=$category_id}
request_parameter_name='category_order'
label="{intl l='Online'}"
}
</th>
<th>
{admin_sortable_header
current_order=$category_order
order='manual'
reverse_order='manual_reverse'
path={url path='/admin/categories' id_category=$category_id}
request_parameter_name='category_order'
label="{intl l='Position'}"
}
</th>
<th class="actions">{intl l='Actions'}</th>
</tr>
</thead>
<tbody>
{loop name="category_list" type="category" visible="*" parent=$category_id order=$category_order backend_context="1" lang=$lang_id}
<tr>
<td>{$ID}</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}" title="{intl l='Browse this category'}"><img class="img-thumbnail" src="{$IMAGE_URL}" alt="{$TITLE}" /></a>
{/loop}
</td>
<td class="object-title">
<a href="{url path='admin/catalog' category_id=$ID}" title="{intl l='Browse this category'}">
{$TITLE}
</a>
</td>
{module_include location='category_list_row'}
<td>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.categories.edit"}
<div class="make-switch switch-small categoryVisibleToggle" data-id="{$ID}" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input type="checkbox" class="categoryVisibleToggle" {if $VISIBLE == 1}checked="checked"{/if}>
</div>
<div class="general-block-decorator">
<div class="table-responsive">
<table class="table table-striped table-condensed" id="category_list">
<caption>
{* display parent category name, and get current cat ID *}
{loop name="category_title" type="category" visible="*" id=$category_id}
{intl l="Categories in %cat" cat=$TITLE}
{$cat_id = $ID}
{/loop}
{elseloop rel="can_change"}
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input type="checkbox" class="disabled" disabled="disabled" {if $VISIBLE == 1}checked="checked"{/if}>
</div>
{elseloop rel="category_title"}
{intl l="Top level categories"}
{/elseloop}
</td>
<td>
{admin_position_block
permission="admin.categories.edit"
path={url path='admin/categories/update-position' category_id=$ID}
url_parameter="category_id"
in_place_edit_class="categoryPositionChange"
position=$POSITION
id=$ID
}
</td>
{module_include location='category_list_caption'}
<td class="actions">
<div class="btn-group">
<a class="btn btn-default btn-xs" title="{intl l='Browse this category'}" href="{url path='admin/categories' category_id=$ID}"><i class="glyphicon glyphicon-folder-open"></i></a>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.categories.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this category'}" href="{url path='/admin/categories/update' category_id=$ID}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.categories.delete"}
<a class="btn btn-default btn-xs category-delete" title="{intl l='Delete this category and all its contents'}" href="#category_delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
{/loop}
</div>
</td>
</tr>
{/loop}
</tbody>
{/ifloop}
{elseloop rel="category_list"}
<thead>
<tr>
<td class="message">
<div class="alert alert-info">
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.categories.create"}
{intl l="This category has no sub-categories. To create a new one, click the + button above."}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new category'}" href="#category_creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
{elseloop rel="can_create"}
{intl l="This category has no sub-categories."}
{/elseloop}
</div>
</td>
</tr>
</thead>
{/elseloop}
</table>
{ifloop rel="category_list"}
<thead>
<tr>
<th class="object-title">
{admin_sortable_header
current_order=$category_order
order='id'
reverse_order='id_reverse'
path={url path='/admin/categories' id_category=$category_id}
request_parameter_name='category_order'
label="{intl l='ID'}"
}
</th>
<th class="object-image">&nbsp;</th>
<th class="object-title">
{admin_sortable_header
current_order=$category_order
order='alpha'
reverse_order='alpha_reverse'
path={url path='/admin/categories' id_category=$category_id}
request_parameter_name='category_order'
label="{intl l='Category title'}"
}
</th>
{module_include location='category_list_header'}
<th>
{admin_sortable_header
current_order=$category_order
order='visible'
reverse_order='visible_reverse'
path={url path='/admin/categories' id_category=$category_id}
request_parameter_name='category_order'
label="{intl l='Online'}"
}
</th>
<th>
{admin_sortable_header
current_order=$category_order
order='manual'
reverse_order='manual_reverse'
path={url path='/admin/categories' id_category=$category_id}
request_parameter_name='category_order'
label="{intl l='Position'}"
}
</th>
<th class="actions">{intl l='Actions'}</th>
</tr>
</thead>
<tbody>
{loop name="category_list" type="category" visible="*" parent=$category_id order=$category_order backend_context="1" lang=$lang_id}
<tr>
<td>{$ID}</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}" title="{intl l='Browse this category'}"><img class="img-thumbnail" src="{$IMAGE_URL}" alt="{$TITLE}" /></a>
{/loop}
</td>
<td class="object-title">
<a href="{url path='admin/catalog' category_id=$ID}" title="{intl l='Browse this category'}">
{$TITLE}
</a>
</td>
{module_include location='category_list_row'}
<td>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.categories.edit"}
<div class="make-switch switch-small categoryVisibleToggle" data-id="{$ID}" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input type="checkbox" class="categoryVisibleToggle" {if $VISIBLE == 1}checked="checked"{/if}>
</div>
{/loop}
{elseloop rel="can_change"}
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input type="checkbox" class="disabled" disabled="disabled" {if $VISIBLE == 1}checked="checked"{/if}>
</div>
{/elseloop}
</td>
<td>
{admin_position_block
permission="admin.categories.edit"
path={url path='admin/categories/update-position' category_id=$ID}
url_parameter="category_id"
in_place_edit_class="categoryPositionChange"
position=$POSITION
id=$ID
}
</td>
<td class="actions">
<div class="btn-group">
<a class="btn btn-default btn-xs" title="{intl l='Browse this category'}" href="{url path='admin/categories' category_id=$ID}"><i class="glyphicon glyphicon-folder-open"></i></a>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.categories.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this category'}" href="{url path='/admin/categories/update' category_id=$ID}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.categories.delete"}
<a class="btn btn-default btn-xs category-delete" title="{intl l='Delete this category and all its contents'}" href="#category_delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
{/loop}
</div>
</td>
</tr>
{/loop}
</tbody>
{/ifloop}
{elseloop rel="category_list"}
<thead>
<tr>
<td class="message">
<div class="alert alert-info">
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.categories.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}
</table>
</div>
</div>
</div>
</div>
@@ -181,7 +182,7 @@
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<div class="table-responsive">
<table class="table table-striped table-condensed">
<caption>
{* display parent category name *}
@@ -266,14 +267,14 @@
<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/product/edit' id=$ID}" title="{intl l='Edit this product'}">
<a href="{url path='/admin/products/update' product_id=$ID}" title="{intl l='Edit this product'}">
<img src="{$IMAGE_URL}" alt="{$TITLE}" />
</a>
{/loop}
<td class="object-title"><a href="{url path="/admin/product/update/$ID"}" title="{intl l='Edit this product'}">{$REF}</a></td>
<td class="object-title"><a href="{url path='/admin/products/update' product_id=$ID}" title="{intl l='Edit this product'}">{$REF}</a></td>
<td class="object-title"><a href="{url path="/admin/product/update/$ID"}" title="{intl l='Edit this product'}">{$TITLE}</a></td>
<td class="object-title"><a href="{url path='/admin/products/update' product_id=$ID}" title="{intl l='Edit this product'}">{$TITLE}</a></td>
{module_include location='product_list_row'}
@@ -305,7 +306,7 @@
<td>
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.product.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this product'}" href="{url path="admin/product/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
<a class="btn btn-default btn-xs" title="{intl l='Edit this product'}" href="{url path='/admin/products/update' product_id=$ID}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.product.delete"}
@@ -326,8 +327,7 @@
</thead>
{/elseloop}
</table>
</div>
</div>
</div>
</div>

View File

@@ -40,24 +40,23 @@
<div class="col-md-12">
<ul class="nav nav-tabs" id="tabbed-menu">
<li class="active"><a href="#general" data-toggle="tab">{intl l="General description"}</a></li>
<li><a href="#details" data-toggle="tab">{intl l="Details"}</a></li>
<li><a href="#images" data-toggle="tab">{intl l="Images"}</a></li>
<li><a href="#documents" data-toggle="tab">{intl l="Documents"}</a></li>
<li><a href="#modules" data-toggle="tab">{intl l="Modules"}</a></li>
<li {if $current_tab == 'general'}class="active"{/if}><a href="#general" data-toggle="tab">{intl l="General description"}</a></li>
<li {if $current_tab == 'details'}class="active"{/if}><a href="#details" data-toggle="tab">{intl l="Details"}</a></li>
<li {if $current_tab == 'images'}class="active"{/if}><a href="#images" data-toggle="tab">{intl l="Images"}</a></li>
<li {if $current_tab == 'documents'}class="active"{/if}><a href="#documents" data-toggle="tab">{intl l="Documents"}</a></li>
<li {if $current_tab == 'modules'}class="active"{/if}><a href="#modules" data-toggle="tab">{intl l="Modules"}</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane fade active in" id="general">
<div class="tab-pane fade {if $current_tab == 'general'}active in{/if}" id="general">
<div class="form-container">
{form name="thelia.admin.category.modification"}
<form method="POST" action="{url path='/admin/categories/save'}" {form_enctype form=$form} class="clearfix">
{include file="includes/inner-form-toolbar.html" close_url="{url path='/admin/categories' category_id=$category_id}"}
{include file="includes/inner-form-toolbar.html" close_url="{url path='/admin/categories' category_id=$PARENT}"}
{* Be sure to get the category ID, even if the form could not be validated *}
<input type="hidden" name="category_id" value="{$category_id}" />
@@ -141,7 +140,7 @@
</div>
</div>
<div class="tab-pane fade" id="details">
<div class="tab-pane fade {if $current_tab == 'details'}active in{/if}" id="details">
<div class="form-container">
<div class="form-group">
<form action="{url path='/admin/categories/related-content/add'}" id="related_content_form">
@@ -149,9 +148,12 @@
{include
file="includes/inner-form-toolbar.html"
hide_submit_buttons=true
close_url="{url path='/admin/categories' category_id=$category_id}"
close_url="{url path='/admin/categories' category_id=$PARENT}"
}
<p class="title title-without-tabs">{intl l='Related content'}</p>
<p>{intl l='You can attach here some content to this product'}</p>
<input type="hidden" name="category_id" value="{$category_id}" />
<input type="hidden" name="current_tab" value="details" />
@@ -162,8 +164,8 @@
<div class="form-group">
<select name="folder_id" id="folder_id" class="form-control">
<option value="">Select a folder...</option>
{loop name="folders" type="folder" backend_context="1" lang="$edit_language_id"}
<option value="{$ID}">{$TITLE}</option>
{loop name="folders" type="folder-tree" folder="0" backend_context="1" lang="$edit_language_id"}
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px">{$TITLE}</option>
{/loop}
</select>
</div>
@@ -183,6 +185,12 @@
<span class="help-block">{intl l='Select a content and click (+) to add it to this category'}</span>
</div>
<div id="content_selector_empty" class="hide">
<div class="alert alert-info">
{intl l="No available content in this folder"}
</div>
</div>
</div>
</div>
@@ -195,63 +203,65 @@
</form>
</div>
<table class="table table-striped table-condensed table-left-aligned">
<thead>
<tr>
<th>{intl l='ID'}</th>
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<thead>
<tr>
<th>{intl l='ID'}</th>
<th>{intl l='Attribute title'}</th>
<th>{intl l='Content title'}</th>
{module_include location='category_contents_table_header'}
{module_include location='category_contents_table_header'}
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
{loop name="assigned_contents" type="associated_content" category="$category_id" backend_context="1" lang="$edit_language_id"}
<tr>
<td>{$ID}</td>
<tbody>
{loop name="assigned_contents" type="associated_content" category="$category_id" backend_context="1" lang="$edit_language_id"}
<tr>
<td>{$ID}</td>
<td>
{$TITLE}
</td>
<td>
{$TITLE}
</td>
{module_include location='category_contents_table_row'}
{module_include location='category_contents_table_row'}
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.category.content.delete"}
<a class="btn btn-default btn-xs delete-content" title="{intl l='Delete this content'}" href="#delete_content_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
{/loop}
</div>
</td>
</tr>
{/loop}
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.category.content.delete"}
<a class="btn btn-default btn-xs delete-content" title="{intl l='Delete this content'}" href="#delete_content_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
{/loop}
</div>
</td>
</tr>
{/loop}
{elseloop rel="assigned_contents"}
<tr>
<td colspan="3">
<div class="alert alert-info">
{intl l="This category contains no contents"}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
{elseloop rel="assigned_contents"}
<tr>
<td colspan="3">
<div class="alert alert-info">
{intl l="This category contains no contents"}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
</div>
</div>
</div>
<div class="tab-pane fade" id="images">
<div class="tab-pane fade {if $current_tab == 'images'}active in{/if}" id="images">
</div>
<div class="tab-pane fade" id="documents">
<div class="tab-pane fade {if $current_tab == 'documents'}active in{/if}" id="documents">
</div>
<div class="tab-pane fade" id="modules">
<div class="tab-pane fade {if $current_tab == 'modules'}active in{/if}" id="modules">
</div>
</div>
</div>
@@ -287,7 +297,7 @@
{block name="javascript-initialization"}
<script src="/web/tinymce/tinymce.min.js"></script>
<script src="{url file='/tinymce/tinymce.min.js'}"></script>
<script>
tinymce.init({
selector: ".wysiwyg",
@@ -301,9 +311,9 @@
],
toolbar1: "undo redo | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | styleselect | filemanager | link unlink anchor | image media | forecolor backcolor | print preview code ",
image_advtab: true ,
external_filemanager_path:"/web/tinymce/plugins/filemanager/",
external_filemanager_path:"{url file='/tinymce/plugins/filemanager/'}'",
filemanager_title:"{intl l='Files manager'}" ,
external_plugins: { "filemanager" : "/web/tinymce/plugins/filemanager/plugin.min.js"}
external_plugins: { "filemanager" : "{url file='/tinymce/plugins/filemanager/plugin.min.js'}"}
});
</script>
@@ -317,12 +327,6 @@ $(function() {
ev.preventDefault();
});
// Show proper tab, if defined
{if ! empty($current_tab)}
$('#tabbed-menu a[href="#{$current_tab}"]').tab('show')
{/if}
// Set proper content ID in delete content from
$('a.delete-content').click(function(ev) {
$('#content_delete_id').val($(this).data('id'));
@@ -331,28 +335,41 @@ $(function() {
// Load content on folder selection
$('#folder_id').change(function(event) {
$.ajax({
url : '{url path="/admin/category/$category_id/available-related-content/"}' + $(this).val() + '.xml',
type : 'get',
dataType : 'json',
success : function(json) {
$('#content_id :not(:first-child)').remove();
var have_content = false;
var val = $(this).val();
$.each(json, function(idx, value) {
$('#content_id').append($('<option>').text(value.title).attr('value', value.id));
if (val != "") {
$.ajax({
url : '{url path="/admin/category/$category_id/available-related-content/"}' + val + '.xml',
type : 'get',
dataType : 'json',
success : function(json) {
$('#content_id :not(:first-child)').remove();
have_content = true; // Lame...
});
var have_content = false;
if (have_content)
$('#content_selector').removeClass('hide');
else
$('#content_selector').addClass('hide');
$.each(json, function(idx, value) {
$('#content_id').append($('<option>').text(value.title).attr('value', value.id));
}
});
have_content = true; // Lame...
});
if (have_content) {
$('#content_selector_empty').addClass('hide');
$('#content_selector').removeClass('hide');
}
else {
$('#content_selector_empty').removeClass('hide');
$('#content_selector').addClass('hide');
}
}
});
}
else {
$('#content_selector_empty').addClass('hide');
$('#content_selector').addClass('hide');
}
});
// Initialize folder (id={$folder_id}) select value

View File

@@ -17,151 +17,156 @@
<div class="col-md-4">
<div class="menu-list-table general-block-decorator">
<table class="table table-striped table-condensed">
<caption>{intl l='Product catalog configuration'}</caption>
<div class="table-responsive">
<table class="table table-striped table-condensed">
<caption>{intl l='Product catalog configuration'}</caption>
{module_include location='catalog_configuration_top'}
{module_include location='catalog_configuration_top'}
{loop type="auth" name="pcc1" roles="ADMIN" permissions="admin.configuration.templates"}
<tr>
<td><a href="{url path='/admin/configuration/templates'}">{intl l='Product templates'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/templates'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc1" roles="ADMIN" permissions="admin.configuration.templates"}
<tr>
<td><a href="{url path='/admin/configuration/templates'}">{intl l='Product templates'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/templates'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc2" roles="ADMIN" permissions="admin.configuration.attributes"}
<tr>
<td><a href="{url path='/admin/configuration/attributes'}">{intl l='Product attributes'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/attributes'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc2" roles="ADMIN" permissions="admin.configuration.attributes"}
<tr>
<td><a href="{url path='/admin/configuration/attributes'}">{intl l='Product attributes'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/attributes'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc3" roles="ADMIN" permissions="admin.configuration.features"}
<tr>
<td><a href="{url path='/admin/configuration/features'}">{intl l='Product features'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/features'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc3" roles="ADMIN" permissions="admin.configuration.features"}
<tr>
<td><a href="{url path='/admin/configuration/features'}">{intl l='Product features'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/features'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc4" roles="ADMIN" permissions="admin.configuration.messages"}
<tr>
<td><a href="{url path='/admin/configuration/messages'}">{intl l='Mailing templates'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/messages'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{loop type="auth" name="pcc4" roles="ADMIN" permissions="admin.configuration.messages"}
<tr>
<td><a href="{url path='/admin/configuration/messages'}">{intl l='Mailing templates'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/messages'}"><i class="glyphicon glyphicon-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-default btn-xs" href="{url path='/admin/configuration/currencies'}"><i class="glyphicon glyphicon-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-default btn-xs" href="{url path='/admin/configuration/currencies'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{module_include location='catalog_configuration_bottom'}
</table>
{module_include location='catalog_configuration_bottom'}
</table>
</div>
</div>
</div>
<div class="col-md-4">
<div class="menu-list-table general-block-decorator">
<table class="table table-striped table-condensed">
<caption>{intl l='Shipping configuration'}</caption>
<div class="table-responsive">
<table class="table table-striped table-condensed">
<caption>{intl l='Shipping configuration'}</caption>
{module_include location='shipping_configuration_top'}
{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-default btn-xs" href="{url path='/admin/configuration/countries'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{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-default btn-xs" href="{url path='/admin/configuration/countries'}"><i class="glyphicon glyphicon-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-default btn-xs" href="{url path='/admin/configuration/shipping_zones'}"><i class="glyphicon glyphicon-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-default btn-xs" href="{url path='/admin/configuration/shipping_zones'}"><i class="glyphicon glyphicon-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-default btn-xs" href="{url path='/admin/configuration/shipping_configuration'}"><i class="glyphicon glyphicon-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-default btn-xs" href="{url path='/admin/configuration/shipping_configuration'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{module_include location='shipping_configuration_bottom'}
{module_include location='shipping_configuration_bottom'}
</table>
</table>
</div>
</div>
</div>
<div class="col-md-4">
<div class="menu-list-table general-block-decorator">
<table class="table table-striped table-condensed">
<caption>{intl l='System parameters'}</caption>
<div class="table-responsive">
<table class="table table-striped table-condensed">
<caption>{intl l='System parameters'}</caption>
{module_include location='system_configuration_top'}
{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-default btn-xs" href="{url path='/admin/configuration/modules'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{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-default btn-xs" href="{url path='/admin/configuration/modules'}"><i class="glyphicon glyphicon-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-default btn-xs" href="{url path='/admin/configuration/variables'}"><i class="glyphicon glyphicon-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-default btn-xs" href="{url path='/admin/configuration/variables'}"><i class="glyphicon glyphicon-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-default btn-xs" href="{url path='/admin/configuration/admin_profiles'}"><i class="glyphicon glyphicon-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-default btn-xs" href="{url path='/admin/configuration/admin_profiles'}"><i class="glyphicon glyphicon-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-default btn-xs" href="{url path='/admin/configuration/admin_users'}"><i class="glyphicon glyphicon-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-default btn-xs" href="{url path='/admin/configuration/admin_users'}"><i class="glyphicon glyphicon-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 &amp; URLs'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/languages'}"><i class="glyphicon glyphicon-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 &amp; URLs'}</a></td>
<td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/languages'}"><i class="glyphicon glyphicon-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-default btn-xs" href="{url path='/admin/configuration/mailing_system'}"><i class="glyphicon glyphicon-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-default btn-xs" href="{url path='/admin/configuration/mailing_system'}"><i class="glyphicon glyphicon-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-default btn-xs" href="{url path='/admin/configuration/admin_logs'}"><i class="glyphicon glyphicon-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-default btn-xs" href="{url path='/admin/configuration/admin_logs'}"><i class="glyphicon glyphicon-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-default btn-xs" href="{url path='/admin/configuration/system_logs'}"><i class="glyphicon glyphicon-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-default btn-xs" href="{url path='/admin/configuration/system_logs'}"><i class="glyphicon glyphicon-edit"></i></a></td>
</tr>
{/loop}
{module_include location='system_configuration_bottom'}
</table>
{module_include location='system_configuration_bottom'}
</table>
</div>
</div>
</div>

View File

@@ -23,80 +23,80 @@
<form action="" method="post">
<div class="general-block-decorator">
<table class="table table-striped table-condensed">
<caption class="clearfix">
{intl l='Countries'}
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.countries.create"}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new country'}" href="#add_country_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Default</th>
<th>Shop</th>
<th>N° ISO</th>
<th>ISO Code</th>
{module_include location='countries_table_header'}
<th class="actions">{intl l='Actions'}</th>
</tr>
</thead>
<tbody>
{loop name="countries" type="country" backend_context="1" lang=$lang_id order=$order}
<div class="table-responsive">
<table class="table table-striped table-condensed">
<caption class="clearfix">
{intl l='Countries'}
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.countries.create"}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new country'}" href="#add_country_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
<thead>
<tr>
<td>{$ID}</td>
<td>{$TITLE}</td>
<td>
<div class="make-switch switch-small switch-radio" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input class="change-default" type="radio" name="" value="{$ID}" {if $IS_DEFAULT}selected="selected"{/if}/>
</div>
</td>
<td>
<div class="make-switch switch-small switch-radio" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input class="change-default" type="radio" name="" value="{$ID}" {if $IS_DEFAULT}selected="selected"{/if}/>
</div>
</td>
<td>{$ISOCODE}</td>
<td>{$ISOALPHA3}</td>
<th>ID</th>
<th>Name</th>
<th>Default</th>
<th>Shop</th>
<th>N° ISO</th>
<th>ISO Code</th>
{module_include location='countries_table_row'}
{module_include location='countries_table_header'}
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.countries.change"}
<a class="btn btn-default btn-xs country-change" title="{intl l='Change this country'}" href="{url path="/admin/configuration/countries/update/{$ID}"}">
<span class="glyphicon glyphicon-edit"></span>
</a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.countries.delete"}
<a class="btn btn-default btn-xs country-delete" title="{intl l='Delete this country'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
{/loop}
</div>
</td>
<th class="actions">{intl l='Actions'}</th>
</tr>
{/loop}
{elseloop rel="countries"}
<tr>
<td colspan="8">
<div class="alert alert-info">
{intl l="No country has been created yet. Click the + button to create one."}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
</thead>
<tbody>
{loop name="countries" type="country" backend_context="1" lang=$lang_id order=$order}
<tr>
<td>{$ID}</td>
<td>{$TITLE}</td>
<td>
<div class="make-switch switch-small switch-radio" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input class="change-default" type="radio" name="" value="{$ID}" {if $IS_DEFAULT}selected="selected"{/if}/>
</div>
</td>
<td>
<div class="make-switch switch-small switch-radio" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input class="change-default" type="radio" name="" value="{$ID}" {if $IS_DEFAULT}selected="selected"{/if}/>
</div>
</td>
<td>{$ISOCODE}</td>
<td>{$ISOALPHA3}</td>
{module_include location='countries_table_row'}
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.countries.change"}
<a class="btn btn-default btn-xs country-change" title="{intl l='Change this country'}" href="{url path="/admin/configuration/countries/update/{$ID}"}">
<span class="glyphicon glyphicon-edit"></span>
</a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.countries.delete"}
<a class="btn btn-default btn-xs country-delete" title="{intl l='Delete this country'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
{/loop}
</div>
</td>
</tr>
{/loop}
{elseloop rel="countries"}
<tr>
<td colspan="8">
<div class="alert alert-info">
{intl l="No country has been created yet. Click the + button to create one."}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
</div>
</div>
</form>

View File

@@ -22,73 +22,77 @@
<section class="row">
<div class="col-md-12 general-block-decorator">
<table class="table table-striped tablesorter">
<caption>
{intl l='Enabled coupons'}
</caption>
<thead>
<tr>
<th>{block name="coupon-label-code"}{intl l='Code'}{/block}</th>
<th>{block name="coupon-label-title"}{intl l='Title'}{/block}</th>
<th>{block name="coupon-label-expiration-date"}{intl l='Expiration date'}{/block}</th>
<th>{block name="coupon-label-usage-left"}{intl l='Usage left'}{/block}</th>
<th class="sorter-false filter-false">{block name="coupon-label-action"}{/block}</th>
</tr>
</thead>
<tbody>
{loop type="coupon" name="list_coupon" is_enabled="1" backend_context="true"}
<tr>
<td>{block name="coupon-code"}<a href="{$urlReadCoupon|replace:'couponId':$ID}">{$CODE}</a>{/block}</td>
<td>{block name="coupon-title"}{$TITLE}{/block}</td>
<td>{block name="coupon-expiration-date"}{$EXPIRATION_DATE}{/block}</td>
<td>{block name="coupon-usage-left"}{$USAGE_LEFT}{/block}</td>
<td>
{block name="coupon-action"}
<a href="{$urlEditCoupon|replace:'couponId':$ID}" class="btn btn-default btn-primary btn-medium">
<span class="glyphicon glyphicon-edit"></span> {intl l='Edit'}
</a>
{/block}
</td>
</tr>
{/loop}
</tbody>
</table>
<div class="table-responsive">
<table class="table table-striped tablesorter">
<caption>
{intl l='Enabled coupons'}
</caption>
<thead>
<tr>
<th>{block name="coupon-label-code"}{intl l='Code'}{/block}</th>
<th>{block name="coupon-label-title"}{intl l='Title'}{/block}</th>
<th>{block name="coupon-label-expiration-date"}{intl l='Expiration date'}{/block}</th>
<th>{block name="coupon-label-usage-left"}{intl l='Usage left'}{/block}</th>
<th class="sorter-false filter-false">{block name="coupon-label-action"}{/block}</th>
</tr>
</thead>
<tbody>
{loop type="coupon" name="list_coupon" is_enabled="1" backend_context="true"}
<tr>
<td>{block name="coupon-code"}<a href="{$urlReadCoupon|replace:'couponId':$ID}">{$CODE}</a>{/block}</td>
<td>{block name="coupon-title"}{$TITLE}{/block}</td>
<td>{block name="coupon-expiration-date"}{$EXPIRATION_DATE}{/block}</td>
<td>{block name="coupon-usage-left"}{$USAGE_LEFT}{/block}</td>
<td>
{block name="coupon-action"}
<a href="{$urlEditCoupon|replace:'couponId':$ID}" class="btn btn-default btn-primary btn-medium">
<span class="glyphicon glyphicon-edit"></span> {intl l='Edit'}
</a>
{/block}
</td>
</tr>
{/loop}
</tbody>
</table>
</div>
</div>
</section>
<section class="row">
<div class="col-md-12 general-block-decorator">
<table class="table table-striped tablesorter">
<caption>
{intl l='Disabled coupons'}
</caption>
<thead>
<tr>
<th>{block name="coupon-label-code"}{intl l='Code'}{/block}</th>
<th>{block name="coupon-label-title"}{intl l='Title'}{/block}</th>
<th>{block name="coupon-label-expiration-date"}{intl l='Expiration date'}{/block}</th>
<th>{block name="coupon-label-usage-left"}{intl l='Usage left'}{/block}</th>
<th class="sorter-false filter-false">{block name="coupon-label-action"}{/block}</th>
</tr>
</thead>
<tbody>
{loop type="coupon" name="list_coupon" is_enabled="0" backend_context="true"}
<tr>
<td>{block name="coupon-code"}<a href="{$urlReadCoupon|replace:'couponId':$ID}">{$CODE}</a>{/block}</td>
<td>{block name="coupon-title"}{$TITLE}{/block}</td>
<td>{block name="coupon-expiration-date"}{$EXPIRATION_DATE}{/block}</td>
<td>{block name="coupon-usage-left"}{$USAGE_LEFT}{/block}</td>
<td>
{block name="coupon-action"}
<a href="{$urlEditCoupon|replace:'couponId':$ID}" class="btn btn-default btn-primary btn-medium">
<span class="glyphicon glyphicon-edit"></span> {intl l='Edit'}
</a>
{/block}
</td>
</tr>
{/loop}
</tbody>
</table>
<div class="table-responsive">
<table class="table table-striped tablesorter">
<caption>
{intl l='Disabled coupons'}
</caption>
<thead>
<tr>
<th>{block name="coupon-label-code"}{intl l='Code'}{/block}</th>
<th>{block name="coupon-label-title"}{intl l='Title'}{/block}</th>
<th>{block name="coupon-label-expiration-date"}{intl l='Expiration date'}{/block}</th>
<th>{block name="coupon-label-usage-left"}{intl l='Usage left'}{/block}</th>
<th class="sorter-false filter-false">{block name="coupon-label-action"}{/block}</th>
</tr>
</thead>
<tbody>
{loop type="coupon" name="list_coupon" is_enabled="0" backend_context="true"}
<tr>
<td>{block name="coupon-code"}<a href="{$urlReadCoupon|replace:'couponId':$ID}">{$CODE}</a>{/block}</td>
<td>{block name="coupon-title"}{$TITLE}{/block}</td>
<td>{block name="coupon-expiration-date"}{$EXPIRATION_DATE}{/block}</td>
<td>{block name="coupon-usage-left"}{$USAGE_LEFT}{/block}</td>
<td>
{block name="coupon-action"}
<a href="{$urlEditCoupon|replace:'couponId':$ID}" class="btn btn-default btn-primary btn-medium">
<span class="glyphicon glyphicon-edit"></span> {intl l='Edit'}
</a>
{/block}
</td>
</tr>
{/loop}
</tbody>
</table>
</div>
</div>
</section>

View File

@@ -27,120 +27,122 @@
{intl l='This coupon is disabled, you can enable to the bottom of this form.'}
</div>
{/if}
<table class="table table-striped">
<tbody>
<tr>
<td>{intl l='Title'}</td>
<td>{$TITLE}</td>
</tr>
<tr>
<td colspan="2">
{if $IS_ENABLED}
<span class="label label-success">
{intl l="Is enabled"}
</span>
{else}
<span class="label label-warning">
{intl l="Is disabled"}
</span>
{/if}
</td>
</tr>
<tr>
<td colspan="2">
{$TOOLTIP}
</td>
</tr>
<tr>
<td>{intl l='Amount'}</td>
<td>{$AMOUNT}</td>
</tr>
<tr>
<td>{intl l='Expiration date'}</td>
<td>{$EXPIRATION_DATE} ({$DAY_LEFT_BEFORE_EXPIRATION} {intl l="days left"})</td>
</tr>
<tr>
<td>{intl l='Usage left'}</td>
<td>
{if $USAGE_LEFT}
<span class="label label-success">
{$USAGE_LEFT}
</span>
{else}
<span class="label label-warning">
0
</span>
{/if}
</td>
</tr>
<tr>
<td colspan="2">
{if $IS_CUMULATIVE}
<span class="label label-success">
{intl l="May be cumulative"}
</span>
{else}
<span class="label label-warning">
{intl l="Can't be cumulative"}
</span>
{/if}
</td>
</tr>
<tr>
<td colspan="2">
{if $IS_REMOVING_POSTAGE}
<span class="label label-warning">
{intl l="Will remove postage"}
</span>
{else}
<span class="label label-success">
{intl l="Won't remove postage"}
</span>
{/if}
</td>
</tr>
<tr>
<td colspan="2">
{if $IS_AVAILABLE_ON_SPECIAL_OFFERS}
<span class="label label-warning">
{intl l="Will be available on special offers"}
</span>
{else}
<span class="label label-success">
{intl l="Won't be available on special offers"}
</span>
{/if}
</td>
</tr>
<tr>
<td>{intl l='Application field'}</td>
<td>
<ul class="list-unstyled">
{foreach from=$APPLICATION_CONDITIONS item=rule name=rulesForeach}
{if !$smarty.foreach.rulesForeach.first}
<li><span class="label label-info">{intl l='And'}</span></li>
{/if}
<li>{$rule nofilter}</li>
{/foreach}
</ul>
</td>
</tr>
<tr>
<td colspan="2">{$SHORT_DESCRIPTION}</td>
</tr>
<tr>
<td colspan="2">{$DESCRIPTION}</td>
</tr>
<tr>
<td colspan="2">
<a href="{$urlEditCoupon}" class="btn btn-default btn-primary btn-medium">
<span class="icon-edit icon-white"></span> {intl l='Edit'}
</a>
</td>
</tr>
</tbody>
</table>
<div class="table-responsive">
<table class="table table-striped">
<tbody>
<tr>
<td>{intl l='Title'}</td>
<td>{$TITLE}</td>
</tr>
<tr>
<td colspan="2">
{if $IS_ENABLED}
<span class="label label-success">
{intl l="Is enabled"}
</span>
{else}
<span class="label label-warning">
{intl l="Is disabled"}
</span>
{/if}
</td>
</tr>
<tr>
<td colspan="2">
{$TOOLTIP}
</td>
</tr>
<tr>
<td>{intl l='Amount'}</td>
<td>{$AMOUNT}</td>
</tr>
<tr>
<td>{intl l='Expiration date'}</td>
<td>{$EXPIRATION_DATE} ({$DAY_LEFT_BEFORE_EXPIRATION} {intl l="days left"})</td>
</tr>
<tr>
<td>{intl l='Usage left'}</td>
<td>
{if $USAGE_LEFT}
<span class="label label-success">
{$USAGE_LEFT}
</span>
{else}
<span class="label label-warning">
0
</span>
{/if}
</td>
</tr>
<tr>
<td colspan="2">
{if $IS_CUMULATIVE}
<span class="label label-success">
{intl l="May be cumulative"}
</span>
{else}
<span class="label label-warning">
{intl l="Can't be cumulative"}
</span>
{/if}
</td>
</tr>
<tr>
<td colspan="2">
{if $IS_REMOVING_POSTAGE}
<span class="label label-warning">
{intl l="Will remove postage"}
</span>
{else}
<span class="label label-success">
{intl l="Won't remove postage"}
</span>
{/if}
</td>
</tr>
<tr>
<td colspan="2">
{if $IS_AVAILABLE_ON_SPECIAL_OFFERS}
<span class="label label-warning">
{intl l="Will be available on special offers"}
</span>
{else}
<span class="label label-success">
{intl l="Won't be available on special offers"}
</span>
{/if}
</td>
</tr>
<tr>
<td>{intl l='Application field'}</td>
<td>
<ul class="list-unstyled">
{foreach from=$APPLICATION_CONDITIONS item=rule name=rulesForeach}
{if !$smarty.foreach.rulesForeach.first}
<li><span class="label label-info">{intl l='And'}</span></li>
{/if}
<li>{$rule nofilter}</li>
{/foreach}
</ul>
</td>
</tr>
<tr>
<td colspan="2">{$SHORT_DESCRIPTION}</td>
</tr>
<tr>
<td colspan="2">{$DESCRIPTION}</td>
</tr>
<tr>
<td colspan="2">
<a href="{$urlEditCoupon}" class="btn btn-default btn-primary btn-medium">
<span class="icon-edit icon-white"></span> {intl l='Edit'}
</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</section>
{/loop}

View File

@@ -23,166 +23,166 @@
<form action="{url path='/admin/configuration/currencies/update-rates'}" method="post">
<div class="general-block-decorator">
<table class="table table-striped table-condensed">
<caption class="clearfix">
{intl l='Currencies'}
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.currencies.create"}
<span class="pull-right">
<button class="btn btn-default btn-info" title="{intl l='Update rates'}">{intl l='Update rates'} <span class="glyphicon glyphicon-globe"></span></button>
<a class="btn btn-default btn-primary" title="{intl l='Add a new currency'}" href="#creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
</span>
{/loop}
</caption>
<thead>
<tr>
<th>
{admin_sortable_header
current_order=$order
order='id'
reverse_order='id_reverse'
path='/admin/configuration/currencies'
label="{intl l='ID'}"
}
</th>
<th>
{admin_sortable_header
current_order=$order
order='name'
reverse_order='name_reverse'
path='/admin/configuration/currencies'
label="{intl l='Name'}"
}
</th>
<th class="text-center">
{admin_sortable_header
current_order=$order
order='code'
reverse_order='code_reverse'
path='/admin/configuration/currencies'
label="{intl l="ISO 4217 Code"}"
}
<a title="{intl l='More information about ISO 4217'}" href="http://fr.wikipedia.org/wiki/ISO_4217" target="_blank"><i class="glyphicon glyphicon-question-sign"></i></a>
</th>
<th class="text-center">
{admin_sortable_header
current_order=$order
order='symbol'
reverse_order='symbol_reverse'
path='/admin/configuration/currencies'
label="{intl l="Symbol"}"
}
</th>
<th class="text-right">
{admin_sortable_header
current_order=$order
order='rate'
reverse_order='rate_reverse'
path='/admin/configuration/currencies'
label="{intl l="Rate in &euro;"}"
}
</th>
<th class="text-center">
{admin_sortable_header
current_order=$order
order='manual'
reverse_order='manual_reverse'
path='/admin/configuration/currencies'
label="{intl l="Position"}"
}
</th>
<th class="text-center">
{admin_sortable_header
current_order=$order
order='is_default'
reverse_order='is_default_reverse'
path='/admin/configuration/currencies'
label="{intl l="Default"}"
}
</th>
{module_include location='currencies_table_header'}
<th class="actions">{intl l='Actions'}</th>
</tr>
</thead>
<tbody>
{loop name="currencies" type="currency" backend_context="1" lang=$lang_id order=$order}
<div class="table-responsive">
<table class="table table-striped table-condensed">
<caption class="clearfix">
{intl l='Currencies'}
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.currencies.create"}
<span class="pull-right">
<button class="btn btn-default btn-info" title="{intl l='Update rates'}">{intl l='Update rates'} <span class="glyphicon glyphicon-globe"></span></button>
<a class="btn btn-default btn-primary" title="{intl l='Add a new currency'}" href="#creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
</span>
{/loop}
</caption>
<thead>
<tr>
<td>{$ID}</td>
<td>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.currencies.change"}
<a title="{intl l='Change this currency'}" href="{url path='/admin/configuration/currencies/update' currency_id=$ID}">{$NAME}</a>
{/loop}
{elseloop rel="can_change"}
{$NAME}
{/elseloop}
</td>
<td class="text-center">{$ISOCODE}</td>
<td class="text-center">{$SYMBOL}</td>
<td class="text-right">{format_number number="$RATE" decimals="4"}</td>
<td class="text-center">
{admin_position_block
permission="admin.currencies.edit"
path="/admin/configuration/currencies/update-position"
url_parameter="currency_id"
in_place_edit_class="currencyPositionChange"
position="$POSITION"
id="$ID"
<th>
{admin_sortable_header
current_order=$order
order='id'
reverse_order='id_reverse'
path='/admin/configuration/currencies'
label="{intl l='ID'}"
}
</td>
</th>
<td class="text-center">
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input class="change-default" type="radio" name="is_default" value="{$ID}" {if $IS_DEFAULT}checked="checked"{/if}/>
</div>
</td>
<th>
{admin_sortable_header
current_order=$order
order='name'
reverse_order='name_reverse'
path='/admin/configuration/currencies'
label="{intl l='Name'}"
}
</th>
{module_include location='currencies_table_row'}
<th class="text-center">
{admin_sortable_header
current_order=$order
order='code'
reverse_order='code_reverse'
path='/admin/configuration/currencies'
label="{intl l="ISO 4217 Code"}"
}
<a title="{intl l='More information about ISO 4217'}" href="http://fr.wikipedia.org/wiki/ISO_4217" target="_blank"><i class="glyphicon glyphicon-question-sign"></i></a>
</th>
<td class="actions">
<div class="btn-group">
<th class="text-center">
{admin_sortable_header
current_order=$order
order='symbol'
reverse_order='symbol_reverse'
path='/admin/configuration/currencies'
label="{intl l="Symbol"}"
}
</th>
<th class="text-right">
{admin_sortable_header
current_order=$order
order='rate'
reverse_order='rate_reverse'
path='/admin/configuration/currencies'
label="{intl l="Rate in &euro;"}"
}
</th>
<th class="text-center">
{admin_sortable_header
current_order=$order
order='manual'
reverse_order='manual_reverse'
path='/admin/configuration/currencies'
label="{intl l="Position"}"
}
</th>
<th class="text-center">
{admin_sortable_header
current_order=$order
order='is_default'
reverse_order='is_default_reverse'
path='/admin/configuration/currencies'
label="{intl l="Default"}"
}
</th>
{module_include location='currencies_table_header'}
<th class="actions">{intl l='Actions'}</th>
</tr>
</thead>
<tbody>
{loop name="currencies" type="currency" backend_context="1" lang=$lang_id order=$order}
<tr>
<td>{$ID}</td>
<td>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.currencies.change"}
<a class="btn btn-default btn-xs currency-change" title="{intl l='Change this currency'}" href="{url path='/admin/configuration/currencies/update' currency_id="$ID"}">
<span class="glyphicon glyphicon-edit"></span>
</a>
<a title="{intl l='Change this currency'}" href="{url path='/admin/configuration/currencies/update' currency_id=$ID}">{$NAME}</a>
{/loop}
{elseloop rel="can_change"}
{$NAME}
{/elseloop}
</td>
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.currencies.delete"}
<a class="btn btn-default btn-xs currency-delete" title="{intl l='Delete this currency'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
{/loop}
</div>
</td>
</tr>
{/loop}
{elseloop rel="currencies"}
<tr>
<td colspan="8">
<div class="alert alert-info">
{intl l="No currency has been created yet. Click the + button to create one."}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
<td class="text-center">{$ISOCODE}</td>
<td class="text-center">{$SYMBOL}</td>
<td class="text-right">{format_number number="$RATE" decimals="4"}</td>
<td class="text-center">
{admin_position_block
permission="admin.currencies.edit"
path="/admin/configuration/currencies/update-position"
url_parameter="currency_id"
in_place_edit_class="currencyPositionChange"
position="$POSITION"
id="$ID"
}
</td>
<td class="text-center">
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input class="change-default" type="radio" name="is_default" value="{$ID}" {if $IS_DEFAULT}checked="checked"{/if}/>
</div>
</td>
{module_include location='currencies_table_row'}
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.currencies.change"}
<a class="btn btn-default btn-xs currency-change" title="{intl l='Change this currency'}" href="{url path='/admin/configuration/currencies/update' currency_id="$ID"}">
<span class="glyphicon glyphicon-edit"></span>
</a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.currencies.delete"}
<a class="btn btn-default btn-xs currency-delete" title="{intl l='Delete this currency'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
{/loop}
</div>
</td>
</tr>
{/loop}
{elseloop rel="currencies"}
<tr>
<td colspan="8">
<div class="alert alert-info">
{intl l="No currency has been created yet. Click the + button to create one."}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
</div>
</div>
</form>

View File

@@ -142,52 +142,54 @@
</a>
</span>
</p>
<div class="table-responsive">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>{intl l="Address"}</th>
<th>{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
{loop name="address" type="address" customer="$customer_id" backend_context="1" default="0"}
<tr>
<td>
<address>
<strong>{loop name="address.title" type="title" id=$TITLE}{$SHORT}{/loop} {$FIRSTNAME} {$LASTNAME}</strong><br>
{$ADDRESS1}<br>
{$ADDRESS2}<br>
{$ADDRESS3}<br>
{if $PHONE}
<abbr title="{intl l="Phone"}">P:</abbr> {$PHONE}<br>
{/if}
{if $CELLPHONE}
<abbr title="{intl l="cell phone"}">P:</abbr> {$CELLPHONE}
{/if}
</address>
</td>
<td>
<div class="btn-group">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>{intl l="Address"}</th>
<th>{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
{loop name="address" type="address" customer="$customer_id" backend_context="1" default="0"}
<tr>
<td>
<address>
<strong>{loop name="address.title" type="title" id=$TITLE}{$SHORT}{/loop} {$FIRSTNAME} {$LASTNAME}</strong><br>
{$ADDRESS1}<br>
{$ADDRESS2}<br>
{$ADDRESS3}<br>
{if $PHONE}
<abbr title="{intl l="Phone"}">P:</abbr> {$PHONE}<br>
{/if}
{if $CELLPHONE}
<abbr title="{intl l="cell phone"}">P:</abbr> {$CELLPHONE}
{/if}
</address>
</td>
<td>
<div class="btn-group">
<a class="btn btn-default btn-xs" title="{intl l='Edit this address'}" href="#edit_address_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-edit"></span>
</a>
<a class="btn btn-default btn-xs" title="{intl l='Edit this address'}" href="#edit_address_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-edit"></span>
</a>
<a class="btn btn-default btn-xs" title="{intl l='Use this address by default'}" href="#use_address_dialog" data-toggle="modal" rel="tooltip">
<span class="glyphicon glyphicon-pushpin"></span>
</a>
<a class="btn btn-default btn-xs" title="{intl l='Use this address by default'}" href="#use_address_dialog" data-toggle="modal" rel="tooltip">
<span class="glyphicon glyphicon-pushpin"></span>
</a>
<a class="btn btn-default btn-xs customer-delete" title="{intl l='Delete this customer and all his orders'}" href="#delete_address_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
<a class="btn btn-default btn-xs customer-delete" title="{intl l='Delete this customer and all his orders'}" href="#delete_address_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
</div>
</td>
</tr>
{/loop}
</tbody>
</table>
</div>
</td>
</tr>
{/loop}
</tbody>
</table>
</div>
</div>
</form>

View File

@@ -22,121 +22,123 @@
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<table class="table table-striped table-condensed" id="customer_list">
<caption>
{intl l="Customers list"}
<div class="table-responsive">
<table class="table table-striped table-condensed" id="customer_list">
<caption>
{intl l="Customers list"}
{module_include location='customer_list_caption'}
{module_include location='customer_list_caption'}
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.customers.create"}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new Customer'}" href="#add_customer_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.customers.create"}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new Customer'}" href="#add_customer_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
{ifloop rel="customer_list"}
<thead>
<tr>
<th class="object-title">
{intl l="customer ref"}
</th>
<th class="object-title">
{intl l="company"}
</th>
{module_include location='category_list_header'}
<th>
{intl l="firstname & lastname"}
</th>
<th>
{intl l="last order"}
</th>
<th>{intl l='order amount'}</th>
<th class="actions">{intl l='Actions'}</th>
</tr>
</thead>
<tbody>
{loop name="customer_list" type="customer" current="false" visible="*" last_order="1" backend_context="1" page={$customer_page} limit={$display_customer}}
{ifloop rel="customer_list"}
<thead>
<tr>
<td>{$REF}</td>
<th class="object-title">
{intl l="customer ref"}
</th>
<td>
{$COMPANY}
</td>
<th class="object-title">
{intl l="company"}
</th>
<td class="object-title">
{$FIRSTNAME} {$LASTNAME}
</td>
{module_include location='category_list_header'}
{module_include location='customer_list_row'}
<th>
{intl l="firstname & lastname"}
</th>
<td>
{format_date date=$LASTORDER_DATE}
</td>
<th>
{intl l="last order"}
</th>
<td>
{format_number number=$LASTORDER_AMOUNT}
</td>
<td>
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.customer.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this customer'}" href="{url path="/admin/customer/update/{$ID}" }"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
{loop type="auth" name="can_send_mail" roles="ADMIN" permissions="admin.customer.sendMail"}
<a class="btn btn-default btn-xs" title="{intl l="Send a mail to this customer"}" href="mailto:{$EMAIL}"><span class="glyphicon glyphicon-envelope"></span></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.customer.delete"}
<a class="btn btn-default btn-xs customer-delete" title="{intl l='Delete this customer and all his orders'}" href="#delete_customer_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
<th>{intl l='order amount'}</th>
<th class="actions">{intl l='Actions'}</th>
</tr>
{/loop}
</tbody>
<tfoot>
<tr>
<td colspan="6">
<div class="text-center">
<ul class="pagination pagination-centered">
{if $customer_page != 1}
<li><a href="{url path="/admin/customers" page="1"}">&laquo;</a></li>
{else}
<li class="disabled"><a href="#">&laquo;</a></li>
{/if}
</thead>
{pageloop rel="customer_list"}
{if $PAGE != $CURRENT}
<li><a href="{url path="/admin/customers" page="{$PAGE}"}">{$PAGE}</a></li>
<tbody>
{loop name="customer_list" type="customer" current="false" visible="*" last_order="1" backend_context="1" page={$customer_page} limit={$display_customer}}
<tr>
<td><a href="{url path="/admin/customer/update/{$ID}" }">{$REF}</a></td>
{else}
<li class="active"><a href="#">{$PAGE}</a></li>
{/if}
<td>
{$COMPANY}
</td>
<td class="object-title">
{$FIRSTNAME} {$LASTNAME}
</td>
{module_include location='customer_list_row'}
<td>
{format_date date=$LASTORDER_DATE}
</td>
<td>
{format_number number=$LASTORDER_AMOUNT}
</td>
<td>
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.customer.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this customer'}" href="{url path="/admin/customer/update/{$ID}" }"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
{loop type="auth" name="can_send_mail" roles="ADMIN" permissions="admin.customer.sendMail"}
<a class="btn btn-default btn-xs" title="{intl l="Send a mail to this customer"}" href="mailto:{$EMAIL}"><span class="glyphicon glyphicon-envelope"></span></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.customer.delete"}
<a class="btn btn-default btn-xs customer-delete" title="{intl l='Delete this customer and all his orders'}" href="#delete_customer_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
{/loop}
</tbody>
<tfoot>
<tr>
<td colspan="6">
<div class="text-center">
<ul class="pagination pagination-centered">
{if $customer_page != 1}
<li><a href="{url path="/admin/customers" page="1"}">&laquo;</a></li>
{else}
<li class="disabled"><a href="#">&laquo;</a></li>
{/if}
{pageloop rel="customer_list"}
{if $PAGE != $CURRENT}
<li><a href="{url path="/admin/customers" page="{$PAGE}"}">{$PAGE}</a></li>
{else}
<li class="active"><a href="#">{$PAGE}</a></li>
{/if}
{/pageloop}
{if $PAGE == $LAST && $LAST != $CURRENT}
<li><a href="{url path="/admin/customers" page="$PAGE"}">&raquo;</a></li>
{else}
<li class="disabled"><a href="#">&raquo;</a></li>
{/if}
</ul>
</div>
</td>
</tr>
</tfoot>
{/ifloop}
</table>
{/pageloop}
{if $PAGE == $LAST && $LAST != $CURRENT}
<li><a href="{url path="/admin/customers" page="$PAGE"}">&raquo;</a></li>
{else}
<li class="disabled"><a href="#">&raquo;</a></li>
{/if}
</ul>
</div>
</td>
</tr>
</tfoot>
{/ifloop}
</table>
</div>
</div>
</div>
</div>

View File

@@ -77,95 +77,97 @@
<div class="alert alert-info">
{intl l="Enter here all possible feature values."}
</div>
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<thead>
<tr>
<th>
{admin_sortable_header
current_order=$featureav_order
order='id'
reverse_order='id_reverse'
request_parameter_name='featureav_order'
path={url path='/admin/configuration/features/update' feature_id=$feature_id}
label="{intl l='ID'}"
}
</th>
<table class="table table-striped table-condensed table-left-aligned">
<thead>
<tr>
<th>
{admin_sortable_header
current_order=$featureav_order
order='id'
reverse_order='id_reverse'
request_parameter_name='featureav_order'
path={url path='/admin/configuration/features/update' feature_id=$feature_id}
label="{intl l='ID'}"
}
</th>
<th>
{admin_sortable_header
current_order=$featureav_order
order='alpha'
reverse_order='alpha_reverse'
request_parameter_name='featureav_order'
path={url path='/admin/configuration/features/update' feature_id=$feature_id}
label="{intl l='Value'}"
}
</th>
<th>
{admin_sortable_header
current_order=$featureav_order
order='alpha'
reverse_order='alpha_reverse'
request_parameter_name='featureav_order'
path={url path='/admin/configuration/features/update' feature_id=$feature_id}
label="{intl l='Value'}"
}
</th>
<th class="text-center">
{admin_sortable_header
current_order=$featureav_order
order='manual'
reverse_order='manual_reverse'
request_parameter_name='featureav_order'
path={url path='/admin/configuration/features/update' feature_id=$feature_id}
label="{intl l="Position"}"
}
</th>
<th class="text-center">
{admin_sortable_header
current_order=$featureav_order
order='manual'
reverse_order='manual_reverse'
request_parameter_name='featureav_order'
path={url path='/admin/configuration/features/update' feature_id=$feature_id}
label="{intl l="Position"}"
}
</th>
{module_include location='features_value_table_header'}
{module_include location='features_value_table_header'}
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
{loop name="list" type="feature_availability" feature=$feature_id backend_context="1" lang=$edit_language_id order=$featureav_order}
<tr>
<td>{$ID}</td>
<tbody>
{loop name="list" type="feature_availability" feature=$feature_id backend_context="1" lang=$edit_language_id order=$featureav_order}
<tr>
<td>{$ID}</td>
<td>
{* FIXME : integrate this in the encolsing form to provide standard form processing *}
<input class="js-edit form-control" type="text" name="feature_values[{$ID}]" value="{$TITLE}" />
</td>
<td>
{* FIXME : integrate this in the encolsing form to provide standard form processing *}
<input class="js-edit form-control" type="text" name="feature_values[{$ID}]" value="{$TITLE}" />
</td>
<td class="text-center">
{admin_position_block
permission="admin.features.edit"
path={url path='/admin/configuration/features-av/update-position' feature_id=$feature_id}
url_parameter="featureav_id"
in_place_edit_class="positionChange"
position="$POSITION"
id="$ID"
}
</td>
<td class="text-center">
{admin_position_block
permission="admin.features.edit"
path={url path='/admin/configuration/features-av/update-position' feature_id=$feature_id}
url_parameter="featureav_id"
in_place_edit_class="positionChange"
position="$POSITION"
id="$ID"
}
</td>
{module_include location='features_value_table_row'}
{module_include location='features_value_table_row'}
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.feature-av.delete"}
<a class="btn btn-default btn-xs value-delete" title="{intl l='Delete this value'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
{/loop}
</div>
</td>
</tr>
{/loop}
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.feature-av.delete"}
<a class="btn btn-default btn-xs value-delete" title="{intl l='Delete this value'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
{/loop}
</div>
</td>
</tr>
{/loop}
{elseloop rel="list"}
<tr>
<td colspan="4">
<div class="alert alert-info">
{intl l="No value has been created yet. Click the + button to create one."}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
{elseloop rel="list"}
<tr>
<td colspan="4">
<div class="alert alert-info">
{intl l="No value has been created yet. Click the + button to create one."}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
</div>
</div>
</form>
{/form}

View File

@@ -21,117 +21,119 @@
<div class="col-md-12">
<form action="#" method="post">
<div class="general-block-decorator">
<table class="table table-striped table-condensed table-left-aligned">
<caption>
{intl l='Thelia product features'}
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption>
{intl l='Thelia product features'}
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.features.create"}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new product feature'}" href="#creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
<thead>
<tr>
<th>
{admin_sortable_header
current_order=$order
order='id'
reverse_order='id_reverse'
path='/admin/configuration/features'
label="{intl l='ID'}"
}
</th>
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.features.create"}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new product feature'}" href="#creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
<thead>
<tr>
<th>
{admin_sortable_header
current_order=$order
order='id'
reverse_order='id_reverse'
path='/admin/configuration/features'
label="{intl l='ID'}"
}
</th>
<th>
{admin_sortable_header
current_order=$order
order='alpha'
reverse_order='alpha_reverse'
path='/admin/configuration/features'
label="{intl l='Title'}"
}
</th>
<th>
{admin_sortable_header
current_order=$order
order='alpha'
reverse_order='alpha_reverse'
path='/admin/configuration/features'
label="{intl l='Title'}"
}
</th>
<th class="text-center">
{admin_sortable_header
current_order=$order
order='manual'
reverse_order='manual_reverse'
path='/admin/configuration/features'
label="{intl l="Position"}"
}
</th>
<th class="text-center">
{admin_sortable_header
current_order=$order
order='manual'
reverse_order='manual_reverse'
path='/admin/configuration/features'
label="{intl l="Position"}"
}
</th>
{module_include location='features_table_header'}
{module_include location='features_table_header'}
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
{loop name="list" type="feature" backend_context="1" lang=$lang_id order=$order}
<tr>
<td>{$ID}</td>
<tbody>
{loop name="list" type="feature" backend_context="1" lang=$lang_id order=$order}
<tr>
<td>{$ID}</td>
<td>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.features.change"}
<a title="{intl l='Change this feature'}" href="{url path='/admin/configuration/features/update' feature_id=$ID}">{$TITLE}</a>
{/loop}
{elseloop rel="can_change"}
{$TITLE}
{/elseloop}
</td>
<td>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.features.change"}
<a title="{intl l='Change this feature'}" href="{url path='/admin/configuration/features/update' feature_id=$ID}">{$TITLE}</a>
{/loop}
{elseloop rel="can_change"}
{$TITLE}
{/elseloop}
</td>
<td class="text-center">
{admin_position_block
permission="admin.features.edit"
path="/admin/configuration/features/update-position"
url_parameter="feature_id"
in_place_edit_class="positionChange"
position="$POSITION"
id="$ID"
}
</td>
<td class="text-center">
{admin_position_block
permission="admin.features.edit"
path="/admin/configuration/features/update-position"
url_parameter="feature_id"
in_place_edit_class="positionChange"
position="$POSITION"
id="$ID"
}
</td>
{module_include location='features_table_row'}
{module_include location='features_table_row'}
<td class="actions">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.features.change"}
<div class="btn-group">
<a class="btn btn-default btn-xs feature-remove-from-all" title="{intl l='Remove this feature from all product templates'}" href="#remove_from_all_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-minus"></span>
</a>
<a class="btn btn-default btn-xs feature-add-to-all" title="{intl l='Add this feature to all product templates'}" href="#add_to_all_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-plus"></span>
</a>
</div>
{/loop}
<td class="actions">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.features.change"}
<div class="btn-group">
<a class="btn btn-default btn-xs feature-remove-from-all" title="{intl l='Remove this feature from all product templates'}" href="#remove_from_all_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-minus"></span>
</a>
<a class="btn btn-default btn-xs feature-add-to-all" title="{intl l='Add this feature to all product templates'}" href="#add_to_all_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-plus"></span>
</a>
</div>
{/loop}
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.features.change"}
<a class="btn btn-default btn-xs feature-change" title="{intl l='Change this product feature'}" href="{url path='/admin/configuration/features/update' feature_id=$ID}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.features.change"}
<a class="btn btn-default btn-xs feature-change" title="{intl l='Change this product feature'}" href="{url path='/admin/configuration/features/update' feature_id=$ID}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.features.delete"}
<a class="btn btn-default btn-xs feature-delete" title="{intl l='Delete this product feature'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
{/loop}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.features.delete"}
<a class="btn btn-default btn-xs feature-delete" title="{intl l='Delete this product feature'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
{/loop}
{elseloop rel="list"}
<tr>
<td colspan="4">
<div class="alert alert-info">
{intl l="No product feature has been created yet. Click the + button to create one."}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
{elseloop rel="list"}
<tr>
<td colspan="4">
<div class="alert alert-info">
{intl l="No product feature has been created yet. Click the + button to create one."}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
</div>
</div>
</form>
</div>

View File

@@ -15,163 +15,172 @@
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<table class="table table-striped table-condensed" id="folder_list">
<caption>
{* display parent folder name, and get current folder ID *}
{loop name="folder_title" type="folder" visible="*" id=$folder_id}
{intl l="Folders in %fold" fold=$TITLE}
{$fold_id = $ID}
{/loop}
{elseloop rel="folder_title"}
{intl l="Top level folders"}
{/elseloop}
{module_include location='folder_list_caption'}
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.folders.create"}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new folder'}" href="#folder_creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
{ifloop rel="folder_list"}
<thead>
<tr>
<th class="object-title">
{admin_sortable_header
current_order=$folder_order
order='id'
reverse_order='id_reverse'
path={url path='/admin/folders' folder_id=$folder_id}
request_parameter_name='folder_order'
label="{intl l='ID'}"
}
</th>
<th class="object-image">&nbsp;</th>
<th class="object-title">
{admin_sortable_header
current_order=$folder_order
order='alpha'
reverse_order='alpha_reverse'
path={url path='/admin/folders' folder_id=$folder_id}
request_parameter_name='folder_order'
label="{intl l='Folder title'}"
}
</th>
{module_include location='folder_list_header'}
<th>
{admin_sortable_header
current_order=$folder_order
order='visible'
reverse_order='visible_reverse'
path={url path='/admin/folders' folder_id=$folder_id}
request_parameter_name='folder_order'
label="{intl l='Online'}"
}
</th>
<th>
{admin_sortable_header
current_order=$folder_order
order='manual'
reverse_order='manual_reverse'
path={url path='/admin/folders' folder_id=$folder_id}
request_parameter_name='folder_order'
label="{intl l='Position'}"
}
</th>
<th class="actions">{intl l='Actions'}</th>
</tr>
</thead>
<tbody>
{loop name="folder_list" type="folder" visible="*" parent=$folder_id order=$folder_order backend_context="1" lang=$lang_id}
<tr>
<td>{$ID}</td>
<td>
{loop type="image" name="folder_image" source="folder" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"}
<a href="{url path='admin/folders' folder_id=$ID}" title="{intl l='Browse this folder'}"><img class="img-thumbnail" src="{$IMAGE_URL}" alt="{$TITLE}" /></a>
<div class="general-block-decorator">
<div class="table-responsive">
<table class="table table-striped table-condensed" id="folder_list">
<caption>
{* display parent folder name, and get current folder ID *}
{loop name="folder_title" type="folder" visible="*" id=$folder_id}
{intl l="Folders in %fold" fold=$TITLE}
{$fold_id = $ID}
{/loop}
</td>
{elseloop rel="folder_title"}
{intl l="Top level folders"}
{/elseloop}
<td class="object-title">
<a href="{url path='admin/folders' folder_id=$ID}" title="{intl l='Browse this folder'}">
{$TITLE}
</a>
</td>
{module_include location='folder_list_caption'}
{module_include location='folder_list_row'}
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.folders.create"}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new folder'}" href="#folder_creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
<td>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.folders.edit"}
<div class="make-switch switch-small folderVisibleToggle" data-id="{$ID}" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input type="checkbox" class="folderVisibleToggle" {if $VISIBLE == 1}checked="checked"{/if}>
</div>
{ifloop rel="folder_list"}
<thead>
<tr>
<th class="object-title">
{admin_sortable_header
current_order=$folder_order
order='id'
reverse_order='id_reverse'
path={url path='/admin/folders' folder_id=$folder_id}
request_parameter_name='folder_order'
label="{intl l='ID'}"
}
</th>
<th class="object-image">&nbsp;</th>
<th class="object-title">
{admin_sortable_header
current_order=$folder_order
order='alpha'
reverse_order='alpha_reverse'
path={url path='/admin/folders' folder_id=$folder_id}
request_parameter_name='folder_order'
label="{intl l='Folder title'}"
}
</th>
{module_include location='folder_list_header'}
<th>
{admin_sortable_header
current_order=$folder_order
order='visible'
reverse_order='visible_reverse'
path={url path='/admin/folders' folder_id=$folder_id}
request_parameter_name='folder_order'
label="{intl l='Online'}"
}
</th>
<th>
{admin_sortable_header
current_order=$folder_order
order='manual'
reverse_order='manual_reverse'
path={url path='/admin/folders' folder_id=$folder_id}
request_parameter_name='folder_order'
label="{intl l='Position'}"
}
</th>
<th class="actions">{intl l='Actions'}</th>
</tr>
</thead>
<tbody>
{loop name="folder_list" type="folder" visible="*" parent=$folder_id order=$folder_order backend_context="1" lang=$lang_id}
<tr>
<td>{$ID}</td>
<td>
{loop type="image" name="folder_image" source="folder" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"}
<a href="{url path='admin/folders' folder_id=$ID}" title="{intl l='Browse this folder'}"><img class="img-thumbnail" src="{$IMAGE_URL}" alt="{$TITLE}" /></a>
{/loop}
</td>
{elseloop rel="can_change"}
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input type="checkbox" class="disabled" disabled="disabled" {if $VISIBLE == 1}checked="checked"{/if}>
</div>
{/elseloop}
</td>
<td>
{admin_position_block
permission="admin.folders.edit"
path={url path='admin/folders/update-position' folder_id=$ID}
url_parameter="folder_id"
in_place_edit_class="folderPositionChange"
position=$POSITION
id=$ID
}
</td>
<td class="object-title">
<a href="{url path='admin/folders' folder_id=$ID}" title="{intl l='Browse this folder'}">
{$TITLE}
</a>
</td>
<td class="actions">
<div class="btn-group">
<a class="btn btn-default btn-xs" title="{intl l='Browse this folder'}" href="{url path='admin/folders' folder_id=$ID}"><i class="glyphicon glyphicon-folder-open"></i></a>
{module_include location='folder_list_row'}
<td>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.folders.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this folder'}" href="{url path='/admin/folders/update' folder_id=$ID}"><i class="glyphicon glyphicon-edit"></i></a>
<div class="make-switch switch-small folderVisibleToggle" data-id="{$ID}" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input type="checkbox" class="folderVisibleToggle" {if $VISIBLE == 1}checked="checked"{/if}>
</div>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.folders.delete"}
<a class="btn btn-default btn-xs folder-delete" title="{intl l='Delete this folder and all its contents'}" href="#folder_delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
{elseloop rel="can_change"}
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
<input type="checkbox" class="disabled" disabled="disabled" {if $VISIBLE == 1}checked="checked"{/if}>
</div>
{/elseloop}
</td>
<td>
{admin_position_block
permission="admin.folders.edit"
path={url path='admin/folders/update-position' folder_id=$ID}
url_parameter="folder_id"
in_place_edit_class="folderPositionChange"
position=$POSITION
id=$ID
}
</td>
<td class="actions">
<div class="btn-group">
<a class="btn btn-default btn-xs" title="{intl l='Browse this folder'}" href="{url path='admin/folders' folder_id=$ID}"><i class="glyphicon glyphicon-folder-open"></i></a>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.folders.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this folder'}" href="{url path='/admin/folders/update' folder_id=$ID}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.folders.delete"}
<a class="btn btn-default btn-xs folder-delete" title="{intl l='Delete this folder and all its contents'}" href="#folder_delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
{/loop}
</div>
</td>
</tr>
{/loop}
</tbody>
{/ifloop}
{elseloop rel="folder_list"}
<thead>
<tr>
<td class="message">
<div class="alert alert-info">
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.folders.create"}
{intl l="This folder has no sub-folders. To create a new one, click the + button above."}
{/loop}
</div>
</td>
</tr>
{/loop}
</tbody>
{/ifloop}
{elseloop rel="folder_list"}
<thead>
<tr>
<td class="message">
<div class="alert alert-info">
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.folders.create"}
{intl l="This folder has no sub-folders. To create a new one, click the + button above."}
{/loop}
{elseloop rel="can_create"}
{intl l="This folder has no sub-folders."}
{/elseloop}
</div>
</td>
</tr>
</thead>
{/elseloop}
</table>
{elseloop rel="can_create"}
{intl l="This folder has no sub-folders."}
{/elseloop}
</div>
</td>
</tr>
</thead>
{/elseloop}
</table>
</div>
</div>
</div>
</div>
@@ -181,7 +190,7 @@
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<div class="table-responsive">
<table class="table table-striped table-condensed">
<caption>
{* display parent folder name *}
@@ -314,7 +323,7 @@
</thead>
{/elseloop}
</table>
</div>
</div>
</div>

View File

@@ -21,8 +21,8 @@
<div class="text-center clearfix">
<div class="btn-group">
<button type="button" class="btn btn-default active" data-toggle="jqplot" data-target="turnover"><span class="glyphicon glyphicon-euro"></span> {intl l="Turnover"}</button>
<button type="button" class="btn btn-primary" data-toggle="jqplot" data-target="registration"><span class="glyphicon glyphicon-user"></span> {intl l="Registrations"}</button>
<button type="button" class="btn btn-default active" data-toggle="jqplot" data-target="sales"><span class="glyphicon glyphicon-euro"></span> {intl l="Sales"}</button>
<button type="button" class="btn btn-primary" data-toggle="jqplot" data-target="registration"><span class="glyphicon glyphicon-user"></span> {intl l="New customers"}</button>
<button type="button" class="btn btn-success" data-toggle="jqplot" data-target="orders"><span class="glyphicon glyphicon-shopping-cart"></span> {intl l="Orders"}</button>
<button type="button" class="btn btn-info" data-toggle="jqplot" data-target="first-orders"><span class="glyphicon glyphicon-thumbs-up"></span> {intl l="First orders"}</button>
<button type="button" class="btn btn-danger" data-toggle="jqplot" data-target="aborted-orders"><span class="glyphicon glyphicon-thumbs-down"></span> {intl l="Aborted orders"}</button>
@@ -34,7 +34,7 @@
<div class="jqplot-content">
<div id="jqplot"></div>
<div id="turnover" data-toggle="jqplot-serie" class="active"></div>
<div id="sales" data-toggle="jqplot-serie" class="active"></div>
<div id="registration" data-toggle="jqplot-serie"></div>
<div id="orders" data-toggle="jqplot-serie"></div>
<div id="first-orders" data-toggle="jqplot-serie"></div>
@@ -47,51 +47,53 @@
<div class="row">
<div class="col-md-4">
<div class="general-block-decorator">
<div class="title title-without-tabs">{intl l="Informations site"}</div>
<table class="table table-striped">
<tbody>
<tr>
<th>{intl l="Customers"}</th>
<td>1</td>
</tr>
<tr>
<th>{intl l="Sections"}</th>
<td>8</td>
</tr>
<tr>
<th>{intl l="Products"}</th>
<td>43</td>
</tr>
<tr>
<th>{intl l="Products online"}</th>
<td>43</td>
</tr>
<tr>
<th>{intl l="Products offline"}</th>
<td>0</td>
</tr>
<tr>
<th>{intl l="Orders"}</th>
<td>1</td>
</tr>
<tr>
<th>{intl l="Orders pending"}</th>
<td>1</td>
</tr>
<tr>
<th>{intl l="Orders treatment"}</th>
<td>0</td>
</tr>
<tr>
<th>{intl l="Shipped orders"}</th>
<td>0</td>
</tr>
<tr>
<th>{intl l="Canceled orders"}</th>
<td>0</td>
</tr>
</tbody>
</table>
<div class="title title-without-tabs">{intl l="Shop Informations"}</div>
<div class="table-responsive">
<table class="table table-striped">
<tbody>
<tr>
<th>{intl l="Customers"}</th>
<td>1</td>
</tr>
<tr>
<th>{intl l="Categories"}</th>
<td>8</td>
</tr>
<tr>
<th>{intl l="Products"}</th>
<td>43</td>
</tr>
<tr>
<th>{intl l="Online products"}</th>
<td>43</td>
</tr>
<tr>
<th>{intl l="Offline products"}</th>
<td>0</td>
</tr>
<tr>
<th>{intl l="Orders"}</th>
<td>1</td>
</tr>
<tr>
<th>{intl l="Pending orders"}</th>
<td>1</td>
</tr>
<tr>
<th>{intl l="In process orderst"}</th>
<td>0</td>
</tr>
<tr>
<th>{intl l="Shipped orders"}</th>
<td>0</td>
</tr>
<tr>
<th>{intl l="Canceled orders"}</th>
<td>0</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
@@ -107,106 +109,112 @@
<div class="tab-content">
<div class="tab-pane fade active in" id="statjour">
<table class="table table-striped">
<tbody>
<tr>
<th>{intl l="C. A. TTC"}</th>
<td>2000.00 €</td>
</tr>
<tr>
<th>{intl l="C. A. TTC hors frais de port"}</th>
<td>2500.00 €</td>
</tr>
<tr>
<th>{intl l="C. A. TTC précédent"}</th>
<td>1700.00 €</td>
</tr>
<tr>
<th>{intl l="Commandes en instance"}</th>
<td>4</td>
</tr>
<tr>
<th>{intl l="Commandes en traitement"}</th>
<td>52</td>
</tr>
<tr>
<th>{intl l="Commandes annulées"}</th>
<td>3</td>
</tr>
<tr>
<th>{intl l="Panier moyen TTC"}</th>
<td>25.00 €</td>
</tr>
</tbody>
</table>
<div class="table-responsive">
<table class="table table-striped">
<tbody>
<tr>
<th>{intl l="Overall sales"}</th>
<td>2500.00 €</td>
</tr>
<tr>
<th>{intl l="Sales excluding shipping"}</th>
<td>2000.00 €</td>
</tr>
<tr>
<th>{intl l="Yesterday sales"}</th>
<td>1700.00 €</td>
</tr>
<tr>
<th>{intl l="Waiting orders"}</th>
<td>4</td>
</tr>
<tr>
<th>{intl l="In process orders"}</th>
<td>52</td>
</tr>
<tr>
<th>{intl l="Canceled orders"}</th>
<td>3</td>
</tr>
<tr>
<th>{intl l="Average cart"}</th>
<td>25.00 €</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="tab-pane fade" id="statmois">
<table class="table table-striped">
<tbody>
<tr>
<th>{intl l="C. A. TTC"}</th>
<td>2000.00 €</td>
</tr>
<tr>
<th>{intl l="C. A. TTC hors frais de port"}</th>
<td>2500.00 €</td>
</tr>
<tr>
<th>{intl l="C. A. TTC précédent"}</th>
<td>1700.00 €</td>
</tr>
<tr>
<th>{intl l="Commandes en instance"}</th>
<td>4</td>
</tr>
<tr>
<th>{intl l="Commandes en traitement"}</th>
<td>52</td>
</tr>
<tr>
<th>{intl l="Commandes annulées"}</th>
<td>3</td>
</tr>
<tr>
<th>{intl l="Panier moyen TTC"}</th>
<td>25.00 €</td>
</tr>
</tbody>
</table>
<div class="table-responsive">
<table class="table table-striped">
<tbody>
<tr>
<th>{intl l="Overall sales"}</th>
<td>2500.00 €</td>
</tr>
<tr>
<th>{intl l="Sales excluding shipping"}</th>
<td>2000.00 €</td>
</tr>
<tr>
<th>{intl l="Previous month sales"}</th>
<td>1700.00 €</td>
</tr>
<tr>
<th>{intl l="Waiting orders"}</th>
<td>4</td>
</tr>
<tr>
<th>{intl l="In process orders"}</th>
<td>52</td>
</tr>
<tr>
<th>{intl l="Canceled orders"}</th>
<td>3</td>
</tr>
<tr>
<th>{intl l="Average cart"}</th>
<td>25.00 €</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="tab-pane fade" id="statannee">
<table class="table table-striped">
<tbody>
<tr>
<th>{intl l="C. A. TTC"}</th>
<td>2000.00 €</td>
</tr>
<tr>
<th>{intl l="C. A. TTC hors frais de port"}</th>
<td>2500.00 €</td>
</tr>
<tr>
<th>{intl l="C. A. TTC précédent"}</th>
<td>1700.00 €</td>
</tr>
<tr>
<th>{intl l="Commandes en instance"}</th>
<td>4</td>
</tr>
<tr>
<th>{intl l="Commandes en traitement"}</th>
<td>52</td>
</tr>
<tr>
<th>{intl l="Commandes annulées"}</th>
<td>3</td>
</tr>
<tr>
<th>{intl l="Panier moyen TTC"}</th>
<td>25.00 €</td>
</tr>
</tbody>
</table>
<div class="table-responsive">
<table class="table table-striped">
<tbody>
<tr>
<th>{intl l="Overall sales"}</th>
<td>2500.00 €</td>
</tr>
<tr>
<th>{intl l="Sales excluding shipping"}</th>
<td>2000.00 €</td>
</tr>
<tr>
<th>{intl l="Previous year sales"}</th>
<td>1700.00 €</td>
</tr>
<tr>
<th>{intl l="Waiting orders"}</th>
<td>4</td>
</tr>
<tr>
<th>{intl l="In process orders"}</th>
<td>52</td>
</tr>
<tr>
<th>{intl l="Canceled orders"}</th>
<td>3</td>
</tr>
<tr>
<th>{intl l="Average cart"}</th>
<td>25.00 €</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
@@ -215,22 +223,24 @@
<div class="col-md-4">
<div class="general-block-decorator">
<div class="title title-without-tabs">{intl l="Thelia informations"}</div>
<table class="table table-striped">
<div class="table-responsive">
<table class="table table-striped">
<tbody>
<tr>
<th>{intl l="Current version"}</th>
<td>V2.0.0-beta</td>
</tr>
<tr>
<th>{intl l="Latest version available"}</th>
<td><a href="">V1.5.4.2</a></td>
</tr>
<tr>
<th>{intl l="News"}</th>
<td><a href="" target="_blank">{intl l="Click here"}</a></td>
</tr>
</tbody>
</table>
<tr>
<th>{intl l="Current version"}</th>
<td>V2.0.0-beta</td>
</tr>
<tr>
<th>{intl l="Latest version available"}</th>
<td><a href="">V1.5.4.2</a></td>
</tr>
<tr>
<th>{intl l="News"}</th>
<td><a href="" target="_blank">{intl l="Click here"}</a></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>

View File

@@ -2,11 +2,11 @@
<ul class="breadcrumb">
<li><a href="{url path='admin/home'}">Home</a></li>
<li><a href="{url path='admin/catalog'}">Catalog</a>
<li><a href="{url path='admin/catalog'}">Catalog</a></li>
{ifloop rel="category_path"}</li>
{ifloop rel="category_path"}
{loop name="category_path" type="category-path" visible="*" category=$category_id}
{if $ID == $category_id}
{if $ID == $category_id && $editing_product == false}
<li class="active">
{if $editing_category == true}
{intl l='Editing %cat' cat="{$TITLE}"}
@@ -20,7 +20,9 @@
{/loop}
{/ifloop}
{elseloop rel="category_path"}
</li>
{/elseloop}
{if $editing_product == true}
{loop name="product_path" type="product" visible="*" id=$product_id}
<li>{intl l="Editing %title" title="$TITLE"}</li>
{/loop}
{/if}
</ul>

View File

@@ -21,76 +21,78 @@
<div class="col-md-12">
<form action="{url path='/admin/configuration/messages/update-values'}" method="post">
<div class="general-block-decorator">
<table class="table table-striped table-condensed table-left-aligned">
<caption>
{intl l='Thelia mailing templates'}
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.messages.create"}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new mailing template'}" href="#creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption>
{intl l='Thelia mailing templates'}
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.messages.create"}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new mailing template'}" href="#creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
<thead>
<tr>
<th>{intl l="Purpose"}</th>
<th>{intl l="Name"}</th>
</caption>
<thead>
<tr>
<th>{intl l="Purpose"}</th>
<th>{intl l="Name"}</th>
{module_include location='messages_table_header'}
{module_include location='messages_table_header'}
<th>&nbsp;</th>
</tr>
</thead>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
{loop name="mailing-templates" type="message" secured="*" backend_context="1" lang="$lang_id"}
<tr>
<tbody>
{loop name="mailing-templates" type="message" secured="*" backend_context="1" lang="$lang_id"}
<tr>
<td>{$TITLE}</td>
<td>{$TITLE}</td>
<td>
{if ! $SECURED}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.messages.change"}
<a title="{intl l='Change this mailing template'}" href="{url path='/admin/configuration/messages/update' message_id="$ID"}">{$NAME}</a>
{/loop}
{elseloop rel="can_change"}
<td>
{if ! $SECURED}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.messages.change"}
<a title="{intl l='Change this mailing template'}" href="{url path='/admin/configuration/messages/update' message_id="$ID"}">{$NAME}</a>
{/loop}
{elseloop rel="can_change"}
{$NAME}
{/elseloop}
{else}
{$NAME}
{/elseloop}
{else}
{$NAME}
{/if}
</td>
{/if}
</td>
{module_include location='messages_table_row'}
{module_include location='messages_table_row'}
<td class="actions">
{if ! $SECURED}
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.messages.change"}
<a class="btn btn-default btn-xs message-change" title="{intl l='Change this mailing template'}" href="{url path='/admin/configuration/messages/update' message_id="$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
<td class="actions">
{if ! $SECURED}
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.messages.change"}
<a class="btn btn-default btn-xs message-change" title="{intl l='Change this mailing template'}" href="{url path='/admin/configuration/messages/update' message_id="$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.messages.delete"}
<a class="btn btn-default btn-xs message-delete" title="{intl l='Delete this mailing template'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
{/loop}
</div>
{else}
<i title="{intl l='This mailing template could not be changed.'}" class="glyphicon glyphicon-ban-circle"></i>
{/if}
</td>
</tr>
{/loop}
{elseloop rel="mailing-templates"}
<tr>
<td colspan="3">
<div class="alert alert-info">
{intl l="No mailing template has been created yet. Click the + button to create one."}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.messages.delete"}
<a class="btn btn-default btn-xs message-delete" title="{intl l='Delete this mailing template'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
{/loop}
</div>
{else}
<i title="{intl l='This mailing template could not be changed.'}" class="glyphicon glyphicon-ban-circle"></i>
{/if}
</td>
</tr>
{/loop}
{elseloop rel="mailing-templates"}
<tr>
<td colspan="3">
<div class="alert alert-info">
{intl l="No mailing template has been created yet. Click the + button to create one."}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
</div>
</div>
</form>
</div>

View File

@@ -0,0 +1,276 @@
{extends file="admin-layout.tpl"}
{block name="page-title"}{intl l='Modules'}{/block}
{block name="check-permissions"}admin.modules.view{/block}
{block name="main-content"}
<div class="modules">
<div id="wrapper" class="container">
<div class="clearfix">
<ul class="breadcrumb pull-left">
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
<li><a href="{url path='/admin/modules'}">{intl l="Modules"}</a></li>
</ul>
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.modules.install"}
<a class="btn btn-default btn-primary pull-right" title="{intl l='Install a new module'}" href="#install_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-import"></span> {intl l="Install a new module"}
</a>
{/loop}
</div>
{module_include location='modules_top'}
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Transport modules'}
</caption>
<thead>
<tr>
<th>{intl l="Name"}</th>
<th>{intl l="Description"}</th>
<th>{intl l="Enable/Disable"}</th>
{module_include location='modules_table_header'}
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="">Tinymce</a></td>
<td>Eos minima maiores doloribus mollitia perspiciatis esse iusto odit error delectus aliquid! Eius, pariatur accusantium odit quidem laboriosam.</td>
<td>
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok-circle'></i>" data-off-label="<i class='glyphicon glyphicon-remove-circle'></i>">
<input type="checkbox" checked>
</div>
</td>
{module_include location='modules_table_row'}
<td>
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"}
<a class="btn btn-default btn-xs" title="{intl l='Read the documentation of this module'}" href="{url path="/admin/module/documentation/$ID"}"><span class="glyphicon glyphicon-book"></span></a>
{/loop}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this module'}" href="{url path="/admin/module/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"}
<a class="btn btn-default btn-xs" title="{intl l='Delete this module'}" href="#delete_module_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
<tr>
<td><a href="">So colissimo</a></td>
<td>Eos minima maiores doloribus mollitia perspiciatis esse iusto odit error delectus aliquid</td>
<td>
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok-circle'></i>" data-off-label="<i class='glyphicon glyphicon-remove-circle'></i>">
<input type="checkbox">
</div>
</td>
{module_include location='modules_table_row'}
<td>
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"}
<a class="btn btn-default btn-xs" title="{intl l='Read the documentation of this module'}" href="{url path="/admin/module/documentation/$ID"}"><span class="glyphicon glyphicon-book"></span></a>
{/loop}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this module'}" href="{url path="/admin/module/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"}
<a class="btn btn-default btn-xs" title="{intl l='Delete this module'}" href="#delete_module_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
<tr>
<td><a href="">Title meta</a></td>
<td>Eos minima maiores doloribus mollitia perspiciatis esse iusto odit error delectus aliquid</td>
<td>
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok-circle'></i>" data-off-label="<i class='glyphicon glyphicon-remove-circle'></i>">
<input type="checkbox">
</div>
</td>
{module_include location='modules_table_row'}
<td>
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"}
<a class="btn btn-default btn-xs" title="{intl l='Read the documentation of this module'}" href="{url path="/admin/module/documentation/$ID"}"><span class="glyphicon glyphicon-book"></span></a>
{/loop}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this module'}" href="{url path="/admin/module/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"}
<a class="btn btn-default btn-xs" title="{intl l='Delete this module'}" href="#delete_module_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="general-block-decorator">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Delivery modules'}
</caption>
<thead>
<tr>
<th>{intl l="Name"}</th>
<th>{intl l="Description"}</th>
<th>{intl l="Enable/Disable"}</th>
{module_include location='modules_table_header'}
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="">Tinymce</a></td>
<td>Eos minima maiores doloribus mollitia perspiciatis esse iusto odit error delectus aliquid! Eius, pariatur accusantium odit quidem laboriosam.</td>
<td>
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok-circle'></i>" data-off-label="<i class='glyphicon glyphicon-remove-circle'></i>">
<input type="checkbox" checked>
</div>
</td>
{module_include location='modules_table_row'}
<td>
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"}
<a class="btn btn-default btn-xs" title="{intl l='Read the documentation of this module'}" href="{url path="/admin/module/documentation/$ID"}"><span class="glyphicon glyphicon-book"></span></a>
{/loop}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this module'}" href="{url path="/admin/module/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"}
<a class="btn btn-default btn-xs" title="{intl l='Delete this module'}" href="#delete_module_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
<tr>
<td><a href="">So colissimo</a></td>
<td>Eos minima maiores doloribus mollitia perspiciatis esse iusto odit error delectus aliquid</td>
<td>
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok-circle'></i>" data-off-label="<i class='glyphicon glyphicon-remove-circle'></i>">
<input type="checkbox">
</div>
</td>
{module_include location='modules_table_row'}
<td>
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"}
<a class="btn btn-default btn-xs" title="{intl l='Read the documentation of this module'}" href="{url path="/admin/module/documentation/$ID"}"><span class="glyphicon glyphicon-book"></span></a>
{/loop}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this module'}" href="{url path="/admin/module/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"}
<a class="btn btn-default btn-xs" title="{intl l='Delete this module'}" href="#delete_module_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
<tr>
<td><a href="">Title meta</a></td>
<td>Eos minima maiores doloribus mollitia perspiciatis esse iusto odit error delectus aliquid</td>
<td>
<div class="make-switch switch-small" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok-circle'></i>" data-off-label="<i class='glyphicon glyphicon-remove-circle'></i>">
<input type="checkbox">
</div>
</td>
{module_include location='modules_table_row'}
<td>
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.documentation"}
<a class="btn btn-default btn-xs" title="{intl l='Read the documentation of this module'}" href="{url path="/admin/module/documentation/$ID"}"><span class="glyphicon glyphicon-book"></span></a>
{/loop}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.modules.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this module'}" href="{url path="/admin/module/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.modules.delete"}
<a class="btn btn-default btn-xs" title="{intl l='Delete this module'}" href="#delete_module_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
{module_include location='modules_bottom'}
</div>
</div>
{* Delete module confirmation dialog *}
{capture "delete_module_dialog"}
<input type="hidden" name="current_module_id" value="{$current_module_id}" />
<input type="hidden" name="module_id" id="delete_module_id" value"" />
{/capture}
{include
file = "includes/generic-confirm-dialog.html"
dialog_id = "delete_module_dialog"
dialog_title = {intl l="Delete a module"}
dialog_message = {intl l="Do you really want to delete this module ?"}
form_action = {url path='/admin/modules/delete'}
form_content = {$smarty.capture.delete_module_dialog nofilter}
}
{/block}
{block name="javascript-initialization"}
{javascripts file='assets/js/bootstrap-switch/bootstrap-switch.js'}
<script src="{$asset_url}"></script>
{/javascripts}
{/block}

View File

@@ -30,71 +30,75 @@
<div class="tab-content">
<div class="tab-pane fade active in" id="cart">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Information about order 01201303540354'}
</caption>
<thead>
<tr>
<th>{intl l="Designation"}</th>
<th>{intl l="Price"}</th>
<th>{intl l="Quantity"}</th>
<th>{intl l="Total"}</th>
</tr>
</thead>
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Information about order 01201303540354'}
</caption>
<thead>
<tr>
<th>{intl l="Designation"}</th>
<th>{intl l="Price"}</th>
<th>{intl l="Quantity"}</th>
<th>{intl l="Total"}</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="#">T-Shirt F T1</a></td>
<td>20.00 &euro;</td>
<td>3</td>
<td>60.00 &euro;</td>
</tr>
<tr>
<td><a href="#">T-Shirt F T1</a></td>
<td>20.00 &euro;</td>
<td>3</td>
<td>60.00 &euro;</td>
</tr>
<tr>
<td><a href="#">T-Shirt F T1</a></td>
<td>20.00 &euro;</td>
<td>3</td>
<td>60.00 &euro;</td>
</tr>
</tbody>
<tfoot>
<tr class="active">
<td colspan="3"><strong>Total</strong></td>
<td><strong>180.00 &euro;</strong></td>
</tr>
</tfoot>
</table>
<tbody>
<tr>
<td><a href="#">T-Shirt F T1</a></td>
<td>20.00 &euro;</td>
<td>3</td>
<td>60.00 &euro;</td>
</tr>
<tr>
<td><a href="#">T-Shirt F T1</a></td>
<td>20.00 &euro;</td>
<td>3</td>
<td>60.00 &euro;</td>
</tr>
<tr>
<td><a href="#">T-Shirt F T1</a></td>
<td>20.00 &euro;</td>
<td>3</td>
<td>60.00 &euro;</td>
</tr>
</tbody>
<tfoot>
<tr class="active">
<td colspan="3"><strong>Total</strong></td>
<td><strong>180.00 &euro;</strong></td>
</tr>
</tfoot>
</table>
</div>
</div> <!-- #cart -->
<div class="tab-pane fade" id="bill">
<table class="table table-striped table-condensed table-left-aligned">
<caption>
{intl l='Information about the bill'}
</caption>
<thead>
<tr>
<th>{intl l="Bill n°"}</th>
<th>{intl l="Compagny"}</th>
<th>{intl l="Firstname & Lastname"}</th>
<th>{intl l="Date & Hour"}</th>
</tr>
</thead>
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption>
{intl l='Information about the bill'}
</caption>
<thead>
<tr>
<th>{intl l="Bill n°"}</th>
<th>{intl l="Compagny"}</th>
<th>{intl l="Firstname & Lastname"}</th>
<th>{intl l="Date & Hour"}</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="#">0001</a></td>
<td>Thelia</td>
<td>Dupont Jean</td>
<td>11/01/2013 14:11:00</td>
</tr>
</tbody>
</table>
<tbody>
<tr>
<td><a href="#">0001</a></td>
<td>Thelia</td>
<td>Dupont Jean</td>
<td>11/01/2013 14:11:00</td>
</tr>
</tbody>
</table>
</div>
</div> <!-- #bill -->
<div class="tab-pane fade" id="carriage">
@@ -116,214 +120,219 @@
</div> <!-- #carriage -->
<div class="tab-pane fade" id="settlement">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Information about the settlement'}
</caption>
<tbody>
<tr>
<th>{intl l="Type of payment"}</th>
<td>Unknown</td>
</tr>
<tr>
<th>{intl l="Transaction reference"}</th>
<td>141100</td>
</tr>
<tr>
<th>{intl l="Total order before discount"}</th>
<td>60 &euro;</td>
</tr>
<tr>
<th>{intl l="Discount"}</th>
<td>10%</td>
</tr>
<tr>
<th>{intl l="Coupon code"}</th>
<td></td>
</tr>
<tr>
<th>{intl l="Total with discount"}</th>
<td>50 &euro;</td>
</tr>
<tr>
<th>{intl l="Freight"}</th>
<td>6 &euro;</td>
</tr>
<tr>
<th>{intl l="Total"}</th>
<td>56 &euro;</td>
</tr>
</tbody>
</table>
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Information about the settlement'}
</caption>
<tbody>
<tr>
<th>{intl l="Type of payment"}</th>
<td>Unknown</td>
</tr>
<tr>
<th>{intl l="Transaction reference"}</th>
<td>141100</td>
</tr>
<tr>
<th>{intl l="Total order before discount"}</th>
<td>60 &euro;</td>
</tr>
<tr>
<th>{intl l="Discount"}</th>
<td>10%</td>
</tr>
<tr>
<th>{intl l="Coupon code"}</th>
<td></td>
</tr>
<tr>
<th>{intl l="Total with discount"}</th>
<td>50 &euro;</td>
</tr>
<tr>
<th>{intl l="Freight"}</th>
<td>6 &euro;</td>
</tr>
<tr>
<th>{intl l="Total"}</th>
<td>56 &euro;</td>
</tr>
</tbody>
</table>
</div>
</div> <!-- #settlement -->
<div class="tab-pane fade clearfix" id="address">
<div class="col-md-6">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Billing address'}
<a class="btn btn-default btn-primary pull-right" title="{intl l='Edit this billing address'}" href="#edit_address_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-edit"></span>
</a>
</caption>
<tbody>
<tr>
<th>{intl l="Title"}</th>
<td>Mr</td>
</tr>
<tr>
<th>{intl l="Compagny"}</th>
<td>Thelia</td>
</tr>
<tr>
<th>{intl l="Firstname"}</th>
<td>Espeche</td>
</tr>
<tr>
<th>{intl l="Lastname"}</th>
<td>Michaël</td>
</tr>
<tr>
<th>{intl l="Street address"}</th>
<td>5, rue Rochon</td>
</tr>
<tr>
<th>{intl l="Additional address"}</th>
<td>Lorem ipsum dolor sit amet</td>
</tr>
<tr>
<th>{intl l="Additional address"}</th>
<td>Lorem ipsum dolor sit</td>
</tr>
<tr>
<th>{intl l="Zip code"}</th>
<td>63000</td>
</tr>
<tr>
<th>{intl l="City"}</th>
<td>Clermont-Fd</td>
</tr>
<tr>
<th>{intl l="Country"}</th>
<td>France</td>
</tr>
<tr>
<th>{intl l="Phone"}</th>
<td>01 02 03 04 05</td>
</tr>
</tbody>
</table>
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Billing address'}
<a class="btn btn-default btn-primary pull-right" title="{intl l='Edit this billing address'}" href="#edit_address_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-edit"></span>
</a>
</caption>
<tbody>
<tr>
<th>{intl l="Title"}</th>
<td>Mr</td>
</tr>
<tr>
<th>{intl l="Compagny"}</th>
<td>Thelia</td>
</tr>
<tr>
<th>{intl l="Firstname"}</th>
<td>Espeche</td>
</tr>
<tr>
<th>{intl l="Lastname"}</th>
<td>Michaël</td>
</tr>
<tr>
<th>{intl l="Street address"}</th>
<td>5, rue Rochon</td>
</tr>
<tr>
<th>{intl l="Additional address"}</th>
<td>Lorem ipsum dolor sit amet</td>
</tr>
<tr>
<th>{intl l="Additional address"}</th>
<td>Lorem ipsum dolor sit</td>
</tr>
<tr>
<th>{intl l="Zip code"}</th>
<td>63000</td>
</tr>
<tr>
<th>{intl l="City"}</th>
<td>Clermont-Fd</td>
</tr>
<tr>
<th>{intl l="Country"}</th>
<td>France</td>
</tr>
<tr>
<th>{intl l="Phone"}</th>
<td>01 02 03 04 05</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="col-md-6">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Delivery address'}
<a class="btn btn-default btn-primary pull-right" title="{intl l='Edit this delivery address'}" href="#edit_address_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-edit"></span>
</a>
</caption>
<tbody>
<tr>
<th>{intl l="Title"}</th>
<td>Mr</td>
</tr>
<tr>
<th>{intl l="Compagny"}</th>
<td>Thelia</td>
</tr>
<tr>
<th>{intl l="Firstname"}</th>
<td>Espeche</td>
</tr>
<tr>
<th>{intl l="Lastname"}</th>
<td>Michaël</td>
</tr>
<tr>
<th>{intl l="Street address"}</th>
<td>5, rue Rochon</td>
</tr>
<tr>
<th>{intl l="Additional address"}</th>
<td>Lorem ipsum dolor sit amet</td>
</tr>
<tr>
<th>{intl l="Additional address"}</th>
<td>Lorem ipsum dolor sit</td>
</tr>
<tr>
<th>{intl l="Zip code"}</th>
<td>63000</td>
</tr>
<tr>
<th>{intl l="City"}</th>
<td>Clermont-Fd</td>
</tr>
<tr>
<th>{intl l="Country"}</th>
<td>France</td>
</tr>
<tr>
<th>{intl l="Phone"}</th>
<td>01 02 03 04 05</td>
</tr>
</tbody>
</table>
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Delivery address'}
<a class="btn btn-default btn-primary pull-right" title="{intl l='Edit this delivery address'}" href="#edit_address_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-edit"></span>
</a>
</caption>
<tbody>
<tr>
<th>{intl l="Title"}</th>
<td>Mr</td>
</tr>
<tr>
<th>{intl l="Compagny"}</th>
<td>Thelia</td>
</tr>
<tr>
<th>{intl l="Firstname"}</th>
<td>Espeche</td>
</tr>
<tr>
<th>{intl l="Lastname"}</th>
<td>Michaël</td>
</tr>
<tr>
<th>{intl l="Street address"}</th>
<td>5, rue Rochon</td>
</tr>
<tr>
<th>{intl l="Additional address"}</th>
<td>Lorem ipsum dolor sit amet</td>
</tr>
<tr>
<th>{intl l="Additional address"}</th>
<td>Lorem ipsum dolor sit</td>
</tr>
<tr>
<th>{intl l="Zip code"}</th>
<td>63000</td>
</tr>
<tr>
<th>{intl l="City"}</th>
<td>Clermont-Fd</td>
</tr>
<tr>
<th>{intl l="Country"}</th>
<td>France</td>
</tr>
<tr>
<th>{intl l="Phone"}</th>
<td>01 02 03 04 05</td>
</tr>
</tbody>
</table>
</div>
</div>
</div> <!-- #address -->
<div class="tab-pane fade clearfix" id="supplements">
<table class="table table-striped table-condensed table-left-aligned">
<caption>
{intl l='Further information'}
</caption>
<tbody>
<tr>
<th><label for="">{intl l='Status'}</label></th>
<td>
<form action="" method="">
<div class="row">
<div class="col-lg-4">
<select name="" id="" class="form-control">
<option value="">Status 1</option>
<option value="">Status 2</option>
<option value="">Status 3</option>
</select>
</div>
</div>
</form>
</td>
</tr>
<tr>
<th><label for="">{intl l='Order Tracking'}</label></th>
<td>
<form action="" method="">
<div class="row">
<div class="col-lg-4">
<input type="text" id="" name="" class="form-control" value="" title="" placeholder="">
</div>
<button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-ok"></span></button>
</div>
</form>
</td>
</tr>
<tr>
<th>{intl l='Bill'}</th>
<td><a href="#" class="btn btn-default btn-primary"><span class="glyphicon glyphicon-cloud-download"></span> {intl l='Download bill to pdf'}</a></td>
</tr>
<tr>
<th>{intl l='Delivery'}</th>
<td><a href="#" class="btn btn-default btn-primary"><span class="glyphicon glyphicon-cloud-download"></span> {intl l='Download delivery to pdf'}</a></td>
</tr>
</tbody>
</table>
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption>
{intl l='Further information'}
</caption>
<tbody>
<tr>
<th><label for="">{intl l='Status'}</label></th>
<td>
<form action="" method="">
<div class="row">
<div class="col-lg-4">
<select name="" id="" class="form-control">
<option value="">Status 1</option>
<option value="">Status 2</option>
<option value="">Status 3</option>
</select>
</div>
</div>
</form>
</td>
</tr>
<tr>
<th><label for="">{intl l='Order Tracking'}</label></th>
<td>
<form action="" method="">
<div class="row">
<div class="col-lg-4">
<input type="text" id="" name="" class="form-control" value="" title="" placeholder="">
</div>
<button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-ok"></span></button>
</div>
</form>
</td>
</tr>
<tr>
<th>{intl l='Bill'}</th>
<td><a href="#" class="btn btn-default btn-primary"><span class="glyphicon glyphicon-cloud-download"></span> {intl l='Download bill to pdf'}</a></td>
</tr>
<tr>
<th>{intl l='Delivery'}</th>
<td><a href="#" class="btn btn-default btn-primary"><span class="glyphicon glyphicon-cloud-download"></span> {intl l='Download delivery to pdf'}</a></td>
</tr>
</tbody>
</table>
</div>
</div> <!-- #supplements -->
</div>

View File

@@ -19,114 +19,116 @@
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Orders'}
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.orders.create"}
<a class="btn btn-default btn-primary pull-right" title="{intl l='Create an order'}" href="#creation_dialog">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
<thead>
<tr>
<th>{intl l="Order n°"}</th>
<th>{intl l="Date & Hour"}</th>
<th>{intl l="Compagny"}</th>
<th>{intl l="Name"}</th>
<th>{intl l="Amount"}</th>
<th>{intl l="Status"}</th>
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Orders'}
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.orders.create"}
<a class="btn btn-default btn-primary pull-right" title="{intl l='Create an order'}" href="#creation_dialog">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
<thead>
<tr>
<th>{intl l="Order n°"}</th>
<th>{intl l="Date & Hour"}</th>
<th>{intl l="Compagny"}</th>
<th>{intl l="Name"}</th>
<th>{intl l="Amount"}</th>
<th>{intl l="Status"}</th>
{module_include location='orders_table_header'}
{module_include location='orders_table_header'}
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
<tr>
<tbody>
<tr>
<td><a href="">01230450123045</a></td>
<td>11/09/2013 10:24:31</td>
<td>Thelia</td>
<td><a href="">Dupont</a></td>
<td>251 &euro;</td>
<td><span class="label label-success">Paid</span></td>
<td><a href="">01230450123045</a></td>
<td>11/09/2013 10:24:31</td>
<td>Thelia</td>
<td><a href="">Dupont</a></td>
<td>251 &euro;</td>
<td><span class="label label-success">Paid</span></td>
{module_include location='orders_table_row'}
{module_include location='orders_table_row'}
<td>
<div class="btn-group">
<td>
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this order'}" href="{url path="/admin/order/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this order'}" href="{url path="/admin/order/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.orders.delete"}
<a class="btn btn-default btn-xs" title="{intl l='Delete this order'}" href="#delete_order_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
<tr>
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.orders.delete"}
<a class="btn btn-default btn-xs" title="{intl l='Delete this order'}" href="#delete_order_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
<tr>
<td><a href="">01230450123045</a></td>
<td>11/09/2013 10:24:31</td>
<td>Thelia</td>
<td><a href="">Dupont</a></td>
<td>251 &euro;</td>
<td><span class="label label-danger">Canceled</span></td>
<td><a href="">01230450123045</a></td>
<td>11/09/2013 10:24:31</td>
<td>Thelia</td>
<td><a href="">Dupont</a></td>
<td>251 &euro;</td>
<td><span class="label label-danger">Canceled</span></td>
{module_include location='orders_table_row'}
{module_include location='orders_table_row'}
<td>
<div class="btn-group">
<td>
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this order'}" href="{url path="/admin/order/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this order'}" href="{url path="/admin/order/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.orders.delete"}
<a class="btn btn-default btn-xs" title="{intl l='Delete this order'}" href="#delete_order_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
<tr>
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.orders.delete"}
<a class="btn btn-default btn-xs" title="{intl l='Delete this order'}" href="#delete_order_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
<tr>
<td><a href="">01230450123045</a></td>
<td>11/09/2013 10:24:31</td>
<td>Thelia</td>
<td><a href="">Dupont</a></td>
<td>251 &euro;</td>
<td><span class="label label-info">Current</span></td>
<td><a href="">01230450123045</a></td>
<td>11/09/2013 10:24:31</td>
<td>Thelia</td>
<td><a href="">Dupont</a></td>
<td>251 &euro;</td>
<td><span class="label label-info">Current</span></td>
{module_include location='orders_table_row'}
{module_include location='orders_table_row'}
<td>
<div class="btn-group">
<td>
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this order'}" href="{url path="/admin/order/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.orders.edit"}
<a class="btn btn-default btn-xs" title="{intl l='Edit this order'}" href="{url path="/admin/order/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.orders.delete"}
<a class="btn btn-default btn-xs" title="{intl l='Delete this order'}" href="#delete_order_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.orders.delete"}
<a class="btn btn-default btn-xs" title="{intl l='Delete this order'}" href="#delete_order_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
<!-- <tr>
<td colspan="3">
<div class="alert alert-info">
{intl l="No mailing template has been created yet. Click the + button to create one."}
</div>
</td>
</tr> -->
<!-- <tr>
<td colspan="3">
<div class="alert alert-info">
{intl l="No mailing template has been created yet. Click the + button to create one."}
</div>
</td>
</tr> -->
</tbody>
</table>
</tbody>
</table>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,599 @@
{extends file="admin-layout.tpl"}
{block name="check-permissions"}admin.catalog.view{/block}
{block name="page-title"}{intl l='Edit product'}{/block}
{block name="main-content"}
<div class="catalog edit-product">
<div id="wrapper" class="container">
{include file="includes/catalog-breadcrumb.html" editing_category="false" editing_product="true"}
<div class="row">
{loop name="product_edit" type="product" visible="*" id=$product_id backend_context="1" lang=$edit_language_id}
<div class="col-md-12 general-block-decorator">
<div class="row">
<div class="col-md-7 title">
{intl l='Edit product %title' title=$TITLE}
</div>
<div class="col-md-5 actions">
{if $HAS_PREVIOUS != 0}
<a href="{url path='/admin/products/update' product_id=$PREVIOUS}" class="btn btn-default" title="{intl l='Edit previous product'}"><span class="glyphicon glyphicon-arrow-left"></span></a>
{else}
<a href="#" disabled="disabled" class="btn btn-default"><span class="glyphicon glyphicon-arrow-left"></span></a>
{/if}
<a href="{$URL}" target="_blank" class="btn btn-default" title="{intl l='Preview product page'}"><span class="glyphicon glyphicon-eye-open"></span></a>
{if $HAS_NEXT != 0}
<a href="{url path='/admin/products/update' product_id=$NEXT}" class="btn btn-default" title="{intl l='Edit next product'}"><span class="glyphicon glyphicon-arrow-right"></span></a>
{else}
<a href="#" disabled="disabled" class="btn btn-default"><span class="glyphicon glyphicon-arrow-right"></span></a>
{/if}
</div>
</div>
<div class="row">
<div class="col-md-12">
<ul class="nav nav-tabs" id="tabbed-menu">
<li {if $current_tab == 'general'}class="active"{/if}><a href="#general" data-toggle="tab">{intl l="General description"}</a></li>
<li {if $current_tab == 'details'}class="active"{/if}><a href="#details" data-toggle="tab">{intl l="Details"}</a></li>
<li {if $current_tab == 'images'}class="active"{/if}><a href="#images" data-toggle="tab">{intl l="Images"}</a></li>
<li {if $current_tab == 'documents'}class="active"{/if}><a href="#documents" data-toggle="tab">{intl l="Documents"}</a></li>
<li {if $current_tab == 'modules'}class="active"{/if}><a href="#modules" data-toggle="tab">{intl l="Modules"}</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane fade {if $current_tab == 'general'}active in{/if}" id="general">
<div class="form-container">
{form name="thelia.admin.product.modification"}
<form method="POST" action="{url path='/admin/products/save'}" {form_enctype form=$form} class="clearfix">
{include file="includes/inner-form-toolbar.html" close_url="{url path='/admin/products' product_id=$product_id}"}
{* Be sure to get the product ID, even if the form could not be validated *}
<input type="hidden" name="product_id" value="{$product_id}" />
<input type="hidden" name="current_tab" value="general" />
{form_hidden_fields form=$form}
{form_field form=$form field='success_url'}
<input type="hidden" name="{$name}" value="{url path='/admin/product' product_id={$product_d}}" />
{/form_field}
{form_field form=$form field='locale'}
<input type="hidden" name="{$name}" value="{$edit_language_locale}" />
{/form_field}
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
<div class="form-group">
<label for="product_ref" class="control-label">
{intl l='Product reference'} :
</label>
<div class="well well-sm">{$REF}</div>
</div>
{include file="includes/standard-description-form-fields.html"}
{form_field form=$form field='url'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">
{intl l="{$label}"} :
</label>
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" value="{$value}" title="{intl l='Rewritten URL'}" placeholder="{intl l='Rewriten URL'}" class="form-control">
</div>
{/form_field}
<div class="row">
<div class="col-md-6">
{form_field form=$form field='default_category'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">
{intl l="{$label}"} :
</label>
<select id="{$label_attr.for}" required="required" name="{$name}" class="form-control">
<option value="0">{intl l="Top level"}</option>
{loop name="cat-parent" type="category-tree" category="0" visible="*" product="0"}
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px" {if $DEFAULT_CATEGORY == $ID}selected="selected"{/if} {if $product_id == $ID}disabled="disabled"{/if}>{$TITLE}</option>
{/loop}
</select>
<span class="help-block">{intl l='You can attach this product to more categories in the details tab.'}</span>
</div>
{/form_field}
</div>
<div class="col-md-6">
{form_field form=$form field='visible'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l='Visibility'}</label>
<div class="checkbox">
<label>
<input type="checkbox" id="{$label_attr.for}" name="{$name}" value="1" {if $value != 0}checked="checked"{/if}>
{$label}
</label>
</div>
</div>
{/form_field}
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="control-group">
<lablel>&nbsp;</lablel>
<div class="controls">
<p>{intl l='Product created on %date_create. Last modification: %date_change' date_create="{format_date date=$CREATE_DATE}" date_change="{format_date date=$UPDATE_DATE}"}</p>
</div>
</div>
</div>
</div>
</form>
{/form}
</div>
</div>
<div class="tab-pane fade {if $current_tab == 'details'}active in{/if}" id="details">
<div class="form-container">
{include
file="includes/inner-form-toolbar.html"
hide_submit_buttons=true
close_url="{url path='/admin/categories' category_id=$DEFAULT_CATEGORY}"
}
{* -- Begin related content management -- *}
<div class="col-md-6">
<div class="form-group">
<form action="{url path='/admin/products/related-content/add'}" id="related_content_form">
<p class="title title-without-tabs">{intl l='Related content'}</p>
<p>{intl l='You can attach here some content to this product'}</p>
<input type="hidden" name="product_id" value="{$product_id}" />
<input type="hidden" name="current_tab" value="details" />
{ifloop rel="folders"}
<div class="form-group">
<select name="folder_id" id="folder_id" class="form-control">
<option value="">Select a folder...</option>
{loop name="folders" type="folder-tree" folder="0" backend_context="1" lang="$edit_language_id"}
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px">{$TITLE}</option>
{/loop}
</select>
<span class="help-block">{intl l='Select a folder to get its content'}</span>
</div>
<div id="content_selector" class="hide">
<div class="input-group">
<select required="required" name="content_id" id="content_id" class="form-control">
<option value="">Select a folder content...</option>
</select>
<span class="input-group-btn" id="content_add_button">
<button class="btn btn-default btn-primary action-btn" type="submit"><span class="glyphicon glyphicon-plus-sign"></span></button>
</span>
</div>
<span class="help-block">{intl l='Select a content and click (+) to add it to this product'}</span>
</div>
<div id="content_selector_empty" class="hide">
<div class="alert alert-info">
{intl l="No available content for this folder"}
</div>
</div>
{/ifloop}
{elseloop rel="folders"}
<div class="alert alert-info">{intl l="No folders found"}</div>
{/elseloop}
</form>
</div>
<table class="table table-striped table-condensed table-left-aligned">
<thead>
<tr>
<th>{intl l='ID'}</th>
<th>{intl l='Content title'}</th>
{module_include location='product_contents_table_header'}
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
{loop name="assigned_contents" type="associated_content" product="$product_id" backend_context="1" lang="$edit_language_id"}
<tr>
<td>{$ID}</td>
<td>
{$TITLE}
</td>
{module_include location='product_contents_table_row'}
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.product.content.delete"}
<a class="btn btn-default btn-xs delete-content" title="{intl l='Delete this content'}" href="#delete_content_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
{/loop}
</div>
</td>
</tr>
{/loop}
{elseloop rel="assigned_contents"}
<tr>
<td colspan="3">
<div class="alert alert-info">
{intl l="This product contains no contents"}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
</div>
{* -- End related content management ---- *}
{* -- Begin accessories management ------ *}
<div class="col-md-6">
<div class="form-group">
<form action="{url path='/admin/products/accessory/add'}" id="accessory_form">
<p class="title title-without-tabs">{intl l='Product accessories'}</p>
<p>{intl l='Define here this product\'s accessories'}</p>
<input type="hidden" name="product_id" value="{$product_id}" />
<input type="hidden" name="current_tab" value="details" />
{ifloop rel="categories"}
<div class="form-group">
<select name="accessory_category_id" id="accessory_category_id" class="form-control">
<option value="">Select a category...</option>
{loop name="categories" type="category-tree" category="0" backend_context="1" lang="$edit_language_id"}
<option value="{$ID}" style="padding-left: {3 + $LEVEL * 20}px">{$TITLE}</option>
{/loop}
</select>
<span class="help-block">{intl l='Select a category to get its products'}</span>
</div>
<div id="accessory_selector" class="hide">
<div class="input-group">
<select required="required" name="accessory_id" id="accessory_id" class="form-control">
<option value="">Select a product...</option>
</select>
<span class="input-group-btn" id="accessory_add_button">
<button class="btn btn-default btn-primary action-btn" type="submit"><span class="glyphicon glyphicon-plus-sign"></span></button>
</span>
</div>
<span class="help-block">{intl l='Select a product and click (+) to add it as an accessory'}</span>
</div>
<div id="accessory_selector_empty" class="hide">
<div class="alert alert-info">
{intl l="No available product in this category"}
</div>
</div>
{/ifloop}
{elseloop rel="categories"}
<div class="alert alert-info">{intl l="No categories found"}</div>
{/elseloop}
</form>
</div>
<table class="table table-striped table-condensed table-left-aligned">
<thead>
<tr>
<th>{intl l='ID'}</th>
<th>{intl l='Accessory title'}</th>
<th class="text-center">{intl l='Position'}</th>
{module_include location='product_accessories_table_header'}
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
{loop name="assigned_accessories" order="accessory" type="accessory" product="$product_id" backend_context="1" lang="$edit_language_id"}
<tr>
<td>{$ID}</td>
<td>
{$TITLE}
</td>
<td class="text-center">
{admin_position_block
permission="admin.products.edit"
path={url path='/admin/products/update-accessory-position' product_id=$ID}
url_parameter="accessory_id"
in_place_edit_class="accessoryPositionChange"
position=$POSITION
id=$ID
}
</td>
{module_include location='product_accessories_table_row'}
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.product.accessory.delete"}
<a class="btn btn-default btn-xs delete-accessory" title="{intl l='Delete this accessory'}" href="#delete_accessory_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
{/loop}
</div>
</td>
</tr>
{/loop}
{elseloop rel="assigned_accessories"}
<tr>
<td colspan="4">
<div class="alert alert-info">
{intl l="This product contains no accessories"}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
</div>
{* -- End accessories management -------- *}
</div>
</div>
<div class="tab-pane fade {if $current_tab == 'images'}active in{/if}" id="images">
</div>
<div class="tab-pane fade {if $current_tab == 'documents'}active in{/if}" id="documents">
</div>
<div class="tab-pane fade {if $current_tab == 'modules'}active in{/if}" id="modules">
</div>
</div>
</div>
</div>
</div>
{/loop}
</div>
</div>
</div>
{* Delete related content confirmation dialog *}
{capture "delete_content_dialog"}
<input type="hidden" name="product_id" value="{$product_id}" />
<input type="hidden" name="content_id" id="content_delete_id" value="" />
<input type="hidden" name="folder_id" id="folder_delete_id" value="" />
<input type="hidden" name="current_tab" value="details" />
{/capture}
{include
file = "includes/generic-confirm-dialog.html"
dialog_id = "delete_content_dialog"
dialog_title = {intl l="Remove related content"}
dialog_message = {intl l="Do you really want to remove this related content from the product ?"}
form_action = {url path='/admin/products/related-content/delete'}
form_content = {$smarty.capture.delete_content_dialog nofilter}
}
{* Delete accessory confirmation dialog *}
{capture "delete_accessory_dialog"}
<input type="hidden" name="product_id" value="{$product_id}" />
<input type="hidden" name="accessory_id" id="accessory_delete_id" value="" />
<input type="hidden" name="accessory_category_id" id="accessory_category_delete_id" value="" />
<input type="hidden" name="current_tab" value="details" />
{/capture}
{include
file = "includes/generic-confirm-dialog.html"
dialog_id = "delete_accessory_dialog"
dialog_title = {intl l="Remove an accessory"}
dialog_message = {intl l="Do you really want to remove this accessory from the product ?"}
form_action = {url path='/admin/products/accessory/delete'}
form_content = {$smarty.capture.delete_accessory_dialog nofilter}
}
{/block}
{block name="javascript-initialization"}
{javascripts file='assets/js/bootstrap-editable/bootstrap-editable.js'}
<script src="{$asset_url}"></script>
{/javascripts}
<script src="{url file='/tinymce/tinymce.min.js'}"></script>
<script>
tinymce.init({
selector: ".wysiwyg",
theme: "modern",
menubar : false,
language: "",
plugins: [
"advlist autolink link image lists charmap print preview hr anchor pagebreak",
"searchreplace wordcount visualblocks visualchars insertdatetime media nonbreaking",
"table contextmenu directionality emoticons paste textcolor filemanager"
],
toolbar1: "undo redo | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | styleselect | filemanager | link unlink anchor | image media | forecolor backcolor | print preview code ",
image_advtab: true ,
external_filemanager_path:"{url file='/tinymce/plugins/filemanager/'}'",
filemanager_title:"{intl l='Files manager'}" ,
external_plugins: { "filemanager" : "{url file='/tinymce/plugins/filemanager/plugin.min.js'}"}
});
</script>
<script>
$(function() {
$('.use_default_rewriten_url').click(function(ev) {
alert("Not functionnal");
ev.preventDefault();
});
// Set proper content ID in delete content from
$('a.delete-content').click(function(ev) {
$('#content_delete_id').val($(this).data('id'));
$('#folder_delete_id').val($('#folder_id').val());
});
// Set proper content ID in accessory delete from
$('a.delete-accessory').click(function(ev) {
$('#accessory_delete_id').val($(this).data('id'));
$('#accessory_category_delete_id').val($('#accessory_category_id').val());
});
// Load content on folder selection
$('#folder_id').change(function(event) {
var val = $(this).val();
if (val != "") {
$.ajax({
url : '{url path="/admin/product/$product_id/available-related-content/"}' + $(this).val() + '.xml',
type : 'get',
dataType : 'json',
success : function(json) {
$('#content_id :not(:first-child)').remove();
var have_content = false;
$.each(json, function(idx, value) {
$('#content_id').append($('<option>').text(value.title).attr('value', value.id));
have_content = true; // Lame...
});
if (have_content) {
$('#content_selector_empty').addClass('hide');
$('#content_selector').removeClass('hide');
}
else {
$('#content_selector_empty').removeClass('hide');
$('#content_selector').addClass('hide');
}
}
});
}
else {
$('#content_selector_empty').addClass('hide');
$('#content_selector').addClass('hide');
}
});
// Load content on folder selection
$('#accessory_category_id').change(function(event) {
var val = $(this).val();
if (val != "") {
$.ajax({
url : '{url path="/admin/product/$product_id/available-accessories/"}' + $(this).val() + '.xml',
type : 'get',
dataType : 'json',
success : function(json) {
$('#accessory_id :not(:first-child)').remove();
var have_content = false;
$.each(json, function(idx, value) {
$('#accessory_id').append($('<option>').text(value.title).attr('value', value.id));
have_content = true; // Lame...
});
if (have_content) {
$('#accessory_selector_empty').addClass('hide');
$('#accessory_selector').removeClass('hide');
}
else {
$('#accessory_selector_empty').removeClass('hide');
$('#accessory_selector').addClass('hide');
}
}
});
}
else {
$('#accessory_selector_empty').addClass('hide');
$('#accessory_selector').addClass('hide');
}
});
{* Inline editing of accessory position using bootstrap-editable *}
$('.accessoryPositionChange').editable({
type : 'text',
title : '{intl l="Enter new accessory position"}',
mode : 'popup',
inputclass : 'input-mini',
placement : 'left',
success : function(response, newValue) {
// The URL template
var url = "{url path='admin/product/update-accessory-position/' accessory_id='__ID__' product_id=$product_id position='__POS__'}";
// Perform subtitutions
url = url.replace('__ID__', $(this).data('id')).replace('__POS__', newValue);
// Reload the page
location.href = url;
}
});
// Initialize folder (id={$folder_id}) select value
{if $folder_id != 0}
$('#folder_id').val("{$folder_id}").change();
{/if}
// Initialize folder (id={$folder_id}) select value
{if $accessory_category_id != 0}
$('#accessory_category_id').val("{$accessory_category_id}").change();
{/if}
});
</script>
{/block}

View File

@@ -0,0 +1,126 @@
{extends file="admin-layout.tpl"}
{block name="page-title"}{intl l='Edit profile'}{/block}
{block name="check-permissions"}admin.profile.edit{/block}
{block name="main-content"}
<div class="profile edit-profile">
<div id="wrapper" class="container">
<ul class="breadcrumb">
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
<li>{intl l='Editing profile "%name"' name="{$NAME}"}</li>
</ul>
<div class="row">
<div class="col-md-12 general-block-decorator">
<div class="col-md-12 title title-without-tabs">
{intl l="Edit profile $NAME"}
</div>
<div class="form-container">
{form name="thelia.admin.profile.modification"}
<form method="POST" action="{url path="/admin/profile/update/{$ID}"}" {form_enctype form=$form} class="clearfix">
{form_hidden_fields form=$form}
{form_field form=$form field='success_url'}
<input type="hidden" name="{$name}" value="{url path="/admin/profile/update/{$ID}"}" />
{/form_field}
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
{form_field form=$form field='firstname'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$FIRSTNAME}" title="{intl l="{$label}"}" placeholder="{intl l='Firstname'}">
</div>
{/form_field}
{form_field form=$form field='lastname'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$LASTNAME}" title="{intl l="{$label}"}" placeholder="{intl l='Lastname'}">
</div>
{/form_field}
{form_field form=$form field='default_language'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<select name="{$name}" id="{$label_attr.for}" data-toggle="selectpicker">
{loop type="lang" name="default_language" backend_context="1"}
<option value="{$ID}" {if $ID == $TITLE}selected{/if}>{$TITLE}</option>
{/loop}
</select>
</div>
{/form_field}
{form_field form=$form field='editing_language_default'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<select name="{$name}" id="{$label_attr.for}" data-toggle="selectpicker">
{loop type="lang" name="editing_language_default" backend_context="1"}
<option value="{$ID}" {if $ID == $TITLE}selected{/if}>{$TITLE}</option>
{/loop}
</select>
</div>
{/form_field}
<div class="well">
<div class="title title-without-tabs">{intl l="Change password"}</div>
{form_field form=$form field='old_password'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" title="{intl l="{$label}"}" placeholder="{intl l='Old password'}">
</div>
{/form_field}
{form_field form=$form field='password'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" title="{intl l="{$label}"}" placeholder="{intl l='Password'}">
</div>
{/form_field}
{form_field form=$form field='password_confirm'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" title="{intl l="{$label}"}" placeholder="{intl l='Password confirmation'}">
</div>
{/form_field}
</div>
<div class="text-right">
<button type="submit" class="btn btn-default btn-primary" title="{intl l='Edit profile'}">
{intl l="Edit"}
<span class="glyphicon glyphicon-ok"></span>
</button>
</div>
</form>
{/form}
</div>
</div>
</div>
</div>
</div>
{/block}
{block name="javascript-initialization"}
{javascripts file='assets/js/bootstrap-select/bootstrap-select.js'}
<script src="{$asset_url}"></script>
{/javascripts}
{javascripts file='assets/js/main.js'}
<script src="{$asset_url}"></script>
{/javascripts}
{/block}

View File

@@ -0,0 +1,138 @@
{extends file="admin-layout.tpl"}
{block name="page-title"}{intl l='Edit a shipping configuration'}{/block}
{block name="check-permissions"}admin.configuration.shipping-configuration.edit{/block}
{block name="main-content"}
<div class="shipping-configuration edit-shipping-configuration">
<div id="wrapper" class="container">
<ul class="breadcrumb">
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
<li><a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a></li>
<li><a href="{url path='/admin/configuration/shipping_configuration'}">{intl l="Shipping configuration"}</a></li>
<li>{intl l='Editing shipping configuration "%name"' name="{$TITLE}"}</li>
</ul>
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<div class="col-md-12 title title-without-tabs">
{intl l='Edit shipping configuration %title' title=$TITLE}
</div>
<div class="form-container clearfix">
<div class="col-md-4">
<form method="POST" action="">
<label class="control-label" for="">{intl l="Country"}</label>
<div class="input-group">
<select name="" id="" data-toggle="selectpicker">
<option value="1">France</option>
<option value="2">Monaco</option>
<option value="3">Nouvelle-Calédonie</option>
</select>
<span class="input-group-btn">
<button type="submit" class="btn btn-default btn-primary"><span class="glyphicon glyphicon-plus-sign"></span> {intl l="Add this country"}</button>
</span>
</div>
</form>
</div>
<div class="col-md-8">
<div class="table-responsive">
<table class="table table-striped table-condensed">
<thead>
<tr>
<th>{intl l="Country"}</th>
<th>{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
<tr>
<td>Wallis-et-Futuna</td>
<td>
<a class="btn btn-default btn-xs" title="{intl l='Delete this country'}" href="#delete_country_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
</td>
</tr>
<tr>
<td>Polynésie française</td>
<td>
<a class="btn btn-default btn-xs" title="{intl l='Delete this country'}" href="#delete_country_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
</td>
</tr>
<tr>
<td>USA - Alabama</td>
<td>
<a class="btn btn-default btn-xs" title="{intl l='Delete this country'}" href="#delete_zone_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
</td>
</tr>
</tbody>
<tfoot>
<tr class="active">
<td colspan="2">
<form method="POST" action="">
<label for="" class="control-label">{intl l="Freight"}</label>
<div class="input-group">
<input type="text" class="form-control" name="" id="" placeholder="Freight value">
<span class="input-group-addon">&euro;</span>
<span class="input-group-btn">
<button type="submit" class="btn btn-default btn-primary"><span class="glyphicon glyphicon-check"></span></button>
</span>
</div>
</form>
</td>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{* Delete related content confirmation dialog *}
{capture "delete_country_dialog"}
{/capture}
{include
file = "includes/generic-confirm-dialog.html"
dialog_id = "delete_country_dialog"
dialog_title = {intl l="Remove country"}
dialog_message = {intl l="Do you really want to remove this country ?"}
form_action = {url path=''}
form_content = {$smarty.capture.delete_country_dialog nofilter}
}
{/block}
{block name="javascript-initialization"}
{javascripts file='assets/js/main.js'}
<script src="{$asset_url}"></script>
{/javascripts}
{javascripts file='assets/js/bootstrap-select/bootstrap-select.js'}
<script src="{$asset_url}"></script>
{/javascripts}
{/block}

View File

@@ -0,0 +1,166 @@
{extends file="admin-layout.tpl"}
{block name="page-title"}{intl l='Thelia Shipping configuration'}{/block}
{block name="check-permissions"}admin.configuration.shipping-configuration.view{/block}
{block name="main-content"}
<div class="shipping-configurations">
<div id="wrapper" class="container">
<ul class="breadcrumb">
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
<li><a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a></li>
<li><a href="{url path='/admin/configuration/shipping-configuration'}">{intl l="Shipping configuration"}</a></li>
</ul>
{module_include location='shipping_configuration_top'}
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Thelia Shipping configuration'}
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.shipping-configuration.create"}
<a class="btn btn-default btn-primary pull-right" title="{intl l='Add a new shipping configuration'}" href="#creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
<thead>
<tr>
<th>{intl l="Description"}</th>
{module_include location='shipping_configuration_table_header'}
<th>{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
<tr>
<td>France</td>
{module_include location='shipping_configuration_table_row'}
<td>
{if ! $SECURED}
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-configuration.change"}
<a class="btn btn-default btn-xs shipping-configuration-change" title="{intl l='Change this shipping configuration'}" href="{url path="/admin/configuration/shipping_configuration/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.shipping-configuration.delete"}
<a class="btn btn-default btn-xs shipping-configuration-delete" title="{intl l='Delete this shipping configuration'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
{/loop}
</div>
{else}
<i title="{intl l='This shipping configuration could not be changed.'}" class="glyphicon glyphicon-ban-circle"></i>
{/if}
</td>
</tr>
<tr>
<td>Outre-Mer DOM</td>
{module_include location='shipping_configuration_table_row'}
<td>
{if ! $SECURED}
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-configuration.change"}
<a class="btn btn-default btn-xs shipping-configuration-change" title="{intl l='Change this shipping configuration'}" href="{url path="/admin/configuration/shipping_configuration/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.shipping-configuration.delete"}
<a class="btn btn-default btn-xs shipping-configuration-delete" title="{intl l='Delete this shipping configuration'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
{/loop}
</div>
{else}
<i title="{intl l='This shipping configuration could not be changed.'}" class="glyphicon glyphicon-ban-circle"></i>
{/if}
</td>
</tr>
<tr>
<td>Outre-Mer TOM</td>
{module_include location='shipping_configuration_table_row'}
<td>
{if ! $SECURED}
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-configuration.change"}
<a class="btn btn-default btn-xs shipping-configuration-change" title="{intl l='Change this shipping configuration'}" href="{url path="/admin/configuration/shipping_configuration/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
{loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.shipping-configuration.delete"}
<a class="btn btn-default btn-xs shipping-configuration-delete" title="{intl l='Delete this shipping configuration'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal"><i class="glyphicon glyphicon-trash"></i></a>
{/loop}
</div>
{else}
<i title="{intl l='This shipping configuration could not be changed.'}" class="glyphicon glyphicon-ban-circle"></i>
{/if}
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
{module_include location='shipping_configuration_bottom'}
</div>
</div>
{* Adding a new Shipping configuration *}
{* Capture the dialog body, to pass it to the generic dialog *}
{capture "creation_dialog"}
<div class="form-group">
<label for="" class="control-label">{intl l="Name"} : </label>
<input type="text" id="" name="" class="form-control" title="{intl l="Name"}" placeholder="{intl l='Shipping configuration name'}">
</div>
{module_include location='shipping_configuration_create_form'}
{/capture}
{include
file = "includes/generic-create-dialog.html"
dialog_id = "creation_dialog"
dialog_title = {intl l="Create a new shipping configuration"}
dialog_body = {$smarty.capture.creation_dialog nofilter}
dialog_ok_label = {intl l="Create this shipping configuration"}
dialog_cancel_label = {intl l="Cancel"}
form_action = {url path='/admin/configuration/configuration/shipping_configuration/create'}
form_enctype = ''
form_error_message = $form_error_message
}
{* Delete confirmation dialog *}
{capture "delete_dialog"}
<input type="hidden" name="shipping_zones_id" id="shipping_configuration_delete_id" value="" />
{module_include location='shipping_configuration_delete_form'}
{/capture}
{include
file = "includes/generic-confirm-dialog.html"
dialog_id = "delete_dialog"
dialog_title = {intl l="Delete shipping configuration"}
dialog_message = {intl l="Do you really want to delete this shipping configuration ?"}
form_action = {url path='/admin/configuration/shipping_configuration/delete'}
form_content = {$smarty.capture.delete_dialog nofilter}
}
{/block}

View File

@@ -12,7 +12,7 @@
<ul class="breadcrumb">
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
<li><a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a></li>
<li><a href="{url path='/admin/configuration/shipping-zones'}">{intl l="Shipping zones"}</a></li>
<li><a href="{url path='/admin/configuration/shipping_zones'}">{intl l="Shipping zones"}</a></li>
<li>{intl l='Editing shipping zone "%name"' name="{$TITLE}"}</li>
</ul>
@@ -31,7 +31,7 @@
<label class="control-label" for="">{intl l="Zones"}</label>
<div class="input-group">
<select name="" id="" class="form-control">
<select name="" id="" data-toggle="selectpicker">
<option value="">1</option>
<option value="">2</option>
<option value="">3</option>
@@ -48,40 +48,42 @@
</div>
<div class="col-md-8">
<table class="table table-striped table-condensed">
<thead>
<tr>
<th>{intl l="Zones"}</th>
<th>{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
<tr>
<td>France</td>
<td>
<a class="btn btn-default btn-xs" title="{intl l='Delete this zone'}" href="#delete_zone_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
</td>
</tr>
<tr>
<td>Zone 1</td>
<td>
<a class="btn btn-default btn-xs" title="{intl l='Delete this zone'}" href="#delete_zone_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
</td>
</tr>
<tr>
<td>Zone 2</td>
<td>
<a class="btn btn-default btn-xs" title="{intl l='Delete this zone'}" href="#delete_zone_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
</td>
</tr>
</tbody>
</table>
<div class="table-responsive">
<table class="table table-striped table-condensed">
<thead>
<tr>
<th>{intl l="Zones"}</th>
<th>{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
<tr>
<td>France</td>
<td>
<a class="btn btn-default btn-xs" title="{intl l='Delete this zone'}" href="#delete_zone_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
</td>
</tr>
<tr>
<td>Zone 1</td>
<td>
<a class="btn btn-default btn-xs" title="{intl l='Delete this zone'}" href="#delete_zone_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
</td>
</tr>
<tr>
<td>Zone 2</td>
<td>
<a class="btn btn-default btn-xs" title="{intl l='Delete this zone'}" href="#delete_zone_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span>
</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
@@ -108,4 +110,13 @@
form_action = {url path=''}
form_content = {$smarty.capture.delete_zone_dialog nofilter}
}
{/block}
{block name="javascript-initialization"}
{javascripts file='assets/js/main.js'}
<script src="{$asset_url}"></script>
{/javascripts}
{javascripts file='assets/js/bootstrap-select/bootstrap-select.js'}
<script src="{$asset_url}"></script>
{/javascripts}
{/block}

View File

@@ -12,7 +12,7 @@
<ul class="breadcrumb">
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
<li><a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a></li>
<li><a href="{url path='/admin/configuration/shipping-zones'}">{intl l="Shipping zones"}</a></li>
<li><a href="{url path='/admin/configuration/shipping_zones'}">{intl l="Shipping zones"}</a></li>
</ul>
{module_include location='shipping_zones_top'}
@@ -20,74 +20,76 @@
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<table class="table table-striped table-condensed table-left-aligned">
<caption>
{intl l='Thelia Shipping zones'}
</caption>
<thead>
<tr>
<th>{intl l="Name"}</th>
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption>
{intl l='Thelia Shipping zones'}
</caption>
<thead>
<tr>
<th>{intl l="Name"}</th>
{module_include location='shipping_zones_table_header'}
{module_include location='shipping_zones_table_header'}
<th>{intl l="Actions"}</th>
</tr>
</thead>
<th>{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
<tr>
<td>So Colissimo</td>
<tbody>
<tr>
<td>So Colissimo</td>
{module_include location='shipping_zones_table_row'}
{module_include location='shipping_zones_table_row'}
<td>
{if ! $SECURED}
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-zones.change"}
<a class="btn btn-default btn-xs shipping-zones-change" title="{intl l='Change this shipping zone'}" href="{url path="/admin/configuration/shipping-zones/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
</div>
{else}
<i title="{intl l='This shipping zone could not be changed.'}" class="glyphicon glyphicon-ban-circle"></i>
{/if}
</td>
</tr>
<tr>
<td>Chronopost</td>
<td>
{if ! $SECURED}
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-zones.change"}
<a class="btn btn-default btn-xs shipping-zones-change" title="{intl l='Change this shipping zone'}" href="{url path="/admin/configuration/shipping_zones/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
</div>
{else}
<i title="{intl l='This shipping zone could not be changed.'}" class="glyphicon glyphicon-ban-circle"></i>
{/if}
</td>
</tr>
<tr>
<td>Chronopost</td>
{module_include location='shipping_zones_table_row'}
{module_include location='shipping_zones_table_row'}
<td>
{if ! $SECURED}
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-zones.change"}
<a class="btn btn-default btn-xs shipping-zones-change" title="{intl l='Change this shipping zone'}" href="{url path="/admin/configuration/shipping-zones/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
</div>
{else}
<i title="{intl l='This shipping zone could not be changed.'}" class="glyphicon glyphicon-ban-circle"></i>
{/if}
</td>
</tr>
<tr>
<td>Kiala</td>
<td>
{if ! $SECURED}
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-zones.change"}
<a class="btn btn-default btn-xs shipping-zones-change" title="{intl l='Change this shipping zone'}" href="{url path="/admin/configuration/shipping_zones/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
</div>
{else}
<i title="{intl l='This shipping zone could not be changed.'}" class="glyphicon glyphicon-ban-circle"></i>
{/if}
</td>
</tr>
<tr>
<td>Kiala</td>
{module_include location='shipping_zones_table_row'}
{module_include location='shipping_zones_table_row'}
<td>
{if ! $SECURED}
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-zones.change"}
<a class="btn btn-default btn-xs shipping-zones-change" title="{intl l='Change this shipping zone'}" href="{url path="/admin/configuration/shipping-zones/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
</div>
{else}
<i title="{intl l='This shipping zone could not be changed.'}" class="glyphicon glyphicon-ban-circle"></i>
{/if}
</td>
</tr>
</tbody>
</table>
<td>
{if ! $SECURED}
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.shipping-zones.change"}
<a class="btn btn-default btn-xs shipping-zones-change" title="{intl l='Change this shipping zone'}" href="{url path="/admin/configuration/shipping_zones/update/$ID"}"><i class="glyphicon glyphicon-edit"></i></a>
{/loop}
</div>
{else}
<i title="{intl l='This shipping zone could not be changed.'}" class="glyphicon glyphicon-ban-circle"></i>
{/if}
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
@@ -113,7 +115,7 @@
dialog_title = {intl l="Delete shipping zone"}
dialog_message = {intl l="Do you really want to delete this shipping zone ?"}
form_action = {url path='/admin/configuration/shipping-zones/delete'}
form_action = {url path='/admin/configuration/shipping_zones/delete'}
form_content = {$smarty.capture.delete_dialog nofilter}
}
{/block}

View File

@@ -25,86 +25,88 @@
{if ! empty($general_error) }
<div class="alert alert-danger">{$general_error}</div>
{/if}
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption>
{intl l='Thelia product templates'}
<table class="table table-striped table-condensed table-left-aligned">
<caption>
{intl l='Thelia product templates'}
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.templates.create"}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new product template'}" href="#creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
<thead>
<tr>
<th>
{admin_sortable_header
current_order=$order
order='id'
reverse_order='id_reverse'
path='/admin/configuration/templates'
label="{intl l='ID'}"
}
</th>
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.templates.create"}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new product template'}" href="#creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
<thead>
<tr>
<th>
{admin_sortable_header
current_order=$order
order='id'
reverse_order='id_reverse'
path='/admin/configuration/templates'
label="{intl l='ID'}"
}
</th>
<th>
{admin_sortable_header
current_order=$order
order='alpha'
reverse_order='alpha_reverse'
path='/admin/configuration/templates'
label="{intl l='Title'}"
}
</th>
<th>
{admin_sortable_header
current_order=$order
order='alpha'
reverse_order='alpha_reverse'
path='/admin/configuration/templates'
label="{intl l='Title'}"
}
</th>
{module_include location='templates_table_header'}
{module_include location='templates_table_header'}
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
{loop name="list" type="template" backend_context="1" lang=$lang_id order=$order}
<tr>
<td>{$ID}</td>
<tbody>
{loop name="list" type="template" backend_context="1" lang=$lang_id order=$order}
<tr>
<td>{$ID}</td>
<td>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.templates.change"}
<a title="{intl l='Change this template'}" href="{url path='/admin/configuration/templates/update' template_id=$ID}">{$NAME}</a>
{/loop}
{elseloop rel="can_change"}
{$NAME}
{/elseloop}
</td>
<td>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.templates.change"}
<a title="{intl l='Change this template'}" href="{url path='/admin/configuration/templates/update' template_id=$ID}">{$NAME}</a>
{/loop}
{elseloop rel="can_change"}
{$NAME}
{/elseloop}
</td>
{module_include location='templates_table_row'}
{module_include location='templates_table_row'}
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.templates.change"}
<a class="btn btn-default btn-xs template-change" title="{intl l='Change this product template'}" href="{url path='/admin/configuration/templates/update' template_id=$ID}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.templates.change"}
<a class="btn btn-default btn-xs template-change" title="{intl l='Change this product template'}" href="{url path='/admin/configuration/templates/update' template_id=$ID}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.templates.delete"}
<a class="btn btn-default btn-xs template-delete" title="{intl l='Delete this product template'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
{/loop}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.templates.delete"}
<a class="btn btn-default btn-xs template-delete" title="{intl l='Delete this product template'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
{/loop}
{elseloop rel="list"}
<tr>
<td colspan="4">
<div class="alert alert-info">
{intl l="No product template has been created yet. Click the + button to create one."}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
{elseloop rel="list"}
<tr>
<td colspan="4">
<div class="alert alert-info">
{intl l="No product template has been created yet. Click the + button to create one."}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
</div>
</div>
</form>
</div>

View File

@@ -21,6 +21,7 @@
<div class="col-md-12">
<form action="{url path='/admin/configuration/variables/update-values'}" method="post">
<div class="general-block-decorator">
<div class="table-responsive">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
{intl l='Thelia system variables'}
@@ -122,6 +123,7 @@
{/loop}
</tbody>
</table>
</div>
</div>
</form>
</div>