Huge overhaul of admin UI

master
Mark Moffat 2020-02-01 17:29:30 +10:30
parent dd00bb4807
commit 6825ea3305
36 changed files with 1016 additions and 710 deletions

View File

@ -191,5 +191,9 @@
"Discount end": "Discount end",
"Start": "Start",
"Running": "Running",
"Not running": "Not running"
"Not running": "Not running",
"Menu": "Menu",
"Users": "Users",
"Create Order": "Create Order",
"User edit": "User edit"
}

View File

@ -767,14 +767,14 @@ function globalSearch(){
searchValue: $('#global-search-value').val()
}
}).done((res) => {
$('#global-search').html('<i class="fal fa-search"></i>');
$('#global-search').html('<i class="feather" data-feather="search"></i>');
let hasResult = false;
res.customers.forEach((value) => {
hasResult = true;
const result = `
<li class="list-group-item global-result text-center" data-url="/admin/customer/view/${value._id}">
<div class="row">
<div class="col global-result-type gr-click"><i class="fas fa-users"></i> Customer</div>
<div class="col global-result-type gr-click"><i class="feather" data-feather="user"></i> Customer</div>
<div class="col global-result-detail gr-click">${value.firstName} ${value.lastName}</div>
<div class="col global-result-detail gr-click">${value.email}</div>
</div>
@ -787,7 +787,7 @@ function globalSearch(){
const result = `
<li class="list-group-item global-result text-center" data-url="/admin/order/view/${value._id}">
<div class="row">
<div class="col global-result-type gr-click"><i class="fas fa-cube"></i> Order</div>
<div class="col global-result-type gr-click"><i class="feather" data-feather="package"></i> Order</div>
<div class="col global-result-detail gr-click">${value.orderFirstname} ${value.orderLastname}</div>
<div class="col global-result-detail gr-click">${moment(value.orderDate).format('YYYY/MM/DD')}</div>
<div class="col global-result-detail gr-click">${value.orderEmail}</div>
@ -801,7 +801,7 @@ function globalSearch(){
const result =
`<li class="list-group-item global-result text-center" data-url="/admin/product/edit/${value._id}">
<div class="row">
<div class="col global-result-type gr-click"><i class="fas fa-box-open"></i> Product</div>
<div class="col global-result-type gr-click"><i class="feather" data-feather="tag"></i> Product</div>
<div class="col global-result-detail gr-click">${value.productTitle}</div>
<div class="col global-result-detail gr-click">${$('#currencySymbol').val()}${numeral(value.productPrice).format('0.00')}</div>
</div>
@ -820,5 +820,7 @@ function globalSearch(){
$('#global-search-results').append(noResult);
$('#global-search-results').removeClass('invisible');
}
feather.replace()
});
}

View File

@ -8,7 +8,7 @@ $(document).ready(function (){
});
$('.menu-side li:not(".active")').hide();
$('.menu-side>.active').html('<i class="fa fa-bars" aria-hidden="true"></i>');
$('.menu-side>.active').html('<i class="feather" data-feather="menu"></i>');
$('.menu-side>.active').addClass('menu-side-mobile');
// hide menu if there are no items in it
@ -608,7 +608,7 @@ function updateCartDiv(){
</div>
</div>
<div class="col-4 col-md-2 no-pad-left">
<button class="btn btn-danger btn-delete-from-cart" data-cartid="${productId}" type="button"><i class="far fa-trash-alt" data-cartid="${productId}" aria-hidden="true"></i></button>
<button class="btn btn-danger btn-delete-from-cart" data-cartid="${productId}" type="button"><i class="feather" data-feather="trash-2" data-cartid="${productId}"></i></button>
</div>
<div class="col-8 col-md-4 align-self-center text-right">
<strong class="my-auto">${result.currencySymbol}${productTotalAmount}</strong>
@ -657,6 +657,7 @@ function updateCartDiv(){
$('.cartTotalsWrapper').html(cartTotalsEmptyHtml);
$('.cart-buttons').addClass('d-none');
}
feather.replace();
})
.fail(function(result){
showNotification(result.responseJSON.message, 'danger');

File diff suppressed because one or more lines are too long

View File

@ -1,9 +1,33 @@
.btn-warning,
html,
body {
height: 100%;
background-color: #f8f9fa !important;
}
.content-body {
margin-bottom: 0;
}
.feather {
width: 16px;
height: 16px;
}
.btn-outline-primary,
.btn-outline-success,
.btn-outline-danger,
.btn-outline-warning,
.btn-outline-info {
background-color: white;
}
.btn-outline-primary {
color: #ffffff !important;
background-color: #000000;
border-color: #000000;
}
.btn-outline-danger {
color: #dc3545 !important;
}
.btn-outline-danger:hover {
color: #ffffff !important;
}
.has-error input,
.has-error textarea,
.has-error div {
@ -18,6 +42,12 @@
.footer {
padding-top: 20px;
}
.admin-menu {
padding-left: 0;
}
.admin-menu .list-group-item {
border-bottom: none;
}
.navbarMenuWrapper {
background-color: #f5f5f5;
}
@ -45,6 +75,16 @@
.pagination > li > a {
background-color: #cc4135 !important;
}
.admin-card {
background-color: white !important;
border-radius: 5px;
padding: 15px;
margin: 10px;
box-shadow: 0 0 1px rgba(0, 0, 0, 0.12), 0 1px 6px rgba(0, 0, 0, 0.03), 0 6px 10px -8px rgba(0, 0, 0, 0.1);
}
.admin-card-body {
padding: 5px;
}
/* Fixes summernote editor issue: https://github.com/summernote/summernote/issues/2516 */
body .popover {
display: none !important;
@ -137,6 +177,82 @@ body .popover {
.search-input-addon {
border-bottom-left-radius: 0;
}
/*
* Sidebar
*/
.sidebar {
position: fixed;
top: 0;
bottom: 0;
left: 0;
z-index: 100;
padding: 0;
background-color: white;
box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.1);
}
.sidebar-sticky {
position: relative;
top: 0;
height: 100vh;
padding-top: 15px;
overflow-x: hidden;
overflow-y: auto;
}
@supports ((position: -webkit-sticky) or (position: sticky)) {
.sidebar-sticky {
position: -webkit-sticky;
position: sticky;
}
}
.sidebar .nav-link {
font-weight: 400;
color: #333;
}
.sidebar .nav-link .feather {
margin-right: 4px;
color: #999;
}
.sidebar .nav-link:hover .feather,
.sidebar .nav-link.active .feather {
color: inherit;
}
.sidebar-heading {
font-size: 0.75rem;
text-transform: uppercase;
}
.sidebar-brand {
width: 80%;
}
.sidebar-search {
text-align: center;
width: 20%;
}
.sidebar-addon {
height: 40px;
}
.sidebar-link {
display: inline-block;
width: 80%;
}
.sidebar-link-addon {
display: inline-block;
width: 10%;
}
/*
* Content
*/
[role="main"] {
padding-top: 20px;
margin-bottom: 20px;
min-height: 100%;
height: 100%;
}
@media (min-width: 768px) {
[role="main"] {
padding-top: 20px;
padding-bottom: 20px;
}
}
@media only screen and (max-width: 768px) {
.navbar-default .navbar-brand {
padding-top: 10px;

View File

@ -1 +1 @@
.btn-outline-primary,.btn-warning{color:#fff!important;background-color:#000;border-color:#000}.has-error div,.has-error input,.has-error textarea{border-color:#cc4135}#frm_search,.search-bar-input,.search-bar-input .btn{padding-top:10px;height:45px}.footer{padding-top:20px}.navbarMenuWrapper{background-color:#f5f5f5}.navbarMenu>ul>li>a:hover{color:#cc4135!important}.navbarMenu{padding-right:0;padding-left:0}.product-wrapper>a:hover{color:#cc4135!important}#navbar,#navbar>.navbar-nav,#navbar>.navbar-nav>li>a,.navbar-header,.navbar-static-top{margin-bottom:0;height:100px!important}#navbar>.navbar-nav>li>a{padding-top:35px}.pagination>li>a{background-color:#cc4135!important}body .popover{display:none!important}.navbar-brand{color:#cc4135!important;letter-spacing:4px;padding-left:20px!important;padding-top:0!important;height:80px!important;font-size:55px!important}.navbar-brand,.navbar-brand-image{height:80px;padding-left:10px;padding-top:10px}.navbar-default .badge{background-color:#cc4135}#empty-cart:active,#empty-cart:active:hover,#empty-cart:focus,#empty-cart:hover,.pushy-link:active,.pushy-link:active:hover,.pushy-link:focus,.pushy-link:hover{border-color:#cc4135;background-color:#cc4135}.navActive>a{margin-bottom:0;padding-top:15px;border-bottom:5px solid #cc4135}#navbar,#navbar>.navbar-nav,#navbar>.navbar-nav>li>a,.navbar-header,.navbar-static-top{background-color:#fff}.navbar-default .navbar-nav>li>a{color:#838b8f;font-size:20px}.global-result-type{color:#8d8d8d}.global-result:hover{background-color:#007bff}.global-result:hover .global-result-detail,.global-result:hover .global-result-type,.global-result:hover .global-result-type .fal{color:#fff!important}.global-result a{text-decoration:none!important}.global-result:hover{cursor:pointer}.global-result:first-child{border-top-left-radius:0;border-top-right-radius:0}.global-result{border-left:0;border-right:0}.global-search-modal-content,.global-search-modal-header{background-color:transparent;border:none}#global-search-results{padding-right:0;border-bottom-left-radius:.3rem;border-bottom-right-radius:.3rem}.global-search-form{margin-bottom:0}#global-search-value{border-bottom-right-radius:0}.search-input-addon{border-bottom-left-radius:0}@media only screen and (max-width:768px){.navbar-default .navbar-brand{padding-top:10px}.navbar-default .navbar-nav>li>a{font-size:16px}.searchBarWrapper{padding-top:10px}.navbarMenuWrapper{padding-left:0;padding-right:0}.navbarMenuOuter{padding-left:0;padding-right:0}.navActive>a{color:#fff!important}.navbarMenu{padding-right:7.5px;padding-left:7.5px}.navActive>a{color:#fff!important;background-color:#cc4135;border-bottom:none}.footer{padding-top:10px}}
body,html{height:100%;background-color:#f8f9fa!important}.content-body{margin-bottom:0}.feather{width:16px;height:16px}.btn-outline-danger,.btn-outline-info,.btn-outline-primary,.btn-outline-success,.btn-outline-warning{background-color:#fff}.btn-outline-primary{color:#fff!important;background-color:#000;border-color:#000}.btn-outline-danger{color:#dc3545!important}.btn-outline-danger:hover{color:#fff!important}.has-error div,.has-error input,.has-error textarea{border-color:#cc4135}#frm_search,.search-bar-input,.search-bar-input .btn{padding-top:10px;height:45px}.footer{padding-top:20px}.admin-menu{padding-left:0}.admin-menu .list-group-item{border-bottom:none}.navbarMenuWrapper{background-color:#f5f5f5}.navbarMenu>ul>li>a:hover{color:#cc4135!important}.navbarMenu{padding-right:0;padding-left:0}.product-wrapper>a:hover{color:#cc4135!important}#navbar,#navbar>.navbar-nav,#navbar>.navbar-nav>li>a,.navbar-header,.navbar-static-top{margin-bottom:0;height:100px!important}#navbar>.navbar-nav>li>a{padding-top:35px}.pagination>li>a{background-color:#cc4135!important}.admin-card{background-color:#fff!important;border-radius:5px;padding:15px;margin:10px;box-shadow:0 0 1px rgba(0,0,0,.12),0 1px 6px rgba(0,0,0,.03),0 6px 10px -8px rgba(0,0,0,.1)}.admin-card-body{padding:5px}body .popover{display:none!important}.navbar-brand{color:#cc4135!important;letter-spacing:4px;padding-left:20px!important;padding-top:0!important;height:80px!important;font-size:55px!important}.navbar-brand,.navbar-brand-image{height:80px;padding-left:10px;padding-top:10px}.navbar-default .badge{background-color:#cc4135}#empty-cart:active,#empty-cart:active:hover,#empty-cart:focus,#empty-cart:hover,.pushy-link:active,.pushy-link:active:hover,.pushy-link:focus,.pushy-link:hover{border-color:#cc4135;background-color:#cc4135}.navActive>a{margin-bottom:0;padding-top:15px;border-bottom:5px solid #cc4135}#navbar,#navbar>.navbar-nav,#navbar>.navbar-nav>li>a,.navbar-header,.navbar-static-top{background-color:#fff}.navbar-default .navbar-nav>li>a{color:#838b8f;font-size:20px}.global-result-type{color:#8d8d8d}.global-result:hover{background-color:#007bff}.global-result:hover .global-result-detail,.global-result:hover .global-result-type,.global-result:hover .global-result-type .fal{color:#fff!important}.global-result a{text-decoration:none!important}.global-result:hover{cursor:pointer}.global-result:first-child{border-top-left-radius:0;border-top-right-radius:0}.global-result{border-left:0;border-right:0}.global-search-modal-content,.global-search-modal-header{background-color:transparent;border:none}#global-search-results{padding-right:0;border-bottom-left-radius:.3rem;border-bottom-right-radius:.3rem}.global-search-form{margin-bottom:0}#global-search-value{border-bottom-right-radius:0}.search-input-addon{border-bottom-left-radius:0}.sidebar{position:fixed;top:0;bottom:0;left:0;z-index:100;padding:0;background-color:#fff;box-shadow:inset -1px 0 0 rgba(0,0,0,.1)}.sidebar-sticky{position:relative;top:0;height:100vh;padding-top:15px;overflow-x:hidden;overflow-y:auto}@supports ((position:-webkit-sticky) or (position:sticky)){.sidebar-sticky{position:-webkit-sticky;position:sticky}}.sidebar .nav-link{font-weight:400;color:#333}.sidebar .nav-link .feather{margin-right:4px;color:#999}.sidebar .nav-link.active .feather,.sidebar .nav-link:hover .feather{color:inherit}.sidebar-heading{font-size:.75rem;text-transform:uppercase}.sidebar-brand{width:80%}.sidebar-search{text-align:center;width:20%}.sidebar-addon{height:40px}.sidebar-link{display:inline-block;width:80%}.sidebar-link-addon{display:inline-block;width:10%}[role=main]{padding-top:20px;margin-bottom:20px;min-height:100%;height:100%}@media (min-width:768px){[role=main]{padding-top:20px;padding-bottom:20px}}@media only screen and (max-width:768px){.navbar-default .navbar-brand{padding-top:10px}.navbar-default .navbar-nav>li>a{font-size:16px}.searchBarWrapper{padding-top:10px}.navbarMenuWrapper{padding-left:0;padding-right:0}.navbarMenuOuter{padding-left:0;padding-right:0}.navActive>a{color:#fff!important}.navbarMenu{padding-right:7.5px;padding-left:7.5px}.navActive>a{color:#fff!important;background-color:#cc4135;border-bottom:none}.footer{padding-top:10px}}

View File

@ -1,15 +1,46 @@
@accent-color: #cc4135;
@danger-color: #dc3545;
@nav-menu-bg: #f5f5f5;
@btn-danger-color-txt: #ffffff;
@btn-danger-color-bg: #000000;
@btn-danger-color-border: #000000;
.btn-warning, .btn-outline-primary {
html,body {
height: 100%;
background-color: #f8f9fa !important;
}
.content-body {
margin-bottom: 0;
}
.feather{
width: 16px;
height: 16px;
}
.btn-outline-primary,
.btn-outline-success,
.btn-outline-danger,
.btn-outline-warning,
.btn-outline-info {
background-color: white;
}
.btn-outline-primary {
color: @btn-danger-color-txt !important;
background-color:@btn-danger-color-bg;
border-color: @btn-danger-color-border;
}
.btn-outline-danger{
color: @danger-color !important;
}
.btn-outline-danger:hover{
color: @btn-danger-color-txt !important;
}
.has-error input, .has-error textarea, .has-error div {
border-color: @accent-color;
}
@ -23,6 +54,14 @@
padding-top: 20px;
}
.admin-menu{
padding-left: 0;
}
.admin-menu .list-group-item {
border-bottom: none;
}
.navbarMenuWrapper{
background-color: @nav-menu-bg;
}
@ -53,6 +92,18 @@
background-color: @accent-color !important;
}
.admin-card {
background-color: white !important;
border-radius: 5px;
padding: 15px;
margin: 10px;
box-shadow: 0 0 1px rgba(0,0,0,.12), 0 1px 6px rgba(0,0,0,.03), 0 6px 10px -8px rgba(0,0,0,.1);
}
.admin-card-body {
padding: 5px;
}
/* Fixes summernote editor issue: https://github.com/summernote/summernote/issues/2516 */
body .popover{display:none !important; }
@ -151,6 +202,98 @@ body .popover{display:none !important; }
border-bottom-left-radius: 0;
}
/*
* Sidebar
*/
.sidebar {
position: fixed;
top: 0;
bottom: 0;
left: 0;
z-index: 100;
padding: 0;
background-color: white;
box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}
.sidebar-sticky {
position: relative;
top: 0;
height: 100vh;
padding-top: 15px;
overflow-x: hidden;
overflow-y: auto;
}
@supports ((position: -webkit-sticky) or (position: sticky)) {
.sidebar-sticky {
position: -webkit-sticky;
position: sticky;
}
}
.sidebar .nav-link {
font-weight: 400;
color: #333;
}
.sidebar .nav-link .feather {
margin-right: 4px;
color: #999;
}
.sidebar .nav-link:hover .feather,
.sidebar .nav-link.active .feather {
color: inherit;
}
.sidebar-heading {
font-size: .75rem;
text-transform: uppercase;
}
.sidebar-brand {
width: 80%;
}
.sidebar-search {
text-align: center;
width: 20%;
}
.sidebar-addon {
height: 40px;
}
.sidebar-link {
display: inline-block;
width: 80%;
}
.sidebar-link-addon {
display: inline-block;
width: 10%;
}
/*
* Content
*/
[role="main"] {
padding-top: 20px;
margin-bottom: 20px;
min-height: 100%;
height: 100%;
}
@media (min-width: 768px) {
[role="main"] {
padding-top: 20px;
padding-bottom: 20px;
}
}
@media only screen and (max-width: 768px){
.navbar-default .navbar-brand {
padding-top: 10px;

View File

@ -44,6 +44,11 @@ html, body {
border-bottom-left-radius: 4px;
}
.feather{
width: 16px;
height: 16px;
}
.dragable_item{
cursor: move;
}

View File

@ -28,6 +28,10 @@ body {
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
}
.feather {
width: 16px;
height: 16px;
}
.dragable_item {
cursor: move;
}

File diff suppressed because one or more lines are too long

View File

@ -1,89 +1,87 @@
{{> partials/menu}}
<div class="col-sm-9 top-pad-10">
<main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4">
<form method="post" class="form-horizontal" id="customer-form" role="form" data-toggle="validator" novalidate="false">
<div class="row">
<div class="col-sm-10">
<div class="page-header">
<div class="btn-group float-right" role="group" aria-label="Basic example">
<button class="btn btn-outline-success" id="updateCustomer">Save customer <i class="fas fa-save"></i></button>
<button id="deleteCustomer" onclick="return confirm('Are you sure you want to delete this customer?');" class="btn btn-outline-info">Delete customer <i class="far fa-trash-alt"></i></button>
</div>
<h2>Customer</h2>
<div class="col-sm-12">
<div class="page-header">
<div class="btn-group float-right" role="group" aria-label="Basic example">
<button class="btn btn-outline-success" id="updateCustomer">Save customer</button>
<button id="deleteCustomer" onclick="return confirm('Are you sure you want to delete this customer?');" class="btn btn-outline-danger">Delete customer</button>
</div>
<h2>Customer</h2>
</div>
<div class="col-sm-10">
<div class="form-group">
<label class="control-label">Email *</label>
<input type="text" class="form-control" name="email" id="email" value={{result.email}} required>
</div>
</div>
<div class="col-sm-5">
<div class="form-group">
<label class="control-label">{{ @root.__ "First name" }} *</label>
<input type="text" class="form-control" name="firstName" id="firstName" value={{result.firstName}} required>
</div>
</div>
<div class="col-sm-5">
<div class="form-group">
<label class="control-label">{{ @root.__ "Last name" }} *</label>
<input type="text" class="form-control" name="lastName" id="lastName" value={{result.lastName}} required>
</div>
</div>
<div class="col-sm-10">
<div class="form-group">
<label class="control-label">{{ @root.__ "Address 1" }} *</label>
<input type="text" class="form-control" name="address1" id="address1" value={{result.address1}} required>
</div>
</div>
<div class="col-sm-10">
<div class="form-group">
<label class="control-label">{{ @root.__ "Address 2" }}</label>
<input type="text" class="form-control" name="address2" id="address2" value={{result.address2}}>
</div>
</div>
<div class="col-sm-10">
<div class="form-group">
<label class="control-label">{{ @root.__ "Country" }} *</label>
<select class="form-control" id="country" name="country" required>
<option value="" disabled selected>Select Country</option>
{{#each countryList}}
<option {{selectState this @root.result.country}} value="{{this}}">{{this}}</option>
{{/each}}
</select>
</div>
</div>
<div class="col-sm-5">
<div class="form-group">
<label class="control-label">{{ @root.__ "State" }} *</label>
<input type="text" class="form-control" name="state" id="state" value={{result.state}} required>
</div>
</div>
<div class="col-sm-5">
<div class="form-group">
<label class="control-label">{{ @root.__ "Postcode" }} *</label>
<input type="text" class="form-control" name="postcode" id="postcode" value={{result.postcode}} required>
</div>
</div>
<div class="col-sm-5">
<div class="form-group">
<label class="control-label">{{ @root.__ "Phone number" }} *</label>
<input type="text" class="form-control" name="phone" id="phone" value={{result.phone}} required>
</div>
</div>
<div class="col-sm-5">
<div class="form-group">
<label class="control-label">{{ @root.__ "Password" }}</label>
<input type="password" class="form-control" name="password" id="password">
<p class="help-block">Only populate if wanting to reset the customers password</p>
</div>
</div>
<div class="col-sm-10">
<div class="form-group">
<label class="control-label">{{ @root.__ "Creation date" }}</label>
<input type="text" class="form-control" value="{{formatDate result.created "DD/MM/YYYY hh:mmA"}}" readonly>
</div>
</div>
<input type="hidden" name="customerId" id="customerId" value="{{result._id}}">
</div>
<div class="col-sm-12">
<div class="form-group">
<label class="control-label">Email *</label>
<input type="text" class="form-control" name="email" id="email" value={{result.email}} required>
</div>
</div>
<div class="col-sm-5">
<div class="form-group">
<label class="control-label">{{ @root.__ "First name" }} *</label>
<input type="text" class="form-control" name="firstName" id="firstName" value={{result.firstName}} required>
</div>
</div>
<div class="col-sm-5">
<div class="form-group">
<label class="control-label">{{ @root.__ "Last name" }} *</label>
<input type="text" class="form-control" name="lastName" id="lastName" value={{result.lastName}} required>
</div>
</div>
<div class="col-sm-12">
<div class="form-group">
<label class="control-label">{{ @root.__ "Address 1" }} *</label>
<input type="text" class="form-control" name="address1" id="address1" value={{result.address1}} required>
</div>
</div>
<div class="col-sm-12">
<div class="form-group">
<label class="control-label">{{ @root.__ "Address 2" }}</label>
<input type="text" class="form-control" name="address2" id="address2" value={{result.address2}}>
</div>
</div>
<div class="col-sm-12">
<div class="form-group">
<label class="control-label">{{ @root.__ "Country" }} *</label>
<select class="form-control" id="country" name="country" required>
<option value="" disabled selected>Select Country</option>
{{#each countryList}}
<option {{selectState this @root.result.country}} value="{{this}}">{{this}}</option>
{{/each}}
</select>
</div>
</div>
<div class="col-sm-5">
<div class="form-group">
<label class="control-label">{{ @root.__ "State" }} *</label>
<input type="text" class="form-control" name="state" id="state" value={{result.state}} required>
</div>
</div>
<div class="col-sm-5">
<div class="form-group">
<label class="control-label">{{ @root.__ "Postcode" }} *</label>
<input type="text" class="form-control" name="postcode" id="postcode" value={{result.postcode}} required>
</div>
</div>
<div class="col-sm-5">
<div class="form-group">
<label class="control-label">{{ @root.__ "Phone number" }} *</label>
<input type="text" class="form-control" name="phone" id="phone" value={{result.phone}} required>
</div>
</div>
<div class="col-sm-5">
<div class="form-group">
<label class="control-label">{{ @root.__ "Password" }}</label>
<input type="password" class="form-control" name="password" id="password">
<p class="help-block">Only populate if wanting to reset the customers password</p>
</div>
</div>
<div class="col-sm-12">
<div class="form-group">
<label class="control-label">{{ @root.__ "Creation date" }}</label>
<input type="text" class="form-control" value="{{formatDate result.created "DD/MM/YYYY hh:mmA"}}" readonly>
</div>
</div>
<input type="hidden" name="customerId" id="customerId" value="{{result._id}}">
</form>
</div>
</main>

View File

@ -1,5 +1,5 @@
{{> partials/menu}}
<div class="col-sm-9">
<main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4">
<div class="col-sm-12">
<h2>Customers</h2>
</div>
@ -8,7 +8,7 @@
<input type="text" name="customer_filter" id="customer_filter" class="form-control" placeholder="Filter customers">
<div class="input-group-append">
<button type="button" class="btn btn-outline-success" id="btn_customer_filter">Filter</button>
<a href="/admin/customers" class="hidden-xs btn btn-outline-warning"><i class="fa fa-times" aria-hidden="true"></i></a>
<a href="/admin/customers" class="hidden-xs btn btn-outline-warning"><i class="feather" data-feather="x-octagon"></i></a>
</div>
</div>
<p class="text-warning top-pad-10">{{ @root.__ "Customers can be filtered by: email, name or phone number" }}</p>
@ -61,4 +61,4 @@
{{ @root.__ "No orders found" }}
</h4>
{{/if}}
</div>
</main>

View File

@ -1,5 +1,5 @@
{{> partials/menu}}
<div class="col-sm-9">
<main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4">
<div class="col-sm-12">
<h2>Dashboard</h2>
</div>
@ -71,4 +71,4 @@
</div>
</div>
</div>
</div>
</main>

View File

@ -47,6 +47,7 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.20.2/mode/css/css.min.js" integrity="sha256-D5oJ11cOmRhXSYWELwG2U/XYH3YveZJr9taRYLZ2DSM=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.20.2/mode/xml/xml.min.js" integrity="sha256-ERFGS58tayDq5kkyNwd/89iZZ+HglMH7eYXxG1hxTvA=" crossorigin="anonymous"></script>
{{/if}}
<script src="https://cdnjs.cloudflare.com/ajax/libs/feather-icons/4.25.0/feather.min.js" integrity="sha256-NvgyqkM9Vu1DLHkzxTxXQxZNdDymUlwhXcSJEqUfPiU=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/numeral.js/2.0.6/numeral.min.js" integrity="sha256-LlHVI5rUauudM5ZcZaD6hHPHKrA7CSefHHnKgq+/AZc=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.7/js/tether.min.js" integrity="sha256-4lietOiwRDBKx1goZZbRiwB06L+/bPYEGDIKZt82bgg=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/1000hz-bootstrap-validator/0.11.9/validator.min.js"></script>
@ -158,22 +159,18 @@
{{else}}
<body>
{{/if}}
{{#unless admin}}
<nav class="navbar navbar-expand-lg justify-content-between mainNavBar">
{{#if admin}}
<a class="navbar-brand" href="/admin"><img class="img-fluid" src="/images/logo-admin.png"></a>
{{else}}
<a class="navbar-brand" href="/">{{@root.config.cartTitle}}</a>
{{/if}}
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarMenu" aria-controls="navbarMenu" aria-expanded="false" aria-label="Toggle navigation">
<i class="fa fa-bars" aria-hidden="true"></i>
<i class="feather" data-feather="menu"></i>
</button>
<div id="navbarText">
<ul class="navbar-nav ml-auto">
{{#unless admin}}
{{#ifCond @root.config.enableLanguages "!=" false}}
<div class="dropdown d-none d-sm-block">
<button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fas fa-globe-americas"></i>
<i class="feather" data-feather="globe"></i>
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
{{#availableLanguages}}
@ -182,23 +179,15 @@
</div>
</div>
{{/ifCond}}
{{/unless}}
{{#unless admin}}
{{#if @root.session.cart}}
<li class="nav-item"><a href="/checkout/cart" class="btn menu-btn"><i class="fa fa-shopping-cart" aria-hidden="true"></i> {{ @root.__ "Cart" }} <span class="badge badge-danger" id="cart-count">{{@root.session.totalCartItems}}</span></a></li>
{{else}}
<li class="nav-item"><a href="/checkout/cart" class="btn menu-btn"><i class="fa fa-shopping-cart" aria-hidden="true"></i> {{ @root.__ "Cart" }} <span class="badge badge-danger" id="cart-count">0</span></a></li>
{{/if}}
{{/unless}}
{{#if admin}}
{{#if @root.session.user}}
<li class="nav-item"><a href="#" data-toggle="modal" data-target="#globalSearchModal" class="pad-right-15"><i class="fas fa-search"></i></a></li>
<li class="nav-item"><a href="/admin/logout"><i class="fas fa-sign-out-alt"></i> Logout</a></li>
{{/if}}
{{#if @root.session.cart}}
<li class="nav-item"><a href="/checkout/cart" class="btn menu-btn"><i class="feather" data-feather="shopping-cart"></i> {{ @root.__ "Cart" }} <span class="badge badge-danger" id="cart-count">{{@root.session.totalCartItems}}</span></a></li>
{{else}}
<li class="nav-item"><a href="/checkout/cart" class="btn menu-btn"><i class="feather" data-feather="shopping-cart"></i></i> {{ @root.__ "Cart" }} <span class="badge badge-danger" id="cart-count">0</span></a></li>
{{/if}}
</ul>
</div>
</nav>
{{/unless}}
<div class="site-overlay"></div>
{{#unless admin}}
{{#ifCond page '!=' 'checkout'}}
@ -206,7 +195,7 @@
<div id="cart" class="col-md-12 pad-left-12 top-pad-10 pushy pushy-right">
<div class="row {{checkout}}">
<div class="col-sm-12 text-right">
<button class="pushy-link btn btn-primary" type="button">X</button>
<button class="pushy-link btn btn-primary" type="button"><i class="feather" data-feather="x"></i></button>
</div>
</div>
<div class="row">
@ -224,13 +213,9 @@
{{/ifCond}}
{{/ifCond}}
{{/unless}}
<div class="container-fluid content-body" id="container">
<div class="row">
{{#if admin}}
{{{body}}}
{{else}}
<div class="container-fluid content-body h-100" id="container">
<div class="row h-100">
{{{body}}}
{{/if}}
</div>
</div>
<input type="hidden" id="input_notify_message" value="{{message}}">
@ -265,7 +250,7 @@
<div class="form-group global-search-form">
<div class="input-group">
<div class="input-group-prepend">
<label class="input-group-text search-input-addon" for="global-search-value"><i class="fas fa-search"></i></label>
<label class="input-group-text search-input-addon" for="global-search-value"><i class="feather" data-feather="search"></i></label>
</div>
<input type="text" class="form-control form-control-lg" id="global-search-value">
</div>
@ -278,5 +263,8 @@
</div>
{{/if}}
{{> partials/confirmModal}}
<script>
feather.replace();
</script>
</body>
</html>

View File

@ -1,14 +1,9 @@
{{> partials/menu}}
<div class="col-sm-9">
<main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4">
<div class="col-sm-12">
<h2>Create Order</h2>
<h2>{{ @root.__ "Create Order" }} <span class="float-right"><button id="orderCreate" class="btn btn-outline-success float-right">{{ @root.__ "Create order" }}</button></span></h2>
</div>
<div class="order-layout col-md-12">
<div class="row">
<div class="col-12 bottom-pad-20">
<button id="orderCreate" class="btn btn-outline-success float-right">{{ @root.__ "Create order" }}</button>
</div>
</div>
<div class="order-layout col-md-12">
<div class="row">
<div class="col-5">
<form id="createOrderForm">
@ -113,4 +108,4 @@
</div>
</div>
</div>
</div>
</main>

View File

@ -1,5 +1,5 @@
{{> partials/menu}}
<div class="col-sm-9">
<main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4">
<div class="col-sm-12">
<h2>View Order</h2>
</div>
@ -73,4 +73,4 @@
</ul>
<input type="hidden" id="order_id" value="{{result._id}}">
</div>
</div>
</main>

View File

@ -1,5 +1,5 @@
{{> partials/menu}}
<div class="col-sm-9">
<main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4">
<div class="col-sm-12">
<h2>Orders</h2>
</div>
@ -9,7 +9,7 @@
<div class="input-group-append">
<button class="btn btn-outline-success" id="btn_order_filter">{{ @root.__ "Filter" }}</button>
<a href="/admin/orders/bystatus/" class="hidden-xs btn btn-outline-info orderFilterByStatus">{{ @root.__ "By status" }}</a>
<a href="/admin/orders" class="hidden-xs btn btn-outline-warning"><i class="fa fa-times" aria-hidden="true"></i></a>
<a href="/admin/orders" class="hidden-xs btn btn-outline-warning"><i class="feather" data-feather="x-octagon"></i></a>
</div>
</div>
<div class="orderFilter">
@ -46,7 +46,7 @@
<li class="list-group-item">
<div class="float-right top-pad-5">
{{ @root.__ "Status" }}: <span class="text-{{getStatusColor this.orderStatus}}">{{this.orderStatus}}</span>
<a class="text-danger" href="/admin/order/delete/{{this._id}}" onclick="return confirm('Are you sure you want to delete this order?');"> <i class="far fa-trash-alt"></i></a>
<a class="text-danger" href="/admin/order/delete/{{this._id}}" onclick="return confirm('Are you sure you want to delete this order?');"> <i class="feather" data-feather="trash-2"></i></a>
</div>
<div class="top-pad-5">
<a href="/admin/order/view/{{this._id}}" class="text-success">View order</a> - <span class="text-info">Date: </span>{{formatDate this.orderDate "DD/MM/YYYY hh:mm"}} | <span class="text-info">Email:</span> {{this.orderEmail}} | <span class="text-info">{{ @root.__ "Last name" }}:</span> {{this.orderLastname}}
@ -62,4 +62,4 @@
{{/if}}
</ul>
</div>
</div>
</main>

View File

@ -1,29 +1,93 @@
<div class="col-sm-3">
<h2>&nbsp;</h2>
<ul class="list-group">
<li class="list-group-item"><i class="far fa-chart-bar fa-icon"></i> &nbsp; <a href="/admin/dashboard">{{ @root.__ "Dashboard" }}</a></li>
<li class="list-group-item"><strong>Products</strong></li>
{{#ifCond session.isAdmin '===' true}}
<li class="list-group-item"><i class="far fa-plus-square"></i> &nbsp; <a href="/admin/product/new">{{ @root.__ "New" }}</a></li>
{{/ifCond}}
<li class="list-group-item"><i class="fas fa-list fa-icon"></i> &nbsp; <a href="/admin/products">{{ @root.__ "List" }}</a></li>
<li class="list-group-item"><strong>Orders</strong></li>
<li class="list-group-item"><i class="fas fa-cubes fa-icon"></i> &nbsp; <a href="/admin/orders">{{ @root.__ "List" }}</a></li>
<li class="list-group-item"><i class="fas fa-cube fa-icon"></i> &nbsp; <a href="/admin/order/create">{{ @root.__ "Create" }}</a></li>
<li class="list-group-item"><strong>Customers</strong></li>
<li class="list-group-item"><i class="fas fa-users fa-icon"></i> &nbsp; <a href="/admin/customers">{{ @root.__ "List" }}</a></li>
<li class="list-group-item"><strong>Users</strong></li>
{{#ifCond session.isAdmin '===' true}}
<li class="list-group-item"><i class="fas fa-user-plus fa-icon"></i> &nbsp; <a href="/admin/user/new">{{ @root.__ "New" }}</a></li>
<li class="list-group-item"><i class="fas fa-user fa-icon"></i> &nbsp; <a href="/admin/users">{{ @root.__ "Edit" }}</a></li>
{{/ifCond}}
<li class="list-group-item"><i class="fas fa-user-circle"></i> &nbsp; <a href="/admin/user/edit/{{session.userId}}">My Account</a></li>
<li class="list-group-item"><strong>{{ @root.__ "Settings" }}</strong></li>
<li class="list-group-item"><i class="fas fa-cog fa-icon"></i> &nbsp; <a href="/admin/settings">{{ @root.__ "General settings" }}</a></li>
<li class="list-group-item"><i class="fas fa-bars fa-icon"></i> &nbsp; <a href="/admin/settings/menu">Menu</a></li>
<li class="list-group-item"><i class="far fa-file fa-icon"></i> &nbsp; <a href="/admin/settings/pages">{{ @root.__ "Static pages" }}</a></li>
{{#ifCond session.isAdmin '===' true}}
<li class="list-group-item"><i class="fas fa-tag"></i> &nbsp; <a href="/admin/settings/discounts">{{ @root.__ "Discount codes" }}</a></li>
{{/ifCond}}
</ul>
</div>
<nav class="col-md-2 d-none d-md-block sidebar">
<div class="sidebar-sticky">
<ul class="nav flex-column">
<li class="nav-item">
<a href="/admin"><img class="sidebar-brand" src="/images/logo-admin.png"></a>
<a href="#" data-toggle="modal" data-target="#globalSearchModal" class="sidebar-search text-muted"><i class="feather" data-feather="search"></i></a>
</li>
<li class="nav-item">
<a class="nav-link" href="/admin/dashboard">
<i class="feather" data-feather="bar-chart"></i> &nbsp;
{{ @root.__ "Dashboard" }}
</a>
</li>
<h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted">
<span>Manage</span>
</h6>
{{#ifCond session.isAdmin '===' true}}
<li class="nav-item sidebar-addon">
<a class="nav-link sidebar-link" href="/admin/products">
<i class="feather" data-feather="tag"></i> &nbsp;
Products
</a>
<a class="sidebar-link-addon text-muted" href="/admin/product/new">
<i class="feather" data-feather="plus"></i>
</a>
</li>
{{else}}
<li class="nav-item">
<a class="nav-link" href="/admin/products">
<i class="feather" data-feather="tag"></i> &nbsp;
Products
</a>
</li>
{{/ifCond}}
<li class="nav-item sidebar-addon">
<a class="nav-link sidebar-link" href="/admin/orders">
<i class="feather" data-feather="package"></i> &nbsp;
Orders
</a>
<a class="sidebar-link-addon text-muted" href="/admin/order/create">
<i class="feather" data-feather="plus"></i>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/admin/customers">
<i class="feather" data-feather="users"></i> &nbsp;
Customers
</a>
</li>
<li class="nav-item sidebar-addon">
<a class="nav-link sidebar-link" href="/admin/users">
<i class="feather" data-feather="user"></i> &nbsp;
Users
</a>
<a class="sidebar-link-addon text-muted" href="/admin/user/new">
<i class="feather" data-feather="plus"></i>
</a>
</li>
</ul>
<h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted">
<span>Settings</span>
</h6>
<ul class="nav flex-column mb-2">
<li class="nav-item">
<a class="nav-link" href="/admin/settings">
<i class="feather" data-feather="sliders"></i> &nbsp;
{{ @root.__ "General settings" }}
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/admin/settings/menu">
<i class="feather" data-feather="menu"></i> &nbsp;
{{ @root.__ "Menu" }}
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/admin/settings/pages">
<i class="feather" data-feather="file-text"></i> &nbsp;
{{ @root.__ "Static pages" }}
</a>
</li>
{{#ifCond session.isAdmin '===' true}}
<li class="nav-item">
<a class="nav-link" href="/admin/settings/discounts">
<i class="feather" data-feather="code"></i> &nbsp;
{{ @root.__ "Discount codes" }}
</a>
</li>
{{/ifCond}}
</ul>
</div>
</nav>

View File

@ -1,3 +1,3 @@
<div class="paypal_button col-sm-12 text-center">
<button id="checkout_paypal" class="btn btn-outline-success waves-effect waves-light blue darken-3" type="submit"><i class="fab fa-cc-paypal"></i> Pay with PayPal <i class="fab fa-cc-paypal"></i></button>
<button id="checkout_paypal" class="btn btn-outline-success waves-effect waves-light blue darken-3" type="submit">Pay with PayPal</button>
</div>

View File

@ -18,7 +18,7 @@
data-locale="auto"
data-zip-code="false"
data-currency="{{@root.paymentConfig.stripeCurrency}}">
<i class="fab fa-stripe fa-lg" aria-hidden="true"></i> Pay Now <i class="fab fa-stripe fa-lg" aria-hidden="true"></i>
Pay Now
</button>
<script src="https://checkout.stripe.com/v2/checkout.js"></script>
</form>

View File

@ -1,16 +1,16 @@
{{> partials/menu}}
<div class="col-sm-9 top-pad-5">
<main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4">
<form class="form-horizontal" id="productEditForm" data-toggle="validator">
<div class="col-sm-12">
<div class="col-12">
<div class="page-header">
<div class="float-right">
<button type="button" class="btn btn-outline-info" data-toggle="modal" data-target="#myModal">{{ @root.__ "Upload image" }}</button>
<button id="productUpdate" class="btn btn-outline-success">{{ @root.__ "Save product" }} <i class="far fa-save"></i></button>
<button id="productUpdate" class="btn btn-outline-success">{{ @root.__ "Save product" }}</button>
</div>
<h2>{{ @root.__ "Edit product" }}</h2>
</div>
</div>
<div class="col-sm-10">
<div class="col-12">
<div class="form-group">
<label for="productTitle" class="control-label">{{ @root.__ "Product title" }} *</label>
<input type="text" id="productTitle" class="form-control" minlength="5" maxlength="200" value="{{result.productTitle}}" required/>
@ -44,13 +44,13 @@
</div>
</div>
{{/if}}
<div class="col-sm-10">
<div class="col-12">
<div class="form-group">
<label for="productDescription" class="control-label">{{ @root.__ "Product description" }} *</label>
<textarea minlength="5" rows="10" id="productDescription" class="form-control" required>{{result.productDescription}}</textarea>
</div>
</div>
<div class="col-sm-10">
<div class="col-12">
<div class="form-group">
<label class="control-label">Permalink</label>
<div class="input-group">
@ -62,7 +62,7 @@
<p class="help-block">{{ @root.__ "This sets a readable URL for the product" }}</p>
</div>
</div>
<div class="col-sm-10">
<div class="col-12">
<div class="form-group">
<input type="hidden" id="productOptions" value="{{stringify result.productOptions}}" />
<label class="control-label">{{ @root.__ "Product options" }}</label>
@ -111,7 +111,7 @@
</div>
</div>
{{#ifCond config.paymentGateway '==' 'stripe'}}
<div class="col-sm-10">
<div class="col-12">
<div class="form-group">
<label class="control-label">Subscription plan</label>
<input type="text" class="form-control" id="productSubscription" placeholder="plan_XXXXXXXXXXXXXX" value={{@root.result.productSubscription}}>
@ -119,7 +119,7 @@
</div>
</div>
{{/ifCond}}
<div class="col-sm-10">
<div class="col-12">
<div class="form-group">
<label for="productComment" class="control-label">{{ @root.__ "Allow comment" }}</label>
<div class="checkbox">
@ -130,7 +130,7 @@
<p class="help-block">{{ @root.__ "Allow free form comments when adding products to cart" }}</p>
</div>
</div>
<div class="col-sm-10">
<div class="col-12">
<div class="form-group">
<label for="productTags" class="control-label">{{ @root.__ "Product tag words" }}</label>
<input type="text" class="form-control" id="productTags" value="{{result.productTags}}">
@ -164,7 +164,7 @@
</div>
<input type="hidden" id="productId" value="{{result._id}}" />
</form>
</div>
</main>
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">

View File

@ -1,141 +1,143 @@
{{> partials/menu}}
<form class="form-horizontal" id="productNewForm" data-toggle="validator">
<div class="col-sm-12">
<div class="page-header">
<div class="float-right">
<button id="frm_edit_product_save" class="btn btn-outline-success" type="submit">Add product <i class="far fa-plus-square"></i></button>
</div>
<h2>{{ @root.__ "New product" }}</h2>
</div>
</div>
<div class="col-sm-10">
<div class="form-group">
<label for="productTitle" class="control-label">{{ @root.__ "Product title" }} *</label>
<input type="text" id="productTitle" class="form-control" minlength="5" maxlength="200" value="{{productTitle}}" required/>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="productPrice" class="control-label">{{ @root.__ "Product price" }} *</label>
<div class="input-group">
<div class="input-group-prepend">
<label class="input-group-text">{{currencySymbol config.currencySymbol}}</label>
<main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4">
<form class="form-horizontal" id="productNewForm" data-toggle="validator">
<div class="col-12">
<div class="page-header">
<div class="float-right">
<button id="frm_edit_product_save" class="btn btn-outline-success" type="submit">Add product</button>
</div>
<input type="number" id="productPrice" class="form-control" step="any" value="{{productPrice}}" required/>
<h2>{{ @root.__ "New product" }}</h2>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="productPublished" class="control-label">{{ @root.__ "Status" }}</label>
<select class="form-control" id="productPublished">
<option value="true" selected>{{ @root.__ "Published" }}</option>
<option value="false">{{ @root.__ "Draft" }}</option>
</select>
<div class="col-12">
<div class="form-group">
<label for="productTitle" class="control-label">{{ @root.__ "Product title" }} *</label>
<input type="text" id="productTitle" class="form-control" minlength="5" maxlength="200" value="{{productTitle}}" required/>
</div>
</div>
</div>
{{#if config.trackStock}}
<div class="col-sm-6">
<div class="form-group">
<label for="productStock" class="control-label">{{ @root.__ "Stock level" }}</label>
<input type="number" id="productStock" class="form-control" value="{{productStock}}" step="any" />
</div>
</div>
{{/if}}
<div class="col-sm-10">
<div class="form-group" id="editor-wrapper">
<label for="editor" class="control-label">{{ @root.__ "Product description" }} *</label>
<textarea minlength="5" rows="10" id="productDescription" class="form-control" required>{{productDescription}}</textarea>
</div>
</div>
<div class="col-sm-10">
<div class="form-group">
<label class="control-label">Permalink</label>
<div class="input-group">
<input type="text" class="form-control" id="productPermalink" placeholder="Permalink for the article" value={{productPermalink}}>
<div class="input-group-append">
<button class="btn btn-outline-success" id="validatePermalink" type="button">Validate</button>
<div class="col-sm-6">
<div class="form-group">
<label for="productPrice" class="control-label">{{ @root.__ "Product price" }} *</label>
<div class="input-group">
<div class="input-group-prepend">
<label class="input-group-text">{{currencySymbol config.currencySymbol}}</label>
</div>
<input type="number" id="productPrice" class="form-control" step="any" value="{{productPrice}}" required/>
</div>
</div>
<p class="help-block">{{ @root.__ "This sets a readable URL for the product" }}</p>
</div>
</div>
<div class="col-sm-10">
<div class="form-group">
<label class="control-label">{{ @root.__ "Product options" }}</label>
<input type="hidden" id="productOptions" value="{{result.productOptions}}" />
<ul class="list-group" id="product_opt_wrapper">
<li class="list-group-item">
<div class="row">
<div class="col-sm-2">
<strong>{{ @root.__ "Name" }}:</strong>
<input type="text" id="product_optName" class="form-control" placeholder="Size" />
<div class="col-sm-6">
<div class="form-group">
<label for="productPublished" class="control-label">{{ @root.__ "Status" }}</label>
<select class="form-control" id="productPublished">
<option value="true" selected>{{ @root.__ "Published" }}</option>
<option value="false">{{ @root.__ "Draft" }}</option>
</select>
</div>
</div>
{{#if config.trackStock}}
<div class="col-sm-6">
<div class="form-group">
<label for="productStock" class="control-label">{{ @root.__ "Stock level" }}</label>
<input type="number" id="productStock" class="form-control" value="{{productStock}}" step="any" />
</div>
</div>
{{/if}}
<div class="col-12">
<div class="form-group" id="editor-wrapper">
<label for="editor" class="control-label">{{ @root.__ "Product description" }} *</label>
<textarea minlength="5" rows="10" id="productDescription" class="form-control" required>{{productDescription}}</textarea>
</div>
</div>
<div class="col-12">
<div class="form-group">
<label class="control-label">Permalink</label>
<div class="input-group">
<input type="text" class="form-control" id="productPermalink" placeholder="Permalink for the article" value={{productPermalink}}>
<div class="input-group-append">
<button class="btn btn-outline-success" id="validatePermalink" type="button">Validate</button>
</div>
<div class="col-sm-2">
<strong>{{ @root.__ "Label" }}:</strong>
<input type="text" id="product_optLabel" class="form-control" placeholder="Select size"/>
</div>
<div class="col-sm-2">
<strong>{{ @root.__ "Type" }}:</strong>
<select id="product_optType" class="form-control">
<option value="select">Select</option>
<option value="radio">Radio</option>
<option value="checkbox">Checkbox</option>
</select>
</div>
<div class="col-sm-4">
<strong>{{ @root.__ "Options" }}:</strong>
<input type="text" id="product_optOptions" class="form-control" placeholder="comma, seporated, list"/>
</div>
<div class="col-sm-2 text-right"></br>
<button id="product_opt_add" class="btn btn-outline-success">{{ @root.__ "Add" }}</button>
</div></div>
</li>
{{#each options}}
</div>
<p class="help-block">{{ @root.__ "This sets a readable URL for the product" }}</p>
</div>
</div>
<div class="col-12">
<div class="form-group">
<label class="control-label">{{ @root.__ "Product options" }}</label>
<input type="hidden" id="productOptions" value="{{result.productOptions}}" />
<ul class="list-group" id="product_opt_wrapper">
<li class="list-group-item">
<div class="row">
<div class='col-sm-2 opt-name'>{{this.optName}}</div>
<div class='col-sm-2'>{{this.optLabel}}</div>
<div class='col-sm-2'>{{this.optType}}</div>
<div class='col-sm-4'>{{{this.optOptions}}}</div>
<div class='col-sm-2 text-right'>
<button class='product_opt_remove btn btn-outline-danger'>{{ @root.__ "Remove" }}</button>
</div>
<div class="col-sm-2">
<strong>{{ @root.__ "Name" }}:</strong>
<input type="text" id="product_optName" class="form-control" placeholder="Size" />
</div>
<div class="col-sm-2">
<strong>{{ @root.__ "Label" }}:</strong>
<input type="text" id="product_optLabel" class="form-control" placeholder="Select size"/>
</div>
<div class="col-sm-2">
<strong>{{ @root.__ "Type" }}:</strong>
<select id="product_optType" class="form-control">
<option value="select">Select</option>
<option value="radio">Radio</option>
<option value="checkbox">Checkbox</option>
</select>
</div>
<div class="col-sm-4">
<strong>{{ @root.__ "Options" }}:</strong>
<input type="text" id="product_optOptions" class="form-control" placeholder="comma, seporated, list"/>
</div>
<div class="col-sm-2 text-right"></br>
<button id="product_opt_add" class="btn btn-outline-success">{{ @root.__ "Add" }}</button>
</div></div>
</li>
{{/each}}
</ul>
<p class="help-block">{{ @root.__ "Here you can set options for your product. Eg: Size, color, style" }}</p>
</div>
</div>
{{#ifCond config.paymentGateway '==' 'stripe'}}
<div class="col-sm-10">
<div class="form-group">
<label class="control-label">Subscription plan</label>
<input type="text" class="form-control" id="productSubscription" placeholder="plan_XXXXXXXXXXXXXX">
<p class="help-block">First setup the plan in <strong>Stripe</strong> dashboard and enter the Plan ID. Format: plan_XXXXXXXXXXXXXX</p>
</div>
</div>
{{/ifCond}}
<div class="col-sm-10">
<div class="form-group">
<label for="productComment" class="control-label">{{ @root.__ "Allow comment" }}</label>
<div class="checkbox">
<label>
<input class="productComment" type="checkbox" {{checkedState result.productComment}} id="productComment">
</label>
{{#each options}}
<li class="list-group-item">
<div class="row">
<div class='col-sm-2 opt-name'>{{this.optName}}</div>
<div class='col-sm-2'>{{this.optLabel}}</div>
<div class='col-sm-2'>{{this.optType}}</div>
<div class='col-sm-4'>{{{this.optOptions}}}</div>
<div class='col-sm-2 text-right'>
<button class='product_opt_remove btn btn-outline-danger'>{{ @root.__ "Remove" }}</button>
</div>
</div>
</li>
{{/each}}
</ul>
<p class="help-block">{{ @root.__ "Here you can set options for your product. Eg: Size, color, style" }}</p>
</div>
<p class="help-block">{{ @root.__ "Allow free form comments when adding products to cart" }}</p>
</div>
</div>
<div class="col-sm-10">
<div class="form-group">
<label for="productTags" class="control-label">Product tag words</label>
<input type="text" class="form-control" id="productTags">
<p class="help-block">{{ @root.__ "Tag words used to indexed products, making them easier to find and filter." }}</p>
{{#ifCond config.paymentGateway '==' 'stripe'}}
<div class="col-12">
<div class="form-group">
<label class="control-label">Subscription plan</label>
<input type="text" class="form-control" id="productSubscription" placeholder="plan_XXXXXXXXXXXXXX">
<p class="help-block">First setup the plan in <strong>Stripe</strong> dashboard and enter the Plan ID. Format: plan_XXXXXXXXXXXXXX</p>
</div>
</div>
</div>
</form>
{{/ifCond}}
<div class="col-12">
<div class="form-group">
<label for="productComment" class="control-label">{{ @root.__ "Allow comment" }}</label>
<div class="checkbox">
<label>
<input class="productComment" type="checkbox" {{checkedState result.productComment}} id="productComment">
</label>
</div>
<p class="help-block">{{ @root.__ "Allow free form comments when adding products to cart" }}</p>
</div>
</div>
<div class="col-12">
<div class="form-group">
<label for="productTags" class="control-label">Product tag words</label>
<input type="text" class="form-control" id="productTags">
<p class="help-block">{{ @root.__ "Tag words used to indexed products, making them easier to find and filter." }}</p>
</div>
</div>
</form>
</main>
<script src="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.2/summernote.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.2/summernote.css" rel="stylesheet">
<script>

View File

@ -1,5 +1,5 @@
{{> partials/menu}}
<div class="col-sm-9">
<main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4">
<div class="col-sm-12">
<h2>Products</h2>
</div>
@ -8,7 +8,7 @@
<input type="text" name="product_filter" id="product_filter" class="form-control" placeholder="Filter products">
<div class="input-group-append">
<button class="btn btn-outline-success" id="btn_product_filter">Filter</button>
<a href="/admin/products" class="hidden-xs btn btn-outline-warning"><i class="fa fa-times" aria-hidden="true"></i></a>
<a href="/admin/products" class="hidden-xs btn btn-outline-warning"><i class="feather" data-feather="x-octagon"></i></a>
</div>
</div>
<p class="text-warning top-pad-10">{{ @root.__ "Products can be filtered by: product title or product description keywords" }}</p>
@ -25,7 +25,7 @@
</li>
{{#each results}}
<li class="list-group-item">
<button class="float-right btn text-danger btn-delete-product" data-id="{{this._id}}"> <i class="far fa-trash-alt"></i></button>
<button class="float-right btn text-danger btn-delete-product" data-id="{{this._id}}"> <i class="feather" data-feather="trash-2"></i></button>
<h4 class="float-right"><input id="{{this._id}}" class="publishedState" type="checkbox" {{checkedState this.productPublished}}></h4>
<div class="top-pad-8"><a href="/admin/product/edit/{{this._id}}">{{this.productTitle}}</a></div>
</li>

View File

@ -1,6 +1,6 @@
{{> partials/menu}}
<form class="form-horizontal col-sm-7" id="discountEditForm" data-toggle="validator">
<div class="row">
<main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4">
<form class="form-horizontal" id="discountEditForm" data-toggle="validator">
<div class="col-sm-12">
<div class="page-header">
<div class="float-right">
@ -9,13 +9,13 @@
<h2>{{ @root.__ "Edit discount" }}</h2>
</div>
</div>
<div class="col-10">
<div class="col-12">
<div class="form-group">
<label for="discountCode" class="control-label">{{ @root.__ "Discount code" }} *</label>
<input type="text" id="discountCode" class="form-control" minlength="1" maxlength="50" value="{{discount.code}}" required/>
</div>
</div>
<div class="col-sm-6">
<div class="col-12">
<div class="form-group">
<label for="discountType" class="control-label">{{ @root.__ "Discount type" }} *</label>
<select class="form-control" id="discountType">
@ -24,24 +24,24 @@
</select>
</div>
</div>
<div class="col-sm-10">
<div class="col-12">
<div class="form-group">
<label for="discountValue" class="control-label">{{ @root.__ "Discount value" }} *</label>
<input type="number" id="discountValue" class="form-control" minlength="1" maxlength="50" value="{{discount.value}}" required/>
</div>
</div>
<div class="col-sm-10">
<div class="col-12">
<div class="form-group">
<label for="discountStart" class="control-label">{{ @root.__ "Discount start" }} *</label>
<input id="discountStart" value="{{formatDate discount.start 'DD/MM/YYYY kk:mm'}}" />
</div>
</div>
<div class="col-sm-10">
<div class="col-12">
<div class="form-group">
<label for="discountEnd" class="control-label">{{ @root.__ "Discount end" }} *</label>
<input id="discountEnd" value="{{formatDate discount.end 'DD/MM/YYYY kk:mm'}}" />
</div>
</div>
<input type="hidden" id="discountId" value="{{discount._id}}">
</div>
</form>
</form>
</main>

View File

@ -1,7 +1,7 @@
{{> partials/menu}}
<form class="form-horizontal col-sm-7" id="discountNewForm" data-toggle="validator">
<div class="row">
<div class="col-sm-12">
<main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4">
<form class="form-horizontal" id="discountNewForm" data-toggle="validator">
<div class="col-12">
<div class="page-header">
<div class="float-right">
<button id="" class="btn btn-outline-success" type="submit">Add discount</button>
@ -9,13 +9,13 @@
<h2>{{ @root.__ "New discount" }}</h2>
</div>
</div>
<div class="col-10">
<div class="col-12">
<div class="form-group">
<label for="discountCode" class="control-label">{{ @root.__ "Discount code" }} *</label>
<input type="text" id="discountCode" class="form-control" minlength="1" maxlength="50" placeholder="CODE20" required/>
</div>
</div>
<div class="col-sm-6">
<div class="col-12">
<div class="form-group">
<label for="discountType" class="control-label">{{ @root.__ "Discount type" }} *</label>
<select class="form-control" id="discountType">
@ -24,23 +24,23 @@
</select>
</div>
</div>
<div class="col-sm-10">
<div class="col-12">
<div class="form-group">
<label for="discountValue" class="control-label">{{ @root.__ "Discount value" }} *</label>
<input type="number" id="discountValue" class="form-control" minlength="1" maxlength="50" placeholder="20" required/>
</div>
</div>
<div class="col-sm-10">
<div class="col-12">
<div class="form-group">
<label for="discountStart" class="control-label">{{ @root.__ "Discount start" }} *</label>
<input id="discountStart" />
</div>
</div>
<div class="col-sm-10">
<div class="col-12">
<div class="form-group">
<label for="discountEnd" class="control-label">{{ @root.__ "Discount end" }} *</label>
<input id="discountEnd" />
</div>
</div>
</div>
</form>
</form>
</main>

View File

@ -1,39 +1,37 @@
{{> partials/menu}}
<div class="col-sm-9">
<div class="row">
<div class="col-md-10">
<h2 class="clearfix">{{ @root.__ "Discount codes" }} <div class="float-right"><a href="/admin/settings/discount/new" class="btn btn-outline-success">{{ @root.__ "New Discount" }}</a></div></h2>
{{#if discounts}}
<ul class="list-group">
{{#each discounts}}
<li class="list-group-item">
<div class="row">
<div class="col-4 mt-2">
<span><strong>{{ @root.__ "Code" }}:</strong>&nbsp; {{this.code}}</span>
</div>
<div class="col-2 mt-2">
<span><strong>{{ @root.__ "Type" }}:</strong>&nbsp; {{this.type}}</span>
</div>
<div class="col-3 mt-2">
<span><strong>{{ @root.__ "Status" }}:</strong>
{{#ifCond (discountExpiry this.start this.end) '===' true}}
<span class="text-success">{{ @root.__ "Running" }}</span>
{{else}}
<span class="text-danger">{{ @root.__ "Not running" }}</span>
{{/ifCond}}
</span>
</div>
<div class="col-3 text-right">
<a class="btn btn-outline-success" href="/admin/settings/discount/edit/{{this._id}}">{{ @root.__ "Edit" }}</a>
<button class="btn btn-outline-danger" id="btnDiscountDelete" data-id="{{this._id}}">{{ @root.__ "Delete" }}</button>
</div>
<main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4">
<div class="col-md-12">
<h2 class="clearfix">{{ @root.__ "Discount codes" }} <div class="float-right"><a href="/admin/settings/discount/new" class="btn btn-outline-success">{{ @root.__ "New Discount" }}</a></div></h2>
{{#if discounts}}
<ul class="list-group">
{{#each discounts}}
<li class="list-group-item">
<div class="row">
<div class="col-4 mt-2">
<span><strong>{{ @root.__ "Code" }}:</strong>&nbsp; {{this.code}}</span>
</div>
</li>
{{/each}}
</ul>
{{else}}
<h4 class="text-warning text-center">{{ @root.__ "There are currently no discount codes setup." }}</h4>
{{/if}}
</div>
</div>
</div>
<div class="col-2 mt-2">
<span><strong>{{ @root.__ "Type" }}:</strong>&nbsp; {{this.type}}</span>
</div>
<div class="col-3 mt-2">
<span><strong>{{ @root.__ "Status" }}:</strong>
{{#ifCond (discountExpiry this.start this.end) '===' true}}
<span class="text-success">{{ @root.__ "Running" }}</span>
{{else}}
<span class="text-danger">{{ @root.__ "Not running" }}</span>
{{/ifCond}}
</span>
</div>
<div class="col-3 text-right">
<a class="btn btn-outline-success" href="/admin/settings/discount/edit/{{this._id}}">{{ @root.__ "Edit" }}</a>
<button class="btn btn-outline-danger" id="btnDiscountDelete" data-id="{{this._id}}">{{ @root.__ "Delete" }}</button>
</div>
</div>
</li>
{{/each}}
</ul>
{{else}}
<h4 class="text-warning text-center">{{ @root.__ "There are currently no discount codes setup." }}</h4>
{{/if}}
</div>
</main>

View File

@ -1,53 +1,49 @@
{{> partials/menu}}
<script src="https://code.jquery.com/ui/1.11.3/jquery-ui.min.js"></script>
<div class="col-sm-9">
<div class="row">
<div class="col-sm-10">
<h2>Menu</h2>
<div class="row">
<div class="col-sm-2 offset-sm-1">Menu</div>
<div class="col-sm-9">link</div>
</div>
<div id="draggable_list">
{{#each menu.items}}
<div class="row drag-row" id="menuId-{{@key}}">
<input type="hidden" class="navId" value="{{title}}">
<div class="col-sm-1 dragable_item"><i class="fas fa-arrows-alt"></i></div>
<div class="col-sm-2 dragable_item">
<input type="text" class="form-control navMenu navItem" value="{{title}}">
</div>
<div class="col-sm-6 dragable_item">
<input type="text" class="form-control navLink navItem" value="{{link}}">
</div>
<div class="col-sm-3 dragable_item">
<a class="btn btn-outline-danger settings-menu-delete" data-id="{{@key}}">
<i class="far fa-trash-alt"></i>
</a>
<button type="submit" class="btn btn-outline-success" id="settings-menu-update" data-id="{{@key}}">
<i class="far fa-save"></i>
</button>
</div>
</div>
{{/each}}
</div>
<div class="row">
<div class="col-sm-2 offset-sm-1">
<input type="text" class="form-control" id="newNavMenu" placeholder="Contact Us">
<main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4">
<div class="col-sm-12">
<h2>Menu</h2>
<div class="row">
<div class="col-sm-2 offset-sm-1">Menu</div>
<div class="col-sm-9">link</div>
</div>
<div id="draggable_list">
{{#each menu.items}}
<div class="row drag-row" id="menuId-{{@key}}">
<input type="hidden" class="navId" value="{{title}}">
<div class="col-sm-1 dragable_item"><i class="feather" data-feather="move"></i></div>
<div class="col-sm-2 dragable_item">
<input type="text" class="form-control navMenu navItem" value="{{title}}">
</div>
<div class="col-sm-6">
<input type="text" class="form-control" id="newNavLink" placeholder="/contact">
<div class="col-sm-6 dragable_item">
<input type="text" class="form-control navLink navItem" value="{{link}}">
</div>
<div class="col-sm-3">
<button type="submit" id="settings-menu-new" class="btn btn-outline-success">
<i class="fas fa-plus"></i>
<div class="col-sm-3 dragable_item">
<a class="btn btn-outline-danger settings-menu-delete" data-id="{{@key}}">
<i class="feather" data-feather="trash-2"></i>
</a>
<button type="submit" class="btn btn-outline-success" id="settings-menu-update" data-id="{{@key}}">
<i class="feather" data-feather="save"></i>
</button>
</div>
</div>
{{/each}}
</div>
<div class="row">
<div class="col-sm-2 offset-sm-1">
<input type="text" class="form-control" id="newNavMenu" placeholder="Contact Us">
</div>
<p class="text-muted">
{{ @root.__ "Setting_menu_explain" }}
</p>
</div>
</div>
</div>
<div class="col-sm-6">
<input type="text" class="form-control" id="newNavLink" placeholder="/contact">
</div>
<div class="col-sm-3">
<button type="submit" id="settings-menu-new" class="btn btn-outline-success">
<i class="feather" data-feather="plus"></i>
</button>
</div>
</div>
<p class="text-muted">
{{ @root.__ "Setting_menu_explain" }}
</p>
</div>
</main>

View File

@ -1,35 +1,33 @@
{{> partials/menu}}
<div class="col-sm-9">
<div class="row">
<div class="col-md-12">
<form id="settingsPageEditor">
<h2 class="clearfix">{{ @root.__ "Static page" }} <div class="float-right"><button type="submit" id="btnPageUpdate" class="btn btn-outline-success">{{button_text}}</button></div></h2>
<input type="hidden" id="pageId" value="{{page._id}}">
<div class="form-group">
<label>{{ @root.__ "Page name" }} *</label>
<input type="text" class="form-control" id="pageName" name="pageName" value="{{page.pageName}}" required>
<p class="help-block">{{ @root.__ "A friendly name to manage the static page." }}</p>
<main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4">
<div class="col-sm-12">
<form id="settingsPageEditor">
<h2 class="clearfix">{{ @root.__ "Static page" }} <div class="float-right"><button type="submit" id="btnPageUpdate" class="btn btn-outline-success">{{button_text}}</button></div></h2>
<input type="hidden" id="pageId" value="{{page._id}}">
<div class="form-group">
<label>{{ @root.__ "Page name" }} *</label>
<input type="text" class="form-control" id="pageName" name="pageName" value="{{page.pageName}}" required>
<p class="help-block">{{ @root.__ "A friendly name to manage the static page." }}</p>
</div>
<div class="form-group">
<label>{{ @root.__ "Page slug" }} *</label>
<input type="text" class="form-control" id="pageSlug" name="pageSlug" value="{{page.pageSlug}}" required>
<p class="help-block">{{ @root.__ "Page_Slug_Description" }}</p>
</div>
<div class="form-group">
<label>{{ @root.__ "Page Enabled" }}: </label>
<div class="checkbox">
<label><input class="settingsPageEnabled" type="checkbox" {{checkedState page.pageEnabled}} id="pageEnabled" name="pageEnabled"></label>
</div>
<div class="form-group">
<label>{{ @root.__ "Page slug" }} *</label>
<input type="text" class="form-control" id="pageSlug" name="pageSlug" value="{{page.pageSlug}}" required>
<p class="help-block">{{ @root.__ "Page_Slug_Description" }}</p>
</div>
<div class="form-group">
<label>{{ @root.__ "Page Enabled" }}: </label>
<div class="checkbox">
<label><input class="settingsPageEnabled" type="checkbox" {{checkedState page.pageEnabled}} id="pageEnabled" name="pageEnabled"></label>
</div>
</div>
<div class="form-group">
<label>{{ @root.__ "Page content" }} *</label>
<textarea id="pageContent">{{page.pageContent}}</textarea>
<p class="help-block">{{ @root.__ "Here you can enter the content you wish to be displayed on your static page." }}</p>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="form-group">
<label>{{ @root.__ "Page content" }} *</label>
<textarea id="pageContent">{{page.pageContent}}</textarea>
<p class="help-block">{{ @root.__ "Here you can enter the content you wish to be displayed on your static page." }}</p>
</div>
</form>
</div>
</main>
<script src="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.2/summernote.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.2/summernote.css" rel="stylesheet">
<script>

View File

@ -1,35 +1,33 @@
{{> partials/menu}}
<div class="col-sm-9">
<div class="row">
<div class="col-md-10">
<h2 class="clearfix">{{ @root.__ "Static pages" }} <div class="float-right"><a href="/admin/settings/pages/new" class="btn btn-outline-success">{{ @root.__ "New page" }}</a></div></h2>
<p class="text-muted">
{{ @root.__ "Static_Pages_Info" }}
</p>
{{#if pages}}
<ul class="list-group">
{{#each pages}}
<li class="list-group-item">
<div class="row">
<div class="col-sm-8">
<div class="top-pad-5"><strong>{{ @root.__ "Name" }}:</strong>&nbsp; {{pageName}}</div>
</div>
<div class="col-sm-4 text-right">
<a class="btn btn-outline-success" href="/admin/settings/pages/edit/{{_id}}">{{ @root.__ "Edit" }}</a>
<button class="btn btn-outline-danger" id="btnPageDelete" data-id="{{_id}}">{{ @root.__ "Delete" }}</button>
</div>
<main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4">
<div class="col-md-12">
<h2 class="clearfix">{{ @root.__ "Static pages" }} <div class="float-right"><a href="/admin/settings/pages/new" class="btn btn-outline-success">{{ @root.__ "New page" }}</a></div></h2>
<p class="text-muted">
{{ @root.__ "Static_Pages_Info" }}
</p>
{{#if pages}}
<ul class="list-group">
{{#each pages}}
<li class="list-group-item">
<div class="row">
<div class="col-sm-8">
<div class="top-pad-5"><strong>{{ @root.__ "Name" }}:</strong>&nbsp; {{pageName}}</div>
</div>
</li>
{{/each}}
</ul>
{{else}}
<h4 class="text-warning text-center">{{ @root.__ "There are currently no static pages setup. Please setup a static page." }}</h4>
<p class="text-center">
<a class="btn btn-outline-success" href="/admin/settings/pages/new"> {{ @root.__ "Create new" }}</a>
</p>
{{/if}}
</div>
</div>
</div>
<div class="col-sm-4 text-right">
<a class="btn btn-outline-success" href="/admin/settings/pages/edit/{{_id}}">{{ @root.__ "Edit" }}</a>
<button class="btn btn-outline-danger" id="btnPageDelete" data-id="{{_id}}">{{ @root.__ "Delete" }}</button>
</div>
</div>
</li>
{{/each}}
</ul>
{{else}}
<h4 class="text-warning text-center">{{ @root.__ "There are currently no static pages setup. Please setup a static page." }}</h4>
<p class="text-center">
<a class="btn btn-outline-success" href="/admin/settings/pages/new"> {{ @root.__ "Create new" }}</a>
</p>
{{/if}}
</div>
</main>
<script src="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.2/summernote.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.2/summernote.css" rel="stylesheet">

View File

@ -1,135 +1,133 @@
{{> partials/menu}}
<div class="col-sm-9">
<div class="row">
<div class="col-md-10">
<form id="settingsForm" data-toggle="validator">
<h2 class="clearfix">{{ @root.__ "General settings" }}
<div class="float-right">
<button type="submit" id="btnSettingsUpdate" class="btn btn-outline-success">{{ @root.__ "Update" }}</button>
</h2>
<div class="form-group">
<label>{{ @root.__ "Cart name" }} *</label>
<input type="text" class="form-control" name="cartTitle" value="{{config.cartTitle}}" required>
<p class="help-block">
{{ @root.__ "This element is critical for search engine optimisation. Cart title is displayed if your logo is hidden." }}
</p>
<main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4">
<div class="col-sm-12">
<h2>{{ @root.__ "General settings" }} <span class="float-right"><button type="submit" id="btnSettingsUpdate" class="btn btn-outline-success">{{ @root.__ "Update" }}</button></span></h2>
</div>
<div class="col-md-12">
<form id="settingsForm" data-toggle="validator">
<div class="form-group">
<label>{{ @root.__ "Cart name" }} *</label>
<input type="text" class="form-control" name="cartTitle" value="{{config.cartTitle}}" required>
<p class="help-block">
{{ @root.__ "This element is critical for search engine optimisation. Cart title is displayed if your logo is hidden." }}
</p>
</div>
<div class="form-group">
<label>{{ @root.__ "Cart description" }} *</label>
<input type="text" class="form-control" name="cartDescription" value="{{config.cartDescription}}" required>
<p class="help-block">{{ @root.__ "This description shows when your website is listed in search engine results." }}</p>
</div>
<div class="form-group">
<label>{{ @root.__ "Cart image/logo" }}</label>
<input type="text" class="form-control" name="cartLogo" value="{{config.cartLogo}}">
</div>
<div class="form-group">
<label>{{ @root.__ "Cart URL" }} *</label>
<input type="text" class="form-control" name="baseUrl" value="{{config.baseUrl}}" required>
<p class="help-block">{{ @root.__ "This URL is used in sitemaps and when your customer returns from completing their payment." }}</p>
</div>
<div class="form-group">
<label>{{ @root.__ "Cart Email" }} *</label>
<input type="email" class="form-control" name="emailAddress" value="{{config.emailAddress}}" required>
<p class="help-block">{{ @root.__ "This is used as the \"from\" email when sending receipts to your customers." }}</p>
</div>
<div class="form-group">
<label>{{ @root.__ "Payment gateway" }}</label>
<select class="form-control" name="paymentGateway">
<option {{selectState 'paypal' config.paymentGateway}} value="paypal">Paypal</option>
<option {{selectState 'stripe' config.paymentGateway}} value="stripe">Stripe</option>
</select>
<p class="help-block">{{ @root.__ "Payment_Gateway_Info" }}</p>
</div>
<div class="form-group">
<label>{{ @root.__ "Currency symbol" }}</label>
<input type="text" class="form-control" name="currencySymbol" value="{{currencySymbol config.currencySymbol}}">
<p class="help-block">{{ @root.__ "Set this to your currency symbol. Eg: $, £, €" }}</p>
</div>
<div class="form-group">
<label>{{ @root.__ "Theme" }}</label>
<select class="form-control" name="theme">
{{#each themes}}
<option {{selectState this ../config.theme}} value="{{this}}">{{this}}</option>
{{/each}}
</select>
<p class="help-block">{{ @root.__ "Theme_Info" }}</p>
</div>
<div class="form-group">
<label>{{ @root.__ "Products per row" }}</label>
<select class="form-control" name="productsPerRow">
<option value="{{config.productsPerRow}}" hidden="hidden" selected="selected">{{config.productsPerRow}}</option>
<option {{selectState '1' config.productsPerRow}}>1</option>
<option {{selectState '2' config.productsPerRow}}>2</option>
<option {{selectState '3' config.productsPerRow}}>3</option>
<option {{selectState '4' config.productsPerRow}}>4</option>
</select>
<p class="help-block">{{ @root.__ "The number of products to be displayed across the page." }}</p>
</div>
<div class="form-group">
<label>{{ @root.__ "Products per page" }}</label>
<input type="number" class="form-control" name="productsPerPage" value="{{config.productsPerPage}}">
<p class="help-block">{{ @root.__ "The number of products to be displayed on each page." }}</p>
</div>
<div class="form-group">
<label>{{ @root.__ "Menu Enabled" }}: </label>
<div class="checkbox">
<label>
<input class="settingsMenuEnabled" type="checkbox" {{checkedState config.menuEnabled}} id="menuEnabled"
name="menuEnabled">
</label>
</div>
<div class="form-group">
<label>{{ @root.__ "Cart description" }} *</label>
<input type="text" class="form-control" name="cartDescription" value="{{config.cartDescription}}" required>
<p class="help-block">{{ @root.__ "This description shows when your website is listed in search engine results." }}</p>
<p class="help-block">{{{ @root.__ "Menu_Enabled_Info" }}}</p>
</div>
<div class="form-group">
<label>{{ @root.__ "Menu header" }}</label>
<input type="text" class="form-control" name="menuTitle" value="{{config.menuTitle}}" placeholder="Menu">
<p class="help-block">{{ @root.__ "The heading text for your menu." }}</p>
</div>
<div class="form-group">
<label>Footer HTML</label>
<textarea class="form-control codemirrorArea" rows="5" id="footerHtml" name="footerHtml">{{footerHtml}}</textarea>
<input type="hidden" id="footerHtml_input" name="footerHtml_input">
</div>
<div class="form-group">
<label>Google analytics</label>
<textarea class="form-control" rows="3" id="googleAnalytics" name="googleAnalytics">{{googleAnalytics}}</textarea>
<input type="hidden" id="googleAnalytics_input" name="googleAnalytics_input">
<p class="help-block">{{{ @root.__ "Google_Analytics_Info" }}}
</p>
</div>
<div class="form-group">
<label>{{ @root.__ "Custom CSS" }}</label>
<textarea class="form-control" rows="10" id="customCss" name="customCss">{{config.customCss}}</textarea>
<input type="hidden" id="customCss_input" name="customCss_input">
</div>
<div class="form-group">
<label>Email SMTP Host</label>
<input type="text" class="form-control" name="emailHost" value="{{config.emailHost}}" autocomplete="off" required>
</div>
<div class="form-group">
<label>Email SMTP Port</label>
<input type="text" class="form-control" name="emailPort" value="{{config.emailPort}}" autocomplete="off" required>
</div>
<div class="form-group">
<label>Email SMTP secure </label>
<div class="checkbox">
<label>
<input class="settingsMenuEnabled" type="checkbox" {{checkedState config.emailSecure}} name="emailSecure">
</label>
</div>
<div class="form-group">
<label>{{ @root.__ "Cart image/logo" }}</label>
<input type="text" class="form-control" name="cartLogo" value="{{config.cartLogo}}">
</div>
<div class="form-group">
<label>{{ @root.__ "Cart URL" }} *</label>
<input type="text" class="form-control" name="baseUrl" value="{{config.baseUrl}}" required>
<p class="help-block">{{ @root.__ "This URL is used in sitemaps and when your customer returns from completing their payment." }}</p>
</div>
<div class="form-group">
<label>{{ @root.__ "Cart Email" }} *</label>
<input type="email" class="form-control" name="emailAddress" value="{{config.emailAddress}}" required>
<p class="help-block">{{ @root.__ "This is used as the \"from\" email when sending receipts to your customers." }}</p>
</div>
<div class="form-group">
<label>{{ @root.__ "Payment gateway" }}</label>
<select class="form-control" name="paymentGateway">
<option {{selectState 'paypal' config.paymentGateway}} value="paypal">Paypal</option>
<option {{selectState 'stripe' config.paymentGateway}} value="stripe">Stripe</option>
</select>
<p class="help-block">{{ @root.__ "Payment_Gateway_Info" }}</p>
</div>
<div class="form-group">
<label>{{ @root.__ "Currency symbol" }}</label>
<input type="text" class="form-control" name="currencySymbol" value="{{currencySymbol config.currencySymbol}}">
<p class="help-block">{{ @root.__ "Set this to your currency symbol. Eg: $, £, €" }}</p>
</div>
<div class="form-group">
<label>{{ @root.__ "Theme" }}</label>
<select class="form-control" name="theme">
{{#each themes}}
<option {{selectState this ../config.theme}} value="{{this}}">{{this}}</option>
{{/each}}
</select>
<p class="help-block">{{ @root.__ "Theme_Info" }}</p>
</div>
<div class="form-group">
<label>{{ @root.__ "Products per row" }}</label>
<select class="form-control" name="productsPerRow">
<option value="{{config.productsPerRow}}" hidden="hidden" selected="selected">{{config.productsPerRow}}</option>
<option {{selectState '1' config.productsPerRow}}>1</option>
<option {{selectState '2' config.productsPerRow}}>2</option>
<option {{selectState '3' config.productsPerRow}}>3</option>
<option {{selectState '4' config.productsPerRow}}>4</option>
</select>
<p class="help-block">{{ @root.__ "The number of products to be displayed across the page." }}</p>
</div>
<div class="form-group">
<label>{{ @root.__ "Products per page" }}</label>
<input type="number" class="form-control" name="productsPerPage" value="{{config.productsPerPage}}">
<p class="help-block">{{ @root.__ "The number of products to be displayed on each page." }}</p>
</div>
<div class="form-group">
<label>{{ @root.__ "Menu Enabled" }}: </label>
<div class="checkbox">
<label>
<input class="settingsMenuEnabled" type="checkbox" {{checkedState config.menuEnabled}} id="menuEnabled"
name="menuEnabled">
</label>
</div>
<p class="help-block">{{{ @root.__ "Menu_Enabled_Info" }}}</p>
</div>
<div class="form-group">
<label>{{ @root.__ "Menu header" }}</label>
<input type="text" class="form-control" name="menuTitle" value="{{config.menuTitle}}" placeholder="Menu">
<p class="help-block">{{ @root.__ "The heading text for your menu." }}</p>
</div>
<div class="form-group">
<label>Footer HTML</label>
<textarea class="form-control codemirrorArea" rows="5" id="footerHtml" name="footerHtml">{{footerHtml}}</textarea>
<input type="hidden" id="footerHtml_input" name="footerHtml_input">
</div>
<div class="form-group">
<label>Google analytics</label>
<textarea class="form-control" rows="3" id="googleAnalytics" name="googleAnalytics">{{googleAnalytics}}</textarea>
<input type="hidden" id="googleAnalytics_input" name="googleAnalytics_input">
<p class="help-block">{{{ @root.__ "Google_Analytics_Info" }}}
</p>
</div>
<div class="form-group">
<label>{{ @root.__ "Custom CSS" }}</label>
<textarea class="form-control" rows="10" id="customCss" name="customCss">{{config.customCss}}</textarea>
<input type="hidden" id="customCss_input" name="customCss_input">
</div>
<div class="form-group">
<label>Email SMTP Host</label>
<input type="text" class="form-control" name="emailHost" value="{{config.emailHost}}" autocomplete="off" required>
</div>
<div class="form-group">
<label>Email SMTP Port</label>
<input type="text" class="form-control" name="emailPort" value="{{config.emailPort}}" autocomplete="off" required>
</div>
<div class="form-group">
<label>Email SMTP secure </label>
<div class="checkbox">
<label>
<input class="settingsMenuEnabled" type="checkbox" {{checkedState config.emailSecure}} name="emailSecure">
</label>
</div>
</div>
<div class="form-group">
<label>Email SMTP Username</label>
<input type="text" class="form-control" name="emailUser" value="{{config.emailUser}}" autocomplete="off" required>
</div>
<div class="form-group">
<label>Email SMTP Password</label>
<input type="password" class="form-control" name="emailPassword" value="{{config.emailPassword}}" autocomplete="off" required>
</div>
<div class="form-group">
<button id="sendTestEmail" class="btn btn-outline-success">{{ @root.__ "Send test email" }}</button>
</div>
</div>
</div>
</div>
</div>
<div class="form-group">
<label>Email SMTP Username</label>
<input type="text" class="form-control" name="emailUser" value="{{config.emailUser}}" autocomplete="off" required>
</div>
<div class="form-group">
<label>Email SMTP Password</label>
<input type="password" class="form-control" name="emailPassword" value="{{config.emailPassword}}" autocomplete="off" required>
</div>
<div class="form-group">
<button id="sendTestEmail" class="btn btn-outline-success">{{ @root.__ "Send test email" }}</button>
</div>
</form>
</div>
</main>

View File

@ -38,7 +38,7 @@
</div>
</div>
<div class="col-4 col-md-2 no-pad-left">
<button class="btn btn-danger btn-delete-from-cart" data-id="{{../this.productId}}" data-cartid="{{../this.productId}}" type="button"><i class="far fa-trash-alt" aria-hidden="true"></i></button>
<button class="btn btn-danger btn-delete-from-cart" data-id="{{../this.productId}}" data-cartid="{{../this.productId}}" type="button"><i class="feather" data-feather="trash-2"></i></button>
</div>
{{else}}
<div class="col-12 col-md-8 no-pad-left mb-2"></div>

View File

@ -46,7 +46,7 @@
<button class="btn btn-outline-success" id="addDiscountCode">{{ @root.__ "Apply" }}</button>
</div>
<div class="input-group-append">
<button class="btn btn-outline-danger" id="removeDiscountCode"><i class="fa fa-times" aria-hidden="true"></i></button>
<button class="btn btn-outline-danger" id="removeDiscountCode"><i class="feather" data-feather="x"></i></button>
</div>
</div>
{{/if}}

View File

@ -4,9 +4,9 @@
<div class="col-sm-12 col-md-6 mr-auto">
{{#if result.productImage}}
<div class="title-image-container">
<div class="image-prev image-button"> <i class="fa fa-chevron-left" aria-hidden="true"></i></div>
<div class="image-prev image-button"> <i class="feather" data-feather="chevron-right"></i></div>
<img src="{{result.productImage}}" id="product-title-image" class="product-title-image img-fluid" alt="...">
<div class="image-next image-button"> <i class="fa fa-chevron-right" aria-hidden="true"></i></div>
<div class="image-next image-button"> <i class="feather" data-feather="chevron-left"></i></div>
</div>
{{else}}
<div class="title-image-container">

View File

@ -1,50 +1,48 @@
{{> partials/menu}}
<div class="col-sm-9">
<div class="row">
<div class="col-md-8">
<h2>User edit</h2>
<form id="userEditForm" data-toggle="validator">
<input type="hidden" id="userId" value="{{user._id}}" />
<div class="form-group">
<label>{{ @root.__ "Users name" }}</label>
<input type="text" class="form-control" id="usersName" value="{{user.usersName}}" required>
</div>
<div class="form-group">
<label>{{ @root.__ "User email" }}</label>
<input type="text" class="form-control" id="userEmail" value="{{user.userEmail}}" readonly>
</div>
<div class="form-group">
<label>{{ @root.__ "User password" }} {{#ifCond session.user '==' user.userEmail}}*{{/ifCond}}</label>
<input autocomplete="off" type="password" class="form-control" id="userPassword" {{#ifCond session.user '==' user.userEmail}}required{{/ifCond}}>
</div>
<div class="form-group">
<label>{{ @root.__ "Password confirm" }} {{#ifCond session.user '==' user.userEmail}}*{{/ifCond}}</label>
<input autocomplete="off" type="password" data-validation-match-match="userPassword" data-validation-match-message="Password values to not match" class="form-control" {{#ifCond session.user '==' user.userEmail}}required{{/ifCond}}>
</div>
{{#isAnAdmin @root.session.isAdmin}}
{{#ifCond @root.session.user '!=' user.userEmail}}
<div class="checkbox">
<label>
<input id="userAdmin" {{#checkedState @root.user.isAdmin}}{{/checkedState}} type="checkbox"> {{ @root.__ "User is admin?" }}
</label>
</div>
{{/ifCond}}
{{/isAnAdmin}}
<div class="form-group">
<label>API Key</label>
<div class="input-group">
<input type="text" class="form-control" id="apiKey" value="{{user.apiKey}}" aria-label="..." readonly>
<div class="input-group-append">
<button id="btnGenerateAPIkey" class="btn btn-outline-success">{{ @root.__ "Generate" }}</button>
</div>
</div>
</div><br/>
<div class="form-group">
<div class="float-right">
<button type="submit" class="btn btn-outline-success">{{ @root.__ "Update" }}</button>
</div>
</div>
</form>
<main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4">
<div class="col-md-12">
<div class="page-header">
<div class="float-right">
<button type="submit" class="btn btn-outline-success">{{ @root.__ "Update" }}</button>
</div>
<h2>{{ @root.__ "User edit" }}</h2>
</div>
<form id="userEditForm" data-toggle="validator">
<input type="hidden" id="userId" value="{{user._id}}" />
<div class="form-group">
<label>{{ @root.__ "Users name" }}</label>
<input type="text" class="form-control" id="usersName" value="{{user.usersName}}" required>
</div>
<div class="form-group">
<label>{{ @root.__ "User email" }}</label>
<input type="text" class="form-control" id="userEmail" value="{{user.userEmail}}" readonly>
</div>
<div class="form-group">
<label>{{ @root.__ "User password" }} {{#ifCond session.user '==' user.userEmail}}*{{/ifCond}}</label>
<input autocomplete="off" type="password" class="form-control" id="userPassword" {{#ifCond session.user '==' user.userEmail}}required{{/ifCond}}>
</div>
<div class="form-group">
<label>{{ @root.__ "Password confirm" }} {{#ifCond session.user '==' user.userEmail}}*{{/ifCond}}</label>
<input autocomplete="off" type="password" data-validation-match-match="userPassword" data-validation-match-message="Password values to not match" class="form-control" {{#ifCond session.user '==' user.userEmail}}required{{/ifCond}}>
</div>
{{#isAnAdmin @root.session.isAdmin}}
{{#ifCond @root.session.user '!=' user.userEmail}}
<div class="checkbox">
<label>
<input id="userAdmin" {{#checkedState @root.user.isAdmin}}{{/checkedState}} type="checkbox"> {{ @root.__ "User is admin?" }}
</label>
</div>
{{/ifCond}}
{{/isAnAdmin}}
<div class="form-group">
<label>API Key</label>
<div class="input-group">
<input type="text" class="form-control" id="apiKey" value="{{user.apiKey}}" aria-label="..." readonly>
<div class="input-group-append">
<button id="btnGenerateAPIkey" class="btn btn-outline-success">{{ @root.__ "Generate" }}</button>
</div>
</div>
</div>
</form>
</div>
</div>
</main>

View File

@ -1,31 +1,29 @@
{{> partials/menu}}
<div class="col-sm-9">
<div class="row">
<div class="col-md-8">
<main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4">
<div class="col-12">
<div class="page-header">
<div class="float-right">
<button type="submit" class="btn btn-outline-success">{{ @root.__ "Create" }}</button>
</div>
<h2>{{ @root.__ "New User" }}</h2>
<form id="userNewForm" data-toggle="validator" autocomplete="off">
<div class="form-group">
<label>{{ @root.__ "Users name" }} *</label>
<input type="text" class="form-control" id="usersName" value="{{user.usersName}}" required>
</div>
<div class="form-group">
<label>{{ @root.__ "User email" }} *</label>
<input type="email" class="form-control" id="userEmail" value="{{user.userEmail}}" required>
</div>
<div class="form-group">
<label>{{ @root.__ "User password" }} *</label>
<input type="password" class="form-control" id="userPassword" required>
</div>
<div class="form-group">
<label>{{ @root.__ "Password confirm" }} *</label>
<input type="password" data-match="#userPassword" class="form-control" required>
</div>
<div class="form-group">
<div class="float-right">
<button type="submit" class="btn btn-outline-success">{{ @root.__ "Create" }}</button>
</div>
</div>
</form>
</div>
<form id="userNewForm" data-toggle="validator" autocomplete="off">
<div class="form-group">
<label>{{ @root.__ "Users name" }} *</label>
<input type="text" class="form-control" id="usersName" value="{{user.usersName}}" required>
</div>
<div class="form-group">
<label>{{ @root.__ "User email" }} *</label>
<input type="email" class="form-control" id="userEmail" value="{{user.userEmail}}" required>
</div>
<div class="form-group">
<label>{{ @root.__ "User password" }} *</label>
<input type="password" class="form-control" id="userPassword" required>
</div>
<div class="form-group">
<label>{{ @root.__ "Password confirm" }} *</label>
<input type="password" data-match="#userPassword" class="form-control" required>
</div>
</form>
</div>
</div>
</main>

View File

@ -1,30 +1,30 @@
{{> partials/menu}}
<div class="col-sm-9">
<div class="row">
<div class="col-md-8">
<h2>Users <span class="float-right"><a href="/admin/user/new" class="btn btn-outline-success">{{ @root.__ "New user" }}</a></span></h2>
<ul class="list-group">
{{#each users}}
<li class="list-group-item">
<strong>{{ @root.__ "User" }}:</strong> {{this.usersName}} - ({{this.userEmail}})
<span class="float-right">
<strong>{{ @root.__ "Role" }}: </strong>
{{#isAnAdmin this.isAdmin}}
<span>Admin</span>
{{#if ../this.isOwner}}
(Owner)
{{/if}}
{{else}}
<span>{{ @root.__ "User" }}</span>
{{/isAnAdmin}}
{{#isAnAdmin @root.session.isAdmin}}
<a href="/admin/user/edit/{{../this._id}}"><i class="fas fa-pencil-alt"></i></a>
<a href="#" class="userDelete" data-id="{{../this._id}}"><i class="far fa-trash-alt"></i></a>
{{/isAnAdmin}}
</span>
</li>
{{/each}}
</ul>
</div>
<main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4">
<div class="col-sm-12">
<h2>{{ @root.__ "Users" }} <span class="float-right"><a href="/admin/user/new" class="btn btn-outline-success">{{ @root.__ "New user" }}</a></span></h2>
</div>
<div class="col-md-12">
<ul class="list-group">
{{#each users}}
<li class="list-group-item">
<strong>{{ @root.__ "User" }}:</strong> {{this.usersName}} - ({{this.userEmail}})
<span class="float-right">
<strong>{{ @root.__ "Role" }}: </strong>
{{#isAnAdmin this.isAdmin}}
<span>Admin</span>
{{#if ../this.isOwner}}
(Owner)
{{/if}}
{{else}}
<span>{{ @root.__ "User" }}</span>
{{/isAnAdmin}}
{{#isAnAdmin @root.session.isAdmin}}
<a href="/admin/user/edit/{{../this._id}}"><i class="feather" data-feather="edit"></i></a>
<a href="#" class="userDelete text-danger" data-id="{{../this._id}}"><i class="feather" data-feather="trash-2"></i></a>
{{/isAnAdmin}}
</span>
</li>
{{/each}}
</ul>
</div>
</div>
</main>