first commit
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.vscode/ftp-kr.sync.cache.json
|
||||
1
.vscode/ftp-kr.diff.style.css.map
vendored
Normal file
17
.vscode/ftp-kr.json
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"host": "host700513.hostido.net.pl",
|
||||
"username": "www@marianek.pl",
|
||||
"password": "KY8bZvbspB9qmNuy",
|
||||
"remotePath": "/public_html",
|
||||
"protocol": "ftp",
|
||||
"port": 0,
|
||||
"fileNameEncoding": "utf8",
|
||||
"autoUpload": true,
|
||||
"autoDelete": false,
|
||||
"autoDownload": false,
|
||||
"ignoreRemoteModification": true,
|
||||
"ignore": [
|
||||
".git",
|
||||
"/.vscode"
|
||||
]
|
||||
}
|
||||
18
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"liveSassCompile.settings.formats": [
|
||||
{
|
||||
"format": "compressed",
|
||||
"extensionName": ".css",
|
||||
"savePath": "~/../style-css/",
|
||||
"savePathSegmentKeys": null,
|
||||
"savePathReplaceSegmentsWith": null
|
||||
}
|
||||
],
|
||||
"liveSassCompile.settings.generateMap": true,
|
||||
"liveSassCompile.settings.autoprefix": "defaults",
|
||||
"liveSassCompile.settings.watchOnLaunch": true,
|
||||
"liveSassCompile.settings.includeItems": [
|
||||
"/layout/style-scss/style.scss",
|
||||
"/admin/layout/style-scss/style.scss"
|
||||
]
|
||||
}
|
||||
12
.vscode/sftp.json
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "host700513.hostido.net.pl",
|
||||
"host": "host700513.hostido.net.pl",
|
||||
"protocol": "ftp",
|
||||
"port": 21,
|
||||
"username": "www@marianek.pl",
|
||||
"password": "KY8bZvbspB9qmNuy",
|
||||
"remotePath": "/public_html",
|
||||
"uploadOnSave": false,
|
||||
"useTempFile": false,
|
||||
"openSsh": false
|
||||
}
|
||||
39
admin/ajax.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?
|
||||
error_reporting( E_ALL ^ E_NOTICE ^ E_STRICT );
|
||||
function __autoload_my_classes( $classname )
|
||||
{
|
||||
$q = explode( '\\' , $classname );
|
||||
$c = array_pop( $q );
|
||||
$f = '../autoload/' . implode( '/' , $q ) . '/class.' . $c . '.php';
|
||||
if ( $c == 'Savant3' )
|
||||
{
|
||||
require_once( '../autoload/Savant3.php' );
|
||||
return true;
|
||||
}
|
||||
if ( file_exists( $f ) )
|
||||
require_once( $f );
|
||||
}
|
||||
spl_autoload_register( '__autoload_my_classes' );
|
||||
|
||||
require_once '../config.php';
|
||||
require_once '../libraries/medoo/medoo.php';
|
||||
require_once '../libraries/grid/config.php';
|
||||
date_default_timezone_set('Europe/Warsaw');
|
||||
|
||||
session_start();
|
||||
|
||||
$mdb = new medoo( [
|
||||
'database_type' => 'mysql',
|
||||
'database_name' => $database['name'],
|
||||
'server' => $database['host'],
|
||||
'username' => $database['user'],
|
||||
'password' => $database['password'],
|
||||
'charset' => 'utf8'
|
||||
] );
|
||||
|
||||
require_once 'ajax/pages.php';
|
||||
require_once 'ajax/articles.php';
|
||||
require_once 'ajax/shop-category.php';
|
||||
require_once 'ajax/users.php';
|
||||
require_once 'ajax/shop.php';
|
||||
?>
|
||||
46
admin/ajax/articles.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
$a = \S::get( 'a' );
|
||||
|
||||
if ( $a == 'article_image_delete' )
|
||||
{
|
||||
$response = [ 'status' => 'error', 'msg' => 'Podczas usuwania zdjecia wystąpił błąd. Proszę spróbować ponownie.' ];
|
||||
|
||||
if ( \admin\factory\Articles::delete_img( \S::get( 'image_id' ) ) )
|
||||
$response = [ 'status' => 'ok' ];
|
||||
|
||||
echo json_encode( $response );
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( $a == 'article_file_delete' )
|
||||
{
|
||||
$response = [ 'status' => 'error', 'msg' => 'Podczas usuwania załącznika wystąpił błąd. Proszę spróbować ponownie.' ];
|
||||
|
||||
if ( \admin\factory\Articles::delete_file( \S::get( 'file_id' ) ) )
|
||||
$response = [ 'status' => 'ok' ];
|
||||
|
||||
echo json_encode( $response );
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( $a == 'article_image_alt_change' )
|
||||
{
|
||||
$response = [ 'status' => 'error', 'msg' => 'Podczas zmiany atrybutu alt zdjęcia wystąpił błąd. Proszę spróbować ponownie.' ];
|
||||
|
||||
if ( \admin\factory\Articles::image_alt_change( \S::get( 'image_id' ), \S::get( 'image_alt' ) ) )
|
||||
$response = [ 'status' => 'ok' ];
|
||||
|
||||
echo json_encode( $response );
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( $a == 'article_file_name_change' )
|
||||
{
|
||||
$response = [ 'status' => 'error', 'msg' => 'Podczas zmiany nazwy załącznika wystąpił błąd. Proszę spróbować ponownie.' ];
|
||||
|
||||
if ( \admin\factory\Articles::file_name_change( \S::get( 'file_id' ), \S::get( 'file_name' ) ) )
|
||||
$response = [ 'status' => 'ok' ];
|
||||
|
||||
echo json_encode( $response );
|
||||
exit;
|
||||
}
|
||||
63
admin/ajax/pages.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
$a = \S::get( 'a' );
|
||||
|
||||
if ( $a == 'save_articles_order' )
|
||||
{
|
||||
$response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania kolejności wyświetlania artykułów wystąpił błąd. Proszę spróbować ponownie.' ];
|
||||
|
||||
if ( \admin\factory\Pages::save_articles_order( \S::get( 'page_id' ), \S::get( 'articles' ) ) )
|
||||
$response = [ 'status' => 'ok' ];
|
||||
|
||||
echo json_encode( $response );
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( $a == 'save_pages_order' )
|
||||
{
|
||||
$response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania kolejności stron wystąpił błąd. Proszę spróbować ponownie.' ];
|
||||
|
||||
if ( \admin\factory\Pages::save_pages_order( \S::get( 'menu_id' ), \S::get( 'pages' ) ) )
|
||||
$response = [ 'status' => 'ok' ];
|
||||
|
||||
echo json_encode( $response );
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( $a == 'generate_seo_link' )
|
||||
{
|
||||
$response = [ 'status' => 'error', 'msg' => 'Podczas generowania pola "seo link" wystąpił błąd. Proszę spróbować ponownie.' ];
|
||||
|
||||
if ( $seo_link = \admin\factory\Pages::generate_seo_link( \S::get( 'title' ), \S::get( 'page_id' ), \S::get( 'article_id' ), \S::get( 'category_id' ) ) )
|
||||
$response = [ 'status' => 'ok', 'seo_link' => $seo_link ];
|
||||
|
||||
echo json_encode( $response );
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( $a == 'cookie_menus' )
|
||||
{
|
||||
$array = unserialize( $_COOKIE[ 'cookie_menus' ] );
|
||||
|
||||
if ( $array[ \S::get( 'menu_id' ) ] == 0 )
|
||||
$array[ \S::get( 'menu_id' ) ] = 1;
|
||||
else
|
||||
$array[ \S::get( 'menu_id' ) ] = 0;
|
||||
|
||||
$array = serialize( $array );
|
||||
|
||||
setcookie( 'cookie_menus', $array, time() + 3600 * 24 * 365 );
|
||||
}
|
||||
|
||||
if ( $a == 'cookie_pages' )
|
||||
{
|
||||
$array = unserialize( $_COOKIE[ 'cookie_pages' ] );
|
||||
|
||||
if ( $array[ \S::get( 'page_id' ) ] == 0 )
|
||||
$array[ \S::get( 'page_id' ) ] = 1;
|
||||
else
|
||||
$array[ \S::get( 'page_id' ) ] = 0;
|
||||
|
||||
$array = serialize( $array );
|
||||
|
||||
setcookie( 'cookie_pages', $array, time() + 3600 * 24 * 365 );
|
||||
}
|
||||
13
admin/ajax/shop-category.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
$a = \S::get( 'a' );
|
||||
|
||||
if ( $a == 'save_products_order' )
|
||||
{
|
||||
$response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania kolejności wyświetlania produktów wystąpił błąd. Proszę spróbować ponownie.' ];
|
||||
|
||||
if ( \admin\factory\ShopCategory::save_product_order( \S::get( 'category_id' ), \S::get( 'products' ) ) )
|
||||
$response = [ 'status' => 'ok' ];
|
||||
|
||||
echo json_encode( $response );
|
||||
exit;
|
||||
}
|
||||
58
admin/ajax/shop.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
if ( $a == 'cookie_categories' )
|
||||
{
|
||||
$array = unserialize( $_COOKIE[ 'cookie_categories' ] );
|
||||
|
||||
if ( $array[ \S::get( 'category_id' ) ] == 0 )
|
||||
$array[ \S::get( 'category_id' ) ] = 1;
|
||||
else
|
||||
$array[ \S::get( 'category_id' ) ] = 0;
|
||||
|
||||
$array = serialize( $array );
|
||||
|
||||
setcookie( 'cookie_categories', $array, time() + 3600 * 24 * 365 );
|
||||
}
|
||||
|
||||
if ( $a == 'save_categories_order' )
|
||||
{
|
||||
$response = [ 'status' => 'error', 'msg' => 'Podczas zapisywania kolejności kategorii wystąpił błąd. Proszę spróbować ponownie.' ];
|
||||
|
||||
if ( \admin\factory\ShopCategory::save_categories_order( \S::get( 'categories' ) ) )
|
||||
$response = [ 'status' => 'ok' ];
|
||||
|
||||
echo json_encode( $response );
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( $a == 'product_file_delete' )
|
||||
{
|
||||
$response = [ 'status' => 'error', 'msg' => 'Podczas usuwania załącznika wystąpił błąd. Proszę spróbować ponownie.' ];
|
||||
|
||||
if ( \admin\factory\ShopProduct::delete_file( \S::get( 'file_id' ) ) )
|
||||
$response = [ 'status' => 'ok' ];
|
||||
|
||||
echo json_encode( $response );
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( $a == 'product_file_name_change' )
|
||||
{
|
||||
$response = [ 'status' => 'error', 'msg' => 'Podczas zmiany nazwy załącznika wystąpił błąd. Proszę spróbować ponownie.' ];
|
||||
|
||||
if ( \admin\factory\ShopProduct::file_name_change( \S::get( 'file_id' ), \S::get( 'file_name' ) ) )
|
||||
$response = [ 'status' => 'ok' ];
|
||||
|
||||
echo json_encode( $response );
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( $a == 'product_image_delete' )
|
||||
{
|
||||
$response = [ 'status' => 'error', 'msg' => 'Podczas usuwania zdjecia wystąpił błąd. Proszę spróbować ponownie.' ];
|
||||
|
||||
if ( \admin\factory\ShopProduct::delete_img( \S::get( 'image_id' ) ) )
|
||||
$response = [ 'status' => 'ok' ];
|
||||
|
||||
echo json_encode( $response );
|
||||
exit;
|
||||
}
|
||||
9
admin/ajax/users.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
$a = \S::get( 'a' );
|
||||
|
||||
if ( $a == 'check_login' )
|
||||
{
|
||||
$response = \admin\factory\Users::check_login( \S::get( 'login' ), \S::get( 'user_id' ) );
|
||||
echo json_encode( $response );
|
||||
exit;
|
||||
}
|
||||
89
admin/index.php
Normal file
@@ -0,0 +1,89 @@
|
||||
<?
|
||||
error_reporting( E_ALL ^ E_NOTICE ^ E_STRICT ^ E_WARNING ^ E_DEPRECATED );
|
||||
if ( file_exists( 'ip.conf' ) )
|
||||
{
|
||||
$ips = file_get_contents( 'ip.conf' );
|
||||
$ips = preg_split( "/\\r\\n|\\r|\\n/", $ips );
|
||||
$ips = array_filter( $ips );
|
||||
if ( is_array( $ips ) and!empty( $ips ) )
|
||||
{
|
||||
if ( !in_array( $_SERVER['REMOTE_ADDR'], $ips ) )
|
||||
die( 'Brak dostępu.' );
|
||||
}
|
||||
}
|
||||
|
||||
function __autoload_my_classes( $classname )
|
||||
{
|
||||
$q = explode( '\\', $classname );
|
||||
$c = array_pop( $q );
|
||||
$f = '../autoload/' . implode( '/', $q ) . '/class.' . $c . '.php';
|
||||
if ( file_exists( $f ) )
|
||||
require_once( $f );
|
||||
}
|
||||
|
||||
spl_autoload_register( '__autoload_my_classes' );
|
||||
require_once '../config.php';
|
||||
require_once '../libraries/medoo/medoo.php';
|
||||
require_once '../libraries/grid/config.php';
|
||||
require_once '../libraries/rb.php';
|
||||
require_once '../libraries/phpmailer/class.phpmailer.php';
|
||||
require_once '../libraries/phpmailer/class.smtp.php';
|
||||
|
||||
define( 'REDBEAN_MODEL_PREFIX', '' );
|
||||
\R::setup( 'mysql:host=' . $database['host'] . ';dbname=' . $database['name'], $database['user'], $database['password'] );
|
||||
\R::ext( 'xdispense', function ( $type )
|
||||
{
|
||||
return R::getRedBean() -> dispense( $type );
|
||||
} );
|
||||
|
||||
date_default_timezone_set( 'Europe/Warsaw' );
|
||||
|
||||
$settings = \front\factory\Settings::settings_details();
|
||||
|
||||
if ( file_exists( 'config.php' ) )
|
||||
include 'config.php';
|
||||
|
||||
session_start();
|
||||
|
||||
if ( !isset( $_SESSION['check'] ) )
|
||||
{
|
||||
session_regenerate_id();
|
||||
$_SESSION['check'] = true;
|
||||
$_SESSION['ip'] = $_SERVER['REMOTE_ADDR'];
|
||||
}
|
||||
|
||||
if ( $_SESSION['ip'] !== $_SERVER['REMOTE_ADDR'] )
|
||||
{
|
||||
session_destroy();
|
||||
header( 'Location: /admin/' );
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( !$lang_id = \S::get_session( 'current-lang' ) )
|
||||
{
|
||||
$lang_id = \front\factory\Languages::default_language();
|
||||
\S::set_session( 'current-lang', $lang_id );
|
||||
}
|
||||
|
||||
if ( !$lang = \S::get_session( 'lang-' . $lang_id ) )
|
||||
{
|
||||
$lang = \front\factory\Languages::lang_translations( $lang_id );
|
||||
\S::set_session( 'lang-' . $lang_id, $lang );
|
||||
}
|
||||
|
||||
$mdb = new medoo( [
|
||||
'database_type' => 'mysql',
|
||||
'database_name' => $database['name'],
|
||||
'server' => $database['host'],
|
||||
'username' => $database['user'],
|
||||
'password' => $database['password'],
|
||||
'charset' => 'utf8'
|
||||
] );
|
||||
|
||||
$user = \S::get_session( 'user', true );
|
||||
|
||||
\admin\Site::update();
|
||||
\admin\Site::special_actions();
|
||||
|
||||
echo \admin\view\Page::show();
|
||||
?>
|
||||
0
admin/ip.conf
Normal file
29
admin/js/functions.js
Normal file
@@ -0,0 +1,29 @@
|
||||
function confirm_delete_element( action ) {
|
||||
$.alert({
|
||||
title: 'Pytanie',
|
||||
content: 'Na pewno chcesz usunąć wybrany element?',
|
||||
type: 'orange',
|
||||
closeIcon: true,
|
||||
closeIconClass: 'fa fa-times',
|
||||
typeAnimated: true,
|
||||
animation: 'opacity',
|
||||
columnClass: 'col-12 col-lg-8',
|
||||
theme: 'material',
|
||||
icon: 'fa fa-question',
|
||||
buttons: {
|
||||
cancel: {
|
||||
text: 'Nie',
|
||||
btnClass: 'btn-success',
|
||||
action: function() {}
|
||||
},
|
||||
confirm: {
|
||||
text: 'Tak',
|
||||
btnClass: 'btn-danger',
|
||||
keys: ['enter'],
|
||||
action: function() {
|
||||
action()
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
1
admin/layout/icon/icon-menu/baseline-settings.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"><path d="M19.14 12.94c.04-.3.06-.61.06-.94c0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 0 0 .12-.61l-1.92-3.32a.488.488 0 0 0-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 0 0-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58a.49.49 0 0 0-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6s3.6 1.62 3.6 3.6s-1.62 3.6-3.6 3.6z" fill="#8691b2"/><rect x="0" y="0" width="24" height="24" fill="rgba(0, 0, 0, 0)" /></svg>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
1
admin/layout/icon/icon-menu/baseline-sticky-note-2.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"><path d="M19 3H4.99C3.89 3 3 3.9 3 5l.01 14c0 1.1.89 2 1.99 2h10l6-6V5c0-1.1-.9-2-2-2zM7 8h10v2H7V8zm5 6H7v-2h5v2zm2 5.5V14h5.5L14 19.5z" fill="#8691b2"/><rect x="0" y="0" width="24" height="24" fill="rgba(0, 0, 0, 0)" /></svg>
|
||||
|
After Width: | Height: | Size: 490 B |
1
admin/layout/icon/icon-menu/burst-sale.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100" height="100" preserveAspectRatio="xMidYMid meet" viewBox="0 0 100 100" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"><path d="M44.105 55.641l3.598-2.079l-4.666-3.925z" fill="#8691b2"/><path d="M88.558 49.96c0-.885-.435-1.663-1.097-2.151l.014-.024l-9.324-5.383l5.367-9.296l-.018-.011a2.666 2.666 0 0 0-.127-2.408a2.667 2.667 0 0 0-2.025-1.314v-.026H70.58V18.61h-.022a2.667 2.667 0 0 0-1.314-2.022a2.662 2.662 0 0 0-2.412-.125l-.013-.023l-9.481 5.474l-5.25-9.094l-.019.011a2.668 2.668 0 0 0-2.149-1.094c-.885 0-1.664.435-2.151 1.097l-.024-.014l-5.337 9.244l-9.19-5.306l-.011.019a2.666 2.666 0 0 0-2.408.127a2.666 2.666 0 0 0-1.315 2.025h-.027v10.674H18.845v.021a2.667 2.667 0 0 0-2.022 1.314a2.667 2.667 0 0 0-.126 2.41l-.023.014l5.246 9.087l-9.394 5.424l.011.019a2.668 2.668 0 0 0-1.094 2.149c0 .885.435 1.664 1.097 2.151l-.014.024l9.324 5.383l-5.367 9.296l.018.01a2.666 2.666 0 0 0 .127 2.408a2.667 2.667 0 0 0 2.025 1.314v.027H29.42V81.39h.022c.092.816.549 1.58 1.314 2.022a2.665 2.665 0 0 0 2.412.125l.013.023l9.481-5.474l5.25 9.094l.019-.011a2.668 2.668 0 0 0 2.149 1.094c.885 0 1.664-.435 2.151-1.096l.023.013l5.337-9.244l9.191 5.306l.011-.019a2.666 2.666 0 0 0 2.408-.127a2.664 2.664 0 0 0 1.315-2.025h.027V70.398h10.613v-.021a2.667 2.667 0 0 0 2.022-1.314a2.667 2.667 0 0 0 .126-2.41l.023-.013l-5.246-9.087l9.394-5.424l-.011-.019a2.67 2.67 0 0 0 1.094-2.15zM37.537 65.197c-2.23 1.288-4.252 1.464-5.971 1.002l.241-2.697c1.302.377 2.985.375 4.575-.544c1.367-.789 1.658-1.765 1.269-2.438c-1.159-2.006-6.992 3.23-9.499-1.111c-1.108-1.92-.367-4.471 2.35-6.039c1.833-1.059 3.675-1.383 5.426-.988l-.309 2.623c-1.433-.324-2.908-.004-4.084.674c-1.038.6-1.367 1.389-.967 2.082c1.049 1.816 6.965-3.236 9.451 1.069c1.219 2.109.616 4.58-2.482 6.367zm13.943-8.326l-1.854-1.535l-4.947 2.856l.401 2.374l-2.785 1.607L40.08 48.07l3.079-1.777l11.106 8.971l-2.785 1.607zm3.753-2.166l-6.661-11.538l2.474-1.429l5.413 9.375l4.878-2.816l1.249 2.163l-7.353 4.245zm9.012-5.203l-6.661-11.537l8.164-4.715l1.248 2.162l-5.707 3.296l1.398 2.422l5.586-3.226l1.248 2.162l-5.586 3.225l1.518 2.63l5.708-3.296l1.249 2.162l-8.165 4.715z" fill="#8691b2"/><rect x="0" y="0" width="100" height="100" fill="rgba(0, 0, 0, 0)" /></svg>
|
||||
|
After Width: | Height: | Size: 2.3 KiB |
1
admin/layout/icon/icon-menu/bus.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="17" height="16" preserveAspectRatio="xMidYMid meet" viewBox="0 0 17 16" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"><g transform="translate(1 3)" fill="#8691b2" fill-rule="evenodd"><ellipse cx="3.492" cy="8.48" rx="1.492" ry="1.48"/><circle cx="12.485" cy="8.485" r="1.485"/><path d="M14.078.024h-7.91c-2.104 0-3.137.5-3.137 2.991c0 0-.888.993-1.586.993c-.698 0-1.445.443-1.445.985v3.131c0 .408.219.728.918.819a2.667 2.667 0 0 1-.049-.485c0-1.438 1.182-2.605 2.637-2.605S6.143 7.02 6.143 8.458c0 .176-.019.346-.053.512l3.822.002a2.669 2.669 0 0 1-.048-.477a2.644 2.644 0 0 1 2.642-2.643a2.643 2.643 0 0 1 2.641 2.643a2.6 2.6 0 0 1-.049.478h.887V3.009c-.001-1.863-.671-2.985-1.907-2.985zM7.016 3.031H3.918c0-2.223.947-2.05 1.293-2.05L7.023.967l-.007 2.064zm5.027-.01H7.969V.978h4.074v2.043zm.931 0V.978h1.435c.692 0 .67 2.043.67 2.043h-2.105z"/></g><rect x="0" y="0" width="17" height="16" fill="rgba(0, 0, 0, 0)" /></svg>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
1
admin/layout/icon/icon-menu/bx-at.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"><path d="M12 2C6.486 2 2 6.486 2 12s4.486 10 10 10c1.466 0 2.961-.371 4.442-1.104l-.885-1.793C14.353 19.698 13.156 20 12 20c-4.411 0-8-3.589-8-8s3.589-8 8-8s8 3.589 8 8v1c0 .692-.313 2-1.5 2c-1.396 0-1.494-1.819-1.5-2V8h-2v.025A4.954 4.954 0 0 0 12 7c-2.757 0-5 2.243-5 5s2.243 5 5 5c1.45 0 2.748-.631 3.662-1.621c.524.89 1.408 1.621 2.838 1.621c2.273 0 3.5-2.061 3.5-4v-1c0-5.514-4.486-10-10-10zm0 13c-1.654 0-3-1.346-3-3s1.346-3 3-3s3 1.346 3 3s-1.346 3-3 3z" fill="#8691b2"/><rect x="0" y="0" width="24" height="24" fill="rgba(0, 0, 0, 0)" /></svg>
|
||||
|
After Width: | Height: | Size: 814 B |
1
admin/layout/icon/icon-menu/bxs-category-alt.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"><path d="M10 3H4a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1zm10 10h-6a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1v-6a1 1 0 0 0-1-1zM17 3c-2.206 0-4 1.794-4 4s1.794 4 4 4s4-1.794 4-4s-1.794-4-4-4zM7 13c-2.206 0-4 1.794-4 4s1.794 4 4 4s4-1.794 4-4s-1.794-4-4-4z" fill="#8691b2"/><rect x="0" y="0" width="24" height="24" fill="rgba(0, 0, 0, 0)" /></svg>
|
||||
|
After Width: | Height: | Size: 634 B |
1
admin/layout/icon/icon-menu/bxs-dashboard.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"><path d="M4 13h6a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1zm-1 7a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1v-4a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v4zm10 0a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1v-7a1 1 0 0 0-1-1h-6a1 1 0 0 0-1 1v7zm1-10h6a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1h-6a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1z" fill="#8691b2"/><rect x="0" y="0" width="24" height="24" fill="rgba(0, 0, 0, 0)" /></svg>
|
||||
|
After Width: | Height: | Size: 647 B |
1
admin/layout/icon/icon-menu/calendar-settings.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"><path d="M30 23v-2h-2.09a5.96 5.96 0 0 0-1.024-2.47l1.478-1.48l-1.414-1.414l-1.479 1.479A5.958 5.958 0 0 0 23 16.09V14h-2v2.09a5.958 5.958 0 0 0-2.47 1.024l-1.48-1.478l-1.414 1.414l1.479 1.479A5.962 5.962 0 0 0 16.09 21H14v2h2.09a5.962 5.962 0 0 0 1.024 2.47l-1.478 1.48l1.414 1.414l1.479-1.479A5.958 5.958 0 0 0 21 27.91V30h2v-2.09a5.958 5.958 0 0 0 2.47-1.024l1.48 1.478l1.414-1.414l-1.479-1.479A5.96 5.96 0 0 0 27.91 23zm-8 3a4 4 0 1 1 4-4a4.005 4.005 0 0 1-4 4z" fill="#8691b2"/><path d="M28 6a2 2 0 0 0-2-2h-4V2h-2v2h-8V2h-2v2H6a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h4v-2H6V6h4v2h2V6h8v2h2V6h4v6h2z" fill="#8691b2"/><rect x="0" y="0" width="32" height="32" fill="rgba(0, 0, 0, 0)" /></svg>
|
||||
|
After Width: | Height: | Size: 950 B |
1
admin/layout/icon/icon-menu/chevrons-right.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"><g fill="none" stroke="#8691b2" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M13 17l5-5l-5-5"/><path d="M6 17l5-5l-5-5"/></g><rect x="0" y="0" width="24" height="24" fill="rgba(0, 0, 0, 0)" /></svg>
|
||||
|
After Width: | Height: | Size: 489 B |
1
admin/layout/icon/icon-menu/chevrons-right_1.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"><g fill="none" stroke="#8691b2" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M13 17l5-5l-5-5"/><path d="M6 17l5-5l-5-5"/></g><rect x="0" y="0" width="24" height="24" fill="rgba(0, 0, 0, 0)" /></svg>
|
||||
|
After Width: | Height: | Size: 489 B |
1
admin/layout/icon/icon-menu/coins-fill.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"><path d="M14 2a8 8 0 0 1 3.292 15.293A8 8 0 1 1 6.706 6.707A8.003 8.003 0 0 1 14 2zm-3 7H9v1a2.5 2.5 0 0 0-.164 4.995L9 15h2l.09.008a.5.5 0 0 1 0 .984L11 16H7v2h2v1h2v-1a2.5 2.5 0 0 0 .164-4.995L11 13H9l-.09-.008a.5.5 0 0 1 0-.984L9 12h4v-2h-2V9zm3-5a5.985 5.985 0 0 0-4.484 2.013a8 8 0 0 1 8.47 8.471A6 6 0 0 0 14 4z" fill="#8691b2"/><rect x="0" y="0" width="24" height="24" fill="rgba(0, 0, 0, 0)" /></svg>
|
||||
|
After Width: | Height: | Size: 671 B |
1
admin/layout/icon/icon-menu/file-image-outlined.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1024" height="1024" preserveAspectRatio="xMidYMid meet" viewBox="0 0 1024 1024" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"><path d="M553.1 509.1l-77.8 99.2l-41.1-52.4a8 8 0 0 0-12.6 0l-99.8 127.2a7.98 7.98 0 0 0 6.3 12.9H696c6.7 0 10.4-7.7 6.3-12.9l-136.5-174a8.1 8.1 0 0 0-12.7 0zM360 442a40 40 0 1 0 80 0a40 40 0 1 0-80 0zm494.6-153.4L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0 0 42 42h216v494z" fill="#8691b2"/><rect x="0" y="0" width="1024" height="1024" fill="rgba(0, 0, 0, 0)" /></svg>
|
||||
|
After Width: | Height: | Size: 802 B |
1
admin/layout/icon/icon-menu/language.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1792" height="1792" preserveAspectRatio="xMidYMid meet" viewBox="0 0 1792 1792" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"><path d="M891 689q-6-87-66-144q-30-27-50-37.5T715 488q1-5 4.5-26t6.5-35l-91-12l-10 50q-79-14-136 3V354q151-6 306-23l-14-94q-126 21-286 29q2-30 6-49t6-37q-5 0-36-.5t-53-.5q-2 18-5.5 40t-5.5 51l-154 3l14 94l120-6l5 137q-100 50-150.5 114T191 781q0 64 30 97t75 33.5t94-17t89-49.5l18 36l72-46l-21-43q34-34 54-56.5t50.5-71.5T700 562q60 17 82 43t19 86q-48 10-80 48t-32 88v25q-37 10-81 13l46 73q5-1 35-6v68H179q-31 0-53-22.5T104 924V179q0-31 22-53t53-22h745q31 0 53.5 22t22.5 53v510H891zm212 0V138q0-57-41-97.5T965 0H138Q81 0 40.5 40.5T0 138v827q0 56 40.5 97t97.5 41h551v551q0 57 41 97.5t97 40.5h827q57 0 97.5-40.5t40.5-97.5V827q0-56-40.5-97t-97.5-41h-551zM401 584q10 120 32 181q-17 16-40.5 31T343 821t-44-1.5t-18-47.5q0-60 33-111t87-77zm90-33q54-26 119-7q-7 25-19.5 47.5t-22.5 35t-28 34.5l-27 33q-5-13-9-26t-6-21t-3.5-24t-2-20.5t-1-26t-.5-25.5zm504 1069H863l310-758h135l310 758h-132l-89-218h-312zm246-599l-116 281h231z" fill="#8691b2"/><rect x="0" y="0" width="1792" height="1792" fill="rgba(0, 0, 0, 0)" /></svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
1
admin/layout/icon/icon-menu/letter-aa.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"><path d="M23 13h-5v2h5v2h-4a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h6v-8a2 2 0 0 0-2-2zm0 8h-4v-2h4z" fill="#8691b2"/><path d="M13 9H9a2 2 0 0 0-2 2v12h2v-5h4v5h2V11a2 2 0 0 0-2-2zm-4 7v-5h4v5z" fill="#8691b2"/><rect x="0" y="0" width="32" height="32" fill="rgba(0, 0, 0, 0)" /></svg>
|
||||
|
After Width: | Height: | Size: 537 B |
1
admin/layout/icon/icon-menu/menu(1).svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20" height="20" preserveAspectRatio="xMidYMid meet" viewBox="0 0 20 20" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"><g fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M3 5a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H4a1 1 0 0 1-1-1z" fill="#8691b2"/><path fill-rule="evenodd" clip-rule="evenodd" d="M3 10a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H4a1 1 0 0 1-1-1z" fill="#8691b2"/><path fill-rule="evenodd" clip-rule="evenodd" d="M3 15a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H4a1 1 0 0 1-1-1z" fill="#8691b2"/></g><rect x="0" y="0" width="20" height="20" fill="rgba(0, 0, 0, 0)" /></svg>
|
||||
|
After Width: | Height: | Size: 714 B |
1
admin/layout/icon/icon-menu/note.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" preserveAspectRatio="xMidYMid meet" viewBox="0 0 16 16" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"><g fill="#8691b2"><path fill-rule="evenodd" clip-rule="evenodd" d="M1.5 2h13l.5.5v10l-.5.5h-13l-.5-.5v-10l.5-.5zM2 3v9h12V3H2zm2 2h8v1H4V5zm6 2H4v1h6V7zM4 9h4v1H4V9z"/></g><rect x="0" y="0" width="16" height="16" fill="rgba(0, 0, 0, 0)" /></svg>
|
||||
|
After Width: | Height: | Size: 508 B |
1
admin/layout/icon/icon-menu/package(1).svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" preserveAspectRatio="xMidYMid meet" viewBox="0 0 16 16" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"><g fill="#8691b2"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.61 3l5.74 1.53L15 5v6.74l-.37.48l-6.13 1.69l-6.14-1.69l-.36-.48V5l.61-.47L8.34 3h.27zm-.09 1l-4 1l.55.2l3.43.9l3-.81l.95-.29l-3.93-1zM3 11.36l5 1.37V7L3 5.66v5.7zM9 7v5.73l5-1.37V5.63l-2.02.553V8.75l-1 .26V6.457L9 7z"/></g><rect x="0" y="0" width="16" height="16" fill="rgba(0, 0, 0, 0)" /></svg>
|
||||
|
After Width: | Height: | Size: 629 B |
1
admin/layout/icon/icon-menu/people-fill.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" preserveAspectRatio="xMidYMid meet" viewBox="0 0 16 16" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"><g fill="#8691b2"><path fill-rule="evenodd" d="M7 14s-1 0-1-1s1-4 5-4s5 3 5 4s-1 1-1 1H7zm4-6a3 3 0 1 0 0-6a3 3 0 0 0 0 6zm-5.784 6A2.238 2.238 0 0 1 5 13c0-1.355.68-2.75 1.936-3.72A6.325 6.325 0 0 0 5 9c-4 0-5 3-5 4s1 1 1 1h4.216zM4.5 8a2.5 2.5 0 1 0 0-5a2.5 2.5 0 0 0 0 5z"/></g><rect x="0" y="0" width="16" height="16" fill="rgba(0, 0, 0, 0)" /></svg>
|
||||
|
After Width: | Height: | Size: 617 B |
1
admin/layout/icon/icon-menu/photo-video.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="640" height="512" preserveAspectRatio="xMidYMid meet" viewBox="0 0 640 512" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"><path d="M608 0H160a32 32 0 0 0-32 32v96h160V64h192v320h128a32 32 0 0 0 32-32V32a32 32 0 0 0-32-32zM232 103a9 9 0 0 1-9 9h-30a9 9 0 0 1-9-9V73a9 9 0 0 1 9-9h30a9 9 0 0 1 9 9zm352 208a9 9 0 0 1-9 9h-30a9 9 0 0 1-9-9v-30a9 9 0 0 1 9-9h30a9 9 0 0 1 9 9zm0-104a9 9 0 0 1-9 9h-30a9 9 0 0 1-9-9v-30a9 9 0 0 1 9-9h30a9 9 0 0 1 9 9zm0-104a9 9 0 0 1-9 9h-30a9 9 0 0 1-9-9V73a9 9 0 0 1 9-9h30a9 9 0 0 1 9 9zm-168 57H32a32 32 0 0 0-32 32v288a32 32 0 0 0 32 32h384a32 32 0 0 0 32-32V192a32 32 0 0 0-32-32zM96 224a32 32 0 1 1-32 32a32 32 0 0 1 32-32zm288 224H64v-32l64-64l32 32l128-128l96 96z" fill="#8691b2"/><rect x="0" y="0" width="640" height="512" fill="rgba(0, 0, 0, 0)" /></svg>
|
||||
|
After Width: | Height: | Size: 939 B |
1
admin/layout/icon/icon-menu/piggy-bank-coins.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="520" height="512" preserveAspectRatio="xMidYMid meet" viewBox="0 0 520 512" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"><path d="M469 192h-32q-7 0-10-6q-9-14-20-22l-2-2V64h-21q-32 0-60 28l-2 2v-7q0-35-25.5-61T235 0q-35 0-60.5 25T149 87q0 13 2 20q-27 10-55 38l-43-15l-17-17q-14-14-30 0q-13 15 0 30l26 26l36 12q-25 38-25 86v32l19 175q2 16 14.5 27t28.5 11h29q13 0 25-8t16-22l15-43q33 10 72 7l13 36q12 28 41 28h30q16 0 28.5-11.5T388 471l9-85q29-29 40-60q3-8 13-8h4q24 0 42-18t18-42v-23q-2-18-14.5-30.5T469 192zM237 43q18 0 31.5 13T282 87q0 19-13 32t-32 13q-19-2-32-14.5T192 87t13-31t32-13zm232 217q0 7-5 12t-12 5h-4q-36 0-53 37q-9 22-34 49l-7 6l-11 100h-29l-24-68l-17 2q-11 2-28 2q-29 0-62-10l-21-9l-28 83h-29L85 297v-30q0-43 26-75q12-4 15-13v-4q13-13 45-30q26 30 64 30q47 0 72-38h2q14 7 41-11q2-1 6-4.5t7-4.5v64l6 7q6 6 11 10l5.5 5.5l4.5 5.5q18 28 47 28h32v23zm-128-68q0 9-6 15t-15 6t-15-6t-6-15t6-15t15-6t15 6t6 15z" fill="#8691b2"/><rect x="0" y="0" width="520" height="512" fill="rgba(0, 0, 0, 0)" /></svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
1
admin/layout/icon/icon-menu/shopping-basket.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="576" height="512" preserveAspectRatio="xMidYMid meet" viewBox="0 0 576 512" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"><path d="M576 216v16c0 13.255-10.745 24-24 24h-8l-26.113 182.788C514.509 462.435 494.257 480 470.37 480H105.63c-23.887 0-44.139-17.565-47.518-41.212L32 256h-8c-13.255 0-24-10.745-24-24v-16c0-13.255 10.745-24 24-24h67.341l106.78-146.821c10.395-14.292 30.407-17.453 44.701-7.058c14.293 10.395 17.453 30.408 7.058 44.701L170.477 192h235.046L326.12 82.821c-10.395-14.292-7.234-34.306 7.059-44.701c14.291-10.395 34.306-7.235 44.701 7.058L484.659 192H552c13.255 0 24 10.745 24 24zM312 392V280c0-13.255-10.745-24-24-24s-24 10.745-24 24v112c0 13.255 10.745 24 24 24s24-10.745 24-24zm112 0V280c0-13.255-10.745-24-24-24s-24 10.745-24 24v112c0 13.255 10.745 24 24 24s24-10.745 24-24zm-224 0V280c0-13.255-10.745-24-24-24s-24 10.745-24 24v112c0 13.255 10.745 24 24 24s24-10.745 24-24z" fill="#8691b2"/><rect x="0" y="0" width="576" height="512" fill="rgba(0, 0, 0, 0)" /></svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
1
admin/layout/icon/icon-menu/shopping-cart.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1200" height="1200" preserveAspectRatio="xMidYMid meet" viewBox="0 0 1200 1200" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"><path d="M1199.398 403.537l-50.323 288.696c-6.206 31.891-31.615 51.282-60.917 51.646H354.5l-14.566 82.106h699.226c36.818 2.798 61.793 28.88 62.242 62.24c-2.678 36.743-28.758 61.786-62.242 62.242H265.773c-41.827-3.762-66.768-37.103-62.242-74.16l33.107-180.104l-50.323-505.88L43.292 145.3C8.341 131.423-5.924 99.805 2.239 67.167c13.573-34.015 46.096-49.556 78.133-41.053l182.752 58.269c24.62 9.229 38.783 29.382 42.377 52.972l10.594 100.646l829.006 92.7c38.09 8.251 58.769 38.422 54.297 72.836zm-744.126 677.619c0 52.476-42.54 95.017-95.018 95.017c-52.477 0-95.017-42.541-95.017-95.017c0-52.478 42.541-95.019 95.017-95.019c52.477.001 95.018 42.543 95.018 95.019zm567.252 0c0 52.476-42.541 95.017-95.019 95.017c-52.477 0-95.017-42.541-95.017-95.017c0-52.478 42.54-95.019 95.017-95.019c52.478.001 95.019 42.543 95.019 95.019z" fill="#8691b2"/><rect x="0" y="0" width="1200" height="1200" fill="rgba(0, 0, 0, 0)" /></svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
1
admin/layout/icon/icon-menu/star-filled.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1024" height="1024" preserveAspectRatio="xMidYMid meet" viewBox="0 0 1024 1024" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"><path d="M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5c-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 0 0 .6 45.3l183.7 179.1l-43.4 252.9a31.95 31.95 0 0 0 46.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2c17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9l183.7-179.1c5-4.9 8.3-11.3 9.3-18.3c2.7-17.5-9.5-33.7-27-36.3z" fill="#8691b2"/><rect x="0" y="0" width="1024" height="1024" fill="rgba(0, 0, 0, 0)" /></svg>
|
||||
|
After Width: | Height: | Size: 738 B |
1
admin/layout/icon/icon-menu/template(1).svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"><g fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M3 3v6h18V3H3zm16 2H5v2h14V5z" fill="#8691b2"/><path fill-rule="evenodd" clip-rule="evenodd" d="M3 11v10h8V11H3zm6 2H5v6h4v-6z" fill="#8691b2"/><path d="M21 11h-8v2h8v-2z" fill="#8691b2"/><path d="M13 15h8v2h-8v-2z" fill="#8691b2"/><path d="M21 19h-8v2h8v-2z" fill="#8691b2"/></g><rect x="0" y="0" width="24" height="24" fill="rgba(0, 0, 0, 0)" /></svg>
|
||||
|
After Width: | Height: | Size: 680 B |
1
admin/layout/icon/icon-menu/template.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"><path d="M26 6v4H6V6h20m0-2H6a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z" fill="#8691b2"/><path d="M10 16v10H6V16h4m0-2H6a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2V16a2 2 0 0 0-2-2z" fill="#8691b2"/><path d="M26 16v10H16V16h10m0-2H16a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V16a2 2 0 0 0-2-2z" fill="#8691b2"/><rect x="0" y="0" width="32" height="32" fill="rgba(0, 0, 0, 0)" /></svg>
|
||||
|
After Width: | Height: | Size: 679 B |
1
admin/layout/icon/icon-menu/view-cols.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"><g fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M2 8a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v8a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V8zm14-1h3a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1h-3V7zm-2 0h-4v10h4V7zM8 17V7H5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h3z" fill="#8691b2"/></g><rect x="0" y="0" width="24" height="24" fill="rgba(0, 0, 0, 0)" /></svg>
|
||||
|
After Width: | Height: | Size: 593 B |
1
admin/layout/icon/user-avatar-filled.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"><defs/><path d="M26.749 24.93A13.99 13.99 0 1 0 2 16a13.899 13.899 0 0 0 3.251 8.93l-.02.017c.07.084.15.156.222.239c.09.103.187.2.28.3c.28.304.568.596.87.87c.092.084.187.162.28.242c.32.276.649.538.99.782c.044.03.084.069.128.1v-.012a13.901 13.901 0 0 0 16 0v.012c.044-.031.083-.07.128-.1c.34-.245.67-.506.99-.782c.093-.08.188-.159.28-.242c.302-.275.59-.566.87-.87c.093-.1.189-.197.28-.3c.071-.083.152-.155.222-.24zM16 8a4.5 4.5 0 1 1-4.5 4.5A4.5 4.5 0 0 1 16 8zM8.007 24.93A4.996 4.996 0 0 1 13 20h6a4.996 4.996 0 0 1 4.993 4.93a11.94 11.94 0 0 1-15.986 0z" fill="#2a3042"/><rect x="0" y="0" width="32" height="32" fill="rgba(0, 0, 0, 0)" /></svg>
|
||||
|
After Width: | Height: | Size: 909 B |
BIN
admin/layout/images/bg-unlogged.png
Normal file
|
After Width: | Height: | Size: 277 KiB |
1
admin/layout/images/home.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1200" height="1200" preserveAspectRatio="xMidYMid meet" viewBox="0 0 1200 1200" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"><path d="M600 0L56.645 422.323V1200h373.829V730.541h339.054V1200h373.828V422.323L600 0z" fill="#fff"/><rect x="0" y="0" width="1200" height="1200" fill="rgba(0, 0, 0, 0)" /></svg>
|
||||
|
After Width: | Height: | Size: 450 B |
BIN
admin/layout/images/no-image.png
Normal file
|
After Width: | Height: | Size: 514 KiB |
BIN
admin/layout/lang-de.jpg
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
admin/layout/lang-en.jpg
Normal file
|
After Width: | Height: | Size: 7.8 KiB |
BIN
admin/layout/lang-pl.jpg
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
admin/layout/lang-ru.jpg
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
admin/layout/lang-uk.jpg
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
1
admin/layout/style-css/style.css
Normal file
1
admin/layout/style-css/style.css.map
Normal file
0
admin/layout/style-scss/_mixins.css
Normal file
172
admin/layout/style-scss/_mixins.scss
Normal file
@@ -0,0 +1,172 @@
|
||||
$breakpoints: (xs: 576px,
|
||||
sm: 768px,
|
||||
md: 992px,
|
||||
lg: 1200px);
|
||||
|
||||
@mixin respond-above($breakpoint) {
|
||||
@if map-has-key($breakpoints, $breakpoint) {
|
||||
$breakpoint-value: map-get($breakpoints, $breakpoint);
|
||||
|
||||
@media (min-width: $breakpoint-value) {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
@else {
|
||||
@warn 'Invalid breakpoint: #{$breakpoint}.';
|
||||
}
|
||||
}
|
||||
|
||||
@mixin respond-below($breakpoint) {
|
||||
@if map-has-key($breakpoints, $breakpoint) {
|
||||
$breakpoint-value: map-get($breakpoints, $breakpoint);
|
||||
|
||||
@media (max-width: ($breakpoint-value - 1)) {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
@else {
|
||||
@warn 'Invalid breakpoint: #{$breakpoint}.';
|
||||
}
|
||||
}
|
||||
|
||||
@mixin respond-between($lower, $upper) {
|
||||
@if map-has-key($breakpoints, $lower) and map-has-key($breakpoints, $upper) {
|
||||
$lower-breakpoint: map-get($breakpoints, $lower);
|
||||
$upper-breakpoint: map-get($breakpoints, $upper);
|
||||
|
||||
@media (min-width: $lower-breakpoint) and (max-width: ($upper-breakpoint - 1)) {
|
||||
@content;
|
||||
}
|
||||
}
|
||||
|
||||
@else {
|
||||
@if (map-has-key($breakpoints, $lower)==false) {
|
||||
@warn 'Your lower breakpoint was invalid: #{$lower}.';
|
||||
}
|
||||
|
||||
@if (map-has-key($breakpoints, $upper)==false) {
|
||||
@warn 'Your upper breakpoint was invalid: #{$upper}.';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@mixin border-radius($px: 0) {
|
||||
-webkit-border-radius: $px;
|
||||
-moz-border-radius: $px;
|
||||
border-radius: $px;
|
||||
}
|
||||
|
||||
@mixin box-shadow($value) {
|
||||
-webkit-box-shadow: $value;
|
||||
-moz-box-shadow: $value;
|
||||
box-shadow: $value;
|
||||
}
|
||||
|
||||
@mixin transition($element: all, $time: .5s, $option: ease) {
|
||||
-webkit-transition: $element $time $option;
|
||||
transition: $element $time $option;
|
||||
}
|
||||
|
||||
@mixin opacity($value) {
|
||||
$IEValue: $value*100;
|
||||
opacity: $value;
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity="+$IEValue+")";
|
||||
filter: alpha(opacity=$IEValue);
|
||||
}
|
||||
|
||||
@mixin flexbox() {
|
||||
display: -webkit-box;
|
||||
display: -moz-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
@mixin flex($values) {
|
||||
-webkit-box-flex: $values;
|
||||
-moz-box-flex: $values;
|
||||
-webkit-flex: $values;
|
||||
-ms-flex: $values;
|
||||
flex: $values;
|
||||
}
|
||||
|
||||
@mixin flex-direction($direction) {
|
||||
-webkit-flex-direction: $direction;
|
||||
-moz-flex-direction: $direction;
|
||||
-ms-flex-direction: $direction;
|
||||
flex-direction: $direction;
|
||||
}
|
||||
|
||||
@mixin flex-wrap($wrap) {
|
||||
-webkit-flex-wrap: $wrap;
|
||||
-moz-flex-wrap: $wrap;
|
||||
-ms-flex-wrap: $wrap;
|
||||
flex-wrap: $wrap;
|
||||
}
|
||||
|
||||
@mixin flex-flow($flow) {
|
||||
-webkit-flex-flow: $flow;
|
||||
-moz-flex-flow: $flow;
|
||||
-ms-flex-flow: $flow;
|
||||
flex-flow: $flow;
|
||||
}
|
||||
|
||||
@mixin order($val) {
|
||||
-webkit-box-ordinal-group: $val;
|
||||
-moz-box-ordinal-group: $val;
|
||||
-ms-flex-order: $val;
|
||||
-webkit-order: $val;
|
||||
order: $val;
|
||||
}
|
||||
|
||||
@mixin flex-grow($grow) {
|
||||
-webkit-flex-grow: $grow;
|
||||
-moz-flex-grow: $grow;
|
||||
-ms-flex-grow: $grow;
|
||||
flex-grow: $grow;
|
||||
}
|
||||
|
||||
@mixin flex-shrink($shrink) {
|
||||
-webkit-flex-shrink: $shrink;
|
||||
-moz-flex-shrink: $shrink;
|
||||
-ms-flex-shrink: $shrink;
|
||||
flex-shrink: $shrink;
|
||||
}
|
||||
|
||||
@mixin flex-basis($width) {
|
||||
-webkit-flex-basis: $width;
|
||||
-moz-flex-basis: $width;
|
||||
-ms-flex-basis: $width;
|
||||
flex-basis: $width;
|
||||
}
|
||||
|
||||
@mixin justify-content($justify) {
|
||||
-webkit-justify-content: $justify;
|
||||
-moz-justify-content: $justify;
|
||||
-ms-justify-content: $justify;
|
||||
justify-content: $justify;
|
||||
-ms-flex-pack: $justify;
|
||||
}
|
||||
|
||||
@mixin align-content($align) {
|
||||
-webkit-align-content: $align;
|
||||
-moz-align-content: $align;
|
||||
-ms-align-content: $align;
|
||||
align-content: $align;
|
||||
}
|
||||
|
||||
@mixin align-items($align) {
|
||||
-webkit-align-items: $align;
|
||||
-moz-align-items: $align;
|
||||
-ms-align-items: $align;
|
||||
align-items: $align;
|
||||
}
|
||||
|
||||
@mixin align-self($align) {
|
||||
-webkit-align-self: $align;
|
||||
-moz-align-self: $align;
|
||||
-ms-align-self: $align;
|
||||
align-self: $align;
|
||||
}
|
||||
508
admin/layout/style-scss/style.css
Normal file
@@ -0,0 +1,508 @@
|
||||
body.external-page #content .admin-form {
|
||||
max-width: 450px; }
|
||||
|
||||
.sidebar-menu > li > a > span:nth-child(2) {
|
||||
padding: 0; }
|
||||
|
||||
ol.sortable, ol.sortable ol {
|
||||
margin: 0 0 0 25px;
|
||||
padding: 0;
|
||||
list-style-type: none; }
|
||||
|
||||
ol.sortable {
|
||||
margin: 0; }
|
||||
|
||||
ol.sortable, ol.sortable *, ol.sortable *:before, ol.sortable *:after {
|
||||
box-sizing: content-box; }
|
||||
|
||||
.sortable li {
|
||||
margin: 0;
|
||||
padding: 0; }
|
||||
|
||||
.sortable li div.content {
|
||||
color: #454545;
|
||||
cursor: move;
|
||||
height: 45px;
|
||||
line-height: 45px;
|
||||
margin: 0;
|
||||
padding: 0 10px;
|
||||
border-bottom: 1px solid #e1e1e1; }
|
||||
|
||||
.sortable li div.content.text-danger {
|
||||
color: #e9573f !important; }
|
||||
|
||||
.sortable li.sort-branch div {
|
||||
color: #383838; }
|
||||
|
||||
.sort-leaf .disclose {
|
||||
content: "- ";
|
||||
text-indent: -3000px;
|
||||
background-image: url("/libraries/jquery-nested-sortable/skin-vista/icons.gif");
|
||||
background-position: -16px -64px;
|
||||
background-repeat: no-repeat;
|
||||
display: inline-block;
|
||||
height: 16px;
|
||||
vertical-align: top;
|
||||
width: 16px;
|
||||
margin: 16px 5px 0 1px; }
|
||||
|
||||
li.sort-collapsed.sort-hover div {
|
||||
border-color: #999999; }
|
||||
|
||||
.disclose {
|
||||
cursor: pointer;
|
||||
width: 20px;
|
||||
display: none;
|
||||
text-align: center; }
|
||||
|
||||
.sortable li.sort-collapsed > ol {
|
||||
display: none; }
|
||||
|
||||
.sortable li.sort-branch > div > .disclose {
|
||||
display: block;
|
||||
float: left;
|
||||
margin-right: 15px; }
|
||||
|
||||
.sortable li.sort-collapsed > div > .disclose > span:before {
|
||||
display: inline-block;
|
||||
font-family: FontAwesome;
|
||||
font-size: 10px;
|
||||
content: "\f054";
|
||||
height: 25px;
|
||||
width: 25px;
|
||||
line-height: 25px;
|
||||
border-radius: 13px;
|
||||
background: #eeeeee;
|
||||
color: #3bafda;
|
||||
border: 1px solid #3bafda; }
|
||||
|
||||
.sortable li.sort-collapsed > div > .disclose:hover > span:before, .sortable li.sort-expanded > div > .disclose:hover > span:before {
|
||||
background: #3bafda;
|
||||
color: #FFF; }
|
||||
|
||||
.sortable li.sort-expanded > div > .disclose > span:before {
|
||||
display: inline-block;
|
||||
font-family: FontAwesome;
|
||||
font-size: 10px;
|
||||
content: "\f078";
|
||||
height: 25px;
|
||||
width: 25px;
|
||||
line-height: 25px;
|
||||
border-radius: 13px;
|
||||
background: #eeeeee;
|
||||
color: #3bafda;
|
||||
border: 1px solid #3bafda; }
|
||||
|
||||
.placeholder {
|
||||
outline: 1px dashed #4183C4; }
|
||||
|
||||
.sort-error {
|
||||
background: #fbe3e4;
|
||||
border-color: transparent; }
|
||||
|
||||
.menu_sortable .btn-group {
|
||||
margin-top: 7px;
|
||||
display: none; }
|
||||
|
||||
.menu_sortable div:hover .btn-group {
|
||||
display: block; }
|
||||
|
||||
.menu_sortable div:hover {
|
||||
background: #f0f0f0; }
|
||||
|
||||
.resp-vtabs::after {
|
||||
content: '';
|
||||
display: block;
|
||||
clear: both; }
|
||||
|
||||
.resp-tab-content {
|
||||
padding: 25px 15px; }
|
||||
|
||||
.resp-tab-content .resp-tab-content {
|
||||
padding: 0;
|
||||
border: 0; }
|
||||
|
||||
.resp-tabs-list li, .resp-tab-active {
|
||||
padding: 8px 20px !important; }
|
||||
|
||||
.resp-tab-content .resp-tabs-list {
|
||||
border-bottom: 0;
|
||||
margin-bottom: 10px;
|
||||
background: #f1f1f1; }
|
||||
|
||||
.resp-tab-content .resp-tabs-list li {
|
||||
border-left: 0 !important;
|
||||
border-right: 0 !important;
|
||||
float: right; }
|
||||
|
||||
.resp-tab-content .resp-tabs-list::after {
|
||||
clear: both;
|
||||
content: '';
|
||||
display: block; }
|
||||
|
||||
.resp-tab-content .resp-tab-active {
|
||||
position: relative;
|
||||
top: -1px; }
|
||||
|
||||
.resp-tab-content .form-group {
|
||||
margin: 0 0 15px 0; }
|
||||
|
||||
.input-group span.btn-info {
|
||||
border-color: rgba(0, 0, 0, 0.05); }
|
||||
|
||||
#overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 1300;
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
display: none;
|
||||
cursor: pointer; }
|
||||
|
||||
#g-row-limit {
|
||||
width: auto;
|
||||
display: inline-block;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
padding: 4px 12px; }
|
||||
|
||||
#images-uploader, #files-uploader {
|
||||
clear: both; }
|
||||
|
||||
#images-uploader, #images-uploader *, #files-uploader, #files-uploader * {
|
||||
box-sizing: content-box !important; }
|
||||
|
||||
#images-list {
|
||||
margin: 0;
|
||||
padding: 0 5px; }
|
||||
|
||||
#images-list li {
|
||||
background: #FFF;
|
||||
text-align: center;
|
||||
display: block;
|
||||
height: 100px;
|
||||
margin: 5px 5px 10px 5px;
|
||||
vertical-align: middle;
|
||||
border: 1px solid #e5e5e5;
|
||||
float: left;
|
||||
width: calc( 50% - 10px ); }
|
||||
|
||||
#images-list li .article-image {
|
||||
height: 100%;
|
||||
width: 120px;
|
||||
float: left;
|
||||
margin-right: 10px; }
|
||||
|
||||
#images-list li .input-group {
|
||||
margin: 10px 10px 10px 0; }
|
||||
|
||||
#images-list li:hover .article-image-edit, #images-list li.pending .article-image-edit {
|
||||
display: block; }
|
||||
|
||||
.article-image-edit {
|
||||
background: rgba(255, 255, 255, 0.8);
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
width: 150px;
|
||||
cursor: pointer;
|
||||
line-height: 168px;
|
||||
display: none; }
|
||||
|
||||
.article-image-edit i {
|
||||
font-size: 28px;
|
||||
color: #cc0000; }
|
||||
|
||||
.article-image-edit img {
|
||||
height: 50px;
|
||||
position: relative;
|
||||
top: 12px; }
|
||||
|
||||
#files-list {
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0; }
|
||||
|
||||
#files-list li {
|
||||
float: left;
|
||||
margin: 5px 7px; }
|
||||
|
||||
#files-list li .article_file_delete {
|
||||
border-color: rgba(0, 0, 0, 0.05); }
|
||||
|
||||
#elfinder * {
|
||||
box-sizing: content-box !important; }
|
||||
|
||||
#elfinder {
|
||||
background: #EBEBEB; }
|
||||
|
||||
.elfinder-button {
|
||||
background: #FFF !important; }
|
||||
|
||||
.elfinder-cwd, .elfinder .elfinder-navbar, .std42-dialog .ui-dialog-content, .elfinder-contextmenu .elfinder-contextmenu-item span {
|
||||
font-size: 12px; }
|
||||
|
||||
.elfinder-contextmenu-item {
|
||||
background: #FFF;
|
||||
color: #000; }
|
||||
|
||||
.elfinder-cwd-view-icons .elfinder-cwd-filename {
|
||||
-webkit-border-radius: 0px;
|
||||
border-radius: 0px; }
|
||||
|
||||
.elfinder-cwd-view-icons .elfinder-cwd-file .elfinder-cwd-filename.ui-state-hover, .elfinder-cwd table td.ui-state-hover, .elfinder-button-menu .ui-state-hover {
|
||||
background: #2c373d; }
|
||||
|
||||
.elfinder-cwd-filename input[type="text"] {
|
||||
border: 0px !important;
|
||||
padding: 0px !important; }
|
||||
|
||||
#elfinder {
|
||||
height: 750px !important;
|
||||
position: relative; }
|
||||
|
||||
.elfinder-cwd table tr:nth-child(2n+1) {
|
||||
background: #D3D3D3; }
|
||||
|
||||
.elfinder-cwd table tr {
|
||||
border-top: 1px solid #CCC; }
|
||||
|
||||
.elfinder-cwd table tr td {
|
||||
padding: 5px 12px !important; }
|
||||
|
||||
.elfinder-workzone {
|
||||
clear: both; }
|
||||
|
||||
#elfinder .ui-dialog {
|
||||
border: 1px solid #ccc;
|
||||
position: absolute !important; }
|
||||
|
||||
.navbar-branding .navbar-brand {
|
||||
float: left; }
|
||||
|
||||
.navbar .label {
|
||||
margin-left: 10px;
|
||||
position: relative;
|
||||
top: 17px; }
|
||||
|
||||
body.sb-top .navbar-branding {
|
||||
width: 250px; }
|
||||
|
||||
.flags {
|
||||
margin: -4px 0 0 20px !important;
|
||||
background: none;
|
||||
cursor: move; }
|
||||
|
||||
.flags:hover {
|
||||
border: 0px !important;
|
||||
background: none !important; }
|
||||
|
||||
.flags img {
|
||||
height: 10px;
|
||||
margin-right: 5px;
|
||||
opacity: .4; }
|
||||
|
||||
.CodeMirror {
|
||||
height: 500px !important; }
|
||||
|
||||
.nav > li > a {
|
||||
font-size: 12px; }
|
||||
|
||||
#newsletter-preview {
|
||||
border: 1px solid #ccc;
|
||||
padding: 20px; }
|
||||
|
||||
div.jqi .jqititle {
|
||||
margin-bottom: 0; }
|
||||
|
||||
#google-preview {
|
||||
padding: 10px; }
|
||||
|
||||
.google-title {
|
||||
color: #1a0dab;
|
||||
font-family: arial,sans-serif;
|
||||
cursor: pointer;
|
||||
font-size: 18px;
|
||||
line-height: 21.6px;
|
||||
width: 600px;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap; }
|
||||
|
||||
.google-url {
|
||||
color: #006621;
|
||||
font-family: arial,sans-serif;
|
||||
font-size: 14px;
|
||||
line-height: 16px;
|
||||
width: 600px;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap; }
|
||||
|
||||
.google-description {
|
||||
color: #545454;
|
||||
font-family: arial,sans-serif;
|
||||
font-size: 13px;
|
||||
line-height: 18.2px;
|
||||
width: 600px;
|
||||
display: block; }
|
||||
|
||||
.sidebar-left-content {
|
||||
background: #114975; }
|
||||
|
||||
.sidebar-menu li.disable_menu {
|
||||
pointer-events: none;
|
||||
opacity: .3; }
|
||||
|
||||
body.sb-top #sidebar_left .sidebar-menu > li > a {
|
||||
color: #FFF; }
|
||||
|
||||
body.sb-top.sb-top-sm #sidebar_left .sidebar-menu > li > a > span:nth-child(1) {
|
||||
font-size: 13px; }
|
||||
|
||||
body.sb-top #sidebar_left .sidebar-menu li > a > span.caret {
|
||||
color: #FFF; }
|
||||
|
||||
body.sb-top #sidebar_left .sidebar-menu > li.active > a,
|
||||
body.sb-top #sidebar_left .sidebar-menu > li:hover > a,
|
||||
body.sb-top #sidebar_left .sidebar-menu > li > a.menu-open,
|
||||
body.sb-top #sidebar_left .sidebar-menu > li > a:hover,
|
||||
body.sb-top #sidebar_left .sidebar-menu > li > a:focus {
|
||||
background: #FFF;
|
||||
color: #114975; }
|
||||
|
||||
body.sb-top #sidebar_left .sidebar-menu liactive > a > span.caret,
|
||||
body.sb-top #sidebar_left .sidebar-menu > li:hover > a > span.caret,
|
||||
body.sb-top #sidebar_left .sidebar-menu > li > a.menu-open > span.caret,
|
||||
body.sb-top #sidebar_left .sidebar-menu > li > a:hover > span.caret,
|
||||
body.sb-top #sidebar_left .sidebar-menu > li > a:focus > span.caret {
|
||||
color: #114975; }
|
||||
|
||||
.sidebar-menu > li > ul {
|
||||
background: #FFF;
|
||||
-webkit-box-shadow: -1px 1px 6px rgba(0, 0, 0, 0.2);
|
||||
-moz-box-shadow: -1px 1px 6px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: -1px 1px 6px rgba(0, 0, 0, 0.2); }
|
||||
|
||||
.sidebar-menu > li > ul > li > a {
|
||||
color: #114975;
|
||||
border-bottom: 1px solid #f3f3f3; }
|
||||
|
||||
body.sb-top #sidebar_left .sidebar-menu > li > ul > li > a.menu-open:after, body.sb-top #sidebar_left .sidebar-menu > li > ul > li.active > a:after, body.sb-top #sidebar_left .sidebar-menu > li > ul > li:hover > a:after, body.sb-top #sidebar_left .sidebar-menu > li > ul > li:focus > a:after {
|
||||
width: 5px;
|
||||
left: 0; }
|
||||
|
||||
.sidebar-menu > li > ul > li > a:hover, .sidebar-menu > li > ul > li > a:focus {
|
||||
color: #114975; }
|
||||
|
||||
.sidebar-menu > li > ul > li:hover > a:after, .sidebar-menu > li > ul > li:focus > a:after {
|
||||
background: #70ca63; }
|
||||
|
||||
body.sb-top #sidebar_left .sidebar-menu > li > ul {
|
||||
padding-bottom: 0; }
|
||||
|
||||
.progress-box {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 200;
|
||||
background: #fff;
|
||||
padding: 0px;
|
||||
margin-left: -15px; }
|
||||
|
||||
.progress {
|
||||
margin: 15px;
|
||||
height: 35px;
|
||||
transform: translateY(-100%);
|
||||
position: relative;
|
||||
top: 30%;
|
||||
background-color: #333; }
|
||||
|
||||
.version {
|
||||
position: relative;
|
||||
top: 5%; }
|
||||
|
||||
.version h3 p {
|
||||
display: inline-block; }
|
||||
|
||||
.version h3 {
|
||||
text-align: center; }
|
||||
|
||||
.form-group.text-right div {
|
||||
padding-right: 15px; }
|
||||
|
||||
.remember {
|
||||
font-size: 13px !important; }
|
||||
|
||||
#remember {
|
||||
display: inline-block !important;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
top: 2px;
|
||||
position: relative; }
|
||||
|
||||
.popo {
|
||||
display: inline-block;
|
||||
border: 1px solid #114975;
|
||||
border-radius: 50%;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
text-align: center; }
|
||||
|
||||
.popover-btn {
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
display: block;
|
||||
color: red;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
text-indent: -2px;
|
||||
font-style: normal; }
|
||||
|
||||
.mfp-auto-cursor .mfp-content {
|
||||
max-width: 1000px; }
|
||||
|
||||
.mfp-auto-cursor .mfp-content .col-lg-9,
|
||||
.mfp-auto-cursor .mfp-content .row {
|
||||
width: 100%;
|
||||
float: none;
|
||||
max-width: 1000px; }
|
||||
|
||||
.mfp-auto-cursor .mfp-content .g-container {
|
||||
max-width: 1000px; }
|
||||
|
||||
.mfp-close, .mfp-close:active {
|
||||
right: -7px;
|
||||
top: -27px;
|
||||
background: #FFF !important; }
|
||||
|
||||
.affix {
|
||||
top: 60px;
|
||||
width: 100%;
|
||||
z-index: 100;
|
||||
left: 0px; }
|
||||
|
||||
.affix + .panel-heading {
|
||||
padding-top: 70px; }
|
||||
|
||||
.resp-vtabs li.resp-tab-active {
|
||||
background: #4186da !important;
|
||||
color: #FFF;
|
||||
border-left: 0 !important; }
|
||||
|
||||
.resp-vtabs > .resp-tabs-container {
|
||||
border: 0 !important;
|
||||
border-left: 1px solid #e5e5e5 !important; }
|
||||
|
||||
@media (min-width: 1199px) {
|
||||
.g-container .panel-body form {
|
||||
max-width: 1400px; } }
|
||||
@media (max-width: 900px) {
|
||||
body.sb-top #toggle_sidemenu_t {
|
||||
width: 60px; } }
|
||||
|
||||
/*# sourceMappingURL=style.css.map */
|
||||
7
admin/layout/style-scss/style.css.map
Normal file
2216
admin/layout/style-scss/style.scss
Normal file
BIN
admin/layout/user-icon.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
1
admin/temp/2/s_cache_21a4da48e5fa14e992150d116fb212cc
Normal file
@@ -0,0 +1 @@
|
||||
YToyOntpOjA7aToxNjkzOTE3NzIzO2k6MTtzOjg6Ik1hcmlhbmVrIjt9
|
||||
1
admin/temp/3/s_cache_3a23324137621a1dfafc3ee613d86e94
Normal file
@@ -0,0 +1 @@
|
||||
YToyOntpOjA7aToxNjkzOTQ2ODIzO2k6MTtzOjI6InBsIjt9
|
||||
1
admin/temp/4/s_cache_44e3d63e885545f6b55debe0486ec1e4
Normal file
1
admin/temp/4/s_cache_4b916ae533b4ded88ddc3edfe99de1be
Normal file
@@ -0,0 +1 @@
|
||||
YToyOntpOjA7aToxNzI0MjYzMTIxO2k6MTthOjM5OntzOjk6ImZpcm1fbmFtZSI7czo4OiJNYXJpYW5layI7czoxMToiZmlybV9hZHJlc3MiO3M6MDoiIjtzOjE1OiJhZGRpdGlvbmFsX2luZm8iO3M6MjQxOiI8cD48c3Ryb25nPk1hc3ogcHl0YW5pYT8gWmFkendvxYQgZG8gbmFzLjwvc3Ryb25nPjwvcD4NCg0KPHA+dGVsLiA8YSBocmVmPSJ0ZWw6Ly81MzA3NTU3NzQiPjUzMCA3NTUgNzc0PC9hPjxiciAvPg0KZW1haWw6Jm5ic3A7PGEgaHJlZj0ibWFpbHRvOnNrbGVwQG1hcmlhbmVrLnBsIj5za2xlcEBtYXJpYW5lay5wbDwvYT48YnIgLz4NCnVsLiBLcmFrb3dza2EgMTU2LzEwNCwgMzUtNTA2IFJ6ZXN6Jm9hY3V0ZTt3PC9wPg0KIjtzOjEyOiJjb250YWN0X2Zvcm0iO3M6MToiMSI7czoxMzoiY29udGFjdF9lbWFpbCI7czoxNzoic2tsZXBAbWFyaWFuZWsucGwiO3M6MTA6ImVtYWlsX2hvc3QiO3M6MTY6Im1haWwubWFyaWFuZWsucGwiO3M6MTA6ImVtYWlsX3BvcnQiO3M6MjoiMjUiO3M6MTE6ImVtYWlsX2xvZ2luIjtzOjE3OiJza2xlcEBtYXJpYW5lay5wbCI7czoxNDoiZW1haWxfcGFzc3dvcmQiO3M6OToiTGVnaWExOTE2IjtzOjExOiJnb29nbGVfbWFwcyI7czowOiIiO3M6MTM6ImZhY2Vib29rX2xpbmsiO3M6MDoiIjtzOjE0OiJzdGF0aXN0aWNfY29kZSI7czowOiIiO3M6ODoiaHRhY2Nlc3MiO3M6MDoiIjtzOjY6InJvYm90cyI7czowOiIiO3M6MjI6InNob3BfYmFua19hY2NvdW50X2luZm8iO3M6MjI4OiI8cD5Qcm9qZWN0LVBybzxiciAvPg0KTmVzdEJhbmsmbmJzcDs8c3Ryb25nPjIyIDI1MzAgMDAwOCAyMDUxIDEwNTAgNjc2MyAwMDAxPC9zdHJvbmc+PC9wPg0KDQo8cD5Ld290YTogPHN0cm9uZz5bS1dPVEFdPC9zdHJvbmc+PGJyIC8+DQpXIHR5dHVsZSBwcm9zesSZIHdwaXNhxIcgbnVtZXIgemFtJm9hY3V0ZTt3aWVuaWE6Jm5ic3A7PHN0cm9uZz5bTlItWkFNT1dJRU5JQV08L3N0cm9uZz48L3A+DQoiO3M6NjoidXBkYXRlIjtzOjE6IjEiO3M6MTQ6ImJvb3RfYW5pbWF0aW9uIjtzOjA6IiI7czoxNzoibmV3c2xldHRlcl9oZWFkZXIiO3M6MTYzOiI8ZGl2IHN0eWxlPSJib3JkZXItYm90dG9tOjVweCBzb2xpZCAjNzdjZGQxOyBwYWRkaW5nOjIwcHg7IHRleHQtYWxpZ246Y2VudGVyIj48aW1nIGFsdD0iIiBzcmM9Ii9sYXlvdXQvaW1hZ2VzL2xvZ28ucG5nIiBzdHlsZT0iaGVpZ2h0OjUwcHg7IHdpZHRoOjIwOHB4IiAvPjwvZGl2Pg0KIjtzOjE3OiJuZXdzbGV0dGVyX2Zvb3RlciI7czo2OTM6IjxkaXYgc3R5bGU9ImJvcmRlci10b3A6NXB4IHNvbGlkICM3N2NkZDE7IHBhZGRpbmc6MjBweCAyMHB4IDAgMjBweCI+DQo8cCBzdHlsZT0idGV4dC1hbGlnbjpjZW50ZXIiPjxzcGFuIHN0eWxlPSJmb250LXNpemU6MTJweCI+PGVtPlBvemRyYXdpYW15LDxiciAvPg0KWmVzcG9sIE1BUklBTkVLLlBMPGJyIC8+DQo8YSBocmVmPSJodHRwczovL3d3dy5tYXJpYW5lay5wbCI+d3d3Lm1hcmlhbmVrLnBsPC9hPjwvZW0+PC9zcGFuPjwvcD4NCg0KPHAgc3R5bGU9InRleHQtYWxpZ246Y2VudGVyIj48c3BhbiBzdHlsZT0iZm9udC1zaXplOjExcHgiPjxzcGFuIHN0eWxlPSJjb2xvcjojOTVhNWE2Ij5XaWFkb21vxZvEhyB6b3N0YcWCYSB3eWdlbmVyb3dhbmEgYXV0b21hdHljem5pZSwgcHJvc2lteSBuYSBuacSFIG5pZSBvZHBvd2lhZGHEhy4gJm5ic3A7QWJ5IHNrb250YWt0b3dhxIcgc2nEmSB6IHNlcndpc2VtIDxhIGhyZWY9Imh0dHBzOi8vd3d3Lm1hcmlhbmVrLnBsIj5NQVJJQU5FSy5QTDwvYT4sIHByb3NpbXkgbyBwcnplc8WCYW5pZSBlLW1haWxhIG5hIGFkcmVzJm5ic3A7PC9zcGFuPjxhIGhyZWY9Im1haWx0bzprb250YWt0QG1hcmlhbmVrLnBsIiB0YXJnZXQ9Il9ibGFuayI+PHNwYW4gc3R5bGU9ImNvbG9yOiM5NWE1YTYiPmtvbnRha3RAbWFyaWFuZWsucGw8L3NwYW4+PC9hPjwvc3Bhbj48L3A+DQo8L2Rpdj4NCiI7czoxMDoiaG90cGF5X2FwaSI7czo1OToiUkZSTmFHUk9ibXBuVEUxbWNtUlVNME5OZFRsTlJqWndSeTg0U1dsaFFXRTJhWHA1UzFKRVYwOHdjejAiO3M6NToiZGV2ZWwiO3M6MToiMCI7czozOiJzc2wiO3M6MToiMCI7czoxNDoiaHRhY2Nlc3NfY2FjaGUiO3M6MToiMSI7czoxMzoiZnJlZV9kZWxpdmVyeSI7czo1OiI5OS4wMCI7czoxODoicHJ6ZWxld3kyNF9zYW5kYm94IjtzOjE6IjAiO3M6MjI6InByemVsZXd5MjRfbWVyY2hhbnRfaWQiO3M6NjoiMTU2MTAxIjtzOjE4OiJwcnplbGV3eTI0X2NyY19rZXkiO3M6MTY6ImQ4NWFkOWRlOGNiYTBlMDEiO3M6MTA6InVwZGF0ZV9rZXkiO3M6MzI6ImZmZmE2ODNlYWVjMTU2ZGQwNGNiMDM3ZmU0ODMyZDY5IjtzOjc6InRwYXlfaWQiO3M6NToiNzQ2OTgiO3M6MTI6InRwYXlfc2FuZGJveCI7czoxOiIwIjtzOjE4OiJ0cGF5X3NlY3VyaXR5X2NvZGUiO3M6MTc6IilER01xPmt6eEApIzcwdmFyIjtzOjY6InBpa3NlbCI7czoxNjoiMjU2Nzk5OTIwMzMxNDI3NyI7czoxMzoiZ2VuZXJhdGVfd2VicCI7czoxOiIxIjtzOjEyOiJsYXp5X2xvYWRpbmciO3M6MToiMSI7czoxMjoiZWtvbWlfc3VydmV5IjtzOjA6IiI7czoyMToiZ29vZ2xlX3RhZ19tYW5hZ2VyX2lkIjtzOjEyOiJHVE0tUE03WjNMUjgiO3M6MTQ6ImluZmluaXRlc2Nyb2xsIjtzOjE6IjAiO3M6MjU6IndhcmVob3VzZV9tZXNzYWdlX3plcm9fcGwiO3M6MTY6IiFXeXN5xYJrYSBkbyAyNGgiO3M6Mjg6IndhcmVob3VzZV9tZXNzYWdlX25vbnplcm9fcGwiO3M6MTc6IiEhV3lzecWCa2EgZG8gMjRoIjt9fQ==
|
||||
78
admin/templates/archive/products-list-table.php
Normal file
@@ -0,0 +1,78 @@
|
||||
<? $i = ( $this -> current_page - 1 ) * 10 + 1;?>
|
||||
<? foreach ( $this -> products as $product ):?>
|
||||
<tr>
|
||||
<td>
|
||||
<?= $i++;?>
|
||||
</td>
|
||||
<td>
|
||||
<div class="product-image">
|
||||
<? if ( $product['images'][0]['src'] ):?>
|
||||
<img src="<?= $product['images'][0]['src'];?>" alt="<?= $product['images'][0]['alt'];?>" class="img-responsive">
|
||||
<? else:?>
|
||||
<img src="/admin/layout/images/no-image.png" alt="Brak zdjęcia" class="img-responsive">
|
||||
<? endif;?>
|
||||
</div>
|
||||
<div class="product-name">
|
||||
<a href="/admin/shop_product/product_edit/id=<?= $product['id'];?>">
|
||||
<?= $product['languages']['pl']['name'];?>
|
||||
</a>
|
||||
<a href="#" class="text-muted duplicate-product" product-id="<?= $product['id'];?>">duplikuj</a>
|
||||
</div>
|
||||
<small class="text-muted"><?= \admin\factory\ShopProduct::product_categories( $product['id'] );?></small>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" class="product-price form-control text-right" product-id="<?= $product['id'];?>" value="<?= $product['price_brutto'];?>" style="max-width: 75px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<input type="text" class="product-price-promo form-control text-right" product-id="<?= $product['id'];?>" value="<?= $product['price_brutto_promo'];?>" style="max-width: 75px;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<?= $product['promoted'] ? '<span class="text-success text-bold">tak</span>' : 'nie';?>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<?= $product['status'] ? 'tak' : '<span class="text-danger text-bold">nie</span>';?>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<span class="text-muted"><?= (int)\admin\factory\shopProduct::get_product_quantity_list( $product['id'] );?></span>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<?
|
||||
if ( $product['baselinker_product_name'] != "" ) {
|
||||
echo "<span title='" . htmlspecialchars( $product['baselinker_product_name'] ) . "'>" . mb_substr( $product['baselinker_product_name'], 0, 25, 'UTF-8' ) . "...</span>";
|
||||
echo "<br>";
|
||||
echo "<span class='text-danger baselinker-delete-linking' product-id='" . $product['id'] . "'>";
|
||||
echo "<i class='fa fa-times'></i>usuń powiązanie";
|
||||
echo "</span>";
|
||||
} else {
|
||||
echo "<span class='text-danger baselinker-product-search' product-id='" . $product['id'] . "'>";
|
||||
echo "nie przypisano <i class='fa fa-search'></i>";
|
||||
echo "</span>";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<?
|
||||
if ( $product['apilo_product_name'] != "" ) {
|
||||
echo "<span title='" . htmlspecialchars( $product['apilo_product_name'] ) . "'>" . mb_substr( $product['apilo_product_name'], 0, 25, "UTF-8" ) . "...</span>";
|
||||
echo "<br>";
|
||||
echo "<span class='text-danger apilo-delete-linking' product-id='" . $product['id'] . "'>";
|
||||
echo "<i class='fa fa-times'></i>usuń powiązanie";
|
||||
echo "</span>";
|
||||
} else {
|
||||
echo "<span class='text-danger apilo-product-search' product-id='" . $product['id'] . "'>";
|
||||
echo "nie przypisano <i class='fa fa-search'></i>";
|
||||
echo "</span>";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<a href='/admin/shop_product/product_combination/product_id=<?= $product['id'];?>'>kombinacje (<?= \admin\factory\shopProduct::count_product_combinations( $product['id'] );?>)</a>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a href='/admin/shop_product/product_edit/id=<?= $product['id'];?>'>edytuj</a>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a href='/admin/shop_product/product_unarchive/product_id=<?= $product['id'];?>' class="product-unarchive">przywróć</a>
|
||||
</td>
|
||||
</tr>
|
||||
<? endforeach;?>
|
||||
488
admin/templates/archive/products-list.php
Normal file
@@ -0,0 +1,488 @@
|
||||
<div class="panel">
|
||||
<div class="panel-body">
|
||||
<a href="/admin/shop_product/product_edit/" class="btn btn-success select-all">Dodaj produkt</a>
|
||||
</div>
|
||||
<div class="panel-body pn">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover table-striped mbn" id="table-products">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 10px;">#</th>
|
||||
<th>Nazwa</th>
|
||||
<th class="text-center" style="width: 100px;">Cena</th>
|
||||
<th class="text-center" style="width: 100px;">Cena promocyjna</th>
|
||||
<th class="text-center" style="width: 25px;">Promowany</th>
|
||||
<th class="text-center" style="width: 25px;">Aktywny</th>
|
||||
<th class="text-center" style="width: 75px;">Stan MG</th>
|
||||
<th class="text-center" style="width: 100px;">Baselinker</th>
|
||||
<th class="text-center" style="width: 100px;">Apilo</th>
|
||||
<th class="text-center" style="width: 100px;">Kombinacje</th>
|
||||
<th class="text-center" style="width: 75px;">Edytuj</th>
|
||||
<th class="text-center" style="width: 75px;">Przywróć</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>
|
||||
<input type="text" class="form-control table-search" field_name="name|ean|sku" placeholder="szukaj..." value="<?= htmlspecialchars( $this -> query_array['name'], ENT_QUOTES, 'UTF-8');?>">
|
||||
</th>
|
||||
<th colspan="10"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="12">
|
||||
<ul class="pagination" pagination_max="<?= $this -> pagination_max;?>">
|
||||
<li>
|
||||
<a href="#" page="1" title="pierwsza strona">
|
||||
<i class="fa fa-angle-double-left"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="previous" page="<?= ( $this -> current_page - 1 > 1 ) ? ( $this -> current_page - 1 ) : 1;?>" title="poprzednia strona">
|
||||
<i class="fa fa-angle-left" title="poprzednia strona"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<div>
|
||||
Strona <span id="current-page"><?= $this -> current_page;?></span> z <span id="max_page"><?= $this -> pagination_max;?></span>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="next" page="<?= ( $this -> current_page + 1 < $this -> pagination_max ) ? ( $this -> current_page + 1 ) : $this -> pagination_max;?>" title="następna strona">
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="last" page="<?= $this -> pagination_max;?>" title="ostatnia strona">
|
||||
<i class="fa fa-angle-double-right"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$( function() {
|
||||
ajax_load_products( <?= $this -> current_page;?>, null );
|
||||
|
||||
$( 'body' ).on( 'change', '.table-search', function() {
|
||||
ajax_load_products( 1 );
|
||||
});
|
||||
|
||||
$( 'body' ).on( 'click', '.pagination a', function() {
|
||||
var current_page = $( this ).attr( 'page' );
|
||||
ajax_load_products( current_page );
|
||||
});
|
||||
|
||||
$( 'body' ).on( 'click', '.product-unarchive', function(e) {
|
||||
e.preventDefault();
|
||||
var href = $( this ).attr( 'href' );
|
||||
$.alert({
|
||||
title: 'Pytanie',
|
||||
content: 'Na pewno chcesz przywrócić wybrany produkt z archiwum?',
|
||||
type: 'orange',
|
||||
closeIcon: true,
|
||||
closeIconClass: 'fa fa-times',
|
||||
typeAnimated: true,
|
||||
animation: 'opacity',
|
||||
columnClass: 'col-12 col-lg-10',
|
||||
theme: 'supervan',
|
||||
icon: 'fa fa-question',
|
||||
buttons: {
|
||||
cancel: {
|
||||
text: 'Nie',
|
||||
btnClass: 'btn-success',
|
||||
action: function() {}
|
||||
},
|
||||
confirm: {
|
||||
text: 'Tak',
|
||||
btnClass: 'btn-danger',
|
||||
keys: ['enter'],
|
||||
action: function() {
|
||||
document.location.href = href;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
$( 'body' ).on( 'change', '.product-price-promo', function(e)
|
||||
{
|
||||
var price = $( this ).val();
|
||||
price = price.replace( ' ', '' );
|
||||
price = parseFloat( price.replace( ',', '.' ) * 1 );
|
||||
price = number_format( price, 2, '.', '' );
|
||||
|
||||
$( this ).val( price );
|
||||
|
||||
var product_id = $( this ).attr( 'product-id' );
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/admin/shop_product/product_change_price_brutto_promo/',
|
||||
data:
|
||||
{
|
||||
product_id: product_id,
|
||||
price: price
|
||||
},
|
||||
beforeSend: function()
|
||||
{
|
||||
$( '#overlay' ).show();
|
||||
},
|
||||
success: function( data )
|
||||
{
|
||||
$( '#overlay' ).hide();
|
||||
|
||||
response = jQuery.parseJSON( data );
|
||||
|
||||
if ( response.status !== 'ok' )
|
||||
create_error( response.msg );
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$( 'body' ).on( 'change', '.product-price', function(e)
|
||||
{
|
||||
var price = $( this ).val();
|
||||
price = price.replace( ' ', '' );
|
||||
price = parseFloat( price.replace( ',', '.' ) * 1 );
|
||||
price = number_format( price, 2, '.', '' );
|
||||
|
||||
$( this ).val( price );
|
||||
|
||||
var product_id = $( this ).attr( 'product-id' );
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/admin/shop_product/product_change_price_brutto/',
|
||||
data:
|
||||
{
|
||||
product_id: product_id,
|
||||
price: price
|
||||
},
|
||||
beforeSend: function()
|
||||
{
|
||||
$( '#overlay' ).show();
|
||||
},
|
||||
success: function( data )
|
||||
{
|
||||
$( '#overlay' ).hide();
|
||||
|
||||
response = jQuery.parseJSON( data );
|
||||
|
||||
if ( response.status !== 'ok' )
|
||||
create_error( response.msg );
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$( 'body' ).on( 'click', '.duplicate-product', function(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var product_id = $( this ).attr( 'product-id' );
|
||||
|
||||
$.alert({
|
||||
title: 'Pytanie',
|
||||
content: 'Na pewno chcesz wykonać duplikat produktu?',
|
||||
type: 'orange',
|
||||
closeIcon: true,
|
||||
closeIconClass: 'fa fa-times',
|
||||
typeAnimated: true,
|
||||
animation: 'opacity',
|
||||
columnClass: 'col-12 col-lg-10',
|
||||
theme: 'modern',
|
||||
icon: 'fa fa-question',
|
||||
buttons: {
|
||||
confirm: {
|
||||
text: 'Tak (produkt bez kombinacji)',
|
||||
btnClass: 'btn-success',
|
||||
keys: ['enter'],
|
||||
action: function() {
|
||||
document.location.href = '/admin/shop_product/duplicate_product/product-id=' + product_id;
|
||||
}
|
||||
},
|
||||
confirm2: {
|
||||
text: 'Tak (produkt z KOMBINACJAMI)',
|
||||
btnClass: 'btn-primary',
|
||||
keys: ['enter'],
|
||||
action: function() {
|
||||
document.location.href = '/admin/shop_product/duplicate_product/product-id=' + product_id + '&combination=1';
|
||||
}
|
||||
},
|
||||
cancel: {
|
||||
text: 'Nie',
|
||||
btnClass: 'btn-dark',
|
||||
action: function() {}
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
// apilo product search
|
||||
$( 'body' ).on( 'click', '.apilo-product-search', function() {
|
||||
var product_id = $( this ).attr( 'product-id' );
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/admin/integrations/apilo_product_search/',
|
||||
data: {
|
||||
product_id: product_id
|
||||
},
|
||||
beforeSend: function() {
|
||||
$( '#overlay' ).show();
|
||||
},
|
||||
success: function( response ) {
|
||||
data = jQuery.parseJSON( response );
|
||||
|
||||
if ( data.status == 'SUCCESS' ) {
|
||||
var html = '<div class="apilo-found-products">';
|
||||
html += '<p>Znaleziono ' + data.products.length + ' produktów</p>';
|
||||
html += '<select class="form-control apilo-product-select" product-id="' + product_id + '">';
|
||||
$.each( data.products, function( index, value ) {
|
||||
html += '<option value="' + value.id + '">' + value.name + ' SKU: ' + value.sku + '</option>';
|
||||
});
|
||||
html += '</select>';
|
||||
html += '<button class="btn btn-success apilo-product-select-save" product-id="' + product_id + '">Zapisz</button>';
|
||||
html += '</div>';
|
||||
$( 'span.apilo-product-search[product-id="' + product_id + '"]' ).closest( 'td' ).append( html );
|
||||
} else if ( data.status == 'error' ) {
|
||||
$.alert({
|
||||
title: 'Błąd',
|
||||
content: data.msg,
|
||||
type: 'red',
|
||||
closeIcon: true,
|
||||
closeIconClass: 'fa fa-times',
|
||||
typeAnimated: true,
|
||||
animation: 'opacity',
|
||||
columnClass: 'col-12 col-lg-10',
|
||||
theme: 'modern',
|
||||
icon: 'fa fa-exclamation-triangle',
|
||||
buttons: {
|
||||
confirm: {
|
||||
text: 'OK',
|
||||
btnClass: 'btn-danger',
|
||||
keys: ['enter'],
|
||||
action: function() {}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// delete apilo product linking
|
||||
$( 'body' ).on( 'click', '.apilo-delete-linking', function() {
|
||||
var product_id = $( this ).attr( 'product-id' );
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/admin/shop_product/apilo_product_select_delete/',
|
||||
data: {
|
||||
product_id: product_id
|
||||
},
|
||||
beforeSend: function() {
|
||||
$( '#overlay' ).show();
|
||||
},
|
||||
success: function( response ) {
|
||||
data = jQuery.parseJSON( response );
|
||||
|
||||
if ( data.status == 'ok' ) {
|
||||
$( 'span.apilo-delete-linking[product-id="' + product_id + '"]' ).closest('td').html( '<span class="text-danger apilo-product-search" product-id="' + product_id + '">nie przypisano <i class="fa fa-search"></i></span>' );
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// delete baselinker product linking
|
||||
$( 'body' ).on( 'click', '.baselinker-delete-linking', function() {
|
||||
var product_id = $( this ).attr( 'product-id' );
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/admin/shop_product/baselinker_product_select_delete/',
|
||||
data: {
|
||||
product_id: product_id
|
||||
},
|
||||
beforeSend: function() {
|
||||
$( '#overlay' ).show();
|
||||
},
|
||||
success: function( response ) {
|
||||
data = jQuery.parseJSON( response );
|
||||
|
||||
if ( data.status == 'ok' ) {
|
||||
$( 'span.baselinker-delete-linking[product-id="' + product_id + '"]' ).closest('td').html( '<span class="text-danger baselinker-product-search" product-id="' + product_id + '">nie przypisano <i class="fa fa-search"></i></span>' );
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$( 'body' ).on( 'click', '.baselinker-product-search', function() {
|
||||
var product_id = $( this ).attr( 'product-id' );
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/admin/shop_product/baselinker_product_search/',
|
||||
data: {
|
||||
product_id: product_id
|
||||
},
|
||||
beforeSend: function() {
|
||||
$( '#overlay' ).show();
|
||||
},
|
||||
success: function( response ) {
|
||||
data = jQuery.parseJSON( response );
|
||||
|
||||
if ( data.status == 'SUCCESS' ) {
|
||||
var html = '<div class="baselinker-found-products">';
|
||||
html += '<p>Znaleziono ' + data.products.length + ' produktów</p>';
|
||||
html += '<select class="form-control baselinker-product-select" product-id="' + product_id + '">';
|
||||
$.each( data.products, function( index, value ) {
|
||||
html += '<option value="' + value.product_id + '">' + value.name + ' SKU: ' + value.sku + '</option>';
|
||||
});
|
||||
html += '</select>';
|
||||
html += '<button class="btn btn-success baselinker-product-select-save" product-id="' + product_id + '">Zapisz</button>';
|
||||
html += '</div>';
|
||||
$( 'span.baselinker-product-search[product-id="' + product_id + '"]' ).closest( 'td' ).append( html );
|
||||
} else if ( data.status == 'error' ) {
|
||||
$.alert({
|
||||
title: 'Błąd',
|
||||
content: data.msg,
|
||||
type: 'red',
|
||||
closeIcon: true,
|
||||
closeIconClass: 'fa fa-times',
|
||||
typeAnimated: true,
|
||||
animation: 'opacity',
|
||||
columnClass: 'col-12 col-lg-10',
|
||||
theme: 'modern',
|
||||
icon: 'fa fa-exclamation-triangle',
|
||||
buttons: {
|
||||
confirm: {
|
||||
text: 'OK',
|
||||
btnClass: 'btn-danger',
|
||||
keys: ['enter'],
|
||||
action: function() {}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// apilo product select save
|
||||
$( 'body' ).on( 'click', '.apilo-product-select-save', function(){
|
||||
var product_id = $( this ).attr( 'product-id' );
|
||||
var apilo_product_id = $( '.apilo-product-select[product-id="' + product_id + '"]' ).val();
|
||||
var apilo_product_name = $( '.apilo-product-select[product-id="' + product_id + '"] option:selected' ).text();
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/admin/shop_product/apilo_product_select_save/',
|
||||
data: {
|
||||
product_id: product_id,
|
||||
apilo_product_id: apilo_product_id,
|
||||
apilo_product_name: apilo_product_name
|
||||
},
|
||||
beforeSend: function() {
|
||||
$( '#overlay' ).show();
|
||||
},
|
||||
success: function( response ) {
|
||||
data = jQuery.parseJSON( response );
|
||||
|
||||
if ( data.status == 'ok' ) {
|
||||
$( '.apilo-product-select[product-id="' + product_id + '"]' ).closest( '.apilo-found-products' ).remove();
|
||||
$( 'span.apilo-product-search[product-id="' + product_id + '"]' ).html( '<span title="' + apilo_product_name + '">' + apilo_product_name.substr( 0, 25 ) + '...</span>' ).removeClass( 'apilo-product-search' ).removeClass( 'text-danger' );
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$( 'body' ).on( 'click', '.baselinker-product-select-save', function(){
|
||||
var product_id = $( this ).attr( 'product-id' );
|
||||
var baselinker_product_id = $( '.baselinker-product-select[product-id="' + product_id + '"]' ).val();
|
||||
var baselinker_product_name = $( '.baselinker-product-select[product-id="' + product_id + '"] option:selected' ).text();
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/admin/shop_product/baselinker_product_select_save/',
|
||||
data: {
|
||||
product_id: product_id,
|
||||
baselinker_product_id: baselinker_product_id,
|
||||
baselinker_product_name: baselinker_product_name
|
||||
},
|
||||
beforeSend: function() {
|
||||
$( '#overlay' ).show();
|
||||
},
|
||||
success: function( response ) {
|
||||
data = jQuery.parseJSON( response );
|
||||
|
||||
if ( data.status == 'ok' ) {
|
||||
$( '.baselinker-product-select[product-id="' + product_id + '"]' ).closest( '.baselinker-found-products' ).remove();
|
||||
$( 'span.baselinker-product-search[product-id="' + product_id + '"]' ).html( '<span title="' + baselinker_product_name + '">' + baselinker_product_name.substr( 0, 25 ) + '...</span>' ).removeClass( 'baselinker-product-search' ).removeClass( 'text-danger' );
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
function ajax_load_products( current_page ) {
|
||||
var pagination_max = parseInt( $( '.pagination' ).attr( 'pagination_max' ) );
|
||||
|
||||
var query = '';
|
||||
$( '.table-search' ).each(function(){
|
||||
query += $( this ).attr( 'field_name' ) + '=' + $( this ).val() + '&';
|
||||
});
|
||||
|
||||
current_page = parseInt( current_page );
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/admin/shop_product/ajax_load_products_archive/',
|
||||
data: {
|
||||
current_page: current_page,
|
||||
query: query
|
||||
},
|
||||
beforeSend: function() {
|
||||
$( '#overlay' ).show();
|
||||
},
|
||||
success: function( response ) {
|
||||
$( '#overlay' ).hide();
|
||||
|
||||
data = jQuery.parseJSON( response );
|
||||
|
||||
if ( data.status == 'ok' ) {
|
||||
$( '#table-products tbody' ).html( data.html );
|
||||
$( '.pagination .previous' ).attr( 'page', ( current_page - 1 > 1 ) ? ( current_page - 1 ) : 1 );
|
||||
$( '.pagination .next' ).attr( 'page', ( current_page + 1 < pagination_max ) ? ( current_page + 1 ) : pagination_max );
|
||||
$( '.pagination span' ).html( current_page );
|
||||
if ( data.pagination_max ) {
|
||||
$( '.pagination' ).attr( 'pagination_max', data.pagination_max );
|
||||
$( '.pagination #max_page' ).html( data.pagination_max );
|
||||
$( '.pagination .last' ).attr( 'page', data.pagination_max );
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
783
admin/templates/articles/article-edit.php
Normal file
@@ -0,0 +1,783 @@
|
||||
<script type="text/javascript" src="/libraries/ckeditor/ckeditor.js"></script>
|
||||
<script type="text/javascript" src="/libraries/ckeditor/adapters/jquery.js"></script>
|
||||
<script type="text/javascript" src="/libraries/jquery/sortable/sortable.js"></script>
|
||||
<?
|
||||
global $db;
|
||||
|
||||
ob_start();
|
||||
?>
|
||||
<div id="settings-tabs">
|
||||
<ul class="resp-tabs-list settings-tabs">
|
||||
<li><i class="fa fa-file"></i>Treść</li>
|
||||
<li><i class="fa fa-wrench"></i>Ustawienia</li>
|
||||
<li><i class="fa fa-globe"></i>SEO</li>
|
||||
<li><i class="fa fa-share-alt"></i>Wyświetlanie</li>
|
||||
<li><i class="fa fa-file-image-o"></i>Galeria</li>
|
||||
<li><i class="fa fa-file-archive-o"></i>Załączniki</li>
|
||||
</ul>
|
||||
<div class="resp-tabs-container settings-tabs">
|
||||
<div>
|
||||
<div id="languages-main">
|
||||
<ul class="resp-tabs-list languages-main htabs">
|
||||
<? if ( is_array( $this -> languages ) ): foreach ( $this -> languages as $lg ):?>
|
||||
<? if ( $lg['status'] ):?>
|
||||
<li><? if ( $lg['id'] == \front\factory\Languages::default_language() ) echo '<i class="fa fa-star fa-lg text-system" title="Język domyślny"></i> ';?><?= $lg['name'];?></a></li>
|
||||
<? endif;?>
|
||||
<? endforeach; endif;?>
|
||||
</ul>
|
||||
<div class="resp-tabs-container languages-main">
|
||||
<? if ( is_array( $this -> languages ) ): foreach ( $this -> languages as $lg ):?>
|
||||
<?
|
||||
$languages = array();
|
||||
|
||||
$languages[''] = '---- wersja językowa ----';
|
||||
if ( is_array( $this -> languages ) ) foreach ( $this -> languages as $lg_tmp )
|
||||
{
|
||||
if ( $lg_tmp['id'] != $lg['id'] )
|
||||
$languages[ $lg_tmp['id'] ] = $lg_tmp['name'];
|
||||
}
|
||||
?>
|
||||
<? if ( $lg['status'] ):?>
|
||||
<div>
|
||||
<?= \Html::select(
|
||||
array(
|
||||
'label' => 'Wyświetlaj treść z wersji',
|
||||
'name' => 'copy_from[' . $lg['id'] . ']',
|
||||
'values' => $languages,
|
||||
'value' => $this -> article['languages'][ $lg['id'] ]['copy_from'],
|
||||
)
|
||||
);?>
|
||||
<?= \Html::input(
|
||||
array(
|
||||
'label' => 'Tytuł',
|
||||
'name' => 'title[' . $lg['id'] . ']',
|
||||
'id' => 'title_' . $lg['id'],
|
||||
'value' => $this -> article['languages'][ $lg['id'] ]['title'],
|
||||
'inline' => true
|
||||
)
|
||||
);?>
|
||||
<?= \Html::input_icon( [
|
||||
'label' => 'Zdjęcie tytułowe',
|
||||
'name' => 'main_image[' . $lg['id'] . ']',
|
||||
'id' => 'main_image_' . $lg['id'],
|
||||
'value' => htmlspecialchars( $this -> article['languages'][ $lg['id'] ]['main_image'] ),
|
||||
'icon_content' => 'przeglądaj',
|
||||
'inline' => true,
|
||||
'icon_js' => "window.open ( '/libraries/filemanager-9.14.1/dialog.php?type=1&popup=1&field_id=main_image_" . $lg['id'] . "&akey=c3cb2537d25c0efc9e573d059d79c3b8', 'mywindow', 'location=1,status=1,scrollbars=1, width=1100,height=700');"
|
||||
] );
|
||||
?>
|
||||
<?= \Html::textarea(
|
||||
array(
|
||||
'label' => 'Wstęp',
|
||||
'name' => 'entry[' . $lg['id'] . ']',
|
||||
'id' => 'entry_' . $lg['id'],
|
||||
'value' => $this -> article['languages'][ $lg['id'] ]['entry'],
|
||||
'inline' => true
|
||||
)
|
||||
);?>
|
||||
<?= \Html::textarea(
|
||||
array(
|
||||
'label' => 'Treść',
|
||||
'name' => 'text[' . $lg['id'] . ']',
|
||||
'id' => 'text_' . $lg['id'],
|
||||
'value' => $this -> article['languages'][ $lg['id'] ]['text'],
|
||||
'inline' => true
|
||||
)
|
||||
);?>
|
||||
<?= \Html::textarea( [
|
||||
'label' => 'Spis treści',
|
||||
'name' => 'table_of_contents[' . $lg['id'] . ']',
|
||||
'id' => 'table_of_contents_' . $lg['id'],
|
||||
'value' => $this -> article['languages'][ $lg['id'] ]['table_of_contents'],
|
||||
'inline' => true
|
||||
] );?>
|
||||
<script type="text/javascript">
|
||||
$( function() {
|
||||
$( '#text_<?= $lg['id'];?>, #entry_<?= $lg['id'];?>, #table_of_contents_<?= $lg['id'];?>' ).ckeditor( {
|
||||
toolbar : 'MyToolbar',
|
||||
height:'250'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<? endforeach; endif;?>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<?= \Html::input_switch(
|
||||
array(
|
||||
'label' => 'Opublikowany',
|
||||
'name' => 'status',
|
||||
'checked' => $this -> article['status'] == 1 or !$this -> article['id'] ? true : false
|
||||
)
|
||||
);?>
|
||||
<?= \Html::input_switch(
|
||||
array(
|
||||
'label' => 'Pokaż tytuł',
|
||||
'name' => 'show_title',
|
||||
'checked' => $this -> article['show_title'] == 1 ? true : false
|
||||
)
|
||||
);?>
|
||||
<?= \Html::input_switch( [
|
||||
'label' => 'Pokaż spis treści',
|
||||
'name' => 'show_table_of_contents',
|
||||
'checked' => $this -> article['show_table_of_contents'] == 1 ? true : false
|
||||
] );?>
|
||||
<?= \Html::input_switch(
|
||||
array(
|
||||
'label' => 'Pokaż datę dodania',
|
||||
'name' => 'show_date_add',
|
||||
'checked' => $this -> article['show_date_add'] == 1 ? true : false
|
||||
)
|
||||
);?>
|
||||
<?= \Html::input_switch(
|
||||
array(
|
||||
'label' => 'Pokaż datę modyfikacji',
|
||||
'name' => 'show_date_modify',
|
||||
'checked' => $this -> article['show_date_modify'] == 1 ? true : false
|
||||
)
|
||||
);?>
|
||||
<?= \Html::input_switch(
|
||||
array(
|
||||
'label' => 'Powtórz wprowadzenie',
|
||||
'name' => 'repeat_entry',
|
||||
'checked' => $this -> article['repeat_entry'] == 1 ? true : false
|
||||
)
|
||||
);?>
|
||||
<?= \Html::input_switch(
|
||||
array(
|
||||
'label' => 'Linki do portali społecznościowych',
|
||||
'name' => 'social_icons',
|
||||
'checked' => $this -> article['social_icons'] == 1 ? true : false
|
||||
)
|
||||
);?>
|
||||
</div>
|
||||
<div>
|
||||
<div id="languages-seo">
|
||||
<ul class="resp-tabs-list languages-seo htabs">
|
||||
<? if ( is_array( $this -> languages ) ): foreach ( $this -> languages as $lg ):?>
|
||||
<? if ( $lg['status'] ):?>
|
||||
<li><? if ( $lg['id'] == \front\factory\Languages::default_language() ) echo '<i class="fa fa-star fa-lg text-system" title="Język domyślny"></i> ';?><?= $lg['name'];?></a></li>
|
||||
<? endif;?>
|
||||
<? endforeach; endif;?>
|
||||
</ul>
|
||||
<div class="resp-tabs-container languages-seo">
|
||||
<? if ( is_array( $this -> languages ) ): foreach ( $this -> languages as $lg ):?>
|
||||
<? if ( $lg['status'] ):?>
|
||||
<div>
|
||||
<?= \Html::input_icon(
|
||||
array(
|
||||
'label' => 'Link SEO',
|
||||
'name' => 'seo_link[' . $lg['id'] . ']',
|
||||
'id' => 'seo_link_' . $lg['id'],
|
||||
'value' => $this -> article['languages' ][ $lg['id'] ]['seo_link'],
|
||||
'icon_content' => 'generuj',
|
||||
'icon_js' => 'generate_seo_links( "' . $lg['id'] . '", $( "#title_' . $lg['id'] . '" ).val(), ' . (int)$this -> article['id'] . ' );'
|
||||
)
|
||||
);?>
|
||||
<?= \Html::input( [
|
||||
'label' => 'Meta title',
|
||||
'name' => 'meta_title[' . $lg['id'] . ']',
|
||||
'id' => 'meta_title_' . $lg['id'],
|
||||
'value' => $this -> article['languages'][ $lg['id'] ]['meta_title']
|
||||
]
|
||||
);?>
|
||||
<?= \Html::textarea(
|
||||
array(
|
||||
'label' => 'Meta description',
|
||||
'name' => 'meta_description[' . $lg['id'] . ']',
|
||||
'id' => 'meta_description_' . $lg['id'],
|
||||
'value' => $this -> article['languages'][ $lg['id'] ]['meta_description']
|
||||
)
|
||||
);?>
|
||||
<?= \Html::textarea(
|
||||
array(
|
||||
'label' => 'Meta keywords',
|
||||
'name' => 'meta_keywords[' . $lg['id'] . ']',
|
||||
'id' => 'meta_keywords_' . $lg['id'],
|
||||
'value' => $this -> article['languages'][ $lg['id'] ]['meta_keywords']
|
||||
)
|
||||
);?>
|
||||
<?= \Html::input_switch( [
|
||||
'label' => 'Blokuj indeksację',
|
||||
'name' => 'noindex[' . $lg['id'] . ']',
|
||||
'id' => 'noindex_' . $lg['id'],
|
||||
'checked' => $this -> article['languages'][ $lg['id'] ]['noindex'] == 1 ? 1 : 0
|
||||
]
|
||||
);?>
|
||||
<?= \Html::input_switch( [
|
||||
'label' => 'Blokuj bezpośredni dostęp',
|
||||
'name' => 'block_direct_access[' . $lg['id'] . ']',
|
||||
'id' => 'block_direct_access_' . $lg['id'],
|
||||
'checked' => $this -> article['languages'][ $lg['id'] ]['block_direct_access'] == 1 ? 1 : 0
|
||||
] );?>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<? endforeach; endif;?>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<?
|
||||
$layouts[''] = '---- szablon domyślny ----';
|
||||
if ( is_array( $this -> layouts ) ): foreach ( $this -> layouts as $layout ):
|
||||
$layouts[ $layout['id'] ] = $layout['name'];
|
||||
endforeach; endif;
|
||||
?>
|
||||
<?= \Html::select(
|
||||
array(
|
||||
'label' => 'Szablon',
|
||||
'name' => 'layout_id',
|
||||
'id' => 'layout_id',
|
||||
'values' => $layouts,
|
||||
'value' => $this -> article['layout_id']
|
||||
)
|
||||
);?>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-4 control-label">Wyświetlaj na:</label>
|
||||
<div class="col-lg-8">
|
||||
<?
|
||||
if ( is_array( $this -> menus ) ) foreach ( $this -> menus as $menu )
|
||||
{
|
||||
?>
|
||||
<div class="menu_sortable">
|
||||
<ol class="sortable" id="sortable_<?= $menu['id'];?>">
|
||||
<li id="list_<?= $menu['id'];?>" class="menu_<?= $menu['id'];?>" menu="<?= $menu['id'];?>">
|
||||
<div class="context_0 content content_menu" <? if ( !$menu['status'] ) echo 'style="color: #cc0000;"';?>>
|
||||
<span class="disclose"><span></span></span>
|
||||
Menu: <b><?= $menu['name'];?></b>
|
||||
</div>
|
||||
<?= \admin\view\Articles::subpages_list( \admin\factory\Pages::menu_pages( $menu['id'] ), $this -> article['pages'] );?>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<ul id="images-list">
|
||||
<?
|
||||
$images_count = 0;
|
||||
if ( is_array( $this -> article['images'] ) ): foreach ( $this -> article['images'] as $img ):
|
||||
?>
|
||||
<li id="image-<?= $img['id'];?>">
|
||||
<img class="article-image lozad" data-src="/libraries/thumb.php?img=<?= $img['src'];?>&w=300&h=300">
|
||||
<a href="#" class="input-group-addon btn btn-danger article_image_delete" image-id="<?= $img['id'];?>">
|
||||
<i class="fa fa-trash"></i>
|
||||
</a>
|
||||
<input type="text" class="form-control image-alt" value="<?= $img['alt'];?>" image-id="<?= $img['id'];?>" placeholder="atrybut alt...">
|
||||
</li>
|
||||
<?
|
||||
$images_count++;
|
||||
endforeach; endif;
|
||||
?>
|
||||
</ul>
|
||||
<div id="images-uploader">You browser doesn't have Flash installed.</div>
|
||||
</div>
|
||||
<div>
|
||||
<ul id="files-list">
|
||||
<?
|
||||
$files_count = 0;
|
||||
if ( is_array( $this -> article['files'] ) ): foreach ( $this -> article['files'] as $file ):
|
||||
|
||||
if ( $file['name'] )
|
||||
$name = $file['name'];
|
||||
else
|
||||
{
|
||||
$name = explode( '/', $file['src'] );
|
||||
$name = $name[ count( $name ) - 1 ];
|
||||
}
|
||||
?>
|
||||
<li id="file-<?= $file['id'];?>">
|
||||
<div class="input-group">
|
||||
<input type="text" class="article_file_edit form-control" file_id="<?= $file['id'];?>" value="<?= $name;?>" />
|
||||
<a href="#" class="input-group-addon btn btn-info article_file_delete" file_id="<?= $file['id'];?>">
|
||||
<i class="fa fa-trash"></i>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
<?
|
||||
$files_count++;
|
||||
endforeach; endif;
|
||||
?>
|
||||
</ul>
|
||||
<div id="files-uploader">You browser doesn't have Flash installed.</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?
|
||||
$out = ob_get_clean();
|
||||
|
||||
$grid = new \gridEdit;
|
||||
$grid -> id = 'article-edit';
|
||||
$grid -> gdb_opt = $gdb;
|
||||
$grid -> include_plugins = true;
|
||||
$grid -> title = 'Edycja artykułu';
|
||||
$grid -> fields = [
|
||||
[
|
||||
'db' => 'id',
|
||||
'type' => 'hidden',
|
||||
'value' => $this -> article['id']
|
||||
]
|
||||
];
|
||||
$grid -> actions = [
|
||||
'save' => [ 'url' => '/admin/articles/article_save/', 'back_url' => '/admin/articles/view_list/' ],
|
||||
'cancel' => [ 'url' => '/admin/articles/view_list/' ]
|
||||
];
|
||||
$grid -> external_code = $out;
|
||||
$grid -> persist_edit = true;
|
||||
$grid -> id_param = 'id';
|
||||
|
||||
echo $grid -> draw();
|
||||
?>
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="/libraries/plupload/jquery.plupload.queue/css/jquery.plupload.queue.css" />
|
||||
|
||||
<script type="text/javascript" src="/libraries/plupload/plupload.js"></script>
|
||||
<script type="text/javascript" src="/libraries/plupload/plupload.flash.js"></script>
|
||||
<script type="text/javascript" src="/libraries/plupload/plupload.html5.js"></script>
|
||||
<script type="text/javascript" src="/libraries/plupload/plupload.html4.js"></script>
|
||||
<script type="text/javascript" src="/libraries/plupload/jquery.plupload.queue/jquery.plupload.queue.js"></script>
|
||||
<script type="text/javascript" src="/libraries/plupload/i18n/pl.js"></script>
|
||||
<script type="text/javascript" src="/libraries/jquery-nested-sortable/jquery.mjs.nestedSortable.js"></script>
|
||||
<script type="text/javascript" src="/libraries/jquery/lozad.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var images_count = <?= $images_count;?>;
|
||||
var files_count = <?= $files_count;?>;
|
||||
|
||||
$( function()
|
||||
{
|
||||
const observer = lozad();
|
||||
observer.observe();
|
||||
|
||||
disable_menu();
|
||||
|
||||
var el = document.getElementById( 'images-list' );
|
||||
var sortable = Sortable.create(el, {
|
||||
onEnd: function ( evt ) {
|
||||
var order = '';
|
||||
$( '#images-list li' ).each( function()
|
||||
{
|
||||
if ( order !== '' )
|
||||
order += ';';
|
||||
order += $( this ).children( 'a' ).attr( 'image-id' );
|
||||
});
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/admin/articles/gallery_order_save/',
|
||||
data:
|
||||
{
|
||||
article_id: '<?= $this -> article['id'];?>',
|
||||
order: order
|
||||
},
|
||||
beforeSend: function()
|
||||
{
|
||||
$( '#overlay' ).show();
|
||||
},
|
||||
success: function( data )
|
||||
{
|
||||
$( '#overlay' ).hide();
|
||||
|
||||
response = jQuery.parseJSON( data );
|
||||
|
||||
if ( response.status !== 'ok' )
|
||||
create_error( response.msg );
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$( "#images-uploader" ).pluploadQueue(
|
||||
{
|
||||
runtimes: 'html5,flash,html4',
|
||||
init:
|
||||
{
|
||||
Refresh: function(up)
|
||||
{
|
||||
$( ".plupload_buttons" ).css( "display", "inline" );
|
||||
$( ".plupload_upload_status" ).css( "display", "inline" );
|
||||
$( ".plupload_start" ).addClass( "plupload_disabled" );
|
||||
$( ".plupload_start" ).removeClass( "plupload_disabled" );
|
||||
},
|
||||
UploadComplete: function()
|
||||
{
|
||||
$( ".plupload_buttons" ).css( "display", "inline" );
|
||||
$( ".plupload_upload_status" ).css( "display", "inline" );
|
||||
$( ".plupload_start" ).addClass( "plupload_disabled" );
|
||||
$( ".plupload_start" ).removeClass( "plupload_disabled" );
|
||||
},
|
||||
FileUploaded: function( up, file, response )
|
||||
{
|
||||
data = jQuery.parseJSON( response.response );
|
||||
$( '#images-list' ).append(
|
||||
'<li id="image-' + data.image_id + '">' +
|
||||
'<img class="article-image lozad" data-src="/libraries/thumb.php?img=' + data.data_link + '&w=300&h=300">' +
|
||||
'<a href="#" class="input-group-addon btn btn-danger article_image_delete" image-id="' + data.image_id + '">' +
|
||||
'<i class="fa fa-trash"></i>' +
|
||||
'</a>' +
|
||||
'<input type="text" class="form-control image-alt" value="" image-id="' + data.image_id + '" placeholder="atrybut alt...">' +
|
||||
'</li>'
|
||||
);
|
||||
images_count++;
|
||||
observer.observe();
|
||||
$( 'html, body' ).animate({
|
||||
scrollTop: $( "#images-uploader" ).offset().top
|
||||
}, 1 );
|
||||
}
|
||||
},
|
||||
url: '/libraries/plupload/upload-articles-images.php',
|
||||
chunk_size: '1mb',
|
||||
unique_names: false,
|
||||
resize : {
|
||||
width : <?= $this -> settings['image_px'] ? $this -> settings['image_px'] : '1920';?>,
|
||||
height : <?= $this -> settings['image_px'] ? $this -> settings['image_px'] : '1920';?>,
|
||||
quality : 95
|
||||
},
|
||||
filters: [
|
||||
{ title: "Obrazki", extensions : "jpg, gif, png, bmp, jpeg" }
|
||||
],
|
||||
flash_swf_url: '/../libraries/plupload/plupload.flash.swf'
|
||||
});
|
||||
|
||||
$( "#files-uploader" ).pluploadQueue(
|
||||
{
|
||||
runtimes: 'html5,flash,html4',
|
||||
init:
|
||||
{
|
||||
Refresh: function( up )
|
||||
{
|
||||
$( ".plupload_buttons" ).css( "display", "inline" );
|
||||
$( ".plupload_upload_status" ).css( "display", "inline" );
|
||||
$( ".plupload_start" ).addClass( "plupload_disabled" );
|
||||
$( ".plupload_start" ).removeClass( "plupload_disabled" );
|
||||
},
|
||||
FileUploaded: function( up, file, response )
|
||||
{
|
||||
data = jQuery.parseJSON( response.response );
|
||||
$( '#files-list' ).append(
|
||||
'<li id="file-' + data.file_id + '">' +
|
||||
'<div class="input-group">' +
|
||||
'<input type="text" class="form-control article_file_edit" file_id="' + data.file_id + '" value="' + data.file_name + '" />' +
|
||||
'<a href="#" class="input-group-addon btn btn-info article_file_delete" file_id="' + data.file_id + '">' +
|
||||
'<i class="fa fa-trash"></i>' +
|
||||
'</a>' +
|
||||
'</div>' +
|
||||
'</li>'
|
||||
);
|
||||
files_count++;
|
||||
}
|
||||
},
|
||||
url: '/libraries/plupload/upload-articles-files.php',
|
||||
chunk_size: '1mb',
|
||||
unique_names: false,
|
||||
filters: [
|
||||
{ title: "Wszystkie pliki", extensions: "*" }
|
||||
],
|
||||
flash_swf_url: '/../libraries/plupload/plupload.flash.swf'
|
||||
});
|
||||
|
||||
$( '#settings-tabs' ).easyResponsiveTabs({
|
||||
width: 'auto',
|
||||
fit: true,
|
||||
tabidentify: 'settings-tabs',
|
||||
type: 'vertical'
|
||||
});
|
||||
|
||||
$( '#languages-main' ).easyResponsiveTabs({
|
||||
width: 'auto',
|
||||
fit: true,
|
||||
tabidentify: 'languages-main'
|
||||
});
|
||||
|
||||
$( '#languages-seo' ).easyResponsiveTabs({
|
||||
width: 'auto',
|
||||
fit: true,
|
||||
tabidentify: 'languages-seo'
|
||||
});
|
||||
|
||||
$('ol.sortable').nestedSortable({
|
||||
forcePlaceholderSize: true,
|
||||
handle: 'div',
|
||||
helper: 'clone',
|
||||
items: 'li',
|
||||
opacity: .6,
|
||||
placeholder: 'placeholder',
|
||||
revert: 250,
|
||||
tabSize: 25,
|
||||
tolerance: 'pointer',
|
||||
toleranceElement: '> div',
|
||||
maxLevels: 3,
|
||||
isTree: true,
|
||||
expandOnHover: 700,
|
||||
isAllowed: function()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$( '.disclose' ).on( 'click', function() {
|
||||
$( this ).closest( 'li' ).toggleClass( 'sort-collapsed' ).toggleClass( 'sort-expanded' );
|
||||
});
|
||||
|
||||
$( '.disclose' ).mousedown( function(e) {
|
||||
if ( e.which === 1 ) {
|
||||
if ( $( this ).parent( 'div' ).hasClass( 'content_menu' ) )
|
||||
{
|
||||
var menu_id = $( this ).parent( 'div' ).parent( 'li' ).attr( 'menu' );
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/admin/ajax.php',
|
||||
data: {
|
||||
a: 'cookie_menus',
|
||||
menu_id: menu_id
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
var page_id = $( this ).parent( 'div' ).parent( 'li' ).attr( 'id' );
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/admin/ajax.php',
|
||||
data: {
|
||||
a: 'cookie_pages',
|
||||
page_id: page_id
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
<?php
|
||||
$array = unserialize( $_COOKIE[ 'cookie_pages' ] );
|
||||
if ( is_array( $array ) ): foreach ( $array as $key => $val ):
|
||||
if ( $val ):
|
||||
?>$( '.<?= $key;?>' ).children( 'div' ).children( 'span.disclose' ).click();<?
|
||||
endif;
|
||||
endforeach; endif;
|
||||
|
||||
$array = unserialize( $_COOKIE[ 'cookie_menus' ] );
|
||||
if ( is_array( $array ) ): foreach ( $array as $key => $val ):
|
||||
if ( $val ):
|
||||
?>$( '.menu_<?= $key;?>' ).children( 'div' ).children( 'span.disclose' ).click();<?
|
||||
endif;
|
||||
endforeach; endif;
|
||||
?>
|
||||
|
||||
$( 'body' ).on( 'change', '.image-alt', function()
|
||||
{
|
||||
var image_alt = $( this ).val();
|
||||
var image_id = $( this ).attr( 'image-id' );
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/admin/ajax.php',
|
||||
data:
|
||||
{
|
||||
a: 'article_image_alt_change',
|
||||
image_id: image_id,
|
||||
image_alt: image_alt
|
||||
},
|
||||
beforeSend: function()
|
||||
{
|
||||
$( '#overlay' ).show();
|
||||
},
|
||||
success: function( data )
|
||||
{
|
||||
$( '#overlay' ).hide();
|
||||
|
||||
response = jQuery.parseJSON( data );
|
||||
|
||||
if ( response.status !== 'ok' )
|
||||
create_error( response.msg );
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$( 'body' ).on( 'change', '.article_file_edit', function()
|
||||
{
|
||||
var file_name = $( this ).val();
|
||||
var file_id = $( this ).attr( 'file_id' );
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/admin/ajax.php',
|
||||
data:
|
||||
{
|
||||
a: 'article_file_name_change',
|
||||
file_id: file_id,
|
||||
file_name: file_name
|
||||
},
|
||||
beforeSend: function()
|
||||
{
|
||||
$( '#overlay' ).show();
|
||||
},
|
||||
success: function( data )
|
||||
{
|
||||
$( '#overlay' ).hide();
|
||||
|
||||
response = jQuery.parseJSON( data );
|
||||
|
||||
if ( response.status !== 'ok' )
|
||||
create_error( response.msg );
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$( 'body' ).on( 'click', '.article_file_delete', function()
|
||||
{
|
||||
$( this ).blur();
|
||||
var file_id = $( this ).attr( 'file_id' );
|
||||
|
||||
$.prompt( 'Na pewno chcesz usunąć wybrany plik?', {
|
||||
title: 'Potwierdź?',
|
||||
submit: function(e,v,m,f)
|
||||
{
|
||||
if ( v === true )
|
||||
{
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/admin/ajax.php',
|
||||
data:
|
||||
{
|
||||
a: 'article_file_delete',
|
||||
file_id: file_id
|
||||
},
|
||||
beforeSend: function()
|
||||
{
|
||||
$( '#file-' + file_id ).children( 'input' ).addClass( 'disabled' );
|
||||
$( '#file-' + file_id ).children( 'a' ).addClass( 'disabled' );
|
||||
},
|
||||
success: function( data )
|
||||
{
|
||||
response = jQuery.parseJSON( data );
|
||||
|
||||
if ( response.status === 'ok' )
|
||||
$( '#file-' + file_id ).remove();
|
||||
else
|
||||
create_error( msg );
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
buttons: {
|
||||
'tak': true,
|
||||
'nie': false
|
||||
},
|
||||
focus: 0
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$( 'body' ).on( 'click', '.article_image_delete', function()
|
||||
{
|
||||
$( this ).blur();
|
||||
var image_id = $( this ).attr( 'image-id' );
|
||||
|
||||
$.prompt( 'Na pewno chcesz usunąć wybrane zdjęcie?',
|
||||
{
|
||||
title: 'Potwierdź?',
|
||||
submit: function(e,v,m,f)
|
||||
{
|
||||
if ( v === true )
|
||||
{
|
||||
$.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/admin/ajax.php',
|
||||
data:
|
||||
{
|
||||
a: 'article_image_delete',
|
||||
image_id: image_id
|
||||
},
|
||||
beforeSend: function()
|
||||
{
|
||||
$( '#overlay' ).show();
|
||||
},
|
||||
success: function( data )
|
||||
{
|
||||
$( '#overlay' ).hide();
|
||||
response = jQuery.parseJSON( data );
|
||||
|
||||
if ( response.status === 'ok' )
|
||||
$( '#image-' + image_id ).remove();
|
||||
else
|
||||
create_error( msg );
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
buttons: {
|
||||
'tak': true,
|
||||
'nie': false
|
||||
},
|
||||
focus: 0
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
function generate_seo_links( lang, title, article_id )
|
||||
{
|
||||
if ( title === '' )
|
||||
return false;
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/admin/ajax.php',
|
||||
data:
|
||||
{
|
||||
a: 'generate_seo_link',
|
||||
title: title,
|
||||
article_id: article_id
|
||||
},
|
||||
beforeSend: function()
|
||||
{
|
||||
$( '#seo_link_' + lang ).parents( '.g-form-data' ).find( 'input, a' ).each( function()
|
||||
{
|
||||
$( this ).prop( 'disabled', true ).addClass( 'disabled' );
|
||||
});
|
||||
},
|
||||
success: function( data ) {
|
||||
|
||||
$( '#seo_link_' + lang ).parents( '.g-form-data' ).find( 'input, a' ).each( function() {
|
||||
$( this ).prop( 'disabled', false ).removeClass( 'disabled' );
|
||||
});
|
||||
|
||||
response = jQuery.parseJSON( data );
|
||||
|
||||
if ( response.status === 'ok' )
|
||||
$( '#seo_link_' + lang ).val( response.seo_link );
|
||||
else
|
||||
create_error( response.msg );
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<script>CKEDITOR.dtd.$removeEmpty['span'] = false;</script>
|
||||
67
admin/templates/articles/articles-archive-list.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
global $gdb;
|
||||
|
||||
$grid = new \grid( 'pp_articles' );
|
||||
$grid -> gdb_opt = $gdb;
|
||||
$grid -> sql = 'SELECT *'
|
||||
. 'FROM ( '
|
||||
. 'SELECT '
|
||||
. 'id, date_add, date_modify, status, '
|
||||
. '( SELECT title FROM pp_articles_langs AS pal, pp_langs AS pl WHERE lang_id = pl.id AND article_id = pa.id AND title != \'\' ORDER BY o ASC LIMIT 1 ) AS title '
|
||||
. 'FROM '
|
||||
. 'pp_articles AS pa WHERE status = -1 '
|
||||
. ') AS q1 '
|
||||
. 'WHERE '
|
||||
. '1=1 [where] '
|
||||
. 'ORDER BY '
|
||||
. '[order_p1] [order_p2]';
|
||||
$grid -> sql_count = 'SELECT '
|
||||
. 'COUNT(0) FROM ( '
|
||||
. 'SELECT '
|
||||
. 'id, date_add, date_modify, status, '
|
||||
. '( SELECT title FROM pp_articles_langs AS pal, pp_langs AS pl WHERE lang_id = pl.id AND article_id = pa.id AND title != \'\' ORDER BY o ASC LIMIT 1 ) AS title '
|
||||
. 'FROM '
|
||||
. 'pp_articles AS pa WHERE status = -1 '
|
||||
. ') AS q1 '
|
||||
. 'WHERE '
|
||||
. '1=1 [where] ';
|
||||
$grid -> debug = true;
|
||||
$grid -> order = [ 'column' => 'date_add', 'type' => 'DESC' ];
|
||||
$grid -> columns_view = [
|
||||
[
|
||||
'name' => 'Lp.',
|
||||
'th' => [ 'class' => 'g-lp' ],
|
||||
'td' => [ 'class' => 'g-center' ],
|
||||
'autoincrement' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Tytuł',
|
||||
'db' => 'id',
|
||||
'replace' => [ 'sql' => "SELECT title FROM pp_articles_langs AS pal, pp_langs AS pl WHERE lang_id = pl.id AND article_id = [id] AND title != '' ORDER BY o ASC LIMIT 1" ]
|
||||
],
|
||||
[
|
||||
'name' => 'Data dodania',
|
||||
'td' => [ 'class' => 'g-center' ],
|
||||
'th' => [ 'class' => 'g-center', 'style' => 'width: 140px;' ],
|
||||
'php' => 'echo date( "Y-m-d H:i", strtotime( "[date_add]" ) );'
|
||||
],
|
||||
[
|
||||
'name' => 'Data modyfikacji',
|
||||
'td' => [ 'class' => 'g-center' ],
|
||||
'th' => [ 'class' => 'g-center', 'style' => 'width: 140px;' ],
|
||||
'php' => 'echo date( "Y-m-d H:i", strtotime( "[date_modify]" ) );'
|
||||
],
|
||||
[
|
||||
'name' => 'Akcja',
|
||||
'th' => [ 'class' => 'g-center' ],
|
||||
'td' => [ 'class' => 'g-center', 'style' => 'width: 50px;' ],
|
||||
'content' => '<a href="/admin/articles_archive/article_restore/id=[id]">przywróć</a>'
|
||||
],
|
||||
[
|
||||
'name' => 'Akcja',
|
||||
'action' => [ 'type' => 'delete', 'url' => '/admin/articles_archive/article_delete/id=[id]' ],
|
||||
'th' => [ 'class' => 'g-center' ],
|
||||
'td' => [ 'class' => 'g-center', 'style' => 'width: 50px;' ]
|
||||
]
|
||||
];
|
||||
echo $grid -> draw();
|
||||
115
admin/templates/articles/articles-browse-list.php
Normal file
@@ -0,0 +1,115 @@
|
||||
<?php
|
||||
global $gdb;
|
||||
|
||||
$grid = new \grid( 'pp_articles' );
|
||||
$grid -> gdb_opt = $gdb;
|
||||
$grid -> sql = 'SELECT *'
|
||||
. 'FROM ( '
|
||||
. 'SELECT '
|
||||
. 'id, date_add, date_modify, status, '
|
||||
. '( SELECT title FROM pp_articles_langs AS pal, pp_langs AS pl WHERE lang_id = pl.id AND article_id = pa.id AND title != \'\' ORDER BY o ASC LIMIT 1 ) AS title, '
|
||||
. '( SELECT login FROM pp_users AS pu WHERE pu.id = pa.modify_by ) AS user '
|
||||
. 'FROM '
|
||||
. 'pp_articles AS pa WHERE status != -1 '
|
||||
. ') AS q1 '
|
||||
. 'WHERE '
|
||||
. '1=1 [where] '
|
||||
. 'ORDER BY '
|
||||
. '[order_p1] [order_p2]';
|
||||
$grid -> sql_count = 'SELECT '
|
||||
. 'COUNT(0) FROM ( '
|
||||
. 'SELECT '
|
||||
. 'id, date_add, date_modify, status, '
|
||||
. '( SELECT title FROM pp_articles_langs AS pal, pp_langs AS pl WHERE lang_id = pl.id AND article_id = pa.id AND title != \'\' ORDER BY o ASC LIMIT 1 ) AS title, '
|
||||
. '( SELECT login FROM pp_users AS pu WHERE pu.id = pa.modify_by ) AS user '
|
||||
. 'FROM '
|
||||
. 'pp_articles AS pa WHERE status != -1 '
|
||||
. ') AS q1 '
|
||||
. 'WHERE '
|
||||
. '1=1 [where] ';
|
||||
$grid -> debug = true;
|
||||
$grid -> order = [ 'column' => 'date_add', 'type' => 'DESC' ];
|
||||
$grid -> search = [
|
||||
[ 'name' => 'Tytuł', 'db' => 'title', 'type' => 'text' ],
|
||||
[ 'name' => 'Aktywny', 'db' => 'status', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ],
|
||||
[ 'name' => 'Data dodania', 'db' => 'date_add', 'type' => 'date_range' ],
|
||||
[ 'name' => 'Data modyfikacji', 'db' => 'date_modify', 'type' => 'date_range' ]
|
||||
];
|
||||
$grid -> columns_view = [
|
||||
[
|
||||
'name' => 'Lp.',
|
||||
'th' => [ 'class' => 'g-lp' ],
|
||||
'td' => [ 'class' => 'g-center' ],
|
||||
'autoincrement' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Tytuł',
|
||||
'db' => 'title',
|
||||
'sort' => true,
|
||||
'php' => 'echo "[title]"; echo "<small class=\'text-muted\'>" . \admin\factory\Articles::article_pages( [id] ) . "</small>";'
|
||||
],
|
||||
[
|
||||
'name' => 'Aktywny',
|
||||
'db' => 'status',
|
||||
'replace' => [ 'array' => [ 0 => '<span style="color: #FF0000;">nie</span>', 1 => 'tak' ] ],
|
||||
'td' => [ 'class' => 'g-center' ],
|
||||
'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ],
|
||||
'sort' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Data dodania',
|
||||
'db' => 'date_add',
|
||||
'td' => [ 'class' => 'g-center' ],
|
||||
'th' => [ 'class' => 'g-center', 'style' => 'width: 220px;' ],
|
||||
'php' => 'echo date( "Y-m-d H:i", strtotime( "[date_add]" ) );'
|
||||
],
|
||||
[
|
||||
'name' => 'Data modyfikacji',
|
||||
'db' => 'date_modify',
|
||||
'td' => [ 'class' => 'g-center' ],
|
||||
'th' => [ 'class' => 'g-center', 'style' => 'width: 220px;' ],
|
||||
'php' => 'echo date( "Y-m-d H:i", strtotime( "[date_modify]" ) );'
|
||||
],
|
||||
[
|
||||
'name' => 'Modyfikowany przez',
|
||||
'db' => 'user',
|
||||
'td' => [ 'class' => 'g-center' ],
|
||||
'th' => [ 'class' => 'g-center', 'style' => 'width: 220px;' ],
|
||||
],
|
||||
[
|
||||
'name' => 'Akcja',
|
||||
'db' => 'id',
|
||||
'td' => [ 'class' => 'g-center' ],
|
||||
'th' => [ 'class' => 'g-center', 'style' => 'width: 120px;' ],
|
||||
'php' => 'echo "<a href=\'#\' class=\'button\' url=\'/" . \admin\factory\Articles::article_url( [id] ) . "\'>wybierz</a>";'
|
||||
]
|
||||
];
|
||||
echo $grid -> draw();
|
||||
?>
|
||||
<style type="text/css">
|
||||
body.sb-top.sb-top-sm .navbar.navbar-fixed-top + #sidebar_left + #content_wrapper {
|
||||
padding-top: 0;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
function getUrlParam(paramName)
|
||||
{
|
||||
var reParam = new RegExp('(?:[\?&]|&)' + paramName + '=([^&]+)', 'i');
|
||||
var match = window.location.search.match(reParam);
|
||||
|
||||
return (match && match.length > 1) ? match[1] : '';
|
||||
}
|
||||
|
||||
$( function()
|
||||
{
|
||||
$( '#sidebar_left, .navbar-fixed-top' ).hide();
|
||||
|
||||
var funcNum = getUrlParam('CKEditorFuncNum');
|
||||
|
||||
$( 'body' ).on( 'click', '.button', function()
|
||||
{
|
||||
window.opener.CKEDITOR.tools.callFunction(funcNum, $( this ).attr( 'url' ) );
|
||||
window.close();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
100
admin/templates/articles/articles-list.php
Normal file
@@ -0,0 +1,100 @@
|
||||
<?php
|
||||
global $gdb;
|
||||
|
||||
$grid = new \grid( 'pp_articles' );
|
||||
$grid -> gdb_opt = $gdb;
|
||||
$grid -> sql = 'SELECT *'
|
||||
. 'FROM ( '
|
||||
. 'SELECT '
|
||||
. 'id, date_add, date_modify, status, '
|
||||
. '( SELECT title FROM pp_articles_langs AS pal, pp_langs AS pl WHERE lang_id = pl.id AND article_id = pa.id AND title != \'\' ORDER BY o ASC LIMIT 1 ) AS title, '
|
||||
. '( SELECT login FROM pp_users AS pu WHERE pu.id = pa.modify_by ) AS user '
|
||||
. 'FROM '
|
||||
. 'pp_articles AS pa WHERE status != -1 '
|
||||
. ') AS q1 '
|
||||
. 'WHERE '
|
||||
. '1=1 [where] '
|
||||
. 'ORDER BY '
|
||||
. '[order_p1] [order_p2]';
|
||||
$grid -> sql_count = 'SELECT '
|
||||
. 'COUNT(0) FROM ( '
|
||||
. 'SELECT '
|
||||
. 'id, date_add, date_modify, status, '
|
||||
. '( SELECT title FROM pp_articles_langs AS pal, pp_langs AS pl WHERE lang_id = pl.id AND article_id = pa.id AND title != \'\' ORDER BY o ASC LIMIT 1 ) AS title, '
|
||||
. '( SELECT login FROM pp_users AS pu WHERE pu.id = pa.modify_by ) AS user '
|
||||
. 'FROM '
|
||||
. 'pp_articles AS pa WHERE status != -1 '
|
||||
. ') AS q1 '
|
||||
. 'WHERE '
|
||||
. '1=1 [where] ';
|
||||
$grid -> debug = true;
|
||||
$grid -> order = [ 'column' => 'date_add', 'type' => 'DESC' ];
|
||||
$grid -> search = [
|
||||
[ 'name' => 'Tytuł', 'db' => 'title', 'type' => 'text' ],
|
||||
[ 'name' => 'Aktywny', 'db' => 'status', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ],
|
||||
[ 'name' => 'Data dodania', 'db' => 'date_add', 'type' => 'date_range' ],
|
||||
[ 'name' => 'Data modyfikacji', 'db' => 'date_modify', 'type' => 'date_range' ]
|
||||
];
|
||||
$grid -> columns_view = [
|
||||
[
|
||||
'name' => 'Lp.',
|
||||
'th' => [ 'class' => 'g-lp' ],
|
||||
'td' => [ 'class' => 'g-center' ],
|
||||
'autoincrement' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Tytuł',
|
||||
'db' => 'title',
|
||||
'sort' => true,
|
||||
'php' => 'echo "<a href=\'/admin/articles/article_edit/id=[id]\'>[title]</a>"; echo "<small class=\'text-muted\'>" . \admin\factory\Articles::article_pages( [id] ) . "</small>";'
|
||||
],
|
||||
[
|
||||
'name' => 'Aktywny',
|
||||
'db' => 'status',
|
||||
'replace' => [ 'array' => [ 0 => '<span style="color: #FF0000;">nie</span>', 1 => 'tak' ] ],
|
||||
'td' => [ 'class' => 'g-center' ],
|
||||
'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ],
|
||||
'sort' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Data dodania',
|
||||
'db' => 'date_add',
|
||||
'td' => [ 'class' => 'g-center' ],
|
||||
'th' => [ 'class' => 'g-center', 'style' => 'width: 220px;' ],
|
||||
'php' => 'echo date( "Y-m-d H:i", strtotime( "[date_add]" ) );'
|
||||
],
|
||||
[
|
||||
'name' => 'Data modyfikacji',
|
||||
'db' => 'date_modify',
|
||||
'td' => [ 'class' => 'g-center' ],
|
||||
'th' => [ 'class' => 'g-center', 'style' => 'width: 220px;' ],
|
||||
'php' => 'echo date( "Y-m-d H:i", strtotime( "[date_modify]" ) );'
|
||||
],
|
||||
[
|
||||
'name' => 'Modyfikowany przez',
|
||||
'db' => 'user',
|
||||
'td' => [ 'class' => 'g-center' ],
|
||||
'th' => [ 'class' => 'g-center', 'style' => 'width: 220px;' ],
|
||||
],
|
||||
[
|
||||
'name' => 'Edytuj',
|
||||
'action' => [ 'type' => 'edit', 'url' => '/admin/articles/article_edit/id=[id]' ],
|
||||
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
||||
'td' => [ 'class' => 'g-center' ]
|
||||
],
|
||||
[
|
||||
'name' => 'Usuń',
|
||||
'action' => [ 'type' => 'delete', 'url' => '/admin/articles/article_delete/id=[id]' ],
|
||||
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
||||
'td' => [ 'class' => 'g-center' ]
|
||||
]
|
||||
];
|
||||
$grid -> buttons = [
|
||||
[
|
||||
'label' => 'Dodaj artykuł',
|
||||
'url' => '/admin/articles/article_edit/',
|
||||
'icon' => 'fa-plus-circle',
|
||||
'class' => 'btn-success'
|
||||
]
|
||||
];
|
||||
echo $grid -> draw();
|
||||
16
admin/templates/articles/subpages-list.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<? if ( is_array( $this -> pages ) ):?>
|
||||
<ol>
|
||||
<? foreach ( $this -> pages as $page ):?>
|
||||
<li id="list_<?= $page['id'];?>" idk="<?= $page['id'];?>" class="sort-nonesting list_<?= $page['id'];?>" menu="<?= $page['menu_id'];?>">
|
||||
<div class="content <?= $this -> step < 2 ? $tmp = 'content_page' : $tmp = 'content_page_last_level';?>" <? if ( !$page['status'] ) echo 'style="color: #cc0000;"';?>>
|
||||
<span class="disclose"><span></span></span>
|
||||
<input type="checkbox" class="g-checkbox" name="pages[]" value="<?= $page['id'];?>" <? if ( is_array( $this -> article_pages ) and in_array( $page['id'], $this -> article_pages ) ):?>checked="checked"<? endif;?> /><?= $page['title'];?>
|
||||
</div>
|
||||
<?
|
||||
if ( is_array( $page['subpages'] ) )
|
||||
echo \admin\view\Articles::subpages_list( $page['subpages'], $this -> article_pages, $page['id'], $this -> step + 1 );
|
||||
?>
|
||||
</li>
|
||||
<? endforeach;?>
|
||||
</ol>
|
||||
<? endif;?>
|
||||
180
admin/templates/banners/banner-edit.php
Normal file
@@ -0,0 +1,180 @@
|
||||
<script type="text/javascript" src="/libraries/ckeditor/ckeditor.js"></script>
|
||||
<script type="text/javascript" src="/libraries/ckeditor/adapters/jquery.js"></script>
|
||||
<?
|
||||
\S::set_session( 'admin', true );
|
||||
global $db;
|
||||
|
||||
ob_start();
|
||||
?>
|
||||
|
||||
<div id="settings-tabs">
|
||||
<ul class="resp-tabs-list settings-tabs">
|
||||
<li><i class="fa fa-wrench"></i>Ustawienia</li>
|
||||
<li><i class="fa fa-file"></i>Zawartość</li>
|
||||
</ul>
|
||||
<div class="resp-tabs-container settings-tabs">
|
||||
<div>
|
||||
<?= \Html::input(
|
||||
array(
|
||||
'label' => 'Nazwa',
|
||||
'name' => 'name',
|
||||
'id' => 'name',
|
||||
'value' => $this -> banner['name'],
|
||||
'class' => 'require'
|
||||
) );
|
||||
?>
|
||||
<?= \Html::input_switch(
|
||||
array(
|
||||
'label' => 'Aktywny',
|
||||
'name' => 'status',
|
||||
'checked' => $this -> banner['status'] == 1 or ! $this -> banner['id'] ? true : false
|
||||
)
|
||||
);
|
||||
?>
|
||||
<?= Html::input(
|
||||
array(
|
||||
'label' => 'Data rozpoczęcia',
|
||||
'name' => 'date_start',
|
||||
'id' => 'date_start',
|
||||
'value' => $this -> banner['date_start'],
|
||||
'class' => 'date'
|
||||
)
|
||||
);
|
||||
?>
|
||||
<?= \Html::input(
|
||||
array(
|
||||
'label' => 'Data zakończenia',
|
||||
'name' => 'date_end',
|
||||
'id' => 'date_end',
|
||||
'value' => $this -> banner['date_end'],
|
||||
'class' => 'date'
|
||||
) );
|
||||
?>
|
||||
<?= \Html::input_switch(
|
||||
array(
|
||||
'label' => 'Slajder / Strona główna',
|
||||
'name' => 'home_page',
|
||||
'checked' => $this -> banner['home_page'] == 1 ? true : false
|
||||
)
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<div>
|
||||
<div id="languages-main">
|
||||
<ul class="resp-tabs-list languages-main htabs">
|
||||
<? if ( is_array( $this -> languages ) ): foreach ( $this -> languages as $lg ):?>
|
||||
<? if ( $lg['status'] ):?>
|
||||
<li><?= $lg['name'];?></a></li>
|
||||
<? endif;?>
|
||||
<? endforeach;
|
||||
endif;?>
|
||||
</ul>
|
||||
<div class="resp-tabs-container languages-main">
|
||||
<? if ( is_array( $this -> languages ) ): foreach ( $this -> languages as $lg ):?>
|
||||
<? if ( $lg['status'] ):?>
|
||||
<div>
|
||||
<?= \Html::input_icon(
|
||||
array(
|
||||
'label' => 'Obraz',
|
||||
'name' => 'src[' . $lg['id'] . ']',
|
||||
'id' => 'src_' . $lg['id'],
|
||||
'value' => $this -> banner['languages'][ $lg['id'] ]['src'],
|
||||
'icon_content' => 'przeglądaj',
|
||||
'icon_js' => "window.open ( 'http://" . $_SERVER['SERVER_NAME'] . "/libraries/filemanager-9.14.1/dialog.php?type=1&popup=1&field_id=src_" . $lg['id'] . "&akey=c3cb2537d25c0efc9e573d059d79c3b8', 'mywindow', 'location=1,status=1,scrollbars=1, width=1100,height=700');"
|
||||
)
|
||||
);
|
||||
?>
|
||||
<?= \Html::input(
|
||||
array(
|
||||
'label' => 'Url',
|
||||
'name' => 'url[' . $lg['id'] . ']',
|
||||
'id' => 'url_' . $lg['id'],
|
||||
'value' => $this -> banner['languages'][ $lg['id'] ]['url']
|
||||
)
|
||||
);
|
||||
?>
|
||||
<?= \Html::textarea(
|
||||
array(
|
||||
'label' => 'Kod html',
|
||||
'name' => 'html[' . $lg['id'] . ']',
|
||||
'id' => 'html_' . $lg['id'],
|
||||
'value' => $this -> banner['languages'][$lg['id']]['html']
|
||||
)
|
||||
);
|
||||
?>
|
||||
<?= \Html::textarea(
|
||||
array(
|
||||
'label' => 'Treść',
|
||||
'name' => 'text[' . $lg['id'] . ']',
|
||||
'id' => 'text_' . $lg['id'],
|
||||
'value' => $this -> banner['languages'][$lg['id']]['text']
|
||||
)
|
||||
);
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#text_<?= $lg['id'];?>').ckeditor({
|
||||
toolbar: 'MyTool',
|
||||
height: '300'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<? endforeach; endif;?>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?
|
||||
$out = ob_get_clean();
|
||||
|
||||
$grid = new \gridEdit;
|
||||
$grid -> id = 'banner-edit';
|
||||
$grid -> gdb_opt = $gdb;
|
||||
$grid -> include_plugins = true;
|
||||
$grid -> title = 'Edycja baneru';
|
||||
$grid -> fields = [
|
||||
[
|
||||
'db' => 'id',
|
||||
'type' => 'hidden',
|
||||
'value' => $this -> banner['id']
|
||||
]
|
||||
];
|
||||
$grid -> external_code = $out;
|
||||
$grid -> actions = [
|
||||
'save' => [ 'url' => '/admin/banners/banner_save/', 'back_url' => '/admin/banners/view_list/' ],
|
||||
'cancel' => [ 'url' => '/admin/banners/view_list/' ]
|
||||
];
|
||||
$grid -> persist_edit = true;
|
||||
$grid -> id_param = 'id';
|
||||
echo $grid -> draw();
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
$(function ()
|
||||
{
|
||||
disable_menu();
|
||||
|
||||
$('input[type="text"].date').datetimepicker({
|
||||
format: "YYYY-MM-DD",
|
||||
pickTime: false
|
||||
});
|
||||
|
||||
$( '#settings-tabs' ).easyResponsiveTabs({
|
||||
width: 'auto',
|
||||
fit: true,
|
||||
tabidentify: 'settings-tabs',
|
||||
type: 'vertical'
|
||||
});
|
||||
|
||||
$('#languages-main').easyResponsiveTabs({
|
||||
width: 'auto',
|
||||
fit: true,
|
||||
tabidentify: 'languages-main'
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
<script>CKEDITOR.dtd.$removeEmpty['span'] = false;</script>
|
||||
78
admin/templates/banners/banners-list.php
Normal file
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
global $gdb;
|
||||
|
||||
$grid = new \grid( 'pp_banners' );
|
||||
$grid -> gdb_opt = $gdb;
|
||||
$grid -> order = [ 'column' => 'name', 'type' => 'ASC' ];
|
||||
$grid -> search = [
|
||||
[ 'name' => 'Nazwa', 'db' => 'name', 'type' => 'text' ],
|
||||
[ 'name' => 'Aktywny', 'db' => 'status', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ]
|
||||
];
|
||||
$grid -> columns_view = [
|
||||
[
|
||||
'name' => 'Lp.',
|
||||
'th' => [ 'class' => 'g-lp' ],
|
||||
'td' => [ 'class' => 'g-center' ],
|
||||
'autoincrement' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Nazwa',
|
||||
'db' => 'name',
|
||||
'php' => 'echo "<a href=\'/admin/banners/banner_edit/id=[id]\'>[name]</a>";',
|
||||
'sort' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Aktywny',
|
||||
'db' => 'status',
|
||||
'replace' => [ 'array' => [ 0 => '<span style="color: #FF0000;">nie</span>', 1 => 'tak' ] ],
|
||||
'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ],
|
||||
'td' => [ 'class' => 'g-center' ]
|
||||
],
|
||||
[
|
||||
'name' => 'Strona główna',
|
||||
'db' => 'home_page',
|
||||
'replace' => [ 'array' => [ 0 => 'nie', 1 => '<span class="text-system">tak</span>' ] ],
|
||||
'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ],
|
||||
'td' => [ 'class' => 'g-center' ]
|
||||
],
|
||||
[
|
||||
'name' => 'Slajder',
|
||||
'db' => 'home_page',
|
||||
'replace' => [ 'array' => [ 1 => 'nie', 0 => '<span class="text-system">tak</span>' ] ],
|
||||
'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ],
|
||||
'td' => [ 'class' => 'g-center' ]
|
||||
],
|
||||
[
|
||||
'name' => 'Data rozpoczęcia',
|
||||
'th' => [ 'class' => 'g-center', 'style' => 'width: 140px;' ],
|
||||
'td' => [ 'class' => 'g-center' ],
|
||||
'php' => 'if ( "[date_start]" ) echo date( "Y-m-d", strtotime( "[date_start]" ) ); else echo "-";'
|
||||
],
|
||||
[
|
||||
'name' => 'Data zakończenia',
|
||||
'th' => [ 'class' => 'g-center', 'style' => 'width: 140px;' ],
|
||||
'td' => [ 'class' => 'g-center' ],
|
||||
'php' => 'if ( "[date_end]" ) echo date( "Y-m-d", strtotime( "[date_end]" ) ); else echo "-";'
|
||||
],
|
||||
[
|
||||
'name' => 'Edytuj',
|
||||
'action' => [ 'type' => 'edit', 'url' => '/admin/banners/banner_edit/id=[id]' ],
|
||||
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
||||
'td' => [ 'class' => 'g-center' ]
|
||||
],
|
||||
[
|
||||
'name' => 'Usuń',
|
||||
'action' => [ 'type' => 'delete', 'url' => '/admin/banners/banner_delete/id=[id]' ],
|
||||
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
||||
'td' => [ 'class' => 'g-center' ]
|
||||
]
|
||||
];
|
||||
$grid -> buttons = [
|
||||
[
|
||||
'label' => 'Dodaj baner',
|
||||
'url' => '/admin/banners/banner_edit/',
|
||||
'icon' => 'fa-plus-circle',
|
||||
'class' => 'btn-success'
|
||||
]
|
||||
];
|
||||
echo $grid -> draw();
|
||||
33
admin/templates/baselinker/bundling-products.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<form method="POST" action="/admin/baselinker/bundling_products_save/">
|
||||
<table class="table mbn table-hover table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nazwa produktu</th>
|
||||
<th>SKU</th>
|
||||
<th>Produkt w Baselinker</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<? foreach ( $this -> products as $product ):?>
|
||||
<tr>
|
||||
<td><?= $product['name'];?> - <?= $product['id'];?></td>
|
||||
<td><?= $product['sku'];?></td>
|
||||
<td>
|
||||
<select class="form-control" name="product_<?= $product['id'];?>">
|
||||
<option value="">--- wybierz produkt ---</option>
|
||||
<? foreach ( $this -> baselinker_products as $product_baselinker ):?>
|
||||
<option value="<?= $product_baselinker['product_id'];?>"
|
||||
<? if ( $product_baselinker['product_id'] == $product['baselinker_product_id'] or ( $product['sku'] == $product_baselinker['sku'] and $product['sku'] != "" ) ):?>selected="selected"<? endif;?>
|
||||
>
|
||||
<?= $product_baselinker['name'] . ' - ' . $product_baselinker['sku'];?>
|
||||
<? endforeach;?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<? endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<button class="btn btn-success btn-sm">
|
||||
<i class="fa fa-check-circle mr5"></i>Zapisz
|
||||
</button>
|
||||
</form>
|
||||
250
admin/templates/dashboard/main-view.php
Normal file
@@ -0,0 +1,250 @@
|
||||
<div class="dashboard-summary">
|
||||
<div class="panel panel-tile text-center">
|
||||
<div class="panel-body bg-primary">
|
||||
<h1 class="fs35 mbn"><?= number_format( $this -> summary_sales, 2, '.', ' ' );?> zł</h1>
|
||||
<h6 class="text-white">wartość zamówień</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-tile text-center">
|
||||
<div class="panel-body bg-success">
|
||||
<h1 class="fs35 mbn"><?= $this -> summary_orders;?></h1>
|
||||
<h6 class="text-white">ilość zamówień</h6>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="dashboard-content">
|
||||
<div class="dashboard-title">
|
||||
Ostatnie zamówienia
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Data zamówienia</th>
|
||||
<th scope="col">Nr zamówienia</th>
|
||||
<th scope="col">Status</th>
|
||||
<th scope="col" class="text-right">Wartość</th>
|
||||
<th scope="col">Klient</th>
|
||||
<th scope="col">Email</th>
|
||||
<th scope="col">Telefon</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<? if ( \S::is_array_fix( $this -> last_orders ) ): foreach ( $this -> last_orders as $order ):?>
|
||||
<tr class="status-<?= $order['status'];?>">
|
||||
<td><?= date( "Y-m-d H:i", strtotime( $order['date_order'] ) );?></td>
|
||||
<td>
|
||||
<a href="/admin/shop_order/order_details/order_id=<?= $order['id'];?>"><?= $order['number'];?></a>
|
||||
</td>
|
||||
<td class="order-status"><?= $this -> order_statuses[ $order['status'] ];?></td>
|
||||
<td class="text-right"><?= $order['summary'];?> zł</td>
|
||||
<td><?= $order['client'];?></td>
|
||||
<td><?= $order['client_email'];?></td>
|
||||
<td><?= $order['client_phone'];?></td>
|
||||
</tr>
|
||||
<? endforeach; endif;?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="dashboard-content">
|
||||
<div class="dashboard-title">
|
||||
Sprzedaż z ostatnich 24 m-cy
|
||||
</div>
|
||||
<div id="sale"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="dashboard-content">
|
||||
<div class="dashboard-title">
|
||||
Sprzedaż wg godzin i dni
|
||||
</div>
|
||||
<?
|
||||
$min = 999999999999999999;
|
||||
for ( $i = 0; $i < 24; $i++ )
|
||||
{
|
||||
for ( $j = 1; $j < 8; $j++ )
|
||||
{
|
||||
if ( $max < $this -> sales_grid[$j][$i] )
|
||||
$max = $this -> sales_grid[$j][$i];
|
||||
|
||||
if ( $min > (int) $this -> sales_grid[$j][$i] )
|
||||
$min = (int) $this -> sales_grid[$j][$i];
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="table-responsive">
|
||||
<table class="sales-grid table">
|
||||
<? for ( $i = 0; $i < 24; $i++ ):?>
|
||||
<tr>
|
||||
<td><?= $i;?></td>
|
||||
<? for ( $j = 1; $j < 8; $j++ ):?>
|
||||
<td style="background: rgba( 10, 92, 150, <?= (int) $this -> sales_grid[$j][$i] * 100 / $max / 100;?> ); <? if ( (int) $this -> sales_grid[$j][$i] * 100 / $max > 50 ):?> color: #FFF;<? endif;?>"><?= (int) $this -> sales_grid[$j][$i];?></td>
|
||||
<? endfor;?>
|
||||
</tr>
|
||||
<? endfor;?>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>poniedziałek | <? $sum = 0; for ( $i = 0; $i < 24; $i++ ): $sum += $this -> sales_grid[ 1 ][$i]; endfor; echo $sum;?></td>
|
||||
<td>wtorek | <? $sum = 0; for ( $i = 0; $i < 24; $i++ ): $sum += $this -> sales_grid[ 2 ][$i]; endfor; echo $sum;?></td>
|
||||
<td>środa | <? $sum = 0; for ( $i = 0; $i < 24; $i++ ): $sum += $this -> sales_grid[ 3 ][$i]; endfor; echo $sum;?></td>
|
||||
<td>czwartek | <? $sum = 0; for ( $i = 0; $i < 24; $i++ ): $sum += $this -> sales_grid[ 4 ][$i]; endfor; echo $sum;?></td>
|
||||
<td>piątek | <? $sum = 0; for ( $i = 0; $i < 24; $i++ ): $sum += $this -> sales_grid[ 5 ][$i]; endfor; echo $sum;?></td>
|
||||
<td>sobota | <? $sum = 0; for ( $i = 0; $i < 24; $i++ ): $sum += $this -> sales_grid[ 6 ][$i]; endfor; echo $sum;?></td>
|
||||
<td>niedziela | <? $sum = 0; for ( $i = 0; $i < 24; $i++ ): $sum += $this -> sales_grid[ 7 ][$i]; endfor; echo $sum;?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xl-6">
|
||||
<div class="dashboard-content">
|
||||
<div class="dashboard-title">
|
||||
Najczęściej kupowane produkty
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover dashboard-products">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Zdjęcie</th>
|
||||
<th scope="col">Nazwa</th>
|
||||
<th scope="col" class="text-center">Ilość</th>
|
||||
<th scope="col" class="text-right">Wartość</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<? if ( \S::is_array_fix( $this -> best_sales_products ) ): foreach ( $this -> best_sales_products as $row ):?>
|
||||
<? $product = \shop\Product::getFromCache( (int)$row['parent_product_id'], \front\factory\Languages::default_language() );?>
|
||||
<tr>
|
||||
<td>
|
||||
<?
|
||||
$img = '../' . $product['images'][0]['src'];
|
||||
if ( file_exists( $img ) )
|
||||
echo '<img src="'. $product['images'][0]['src'] . '">';
|
||||
?>
|
||||
</td>
|
||||
<td><?= $product -> language['name'];?></td>
|
||||
<td class="text-center"><?= $row['quantity_summary'];?></td>
|
||||
<td class="text-right"><?= number_format( $row['sales'], 2, '.', " " );?> zł</td>
|
||||
</tr>
|
||||
<? endforeach; endif;?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xl-6">
|
||||
<div class="dashboard-content">
|
||||
<div class="dashboard-title">
|
||||
Najczęściej oglądane produkty
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Zdjęcie</th>
|
||||
<th scope="col">Nazwa</th>
|
||||
<th scope="col" class="text-center">Ilość</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<? if ( \S::is_array_fix( $this -> most_view_products ) ): foreach ( $this -> most_view_products as $row ):?>
|
||||
<? $product = new \shop\Product( $row['id'] );?>
|
||||
<tr>
|
||||
<td>
|
||||
<?
|
||||
$img = '../' . $product['images'][0]['src'];
|
||||
if ( file_exists( $img ) )
|
||||
echo '<img src="'. $product['images'][0]['src'] . '">';
|
||||
?>
|
||||
</td>
|
||||
<td><?= $product['language']['name'];?></td>
|
||||
<td class="text-center"><?= $row['visits'];?></td>
|
||||
</tr>
|
||||
<? endforeach; endif;?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="/libraries/apexcharts/apexcharts.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
|
||||
var options = {
|
||||
series: [{
|
||||
name: 'Sprzedaż',
|
||||
data: [ <? for ( $i = 23; $i >= 0; $i-- ) { echo number_format( (float)$this -> sales[$i]['sales'], 0 , '.', "" ); if ( $i != 0 ) echo ','; }?> ]
|
||||
}],
|
||||
chart: {
|
||||
height: 600,
|
||||
type: 'bar',
|
||||
},
|
||||
plotOptions: {
|
||||
bar: {
|
||||
dataLabels: {
|
||||
position: 'top',
|
||||
},
|
||||
}
|
||||
},
|
||||
dataLabels: {
|
||||
enabled: true,
|
||||
formatter: function (val) {
|
||||
return parseFloat(val).toFixed(0) + " zł";
|
||||
},
|
||||
offsetY: -20,
|
||||
style: {
|
||||
fontSize: '12px',
|
||||
colors: ["#304758"]
|
||||
}
|
||||
},
|
||||
stroke: {
|
||||
curve: 'smooth'
|
||||
},
|
||||
xaxis: {
|
||||
categories: [ <? for ( $i = 23; $i >= 0; $i-- ) { echo "'" . $this -> sales[$i]['date'] . "'"; if ( $i != 0 ) echo ','; }?> ],
|
||||
position: 'bottom',
|
||||
axisBorder: {
|
||||
show: false
|
||||
},
|
||||
axisTicks: {
|
||||
show: false
|
||||
},
|
||||
crosshairs: {
|
||||
fill: {
|
||||
type: 'gradient',
|
||||
gradient: {
|
||||
colorFrom: '#D8E3F0',
|
||||
colorTo: '#BED1E6',
|
||||
stops: [0, 100],
|
||||
opacityFrom: 0.4,
|
||||
opacityTo: 0.5,
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
yaxis: {
|
||||
axisBorder: {
|
||||
show: false
|
||||
},
|
||||
axisTicks: {
|
||||
show: false,
|
||||
},
|
||||
labels: {
|
||||
show: false,
|
||||
formatter: function (val) {
|
||||
return parseFloat(val).toFixed(2) + " zł";
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
var chart = new ApexCharts(document.querySelector("#sale"), options);
|
||||
chart.render();
|
||||
});
|
||||
</script>
|
||||
91
admin/templates/dictionaries/unit-edit.php
Normal file
@@ -0,0 +1,91 @@
|
||||
|
||||
|
||||
<script type="text/javascript" src="/libraries/ckeditor/ckeditor.js"></script>
|
||||
<script type="text/javascript" src="/libraries/ckeditor/adapters/jquery.js"></script>
|
||||
<?
|
||||
global $db;
|
||||
|
||||
ob_start();
|
||||
?>
|
||||
<div id="settings-tabs">
|
||||
<ul class="resp-tabs-list settings-tabs">
|
||||
<li><i class="fa fa-file"></i>Treść</li>
|
||||
</ul>
|
||||
<div class="resp-tabs-container settings-tabs">
|
||||
<div>
|
||||
<div id="languages-main">
|
||||
<ul class="resp-tabs-list languages-main htabs">
|
||||
<? if ( is_array( $this -> languages ) ): foreach ( $this -> languages as $lg ):?>
|
||||
<? if ( $lg['status'] ):?>
|
||||
<li><?= $lg['name'];?></a></li>
|
||||
<? endif;?>
|
||||
<? endforeach; endif;?>
|
||||
</ul>
|
||||
<div class="resp-tabs-container languages-main">
|
||||
<? if ( is_array( $this -> languages ) ): foreach ( $this -> languages as $lg ):?>
|
||||
<? if ( $lg['status'] ):?>
|
||||
<div>
|
||||
<?= \Html::input(
|
||||
array(
|
||||
'label' => 'Tekst',
|
||||
'name' => 'text[' . $lg['id'] . ']',
|
||||
'id' => 'text_' . $lg['id'],
|
||||
'value' => $this -> unit['languages'][ $lg['id'] ]['text'],
|
||||
'inline' => true
|
||||
)
|
||||
);?>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<? endforeach; endif;?>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?
|
||||
$out = ob_get_clean();
|
||||
|
||||
$grid = new \gridEdit;
|
||||
$grid -> id = 'unit-edit';
|
||||
$grid -> gdb_opt = $gdb;
|
||||
$grid -> include_plugins = true;
|
||||
$grid -> title = 'Edycja jednostki miary';
|
||||
$grid -> fields = [
|
||||
[
|
||||
'db' => 'id',
|
||||
'type' => 'hidden',
|
||||
'value' => $this -> unit['id']
|
||||
]
|
||||
];
|
||||
$grid -> actions = [
|
||||
'save' => [ 'url' => '/admin/dictionaries/unit_save/', 'back_url' => '/admin/dictionaries/view_list/' ],
|
||||
'cancel' => [ 'url' => '/admin/dictionaries/view_list/' ]
|
||||
];
|
||||
$grid -> external_code = $out;
|
||||
$grid -> persist_edit = true;
|
||||
$grid -> id_param = 'id';
|
||||
|
||||
echo $grid -> draw();
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
$( function()
|
||||
{
|
||||
disable_menu();
|
||||
|
||||
$( '#settings-tabs' ).easyResponsiveTabs({
|
||||
width: 'auto',
|
||||
fit: true,
|
||||
tabidentify: 'settings-tabs',
|
||||
type: 'vertical'
|
||||
});
|
||||
|
||||
$( '#languages-main' ).easyResponsiveTabs({
|
||||
width: 'auto',
|
||||
fit: true,
|
||||
tabidentify: 'languages-main'
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
<script>CKEDITOR.dtd.$removeEmpty['span'] = false;</script>
|
||||
67
admin/templates/dictionaries/units-list.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
global $gdb;
|
||||
|
||||
$grid = new \grid( 'pp_dictionaries_units' );
|
||||
$grid -> gdb_opt = $gdb;
|
||||
$grid -> sql = 'SELECT *'
|
||||
. 'FROM ( '
|
||||
. 'SELECT '
|
||||
. 'id,'
|
||||
. '( SELECT text FROM pp_units_langs AS psl, pp_langs AS pl WHERE lang_id = pl.id AND unit_id = ps.id AND text != \'\' ORDER BY o ASC LIMIT 1 ) AS text '
|
||||
. 'FROM '
|
||||
. 'pp_units AS ps '
|
||||
. ') AS q1 '
|
||||
. 'WHERE '
|
||||
. '1=1 [where] '
|
||||
. 'ORDER BY '
|
||||
. '[order_p1] [order_p2]';
|
||||
$grid -> sql_count = 'SELECT '
|
||||
. 'COUNT(0) FROM ( '
|
||||
. 'SELECT '
|
||||
. 'id,'
|
||||
. '( SELECT text FROM pp_units_langs AS psl, pp_langs AS pl WHERE lang_id = pl.id AND unit_id = ps.id AND text != \'\' ORDER BY o ASC LIMIT 1 ) AS text '
|
||||
. 'FROM '
|
||||
. 'pp_units AS ps '
|
||||
. ') AS q1 '
|
||||
. 'WHERE '
|
||||
. '1=1 [where] ';
|
||||
$grid -> debug = true;
|
||||
$grid -> order = [ 'column' => 'id', 'type' => 'ASC' ];
|
||||
$grid -> search = [
|
||||
[ 'name' => 'Tekst', 'db' => 'text', 'type' => 'text' ]
|
||||
];
|
||||
$grid -> columns_view = [
|
||||
[
|
||||
'name' => 'Lp.',
|
||||
'th' => [ 'class' => 'g-lp' ],
|
||||
'td' => [ 'class' => 'g-center' ],
|
||||
'autoincrement' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Tekst',
|
||||
'db' => 'text',
|
||||
'php' => 'echo "<a href=\'/admin/dictionaries/unit_edit/id=[id]\'>[text]</a>";',
|
||||
'sort' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Edytuj',
|
||||
'action' => [ 'type' => 'edit', 'url' => '/admin/dictionaries/unit_edit/id=[id]' ],
|
||||
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
||||
'td' => [ 'class' => 'g-center' ]
|
||||
],
|
||||
[
|
||||
'name' => 'Usuń',
|
||||
'action' => [ 'type' => 'delete', 'url' => '/admin/dictionaries/unit_delete/id=[id]' ],
|
||||
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
||||
'td' => [ 'class' => 'g-center' ]
|
||||
]
|
||||
];
|
||||
$grid -> buttons = [
|
||||
[
|
||||
'label' => 'Dodaj jednostkę miary',
|
||||
'url' => '/admin/dictionaries/unit_edit/',
|
||||
'icon' => 'fa-plus-circle',
|
||||
'class' => 'btn-success'
|
||||
]
|
||||
];
|
||||
echo $grid -> draw();
|
||||
1
admin/templates/filemanager/filemanager.php
Normal file
@@ -0,0 +1 @@
|
||||
<iframe src="/libraries/filemanager-9.14.1/dialog.php?akey=c3cb2537d25c0efc9e573d059d79c3b8" style="border: 0px; width: 100%; height: 800px; background: #FFF; padding: 5px;"></iframe>
|
||||
29
admin/templates/html/button.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?
|
||||
$out = '<a ';
|
||||
$out .= 'class="btn ' . $this -> params['class'] . '" ';
|
||||
|
||||
if ( $this -> params['style'] )
|
||||
$out .= 'style="' . $this -> params['style'] . '" ';
|
||||
|
||||
if ( $this -> params['js'] )
|
||||
$out .= 'onclick="' . htmlspecialchars( $this -> params['js'] ) . '" ';
|
||||
|
||||
if ( $this -> params['url'] )
|
||||
$out .= 'href="' . htmlspecialchars( $this -> params['url'] ) . '" ';
|
||||
|
||||
if ( $this -> params['id'] )
|
||||
$out .= 'id="' . $this -> params['id'] . '" ';
|
||||
|
||||
if ( $this -> params['title'] )
|
||||
$out .= 'title="' . htmlspecialchars( $this -> params['title'] ) . '" ';
|
||||
|
||||
if ( $this -> params['target'] )
|
||||
$out .= 'target="' . $this -> params['target'] . '" ';
|
||||
|
||||
$out .= '>';
|
||||
if ( $this -> params['icon'] )
|
||||
$out .= '<i class="fa ' . $this -> params['icon'] . ' mr5"></i>';
|
||||
$out .= $this -> params['text'];
|
||||
$out .= '</a>';
|
||||
|
||||
echo $out;
|
||||
8
admin/templates/html/form-text.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-3 control-label"><?= $this -> params['label'];?>:</label>
|
||||
<div class="col-lg-9">
|
||||
<p class="form-control-static" id="<?= $this -> params['id'];?>">
|
||||
<?= $this -> params['text'];?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
72
admin/templates/html/input-icon.php
Normal file
@@ -0,0 +1,72 @@
|
||||
<?
|
||||
if ( $this -> params['label'] )
|
||||
{
|
||||
$out .= '<div class="form-group row ';
|
||||
if ( $this -> params['inline'] )
|
||||
$out .= 'pl10 pr10';
|
||||
$out .= '">';
|
||||
$out .= '<label class="';
|
||||
if ( !$this -> params['inline'] )
|
||||
$out .= 'col-lg-4 ';
|
||||
if ( $this -> params['inline'] )
|
||||
$out .= 'col-12 mb5 ';
|
||||
$out .= 'control-label">' . $this -> params['label'] . ':</label>';
|
||||
$out .= '<div class="';
|
||||
if ( !$this -> params['inline'] )
|
||||
$out .= 'col-lg-8';
|
||||
if ( $this -> params['inline'] )
|
||||
$out .= 'col-12 ';
|
||||
$out .= '">';
|
||||
}
|
||||
$out .= '<div class="input-group">';
|
||||
$out .= '<input ';
|
||||
$out .= 'type="' . $this -> params['type'] . '" ';
|
||||
|
||||
if ( $this -> params['id'] )
|
||||
$out .= 'id="' . $this -> params['id'] . '" ';
|
||||
|
||||
if ( $this -> params['class'] or $this -> params['label'] )
|
||||
{
|
||||
if ( $this -> params['label'] )
|
||||
$out .= 'class="' . $this -> params['class'] . ' form-control" ';
|
||||
else if ( $this -> params['class'] )
|
||||
$out .= 'class="' . $this -> params['class'] . '" ';
|
||||
}
|
||||
|
||||
$out .= 'name="' . $this -> params['name'] . '" ';
|
||||
$out .= 'value="' . $this -> secureHTML( $this -> params['value'] ) . '" ';
|
||||
|
||||
if ( $this -> params['js'] )
|
||||
$out .= 'onchange="' . htmlspecialchars( $this -> params['js'] ) . '" ';
|
||||
|
||||
if ( $this -> params['js_key'] )
|
||||
$out .= 'onkeyup="' . htmlspecialchars( $this -> params['js_key'] ) . '" ';
|
||||
|
||||
if ( $this -> params['style'] )
|
||||
$out .= 'style="' . $this -> params['style'] . '" ';
|
||||
|
||||
if ( $this -> params['readonly'] )
|
||||
$out .= 'readonly="readonly" ';
|
||||
|
||||
if ( $this -> params['autocomplete'] == 'off' )
|
||||
$out .= 'autocomplete="off" ';
|
||||
|
||||
$out .= ' />';
|
||||
|
||||
$out .= '<span class="input-group-addon btn btn-info ' . $this -> params['icon_class'] . '"';
|
||||
|
||||
if ( $this -> params['icon_js'] )
|
||||
$out .= 'onclick="' . htmlspecialchars( $this -> params['icon_js'] ) . '" ';
|
||||
|
||||
$out .= '>';
|
||||
$out .= $this -> params['icon_content'];
|
||||
$out .= '</span>';
|
||||
$out .= '</div>';
|
||||
|
||||
if ( $this -> params['label'] )
|
||||
{
|
||||
$out .= '</div>';
|
||||
$out .= '</div>';
|
||||
}
|
||||
|
||||
echo $out;
|
||||
27
admin/templates/html/input-switch.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?
|
||||
$out .= '<div class="form-group row">';
|
||||
$out .= '<label class="col-lg-4 control-label" ';
|
||||
|
||||
if ( $this -> params['id'] )
|
||||
$out .= 'for="' . $this -> params['id'] . '" ';
|
||||
else
|
||||
$out .= 'for="' . $this -> params['name'] . '" ';
|
||||
|
||||
$out .= '>' . $this -> params['label'] . ':</label>';
|
||||
$out .= '<div class="col-lg-8">';
|
||||
$out .= '<input class="icheck" ';
|
||||
|
||||
if ( $this -> params['id'] )
|
||||
$out .= 'id="' . $this -> params['id'] . '" ';
|
||||
else
|
||||
$out .= 'id="' . $this -> params['name'] . '" ';
|
||||
$out .= 'name="' . $this -> params['name'] . '" type="checkbox"';
|
||||
|
||||
if ( $this -> params['checked'] )
|
||||
$out .= 'checked="checked" ';
|
||||
|
||||
$out .= '>';
|
||||
$out .= '</div>';
|
||||
$out .= '</div>';
|
||||
|
||||
echo $out;
|
||||
62
admin/templates/html/input.php
Normal file
@@ -0,0 +1,62 @@
|
||||
<?
|
||||
if ( $this -> params['label'] )
|
||||
{
|
||||
$out .= '<div class="form-group row ';
|
||||
if ( $this -> params['inline'] )
|
||||
$out .= 'pl10 pr10';
|
||||
$out .= '">';
|
||||
$out .= '<label class="';
|
||||
if ( !$this -> params['inline'] )
|
||||
$out .= 'col-lg-4 ';
|
||||
if ( $this -> params['inline'] )
|
||||
$out .= 'col-12 mb5 ';
|
||||
$out .= 'control-label">' . $this -> params['label'] . ':</label>';
|
||||
$out .= '<div class="';
|
||||
if ( !$this -> params['inline'] )
|
||||
$out .= 'col-lg-8';
|
||||
if ( $this -> params['inline'] )
|
||||
$out .= 'col-12 ';
|
||||
$out .= '">';
|
||||
}
|
||||
|
||||
$out .= '<input ';
|
||||
$out .= 'type="' . $this -> params['type'] . '" ';
|
||||
|
||||
if ( $this -> params['id'] )
|
||||
$out .= 'id="' . $this -> params['id'] . '" ';
|
||||
|
||||
if ( $this -> params['class'] or $this -> params['label'] )
|
||||
{
|
||||
if ( $this -> params['label'] )
|
||||
$out .= 'class="' . $this -> params['class'] . ' form-control" ';
|
||||
else if ( $this -> params['class'] )
|
||||
$out .= 'class="' . $this -> params['class'] . '" ';
|
||||
}
|
||||
|
||||
$out .= 'name="' . $this -> params['name'] . '" ';
|
||||
$out .= 'value="' . $this -> secureHTML( $this -> params['value'] ) . '" ';
|
||||
|
||||
if ( $this -> params['style'] )
|
||||
$out .= 'style="' . $this -> params['style'] . '" ';
|
||||
|
||||
if ( $this -> params['js'] )
|
||||
$out .= 'onchange="' . htmlspecialchars( $this -> params['js'] ) . '" ';
|
||||
|
||||
if ( $this -> params['js_key'] )
|
||||
$out .= 'onkeyup="' . htmlspecialchars( $this -> params['js_key'] ) . '" ';
|
||||
|
||||
if ( $this -> params['readonly'] )
|
||||
$out .= 'readonly="readonly" ';
|
||||
|
||||
if ( $this -> params['autocomplete'] == 'off' )
|
||||
$out .= 'autocomplete="off" ';
|
||||
|
||||
$out .= ' />';
|
||||
|
||||
if ( $this -> params['label'] )
|
||||
{
|
||||
$out .= '</div>';
|
||||
$out .= '</div>';
|
||||
}
|
||||
|
||||
echo $out;
|
||||
8
admin/templates/html/panel.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<div class="panel <?= $this -> params['class'];?>">
|
||||
<div class="panel-heading">
|
||||
<span class="panel-title"><?= $this -> params['title'];?></span>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?= $this -> params['content'];?>
|
||||
</div>
|
||||
</div>
|
||||
56
admin/templates/html/select.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?
|
||||
if ( $this -> params['label'] )
|
||||
{
|
||||
$out .= '<div class="form-group row ';
|
||||
if ( $this -> params['inline'] )
|
||||
$out .= 'pl10 pr10';
|
||||
$out .= '">';
|
||||
$out .= '<label class="';
|
||||
if ( !$this -> params['inline'] )
|
||||
$out .= 'col-lg-4 ';
|
||||
if ( $this -> params['inline'] )
|
||||
$out .= 'mb5 ';
|
||||
$out .= 'control-label">' . $this -> params['label'] . ':</label>';
|
||||
$out .= '<div class="';
|
||||
if ( !$this -> params['inline'] )
|
||||
$out .= 'col-lg-8';
|
||||
$out .= '">';
|
||||
}
|
||||
|
||||
$out .= '<select ';
|
||||
|
||||
if ( $this -> params['id'] )
|
||||
$out .= 'id="' . $this -> params['id'] . '" ';
|
||||
|
||||
if ( $this -> params['class'] or $this -> params['label'] )
|
||||
{
|
||||
if ( $this -> params['label'] )
|
||||
$out .= 'class="' . $this -> params['class'] . ' form-control" ';
|
||||
else if ( $this -> params['class'] )
|
||||
$out .= 'class="' . $this -> params['class'] . '" ';
|
||||
}
|
||||
|
||||
$out .= 'name="' . $this -> params['name'] . '" ';
|
||||
|
||||
if ( $this -> params['style'] )
|
||||
$out .= 'style="' . $this -> params['style'] . '" ';
|
||||
|
||||
$out .= '>';
|
||||
|
||||
if ( $this -> params['empty'] )
|
||||
$out .= '<option value="">--- ' . mb_strtolower( $this -> params['label'], 'UTF-8' ) . ' ---</option>';
|
||||
|
||||
if ( is_array( $this -> params['values'] ) ) foreach ( $this -> params['values'] as $key => $val )
|
||||
{
|
||||
$out .= '<option value="' . $key . '"'; if ( $key == $this -> params['value'] ) $out .= 'selected="selected"'; $out .='>' . $val . '</option>';
|
||||
}
|
||||
|
||||
$out .= '</select>';
|
||||
|
||||
if ( $this -> params['label'] )
|
||||
{
|
||||
$out .= '</div>';
|
||||
$out .= '</div>';
|
||||
}
|
||||
|
||||
echo $out;
|
||||
54
admin/templates/html/textarea.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?
|
||||
if ( $this -> params['label'] )
|
||||
{
|
||||
$out .= '<div class="form-group row ';
|
||||
if ( $this -> params['inline'] )
|
||||
$out .= 'pl10 pr10';
|
||||
$out .= '">';
|
||||
$out .= '<label class="';
|
||||
if ( !$this -> params['inline'] )
|
||||
$out .= 'col-lg-4 ';
|
||||
if ( $this -> params['inline'] )
|
||||
$out .= 'col-12 mb5 ';
|
||||
$out .= 'control-label">' . $this -> params['label'] . ':</label>';
|
||||
$out .= '<div class="';
|
||||
if ( !$this -> params['inline'] )
|
||||
$out .= 'col-lg-8';
|
||||
if ( $this -> params['inline'] )
|
||||
$out .= 'col-12 ';
|
||||
$out .= '">';
|
||||
}
|
||||
|
||||
$out .= '<textarea ';
|
||||
|
||||
if ( $this -> params['id'] )
|
||||
$out .= 'id="' . $this -> params['id'] . '" ';
|
||||
|
||||
if ( $this -> params['class'] or $this -> params['label'] )
|
||||
{
|
||||
if ( $this -> params['label'] )
|
||||
$out .= 'class="' . $this -> params['class'] . ' form-control" ';
|
||||
else if ( $this -> params['class'] )
|
||||
$out .= 'class="' . $this -> params['class'] . '" ';
|
||||
}
|
||||
|
||||
if ( $this -> params['js'] )
|
||||
$out .= 'onchange="' . htmlspecialchars( $this -> params['js'] ) . '" ';
|
||||
|
||||
if ( $this -> params['js_key'] )
|
||||
$out .= 'onkeyup="' . htmlspecialchars( $this -> params['js_key'] ) . '" ';
|
||||
|
||||
$out .= 'name="' . $this -> params['name'] . '" ';
|
||||
|
||||
if ( $this -> params['style'] )
|
||||
$out .= 'style="' . $this -> params['style'] . '" ';
|
||||
|
||||
$out .= ' rows="' . $this -> params['rows'] . '">' . $this -> secureHTML( $this -> params['value'] ) . '</textarea>';
|
||||
|
||||
if ( $this -> params['label'] )
|
||||
{
|
||||
$out .= '</div>';
|
||||
$out .= '</div>';
|
||||
}
|
||||
|
||||
echo $out;
|
||||
247
admin/templates/integrations/apilo-settings.php
Normal file
@@ -0,0 +1,247 @@
|
||||
<div class="panel panel-danger">
|
||||
<div class="panel-heading">
|
||||
<span class="panel-title">Ustawienia apilo.com</span>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group mb10">
|
||||
<label class="col-lg-3 control-label" for="inputDefault">Włącz synchronizację z apilo.com</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="bs-component">
|
||||
<div class="input-group">
|
||||
<select class="form-control" id="enabled" name="enabled">
|
||||
<option value="">--- wybierz ---</option>
|
||||
<option value="0" <? if ( !$this -> settings['enabled'] ):?>selected<? endif;?>>nie</option>
|
||||
<option value="1" <? if ( $this -> settings['enabled'] ):?>selected<? endif;?>>tak</option>
|
||||
</select>
|
||||
<span class="input-group-addon cursor" field-id="enabled">
|
||||
<i class="fa fa-save"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb10">
|
||||
<label class="col-lg-3 control-label" for="inputDefault">Włącz synchronizację produktów</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="bs-component">
|
||||
<div class="input-group">
|
||||
<select class="form-control" id="sync_products" name="sync_products">
|
||||
<option value="">--- wybierz ---</option>
|
||||
<option value="0" <? if ( !$this -> settings['sync_products'] ):?>selected<? endif;?>>nie</option>
|
||||
<option value="1" <? if ( $this -> settings['sync_products'] ):?>selected<? endif;?>>tak</option>
|
||||
</select>
|
||||
<span class="input-group-addon cursor" field-id="sync_products">
|
||||
<i class="fa fa-save"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb10">
|
||||
<label class="col-lg-3 control-label" for="inputDefault">Włącz synchronizację zamówień</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="bs-component">
|
||||
<div class="input-group">
|
||||
<select class="form-control" id="sync_orders" name="sync_orders">
|
||||
<option value="">--- wybierz ---</option>
|
||||
<option value="0" <? if ( !$this -> settings['sync_orders'] ):?>selected<? endif;?>>nie</option>
|
||||
<option value="1" <? if ( $this -> settings['sync_orders'] ):?>selected<? endif;?>>tak</option>
|
||||
</select>
|
||||
<span class="input-group-addon cursor" field-id="sync_orders">
|
||||
<i class="fa fa-save"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label" for="inputDefault">Data rozpoczęcia synchronizacji zamówień</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="bs-component">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="sync_orders_date_start" name="sync_orders_date_start" placeholder="" value="<?= $this -> settings['sync_orders_date_start'];?>">
|
||||
<span class="input-group-addon cursor" field-id="sync_orders_date_start">
|
||||
<i class="fa fa-save"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb10">
|
||||
<label class="col-lg-3 control-label" for="inputDefault">Platforma</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="bs-component">
|
||||
<div class="input-group">
|
||||
<?
|
||||
$platform_list = unserialize( $this -> settings['platform-list'] );
|
||||
?>
|
||||
<select class="form-control" id="platform-id" name="platform-id">
|
||||
<option value="">--- wybierz platformę ---</option>
|
||||
<? foreach ( $platform_list as $platform ):?>
|
||||
<option value="<?= $platform['id'];?>" <? if ( $this -> settings['platform-id'] == $platform['id'] ):?>selected<? endif;?>><?= $platform['name'];?> <?= $platform['description'];?></option>
|
||||
<? endforeach;?>
|
||||
</select>
|
||||
<span class="input-group-addon cursor" field-id="platform-id">
|
||||
<i class="fa fa-save"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb10">
|
||||
<label class="col-lg-3 control-label" for="inputDefault">Client ID</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="bs-component">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="client-id" name="client-id" placeholder="" value="<?= $this -> settings['client-id'];?>">
|
||||
<span class="input-group-addon cursor" field-id="client-id">
|
||||
<i class="fa fa-save"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb10">
|
||||
<label class="col-lg-3 control-label" for="inputDefault">Client Secret</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="bs-component">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="client-secret" name="client-secret" placeholder="" value="<?= $this -> settings['client-secret'];?>">
|
||||
<span class="input-group-addon cursor" field-id="client-secret">
|
||||
<i class="fa fa-save"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb10">
|
||||
<label class="col-lg-3 control-label" for="inputDefault">ID cennika</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="bs-component">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="pricelist_id" name="pricelist_id" placeholder="" value="<?= $this -> settings['pricelist_id'];?>">
|
||||
<span class="input-group-addon cursor" field-id="pricelist_id">
|
||||
<i class="fa fa-save"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label" for="inputDefault">Authorization Code</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="bs-component">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="authorization-code" name="authorization-code" placeholder="" value="<?= $this -> settings['authorization-code'];?>" <? if ( $this -> settings['access-token'] ):?>readonly<? endif;?>>
|
||||
<? if ( !$this -> settings['access-token'] ):?>
|
||||
<span class="input-group-addon cursor" field-id="authorization-code">
|
||||
<i class="fa fa-save"></i>
|
||||
</span>
|
||||
<? endif;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<? if ( $this -> settings['access-token'] ):?>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label" for="inputDefault">Access Token</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="bs-component">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="access-token" name="access-token" placeholder="" value="<?= $this -> settings['access-token'];?>" readonly>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<? if ( $this -> settings['access-token-expire-at'] ):?>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label" for="inputDefault">Access Token Expire At</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="bs-component">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="access-token-expire-at" name="access-token-expire-at" placeholder="" value="<?= $this -> settings['access-token-expire-at'];?>" readonly>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<? if ( $this -> settings['refresh-token'] ):?>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label" for="inputDefault">Refresh Token</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="bs-component">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="refresh-token" name="refresh-token" placeholder="" value="<?= $this -> settings['refresh-token'];?>" readonly>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<? endif;?>
|
||||
<? if ( $this -> settings['refresh-token-expire-at'] ):?>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label" for="inputDefault">Refresh Token Expire At</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="bs-component">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="refresh-token-expire-at" name="refresh-token-expire-at" placeholder="" value="<?= $this -> settings['refresh-token-expire-at'];?>" readonly>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<? endif;?>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<? if ( !$this -> settings['access-token'] ):?>
|
||||
<a href="#" class="btn btn-primary btn-block apilo-authorization">Autoryzuj się w apilo.com</a>
|
||||
<? else:?>
|
||||
<a href="/admin/integrations/get_payment_types_list/" class="btn btn-primary btn-block">Pobierz listę metod płatności</a>
|
||||
<a href="/admin/integrations/get_carrier_account_list/" class="btn btn-primary btn-block">Pobierz listę kont przewoźników</a>
|
||||
<a href="/admin/integrations/get_status_types_list/" class="btn btn-primary btn-block">Pobierz statusy zamówień</a>
|
||||
<a href="/admin/integrations/get_platform_list/" class="btn btn-primary btn-block">Pobierz listę platform</a>
|
||||
<? endif;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$( 'body' ).on( 'click', '.apilo-authorization', function() {
|
||||
$.ajax({
|
||||
url: '/admin/integrations/apilo_authorization/',
|
||||
type: 'POST',
|
||||
success: function( response ) {
|
||||
response = JSON.parse( response );
|
||||
if ( response.status == 'ok' ) {
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('body').on('click', '.input-group-addon', function() {
|
||||
var field_id = $(this).attr('field-id');
|
||||
var value = $('#' + field_id).val();
|
||||
$.ajax({
|
||||
url: '/admin/integrations/apilo_settings_save/',
|
||||
type: 'POST',
|
||||
data: {
|
||||
field_id: field_id,
|
||||
value: value
|
||||
},
|
||||
success: function(response) {
|
||||
response = JSON.parse(response);
|
||||
if (response.status == 'ok') {
|
||||
$('#' + field_id).val(response.value);
|
||||
$('#' + field_id).closest('.form-group').addClass('has-success');
|
||||
setTimeout(function() {
|
||||
$('#' + field_id).closest('.form-group').removeClass('has-success');
|
||||
}, 5000);
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
});
|
||||
</script>
|
||||
139
admin/templates/integrations/baselinker-settings.php
Normal file
@@ -0,0 +1,139 @@
|
||||
<div class="panel panel-danger">
|
||||
<div class="panel-heading">
|
||||
<span class="panel-title">Ustawienia baselinker.com</span>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label" for="inputDefault">Baselinker API</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="bs-component">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="api_code" name="api_code" placeholder="" value="<?= $this -> settings['api_code'];?>">
|
||||
<span class="input-group-addon cursor" field-id="api_code">
|
||||
<i class="fa fa-save"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- magazyn -->
|
||||
<? $storages_list = unserialize( $this -> settings['storages_list'] );?>
|
||||
<div class="form-group mb10">
|
||||
<label class="col-lg-3 control-label" for="inputDefault">Magazyn</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="bs-component">
|
||||
<div class="input-group">
|
||||
<select name="storage_id" id="storage_id" class="form-control">
|
||||
<option value="">--- wybierz ---</option>
|
||||
<? foreach ( $storages_list as $storage ):?>
|
||||
<option value="<?= $storage['storage_id'];?>" <? if ( $this -> settings['storage_id'] == $storage['storage_id'] ):?>selected<? endif;?>><?= $storage['name'];?></option>
|
||||
<? endforeach;?>
|
||||
</select>
|
||||
<span class="input-group-addon cursor" field-id="storage_id">
|
||||
<i class="fa fa-save"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb10">
|
||||
<label class="col-lg-3 control-label" for="inputDefault">Włącz synchronizację z baselinker.com</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="bs-component">
|
||||
<div class="input-group">
|
||||
<select class="form-control" id="enabled" name="enabled">
|
||||
<option value="">--- wybierz ---</option>
|
||||
<option value="0" <? if ( !$this -> settings['enabled'] ):?>selected<? endif;?>>nie</option>
|
||||
<option value="1" <? if ( $this -> settings['enabled'] ):?>selected<? endif;?>>tak</option>
|
||||
</select>
|
||||
<span class="input-group-addon cursor" field-id="enabled">
|
||||
<i class="fa fa-save"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb10">
|
||||
<label class="col-lg-3 control-label" for="inputDefault">Włącz synchronizację produktów</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="bs-component">
|
||||
<div class="input-group">
|
||||
<select class="form-control" id="sync_products" name="sync_products">
|
||||
<option value="">--- wybierz ---</option>
|
||||
<option value="0" <? if ( !$this -> settings['sync_products'] ):?>selected<? endif;?>>nie</option>
|
||||
<option value="1" <? if ( $this -> settings['sync_products'] ):?>selected<? endif;?>>tak</option>
|
||||
</select>
|
||||
<span class="input-group-addon cursor" field-id="sync_products">
|
||||
<i class="fa fa-save"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb10">
|
||||
<label class="col-lg-3 control-label" for="inputDefault">Włącz synchronizację zamówień</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="bs-component">
|
||||
<div class="input-group">
|
||||
<select class="form-control" id="sync_orders" name="sync_orders">
|
||||
<option value="">--- wybierz ---</option>
|
||||
<option value="0" <? if ( !$this -> settings['sync_orders'] ):?>selected<? endif;?>>nie</option>
|
||||
<option value="1" <? if ( $this -> settings['sync_orders'] ):?>selected<? endif;?>>tak</option>
|
||||
</select>
|
||||
<span class="input-group-addon cursor" field-id="sync_orders">
|
||||
<i class="fa fa-save"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label" for="inputDefault">Data rozpoczęcia synchronizacji zamówień</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="bs-component">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="sync_orders_date_start" name="sync_orders_date_start" placeholder="" value="<?= $this -> settings['sync_orders_date_start'];?>">
|
||||
<span class="input-group-addon cursor" field-id="sync_orders_date_start">
|
||||
<i class="fa fa-save"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<a href="/admin/integrations/baselinker_get_order_status_list/" class="btn btn-primary btn-block">Pobierz statusy zamówień</a>
|
||||
<!-- pobierz listę magazynów -->
|
||||
<a href="/admin/integrations/baselinker_get_storages_list/" class="btn btn-primary btn-block">Pobierz listę magazynów</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$('body').on('click', '.input-group-addon', function() {
|
||||
var field_id = $(this).attr('field-id');
|
||||
var value = $('#' + field_id).val();
|
||||
$.ajax({
|
||||
url: '/admin/integrations/baselinker_settings_save/',
|
||||
type: 'POST',
|
||||
data: {
|
||||
field_id: field_id,
|
||||
value: value
|
||||
},
|
||||
success: function(response) {
|
||||
response = JSON.parse(response);
|
||||
if (response.status == 'ok') {
|
||||
$('#' + field_id).val(response.value);
|
||||
$('#' + field_id).closest('.form-group').addClass('has-success');
|
||||
setTimeout(function() {
|
||||
$('#' + field_id).closest('.form-group').removeClass('has-success');
|
||||
}, 5000);
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
});
|
||||
</script>
|
||||
119
admin/templates/integrations/sellasist-settings.php
Normal file
@@ -0,0 +1,119 @@
|
||||
<div class="panel panel-danger">
|
||||
<div class="panel-heading">
|
||||
<span class="panel-title">Ustawienia sellasist.com</span>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label" for="inputDefault">Sellasist API</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="bs-component">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="api_code" name="api_code" placeholder="" value="<?= $this -> settings['api_code'];?>">
|
||||
<span class="input-group-addon cursor" field-id="api_code">
|
||||
<i class="fa fa-save"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb10">
|
||||
<label class="col-lg-3 control-label" for="inputDefault">Włącz synchronizację z sellasist.com</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="bs-component">
|
||||
<div class="input-group">
|
||||
<select class="form-control" id="enabled" name="enabled">
|
||||
<option value="">--- wybierz ---</option>
|
||||
<option value="0" <? if ( !$this -> settings['enabled'] ):?>selected<? endif;?>>nie</option>
|
||||
<option value="1" <? if ( $this -> settings['enabled'] ):?>selected<? endif;?>>tak</option>
|
||||
</select>
|
||||
<span class="input-group-addon cursor" field-id="enabled">
|
||||
<i class="fa fa-save"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb10">
|
||||
<label class="col-lg-3 control-label" for="inputDefault">Włącz synchronizację produktów</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="bs-component">
|
||||
<div class="input-group">
|
||||
<select class="form-control" id="sync_products" name="sync_products">
|
||||
<option value="">--- wybierz ---</option>
|
||||
<option value="0" <? if ( !$this -> settings['sync_products'] ):?>selected<? endif;?>>nie</option>
|
||||
<option value="1" <? if ( $this -> settings['sync_products'] ):?>selected<? endif;?>>tak</option>
|
||||
</select>
|
||||
<span class="input-group-addon cursor" field-id="sync_products">
|
||||
<i class="fa fa-save"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb10">
|
||||
<label class="col-lg-3 control-label" for="inputDefault">Włącz synchronizację zamówień</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="bs-component">
|
||||
<div class="input-group">
|
||||
<select class="form-control" id="sync_orders" name="sync_orders">
|
||||
<option value="">--- wybierz ---</option>
|
||||
<option value="0" <? if ( !$this -> settings['sync_orders'] ):?>selected<? endif;?>>nie</option>
|
||||
<option value="1" <? if ( $this -> settings['sync_orders'] ):?>selected<? endif;?>>tak</option>
|
||||
</select>
|
||||
<span class="input-group-addon cursor" field-id="sync_orders">
|
||||
<i class="fa fa-save"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label" for="inputDefault">Data rozpoczęcia synchronizacji zamówień</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="bs-component">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="sync_orders_date_start" name="sync_orders_date_start" placeholder="" value="<?= $this -> settings['sync_orders_date_start'];?>">
|
||||
<span class="input-group-addon cursor" field-id="sync_orders_date_start">
|
||||
<i class="fa fa-save"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<a href="/admin/integrations/get_sellasist_status_types_list/" class="btn btn-primary btn-block">Pobierz statusy zamówień</a>
|
||||
<a href="/admin/integrations/get_sellasist_payment_types_list/" class="btn btn-primary btn-block">Pobierz metody płatności</a>
|
||||
<a href="/admin/integrations/get_sellasist_shipments_list/" class="btn btn-primary btn-block">Pobierz metody dostawy</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$('body').on('click', '.input-group-addon', function() {
|
||||
var field_id = $(this).attr('field-id');
|
||||
var value = $('#' + field_id).val();
|
||||
$.ajax({
|
||||
url: '/admin/integrations/sellasist_settings_save/',
|
||||
type: 'POST',
|
||||
data: {
|
||||
field_id: field_id,
|
||||
value: value
|
||||
},
|
||||
success: function(response) {
|
||||
response = JSON.parse(response);
|
||||
if (response.status == 'ok') {
|
||||
$('#' + field_id).val(response.value);
|
||||
$('#' + field_id).closest('.form-group').addClass('has-success');
|
||||
setTimeout(function() {
|
||||
$('#' + field_id).closest('.form-group').removeClass('has-success');
|
||||
}, 5000);
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
});
|
||||
</script>
|
||||
126
admin/templates/integrations/shoppro-settings.php
Normal file
@@ -0,0 +1,126 @@
|
||||
<div class="panel panel-danger">
|
||||
<div class="panel-heading">
|
||||
<span class="panel-title">Ustawienia shopPRO</span>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group mb10">
|
||||
<label class="col-lg-3 control-label" for="inputDefault">Włącz integrację z innym sklepem ShopPRO</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="bs-component">
|
||||
<div class="input-group">
|
||||
<select class="form-control" id="enabled" name="enabled">
|
||||
<option value="">--- wybierz ---</option>
|
||||
<option value="0" <? if ( !$this -> settings['enabled'] ):?>selected<? endif;?>>nie</option>
|
||||
<option value="1" <? if ( $this -> settings['enabled'] ):?>selected<? endif;?>>tak</option>
|
||||
</select>
|
||||
<span class="input-group-addon cursor" field-id="enabled">
|
||||
<i class="fa fa-save"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label" for="inputDefault">DB host</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="bs-component">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="db_host" name="db_host" placeholder="" value="<?= $this -> settings['db_host'];?>">
|
||||
<span class="input-group-addon cursor" field-id="db_host">
|
||||
<i class="fa fa-save"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- DB użytkownik -->
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label" for="inputDefault">DB użytkownik</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="bs-component">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="db_user" name="db_user" placeholder="" value="<?= $this -> settings['db_user'];?>">
|
||||
<span class="input-group-addon cursor" field-id="db_user">
|
||||
<i class="fa fa-save"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- DB hasło -->
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label" for="inputDefault">DB hasło</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="bs-component">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="db_password" name="db_password" placeholder="" value="<?= $this -> settings['db_password'];?>">
|
||||
<span class="input-group-addon cursor" field-id="db_password">
|
||||
<i class="fa fa-save"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- DB nazwa bazy -->
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label" for="inputDefault">DB nazwa</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="bs-component">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="db_name" name="db_name" placeholder="" value="<?= $this -> settings['db_name'];?>">
|
||||
<span class="input-group-addon cursor" field-id="db_name">
|
||||
<i class="fa fa-save"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- domena -->
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label" for="inputDefault">domena</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="bs-component">
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" id="domain" name="domain" placeholder="" value="<?= $this -> settings['domain'];?>">
|
||||
<span class="input-group-addon cursor" field-id="domain">
|
||||
<i class="fa fa-save"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$('body').on('click', '.input-group-addon', function() {
|
||||
var field_id = $(this).attr('field-id');
|
||||
var value = $('#' + field_id).val();
|
||||
$.ajax({
|
||||
url: '/admin/integrations/shoppro_settings_save/',
|
||||
type: 'POST',
|
||||
data: {
|
||||
field_id: field_id,
|
||||
value: value
|
||||
},
|
||||
success: function(response) {
|
||||
response = JSON.parse(response);
|
||||
if (response.status == 'ok') {
|
||||
$('#' + field_id).val(response.value);
|
||||
$('#' + field_id).closest('.form-group').addClass('has-success');
|
||||
setTimeout(function() {
|
||||
$('#' + field_id).closest('.form-group').removeClass('has-success');
|
||||
}, 5000);
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
});
|
||||
</script>
|
||||
101
admin/templates/languages/language-edit.php
Normal file
@@ -0,0 +1,101 @@
|
||||
<?
|
||||
global $db;
|
||||
|
||||
ob_start();
|
||||
?>
|
||||
<?
|
||||
if ( $this -> language['id'] )
|
||||
{
|
||||
echo \Html::input(
|
||||
array(
|
||||
'type' => 'hidden',
|
||||
'name' => 'id',
|
||||
'value' => $this -> language['id']
|
||||
)
|
||||
);
|
||||
echo \Html::input(
|
||||
array(
|
||||
'type' => 'hidden',
|
||||
'name' => 'o',
|
||||
'value' => $this -> language['o']
|
||||
)
|
||||
);
|
||||
echo \Html::input(
|
||||
array(
|
||||
'label' => 'Język',
|
||||
'type' => 'text',
|
||||
'class' => 'require',
|
||||
'name' => 'name',
|
||||
'value' => $this -> language['name']
|
||||
)
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo \Html::input(
|
||||
array(
|
||||
'type' => 'hidden',
|
||||
'name' => 'o',
|
||||
'value' => $this -> order + 1
|
||||
)
|
||||
);
|
||||
echo \Html::input(
|
||||
array(
|
||||
'label' => 'Język',
|
||||
'type' => 'text',
|
||||
'class' => 'require',
|
||||
'name' => 'name'
|
||||
)
|
||||
);
|
||||
echo \Html::input(
|
||||
array(
|
||||
'label' => 'ID (2 znaki)',
|
||||
'class' => 'require',
|
||||
'type' => 'text',
|
||||
'name' => 'id'
|
||||
)
|
||||
);
|
||||
}
|
||||
?>
|
||||
<?= \Html::input_switch(
|
||||
array(
|
||||
'label' => 'Aktywny',
|
||||
'name' => 'status',
|
||||
'checked' => $this -> language['status'] == 1 ? true : false
|
||||
)
|
||||
);?>
|
||||
<?= \Html::input_switch(
|
||||
array(
|
||||
'label' => 'Domyślny',
|
||||
'name' => 'start',
|
||||
'checked' => $this -> language['start'] == 1 ? true : false
|
||||
)
|
||||
);?>
|
||||
<?
|
||||
$out = ob_get_clean();
|
||||
|
||||
$grid = new \gridEdit;
|
||||
$grid -> id = 'language-edit';
|
||||
$grid -> gdb_opt = $gdb;
|
||||
$grid -> include_plugins = true;
|
||||
$grid -> title = 'Edycja języka';
|
||||
$grid -> external_code = $out;
|
||||
$grid -> actions = [
|
||||
'save' => [ 'url' => '/admin/languages/language_save/', 'back_url' => '/admin/languages/view_list/' ],
|
||||
'cancel' => [ 'url' => '/admin/languages/view_list/' ]
|
||||
];
|
||||
$grid -> persist_edit = true;
|
||||
$grid -> id_param = 'id';
|
||||
echo $grid -> draw();
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
$( function()
|
||||
{
|
||||
disable_menu();
|
||||
|
||||
$( 'input[type="text"].date' ).datetimepicker({
|
||||
format: "YYYY-MM-DD",
|
||||
pickTime: false
|
||||
});
|
||||
});
|
||||
</script>
|
||||
58
admin/templates/languages/languages-list.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
global $gdb;
|
||||
|
||||
$grid = new \grid( 'pp_langs' );
|
||||
$grid -> gdb_opt = $gdb;
|
||||
$grid -> order = [ 'column' => 'o', 'type' => 'ASC' ];
|
||||
$grid -> search = [
|
||||
[ 'name' => 'Język', 'db' => 'name', 'type' => 'text' ],
|
||||
[ 'name' => 'Aktywny', 'db' => 'status', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ],
|
||||
[ 'name' => 'Domyślny', 'db' => 'start', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ]
|
||||
];
|
||||
$grid -> columns_view = [
|
||||
[
|
||||
'name' => 'Lp.',
|
||||
'th' => [ 'class' => 'g-lp' ],
|
||||
'td' => [ 'class' => 'g-center' ],
|
||||
'autoincrement' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Domyślny',
|
||||
'db' => 'start',
|
||||
'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ],
|
||||
'td' => [ 'class' => 'g-center' ],
|
||||
'php' => 'if ( [start] ) echo "<span class=\'text-system\'>tak</span>"; else echo "nie";'
|
||||
],
|
||||
[
|
||||
'name' => 'Aktywny',
|
||||
'db' => 'status',
|
||||
'replace' => [ 'array' => [ 0 => '<span style="color: #FF0000;">nie</span>', 1 => 'tak' ] ],
|
||||
'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ],
|
||||
'td' => [ 'class' => 'g-center' ]
|
||||
],
|
||||
[
|
||||
'name' => 'Język',
|
||||
'db' => 'name'
|
||||
],
|
||||
[
|
||||
'name' => 'Edytuj',
|
||||
'action' => [ 'type' => 'edit', 'url' => '/admin/languages/language_edit/id=[id]' ],
|
||||
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
||||
'td' => [ 'class' => 'g-center' ]
|
||||
],
|
||||
[
|
||||
'name' => 'Usuń',
|
||||
'action' => [ 'type' => 'delete', 'url' => '/admin/languages/language_delete/id=[id]' ],
|
||||
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
||||
'td' => [ 'class' => 'g-center' ]
|
||||
]
|
||||
];
|
||||
$grid -> buttons = [
|
||||
[
|
||||
'label' => 'Dodaj język',
|
||||
'url' => '/admin/languages/language_edit/',
|
||||
'icon' => 'fa-plus-circle',
|
||||
'class' => 'btn-success'
|
||||
]
|
||||
];
|
||||
echo $grid -> draw();
|
||||
60
admin/templates/languages/translation-edit.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<?
|
||||
global $db;
|
||||
|
||||
ob_start();
|
||||
?>
|
||||
<?
|
||||
echo \Html::input(
|
||||
array(
|
||||
'type' => 'text',
|
||||
'label' => 'Tekst',
|
||||
'name' => 'text',
|
||||
'class' => 'require',
|
||||
'value' => $this -> translation['text']
|
||||
)
|
||||
);
|
||||
|
||||
if ( is_array( $this -> languages ) ): foreach ( $this -> languages as $language ):
|
||||
echo \Html::input(
|
||||
array(
|
||||
'type' => 'text',
|
||||
'label' => $language['name'],
|
||||
'name' => $language['id'],
|
||||
'value' => $this -> translation[$language['id']]
|
||||
) );
|
||||
endforeach;
|
||||
endif;
|
||||
$out = ob_get_clean();
|
||||
|
||||
$grid = new \gridEdit;
|
||||
$grid -> id = 'translation-edit';
|
||||
$grid -> gdb_opt = $gdb;
|
||||
$grid -> include_plugins = true;
|
||||
$grid -> title = 'Edycja tłumaczenia';
|
||||
$grid -> fields = [
|
||||
[
|
||||
'db' => 'id',
|
||||
'type' => 'hidden',
|
||||
'value' => $this -> translation['id']
|
||||
]
|
||||
];
|
||||
$grid -> external_code = $out;
|
||||
$grid -> actions = [
|
||||
'save' => [ 'url' => '/admin/languages/translation_save/', 'back_url' => '/admin/languages/translation_list/' ],
|
||||
'cancel' => [ 'url' => '/admin/languages/translation_list/' ]
|
||||
];
|
||||
$grid -> persist_edit = true;
|
||||
$grid -> id_param = 'id';
|
||||
echo $grid -> draw();
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
$(function ()
|
||||
{
|
||||
disable_menu();
|
||||
|
||||
$('input[type="text"].date').datetimepicker({
|
||||
format: "YYYY-MM-DD",
|
||||
pickTime: false
|
||||
});
|
||||
});
|
||||
</script>
|
||||
44
admin/templates/languages/translations-list.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
global $gdb;
|
||||
|
||||
$grid = new \grid( 'pp_langs_translations' );
|
||||
$grid -> gdb_opt = $gdb;
|
||||
$grid -> order = [ 'column' => 'text', 'type' => 'ASC' ];
|
||||
$grid -> search = [
|
||||
[ 'name' => 'Tekst', 'db' => 'text', 'type' => 'text' ]
|
||||
];
|
||||
$grid -> columns_view = [
|
||||
[
|
||||
'name' => 'Lp.',
|
||||
'th' => [ 'class' => 'g-lp' ],
|
||||
'td' => [ 'class' => 'g-center' ],
|
||||
'autoincrement' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Tekst',
|
||||
'db' => 'text',
|
||||
'php' => 'echo "<a href=\'/admin/languages/translation_edit/id=[id]\'>[text]</a>";',
|
||||
'sort' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Edytuj',
|
||||
'action' => [ 'type' => 'edit', 'url' => '/admin/languages/translation_edit/id=[id]' ],
|
||||
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
||||
'td' => [ 'class' => 'g-center' ]
|
||||
],
|
||||
[
|
||||
'name' => 'Usuń',
|
||||
'action' => [ 'type' => 'delete', 'url' => '/admin/languages/translation_delete/id=[id]' ],
|
||||
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
||||
'td' => [ 'class' => 'g-center' ]
|
||||
]
|
||||
];
|
||||
$grid -> buttons = [
|
||||
[
|
||||
'label' => 'Dodaj tłumaczenie',
|
||||
'url' => '/admin/languages/translation_edit/',
|
||||
'icon' => 'fa-plus-circle',
|
||||
'class' => 'btn-success'
|
||||
]
|
||||
];
|
||||
echo $grid -> draw();
|
||||
253
admin/templates/layouts/layout-edit.php
Normal file
@@ -0,0 +1,253 @@
|
||||
<link rel="stylesheet" href="/libraries/codemirror/lib/codemirror.css" />
|
||||
<link rel="stylesheet" href="/libraries/codemirror/theme/material.css" />
|
||||
<script type="text/javascript" src="/libraries/jquery-nested-sortable/jquery.mjs.nestedSortable.js"></script>
|
||||
<script type="text/javascript" src="/libraries/codemirror/lib/codemirror.js"></script>
|
||||
<script type="text/javascript" src="/libraries/codemirror/mode/css/css.js"></script>
|
||||
<script type="text/javascript" src="/libraries/codemirror/mode/xml/xml.js"></script>
|
||||
<script type="text/javascript" src="/libraries/codemirror/mode/javascript/javascript.js"></script>
|
||||
<script type="text/javascript" src="/libraries/codemirror/mode/htmlmixed/htmlmixed.js"></script>
|
||||
<script type="text/javascript" src="/libraries/codemirror/addon/mode/multiplex.js"></script>
|
||||
<script type="text/javascript">
|
||||
$( function()
|
||||
{
|
||||
var code_html = CodeMirror.fromTextArea( document.getElementById( "html" ),{
|
||||
lineWrapping: true,
|
||||
mode: "text/html"
|
||||
});
|
||||
code_html.on( 'change', function(cm) {
|
||||
$( '#html' ).val( cm.getValue() );
|
||||
});
|
||||
code_html.setOption( "theme", 'material' );
|
||||
code_html.setSize( null, 700 );
|
||||
|
||||
var code_css = CodeMirror.fromTextArea( document.getElementById( "css" ),{
|
||||
lineWrapping: true,
|
||||
mode: "css"
|
||||
});
|
||||
code_css.on( 'change', function(cm) {
|
||||
$( '#css' ).val( cm.getValue() );
|
||||
});
|
||||
code_css.setOption( "theme", 'material' );
|
||||
code_css.setSize( null, 700 );
|
||||
|
||||
var code_js = CodeMirror.fromTextArea( document.getElementById( "js" ),{
|
||||
lineWrapping: true,
|
||||
mode: "javascript"
|
||||
});
|
||||
code_js.on( 'change', function(cm) {
|
||||
$( '#js' ).val( cm.getValue() );
|
||||
});
|
||||
code_js.setOption( "theme", 'material' );
|
||||
code_js.setSize( null, 700 );
|
||||
|
||||
disable_menu();
|
||||
|
||||
$( '#layout-tabs' ).easyResponsiveTabs(
|
||||
{
|
||||
width: 'auto',
|
||||
fit: true,
|
||||
tabidentify: 'layout-tabs',
|
||||
type: 'vertical'
|
||||
});
|
||||
|
||||
$( 'body' ).on( 'click', '.select-page', function()
|
||||
{
|
||||
$( this ).parent( 'div' ).children( 'div.icheckbox_minimal-blue' ).children( 'input' ).iCheck( 'toggle' );
|
||||
});
|
||||
|
||||
$('ol.sortable').nestedSortable(
|
||||
{
|
||||
forcePlaceholderSize: true,
|
||||
handle: 'div',
|
||||
helper: 'clone',
|
||||
items: 'li',
|
||||
opacity: .6,
|
||||
placeholder: 'placeholder',
|
||||
revert: 250,
|
||||
tabSize: 25,
|
||||
tolerance: 'pointer',
|
||||
toleranceElement: '> div',
|
||||
maxLevels: 3,
|
||||
isTree: true,
|
||||
expandOnHover: 700,
|
||||
isAllowed: function()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$( '.disclose' ).on( 'click', function()
|
||||
{
|
||||
$( this ).closest( 'li' ).toggleClass( 'sort-collapsed' ).toggleClass( 'sort-expanded' );
|
||||
});
|
||||
|
||||
$( '.disclose' ).mousedown( function(e)
|
||||
{
|
||||
if ( e.which === 1 ) {
|
||||
if ( $( this ).parent( 'div' ).hasClass( 'content_menu' ) )
|
||||
{
|
||||
var menu_id = $( this ).parent( 'div' ).parent( 'li' ).attr( 'menu' );
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/admin/ajax.php',
|
||||
data: {
|
||||
a: 'cookie_menus',
|
||||
menu_id: menu_id
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
var page_id = $( this ).parent( 'div' ).parent( 'li' ).attr( 'id' );
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/admin/ajax.php',
|
||||
data: {
|
||||
a: 'cookie_pages',
|
||||
page_id: page_id
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
<?php
|
||||
$array = unserialize( $_COOKIE[ 'cookie_pages' ] );
|
||||
if ( is_array( $array ) ): foreach ( $array as $key => $val ):
|
||||
if ( $val ):
|
||||
?>$( '.<?= $key;?>' ).children( 'div' ).children( 'span.disclose' ).click();<?
|
||||
endif;
|
||||
endforeach; endif;
|
||||
|
||||
$array = unserialize( $_COOKIE[ 'cookie_menus' ] );
|
||||
if ( is_array( $array ) ): foreach ( $array as $key => $val ):
|
||||
if ( $val ):
|
||||
?>$( '.menu_<?= $key;?>' ).children( 'div' ).children( 'span.disclose' ).click();<?
|
||||
endif;
|
||||
endforeach; endif;
|
||||
?>
|
||||
|
||||
});
|
||||
</script>
|
||||
<?
|
||||
global $db;
|
||||
|
||||
ob_start();
|
||||
?>
|
||||
<div id="layout-tabs">
|
||||
<ul class="resp-tabs-list layout-tabs">
|
||||
<li><i class="fa fa-wrench"></i>Ustawienia</li>
|
||||
<li><i class="fa fa-html5"></i>HTML</li>
|
||||
<li><i class="fa fa-html5"></i>CSS</li>
|
||||
<li><i class="fa fa-html5"></i>JS</li>
|
||||
</ul>
|
||||
<div class="resp-tabs-container layout-tabs">
|
||||
<div>
|
||||
<?= \Html::input(
|
||||
array(
|
||||
'label' => 'Nazwa',
|
||||
'name' => 'name',
|
||||
'id' => 'name',
|
||||
'value' => $this -> layout['name']
|
||||
)
|
||||
);?>
|
||||
<?= \Html::input_switch(
|
||||
array(
|
||||
'label' => 'Szablon domyślny',
|
||||
'name' => 'status',
|
||||
'checked' => $this -> layout['status'] == 1 ? true : false
|
||||
)
|
||||
);?>
|
||||
<?= \Html::input_switch(
|
||||
array(
|
||||
'label' => 'Szablon domyślny (kategorie)',
|
||||
'name' => 'categories_default',
|
||||
'checked' => $this -> layout['categories_default'] == 1 ? true : false
|
||||
)
|
||||
);?>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-4 control-label">Strony:</label>
|
||||
<div class="col-lg-8">
|
||||
<? if ( is_array( $this -> menus ) ): foreach ( $this -> menus as $menu ):?>
|
||||
<div class="menu_sortable">
|
||||
<ol class="sortable" id="sortable_<?= $menu['id'];?>">
|
||||
<li id="list_<?= $menu['id'];?>" class="menu_<?= $menu['id'];?>" menu="<?= $menu['id'];?>">
|
||||
<div class="context_0 content content_menu" <? if ( !$menu['status'] ) echo 'style="color: #cc0000;"';?>>
|
||||
<span class="disclose"><span></span></span>
|
||||
Menu: <b><?= $menu['name'];?></b>
|
||||
</div>
|
||||
<?= \admin\view\Layouts::subpages_list( \admin\factory\Pages::menu_pages( $menu['id'] ), $this -> layout['pages'] );?>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<? endforeach; endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-4 control-label">Kategorie:</label>
|
||||
<div class="col-lg-8">
|
||||
<div class="menu_sortable">
|
||||
<ol class="sortable" id="sortable">
|
||||
<? if ( is_array( $this -> categories ) ): foreach ( $this -> categories as $category ):?>
|
||||
<li id="list_<?= $category['id'];?>" class="category_<?= $category['id'];?>" category="<?= $category['id'];?>">
|
||||
<div class="context_0 content content_menu">
|
||||
<span class="disclose"><span></span></span>
|
||||
<? if ( !$category['status'] ) echo '<i class="fa fa-ban fa-lg text-danger" title="Kategoria nieaktywna"></i>';?>
|
||||
<input type="checkbox" class="g-checkbox" name="categories[]" value="<?= $category['id'];?>" <? if ( is_array( $this -> layout['categories'] ) and in_array( $category['id'], $this -> layout['categories'] ) ):?>checked="checked"<? endif;?> />
|
||||
<b><?= $category['languages'][$this -> dlang]['title'];?></b>
|
||||
</div>
|
||||
<?= \Tpl::view( 'shop-product/subcategories-list', [
|
||||
'categories' => \admin\factory\ShopCategory::subcategories( $category['id'] ),
|
||||
'product_categories' => $this -> layout['categories'],
|
||||
'dlang' => $this -> dlang
|
||||
] );?>
|
||||
</li>
|
||||
<? endforeach; endif;?>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<textarea name="html" id="html" style="width: 100%; height: 500px; border: 0; padding: 10px; margin: -10px 0 -15px; font-size: 12px; box-sizing: border-box;"><?= htmlspecialchars( $this -> layout['html'] );?></textarea>
|
||||
</div>
|
||||
<div>
|
||||
<textarea name="css" id="css" style="width: 100%; height: 500px; border: 0; padding: 10px; margin: -10px 0 -15px; font-size: 12px; box-sizing: border-box;"><?= htmlspecialchars( $this -> layout['css'] );?></textarea>
|
||||
</div>
|
||||
<div>
|
||||
<textarea name="js" id="js" style="width: 100%; height: 500px; border: 0; padding: 10px; margin: -10px 0 -15px; font-size: 12px; box-sizing: border-box;"><?= htmlspecialchars( $this -> layout['js'] );?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<?
|
||||
$out = ob_get_clean();
|
||||
|
||||
$grid = new \gridEdit;
|
||||
$grid -> id = 'layout-edit';
|
||||
$grid -> gdb_opt = $gdb;
|
||||
$grid -> include_plugins = true;
|
||||
$grid -> title = 'Edycja szablonu';
|
||||
$grid -> fields = [
|
||||
[
|
||||
'db' => 'id',
|
||||
'type' => 'hidden',
|
||||
'value' => $this -> layout['id']
|
||||
]
|
||||
];
|
||||
$grid -> actions = [
|
||||
'save' => [ 'url' => '/admin/layouts/layout_save/', 'back_url' => '/admin/layouts/view_list/' ],
|
||||
'cancel' => [ 'url' => '/admin/layouts/view_list/' ]
|
||||
];
|
||||
$grid -> external_code = $out;
|
||||
$grid -> persist_edit = true;
|
||||
$grid -> id_param = 'id';
|
||||
|
||||
echo $grid -> draw();
|
||||
?>
|
||||
54
admin/templates/layouts/layouts-list.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
global $gdb;
|
||||
|
||||
$grid = new \grid( 'pp_layouts' );
|
||||
$grid -> gdb_opt = $gdb;
|
||||
$grid -> order = [ 'column' => 'name', 'type' => 'ASC' ];
|
||||
$grid -> search = [
|
||||
[ 'name' => 'Nazwa', 'db' => 'name', 'type' => 'text' ],
|
||||
[ 'name' => 'Szablon domyślny', 'db' => 'status', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ]
|
||||
];
|
||||
$grid -> columns_view = [
|
||||
[
|
||||
'name' => 'Lp.',
|
||||
'th' => [ 'class' => 'g-lp' ],
|
||||
'td' => [ 'class' => 'g-center' ],
|
||||
'autoincrement' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Nazwa',
|
||||
'db' => 'name',
|
||||
'php' => 'echo "<a href=\'/admin/layouts/layout_edit/id=[id]\'>[name]</a>";',
|
||||
'sort' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Szablon domyślny',
|
||||
'db' => 'status',
|
||||
'replace' => [ 'array' => [ 0 => 'nie', 1 => '<span class="text-system">tak</span>' ] ],
|
||||
'td' => [ 'class' => 'g-center' ],
|
||||
'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ]
|
||||
],
|
||||
[
|
||||
'name' => 'Szablon domyślny (kategorie)',
|
||||
'db' => 'categories_default',
|
||||
'replace' => [ 'array' => [ 0 => 'nie', 1 => '<span class="text-system">tak</span>' ] ],
|
||||
'td' => [ 'class' => 'g-center' ],
|
||||
'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ]
|
||||
],
|
||||
[
|
||||
'name' => 'Akcja',
|
||||
'action' => [ 'type' => 'edit', 'url' => '/admin/layouts/layout_edit/id=[id]' ],
|
||||
'th' => [ 'class' => 'g-center' ],
|
||||
'td' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ]
|
||||
],
|
||||
[
|
||||
'name' => 'Akcja',
|
||||
'action' => [ 'type' => 'delete', 'url' => '/admin/layouts/layout_delete/id=[id]' ],
|
||||
'th' => [ 'class' => 'g-center' ],
|
||||
'td' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ]
|
||||
]
|
||||
];
|
||||
$grid -> buttons = [
|
||||
[ 'label' => 'Dodaj szablon', 'url' => '/admin/layouts/layout_edit/', 'icon' => 'fa-plus-circle', 'class' => 'btn-success' ]
|
||||
];
|
||||
echo $grid -> draw();
|
||||
16
admin/templates/layouts/subpages-list.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<? if ( is_array( $this -> pages ) ):?>
|
||||
<ol>
|
||||
<? foreach ( $this -> pages as $page ):?>
|
||||
<li id="list_<?= $page['id'];?>" idk="<?= $page['id'];?>" class="list_<?= $page['id'];?>" menu="<?= $page['menu_id'];?>">
|
||||
<div class="content <?= $this -> step < 2 ? $tmp = 'content_page' : $tmp = 'content_page_last_level';?>" <? if ( !$page['status'] ) echo 'style="color: #cc0000;"';?>>
|
||||
<span class="disclose"><span></span></span>
|
||||
<input type="checkbox" class="g-checkbox" name="pages[]" value="<?= $page['id'];?>" <? if ( is_array( $this -> layout_pages ) and in_array( $page['id'], $this -> layout_pages ) ):?>checked="checked"<? endif;?> /><?= $page['title'];?>
|
||||
</div>
|
||||
<?
|
||||
if ( is_array( $page['subpages'] ) )
|
||||
echo \admin\view\Layouts::subpages_list( $page['subpages'], $this -> layout_pages, $page['id'], $this -> step + 1 );
|
||||
?>
|
||||
</li>
|
||||
<? endforeach;?>
|
||||
</ol>
|
||||
<? endif;?>
|
||||
67
admin/templates/newsletter/email-template-edit.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<script type="text/javascript" src="/libraries/ckeditor/ckeditor.js"></script>
|
||||
<script type="text/javascript" src="/libraries/ckeditor/adapters/jquery.js"></script>
|
||||
<?
|
||||
global $db;
|
||||
ob_start();
|
||||
?>
|
||||
<?= \Html::input(
|
||||
array(
|
||||
'label' => 'Nazwa',
|
||||
'name' => 'name',
|
||||
'id' => 'name',
|
||||
'value' => $this -> email_template['name'],
|
||||
'inline' => true,
|
||||
'readonly' => $this -> email_template['is_admin'] ? true : false
|
||||
)
|
||||
);?>
|
||||
<?= \Html::textarea(
|
||||
array(
|
||||
'label' => 'Treść',
|
||||
'name' => 'text',
|
||||
'id' => 'text',
|
||||
'value' => $this ->email_template['text'],
|
||||
'inline' => true
|
||||
)
|
||||
);?>
|
||||
|
||||
<?
|
||||
$out = ob_get_clean();
|
||||
$grid = new \gridEdit;
|
||||
$grid -> id = 'email-templates-edit';
|
||||
$grid -> gdb_opt = $gdb;
|
||||
$grid -> include_plugins = true;
|
||||
$grid -> title = 'Edycja szablonu newslettera';
|
||||
$grid -> fields = [
|
||||
[
|
||||
'db' => 'id',
|
||||
'type' => 'hidden',
|
||||
'value' => $this -> email_template['id']
|
||||
]
|
||||
];
|
||||
$grid -> external_code = $out;
|
||||
$grid -> actions = [
|
||||
'save' => [
|
||||
'url' => '/admin/newsletter/template_save/',
|
||||
'back_url' => $this -> email_template['is_admin'] ? '/admin/newsletter/email_templates_admin/' : '/admin/newsletter/email_templates_user/'
|
||||
],
|
||||
'cancel' => [
|
||||
'url' => $this -> email_template['is_admin'] ? '/admin/newsletter/email_templates_admin/' : '/admin/newsletter/email_templates_user/'
|
||||
]
|
||||
];
|
||||
$grid -> persist_edit = true;
|
||||
$grid -> id_param = 'id';
|
||||
|
||||
echo $grid -> draw();
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
$( function()
|
||||
{
|
||||
disable_menu();
|
||||
|
||||
$( '#text' ).ckeditor(
|
||||
{
|
||||
toolbar : 'MyTool',
|
||||
height:'350'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
28
admin/templates/newsletter/email-templates-admin.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
global $gdb;
|
||||
|
||||
$grid = new \grid( 'pp_newsletter_templates' );
|
||||
$grid -> gdb_opt = $gdb;
|
||||
$grid -> order = [ 'column' => 'name', 'type' => 'ASC' ];
|
||||
$grid -> where = [ 'is_admin' => 1 ];
|
||||
$grid -> columns_view = [
|
||||
[
|
||||
'name' => 'Lp.',
|
||||
'th' => [ 'class' => 'g-lp' ],
|
||||
'td' => [ 'class' => 'g-center' ],
|
||||
'autoincrement' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Nazwa',
|
||||
'db' => 'name',
|
||||
'php' => 'echo "<a href=\'/admin/newsletter/email_template_edit/id=[id]\'>[name]</a>";',
|
||||
'sort' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Edytuj',
|
||||
'action' => [ 'type' => 'edit', 'url' => '/admin/newsletter/email_template_edit/id=[id]' ],
|
||||
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
||||
'td' => [ 'class' => 'g-center' ]
|
||||
]
|
||||
];
|
||||
echo $grid -> draw();
|
||||
42
admin/templates/newsletter/email-templates-user.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
global $gdb;
|
||||
|
||||
$grid = new \grid( 'pp_newsletter_templates' );
|
||||
$grid -> gdb_opt = $gdb;
|
||||
$grid -> order = [ 'column' => 'name', 'type' => 'ASC' ];
|
||||
$grid -> where = [ 'is_admin' => 0 ];
|
||||
$grid -> columns_view = [
|
||||
[
|
||||
'name' => 'Lp.',
|
||||
'th' => [ 'class' => 'g-lp' ],
|
||||
'td' => [ 'class' => 'g-center' ],
|
||||
'autoincrement' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Nazwa',
|
||||
'db' => 'name',
|
||||
'php' => 'echo "<a href=\'/admin/newsletter/email_template_edit/id=[id]\'>[name]</a>";',
|
||||
'sort' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Edytuj',
|
||||
'action' => [ 'type' => 'edit', 'url' => '/admin/newsletter/email_template_edit/id=[id]' ],
|
||||
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
||||
'td' => [ 'class' => 'g-center' ]
|
||||
],
|
||||
[
|
||||
'name' => 'Usuń',
|
||||
'action' => [ 'type' => 'delete', 'url' => '/admin/newsletter/email_template_delete/id=[id]' ],
|
||||
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
||||
'td' => [ 'class' => 'g-center' ]
|
||||
]
|
||||
];
|
||||
$grid -> buttons = [
|
||||
[
|
||||
'label' => 'Dodaj szablon',
|
||||
'url' => '/admin/newsletter/email_template_edit/',
|
||||
'icon' => 'fa-plus-circle',
|
||||
'class' => 'btn-success'
|
||||
]
|
||||
];
|
||||
echo $grid -> draw();
|
||||
30
admin/templates/newsletter/emails-list.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
global $gdb;
|
||||
|
||||
$grid = new \grid( 'pp_newsletter' );
|
||||
$grid -> gdb_opt = $gdb;
|
||||
$grid -> order = [ 'column' => 'email', 'type' => 'ASC' ];
|
||||
$grid -> search = [
|
||||
[ 'name' => 'Email', 'db' => 'email', 'type' => 'text' ]
|
||||
];
|
||||
$grid -> columns_view = [
|
||||
[
|
||||
'name' => 'Lp.',
|
||||
'th' => [ 'class' => 'g-lp' ],
|
||||
'td' => [ 'class' => 'g-center' ],
|
||||
'autoincrement' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Email',
|
||||
'db' => 'email',
|
||||
'sort' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Potwierdzony',
|
||||
'db' => 'status',
|
||||
'sort' => true,
|
||||
'replace' => [ 'array' => [ 0 => '<span style="color: #FF0000;">nie</span>', 1 => 'tak' ] ]
|
||||
]
|
||||
];
|
||||
$grid -> actions = [ 'delete' => true ];
|
||||
echo $grid -> draw();
|
||||
131
admin/templates/newsletter/prepare.php
Normal file
@@ -0,0 +1,131 @@
|
||||
<?
|
||||
global $db;
|
||||
|
||||
ob_start();
|
||||
?>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-4 control-label">Zakres dat:</label>
|
||||
<div class="col-lg-8">
|
||||
<div class="input-group">
|
||||
<input type="text" id="dates" name="dates" data="search-column:date_add;search-type:date_range" class="form-control date-range require" value="">
|
||||
<span class="input-group-addon cursor date-range-icon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-12 control-label">lub / i</label>
|
||||
</div>
|
||||
<?
|
||||
$templates[''] = '---- szablon ----';
|
||||
if ( is_array( $this -> templates ) ): foreach ( $this -> templates as $template ):
|
||||
$templates[ $template['id'] ] = $template['name'];
|
||||
endforeach; endif;
|
||||
?>
|
||||
<?= \Html::select(
|
||||
array(
|
||||
'label' => 'Szablon',
|
||||
'name' => 'template',
|
||||
'id' => 'template',
|
||||
'values' => $templates,
|
||||
'value' => $this -> templates['id']
|
||||
));?>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-12 control-label">Podgląd:</label>
|
||||
<div class="col-12">
|
||||
<div id="newsletter-preview"></div>
|
||||
</div>
|
||||
</div>
|
||||
<?
|
||||
$out = ob_get_clean();
|
||||
|
||||
$grid = new \gridEdit;
|
||||
$grid -> id = 'newsletter-prepare';
|
||||
$grid -> gdb_opt = $gdb;
|
||||
$grid -> include_plugins = true;
|
||||
$grid -> title = 'Wysyłka newslettera - przygotowanie';
|
||||
$grid -> default_buttons = false;
|
||||
$grid -> external_code = $out;
|
||||
$grid -> buttons = [
|
||||
[
|
||||
'label' => 'Wyślij newsletter',
|
||||
'class' => 'btn-success',
|
||||
'icon' => 'fa-send',
|
||||
'js' => 'send_newsletter();'
|
||||
]
|
||||
];
|
||||
echo $grid -> draw();
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
function send_newsletter()
|
||||
{
|
||||
var dates = $( '#dates' ).val();
|
||||
var template = $('#template').val();
|
||||
|
||||
if ( !dates && !template )
|
||||
$.prompt( 'Proszę wybrać zakres dat lub szablon.', { title: 'Błąd' } );
|
||||
|
||||
$( '#fg-newsletter-prepare' ).submit();
|
||||
return false;
|
||||
}
|
||||
|
||||
$( function()
|
||||
{
|
||||
$( '#fg-newsletter-prepare' ).attr( 'action', '/admin/newsletter/send/' );
|
||||
|
||||
$( 'body' ).on( 'change', '#dates', function()
|
||||
{
|
||||
var dates = $( this ).val();
|
||||
var template = $('#template').val();
|
||||
$.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/admin/ajax.php',
|
||||
data: {
|
||||
a: 'newsletter-preview',
|
||||
dates: dates,
|
||||
template: template
|
||||
},
|
||||
beforeSend: function()
|
||||
{
|
||||
$( '#overlay' ).show();
|
||||
},
|
||||
success: function( response )
|
||||
{
|
||||
$( '#overlay' ).hide();
|
||||
$( '#newsletter-preview' ).html( response );
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$( 'body' ).on( 'change', '#template', function()
|
||||
{
|
||||
var dates = $( '#dates' ).val();
|
||||
var template = $( this ).val();
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: '/admin/ajax.php',
|
||||
data: {
|
||||
a: 'newsletter-preview',
|
||||
template: template,
|
||||
dates: dates
|
||||
},
|
||||
beforeSend: function()
|
||||
{
|
||||
$( '#overlay' ).show();
|
||||
},
|
||||
success: function( response )
|
||||
{
|
||||
$( '#overlay' ).hide();
|
||||
$( '#newsletter-preview' ).html( response );
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||