WIP: fixed new lang theme ui-bug

pull/36/head
A1Gard 1 year ago
parent 254d0b9683
commit 9eb262122d

@ -92,7 +92,7 @@ return [
| |
*/ */
'locale' => 'en', 'locale' => 'fa',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------

@ -2,5 +2,7 @@
return [ return [
//The dashboard uri //The dashboard uri
'uri'=>'dashboard' 'uri'=>'dashboard',
'post_thumb' => '1200x600',
'gallery_thumb' => '500x500',
]; ];

@ -1144,3 +1144,8 @@ nav a {
margin-right: 5px; margin-right: 5px;
margin-top: 1px; margin-top: 1px;
} }
.ajs-message.ajs-visible {
right: auto !important;
left: 2rem !important;
}

@ -32266,7 +32266,7 @@ jQuery(function () {
CKEDITOR.replace('body', { CKEDITOR.replace('body', {
filebrowserUploadUrl: xupload, filebrowserUploadUrl: xupload,
filebrowserUploadMethod: 'form', filebrowserUploadMethod: 'form',
contentsLangDirection: 'rtl' // contentsLangDirection: 'rtl'
}); });
} }
} catch (e) {} } catch (e) {}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1,154 +1,195 @@
/******/ (function(modules) { // webpackBootstrap /*
/******/ // install a JSONP callback for chunk loading * ATTENTION: An "eval-source-map" devtool has been used.
/******/ function webpackJsonpCallback(data) { * This devtool is neither made for production nor for readable output files.
/******/ var chunkIds = data[0]; * It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
/******/ var moreModules = data[1]; * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
/******/ var executeModules = data[2]; * or disable the default devtool with "devtool: false".
/******/ * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
/******/ // add "moreModules" to the modules object, */
/******/ // then flag all "chunkIds" as loaded and fire callback /******/ (() => { // webpackBootstrap
/******/ var moduleId, chunkId, i = 0, resolves = []; /******/ "use strict";
/******/ for(;i < chunkIds.length; i++) { /******/ var __webpack_modules__ = ({});
/******/ chunkId = chunkIds[i]; /************************************************************************/
/******/ if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ resolves.push(installedChunks[chunkId][0]);
/******/ }
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ for(moduleId in moreModules) {
/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
/******/ modules[moduleId] = moreModules[moduleId];
/******/ }
/******/ }
/******/ if(parentJsonpFunction) parentJsonpFunction(data);
/******/
/******/ while(resolves.length) {
/******/ resolves.shift()();
/******/ }
/******/
/******/ // add entry modules from loaded chunk to deferred list
/******/ deferredModules.push.apply(deferredModules, executeModules || []);
/******/
/******/ // run deferred modules when all chunks ready
/******/ return checkDeferredModules();
/******/ };
/******/ function checkDeferredModules() {
/******/ var result;
/******/ for(var i = 0; i < deferredModules.length; i++) {
/******/ var deferredModule = deferredModules[i];
/******/ var fulfilled = true;
/******/ for(var j = 1; j < deferredModule.length; j++) {
/******/ var depId = deferredModule[j];
/******/ if(installedChunks[depId] !== 0) fulfilled = false;
/******/ }
/******/ if(fulfilled) {
/******/ deferredModules.splice(i--, 1);
/******/ result = __webpack_require__(__webpack_require__.s = deferredModule[0]);
/******/ }
/******/ }
/******/
/******/ return result;
/******/ }
/******/
/******/ // The module cache /******/ // The module cache
/******/ var installedModules = {}; /******/ var __webpack_module_cache__ = {};
/******/
/******/ // object to store loaded and loading chunks
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // Promise = chunk loading, 0 = chunk loaded
/******/ var installedChunks = {
/******/ "/vendor/js/manifest": 0
/******/ };
/******/
/******/ var deferredModules = [];
/******/ /******/
/******/ // The require function /******/ // The require function
/******/ function __webpack_require__(moduleId) { /******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache /******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) { /******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ return installedModules[moduleId].exports; /******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ } /******/ }
/******/ // Create a new module (and put it into the cache) /******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = { /******/ var module = __webpack_module_cache__[moduleId] = {
/******/ i: moduleId, /******/ id: moduleId,
/******/ l: false, /******/ loaded: false,
/******/ exports: {} /******/ exports: {}
/******/ }; /******/ };
/******/ /******/
/******/ // Execute the module function /******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ /******/
/******/ // Flag the module as loaded /******/ // Flag the module as loaded
/******/ module.l = true; /******/ module.loaded = true;
/******/ /******/
/******/ // Return the exports of the module /******/ // Return the exports of the module
/******/ return module.exports; /******/ return module.exports;
/******/ } /******/ }
/******/ /******/
/******/
/******/ // expose the modules object (__webpack_modules__) /******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules; /******/ __webpack_require__.m = __webpack_modules__;
/******/ /******/
/******/ // expose the module cache /************************************************************************/
/******/ __webpack_require__.c = installedModules; /******/ /* webpack/runtime/chunk loaded */
/******/ (() => {
/******/ var deferred = [];
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
/******/ if(chunkIds) {
/******/ priority = priority || 0;
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
/******/ deferred[i] = [chunkIds, fn, priority];
/******/ return;
/******/ }
/******/ var notFulfilled = Infinity;
/******/ for (var i = 0; i < deferred.length; i++) {
/******/ var [chunkIds, fn, priority] = deferred[i];
/******/ var fulfilled = true;
/******/ for (var j = 0; j < chunkIds.length; j++) {
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
/******/ chunkIds.splice(j--, 1);
/******/ } else {
/******/ fulfilled = false;
/******/ if(priority < notFulfilled) notFulfilled = priority;
/******/ }
/******/ }
/******/ if(fulfilled) {
/******/ deferred.splice(i--, 1)
/******/ var r = fn();
/******/ if (r !== undefined) result = r;
/******/ }
/******/ }
/******/ return result;
/******/ };
/******/ })();
/******/ /******/
/******/ // define getter function for harmony exports /******/ /* webpack/runtime/compat get default export */
/******/ __webpack_require__.d = function(exports, name, getter) { /******/ (() => {
/******/ if(!__webpack_require__.o(exports, name)) { /******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ __webpack_require__.n = (module) => {
/******/ var getter = module && module.__esModule ?
/******/ () => (module['default']) :
/******/ () => (module);
/******/ __webpack_require__.d(getter, { a: getter });
/******/ return getter;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ } /******/ }
/******/ }; /******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/global */
/******/ (() => {
/******/ __webpack_require__.g = (function() {
/******/ if (typeof globalThis === 'object') return globalThis;
/******/ try {
/******/ return this || new Function('return this')();
/******/ } catch (e) {
/******/ if (typeof window === 'object') return window;
/******/ }
/******/ })();
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/ /******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports /******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) { /******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ } /******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ }; /******/ };
/******/ /******/ })();
/******/ // create a fake namespace object /******/
/******/ // mode & 1: value is a module id, require it /******/ /* webpack/runtime/node module decorator */
/******/ // mode & 2: merge all properties of value into the ns /******/ (() => {
/******/ // mode & 4: return value when already ns object /******/ __webpack_require__.nmd = (module) => {
/******/ // mode & 8|1: behave like require /******/ module.paths = [];
/******/ __webpack_require__.t = function(value, mode) { /******/ if (!module.children) module.children = [];
/******/ if(mode & 1) value = __webpack_require__(value); /******/ return module;
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ }; /******/ };
/******/ })();
/******/ /******/
/******/ // getDefaultExport function for compatibility with non-harmony modules /******/ /* webpack/runtime/jsonp chunk loading */
/******/ __webpack_require__.n = function(module) { /******/ (() => {
/******/ var getter = module && module.__esModule ? /******/ // no baseURI
/******/ function getDefault() { return module['default']; } : /******/
/******/ function getModuleExports() { return module; }; /******/ // object to store loaded and loading chunks
/******/ __webpack_require__.d(getter, 'a', getter); /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ return getter; /******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
/******/ var installedChunks = {
/******/ "/vendor/js/manifest": 0,
/******/ "vendor/css/app": 0
/******/ }; /******/ };
/******/ /******/
/******/ // Object.prototype.hasOwnProperty.call /******/ // no chunk on demand loading
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/ /******/
/******/ // __webpack_public_path__ /******/ // no prefetching
/******/ __webpack_require__.p = "/";
/******/ /******/
/******/ var jsonpArray = window["webpackJsonp"] = window["webpackJsonp"] || []; /******/ // no preloaded
/******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
/******/ jsonpArray.push = webpackJsonpCallback;
/******/ jsonpArray = jsonpArray.slice();
/******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);
/******/ var parentJsonpFunction = oldJsonpFunction;
/******/ /******/
/******/ // no HMR
/******/
/******/ // no HMR manifest
/******/
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
/******/
/******/ // install a JSONP callback for chunk loading
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
/******/ var [chunkIds, moreModules, runtime] = data;
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0;
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
/******/ for(moduleId in moreModules) {
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
/******/ }
/******/ }
/******/ if(runtime) var result = runtime(__webpack_require__);
/******/ }
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ installedChunks[chunkId][0]();
/******/ }
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ return __webpack_require__.O(result);
/******/ }
/******/
/******/ var chunkLoadingGlobal = self["webpackChunk"] = self["webpackChunk"] || [];
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
/******/ })();
/******/ /******/
/******/ // run deferred modules from other chunks
/******/ checkDeferredModules();
/******/ })
/************************************************************************/ /************************************************************************/
/******/ ([]); /******/
/******/
/******/ })()
;

File diff suppressed because one or more lines are too long

@ -20,9 +20,38 @@ jQuery(function () {
}); });
window.addEventListener('load', function () { window.addEventListener('load', function () {
let dirx= 'rtl';
if (!isRtl) { if (!isRtl) {
document.querySelector('body').style.direction = 'ltr'; document.querySelector('body').style.direction = 'ltr';
dirx = 'ltr';
} }
try {
for(let instanceName in CKEDITOR.instances){
CKEDITOR.instances[instanceName].destroy();
}
} catch(e) {
console.log(e.message);
}
$(".ckeditorx").each(function (i,e) {
CKEDITOR.replace($(e).attr('name'), {
filebrowserUploadUrl: xupload,
filebrowserUploadMethod: 'form',
contentsLangDirection: dirx,
});
});
if ($("[name='desc']#description").length) {
CKEDITOR.replace('description', {
filebrowserUploadUrl: xupload,
filebrowserUploadMethod: 'form',
contentsLangDirection: isRtl?'rtl':'ltr',
});
CKEDITOR.instances.description.on('change',function () {
$("#description").val(CKEDITOR.instances.description.getData());
});
}
// },1000);
}) })
// ); // );
// $("nav .current").closest('li').click(); // $("nav .current").closest('li').click();

@ -2,16 +2,7 @@ var isW8 = false;
// var descBody = $("#description").val(); // var descBody = $("#description").val();
$(function () { $(function () {
if ($("[name='desc']#description").length) {
CKEDITOR.replace('description', {
filebrowserUploadUrl: xupload,
filebrowserUploadMethod: 'form',
contentsLangDirection: isRtl?'rtl':'ltr'
});
CKEDITOR.instances.description.on('change',function () {
$("#description").val(CKEDITOR.instances.description.getData());
});
}
window.fakerProduct = function () { window.fakerProduct = function () {
$("#name").val("Product name sample 1"); $("#name").val("Product name sample 1");

@ -143,29 +143,10 @@ return [
'country' => 'کشور', 'country' => 'کشور',
'address' => 'نشانی', 'address' => 'نشانی',
'phone' => 'شماره ثابت', 'phone' => 'شماره ثابت',
'tel' => 'شماره ثابت',
'mobile' => 'شماره همراه', 'mobile' => 'شماره همراه',
'age' => 'سن', 'age' => 'سن',
'gender' => 'جنسیت',
'sex' => 'جنسیت', 'sex' => 'جنسیت',
'image' => 'تصویر', 'gender' => 'جنسیت',
'image2' => 'تصویر دوم',
'link' => 'لینک',
'amount' => 'مقدار',
'email' => 'ایمیل',
'parent' => 'والد',
'state' => 'استان',
'city' => 'شهر',
'postal_code' => 'کد پستی',
'excerpt' => 'خلاصه',
'cat_id' => 'دسته بندی',
'product_id' => 'محصول',
'label' => 'برچسب',
'type' => 'نوع',
'key' => 'کلید',
'section' => 'سکشن',
'subject' => 'عنوان',
'full_name' => 'نام کامل',
'day' => 'روز', 'day' => 'روز',
'month' => 'ماه', 'month' => 'ماه',
'year' => 'سال', 'year' => 'سال',
@ -174,8 +155,6 @@ return [
'second' => 'ثانیه', 'second' => 'ثانیه',
'title' => 'عنوان', 'title' => 'عنوان',
'text' => 'متن', 'text' => 'متن',
'body' => 'متن',
'bodya' => 'متن',
'content' => 'محتوا', 'content' => 'محتوا',
'description' => 'توضیحات', 'description' => 'توضیحات',
'excerpt' => 'گزیده مطلب', 'excerpt' => 'گزیده مطلب',

@ -239,3 +239,8 @@ nav {
margin-right: 5px; margin-right: 5px;
margin-top: 1px; margin-top: 1px;
} }
.ajs-message.ajs-visible{
right: auto !important;
left: 2rem !important;
}

@ -26,7 +26,7 @@
</div> </div>
</div> </div>
<div class="card"> <div class="card mt-2">
<div class="card-header"> <div class="card-header">
{{__("Product categories")}} {{__("Product categories")}}
</div> </div>
@ -37,36 +37,30 @@
</div> </div>
</div> </div>
<div class="accordion" id="accordionExample">
<div class="card"> <div class="accordion mt-2" id="accordionExample">
<div class="card-header" id="headingOne"> <div class="accordion-item">
<h2 class="mb-0"> <h2 class="accordion-header" id="headingOne">
<button class="btn btn-link btn-block text-left" type="button" data-toggle="collapse" <button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
data-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
{{__("Tags")}} {{__("Tags")}}
</button> </button>
</h2> </h2>
</div> <div id="collapseOne" class="accordion-collapse collapse show" aria-labelledby="headingOne" data-bs-parent="#accordionExample">
<div class="accordion-body">
<div id="collapseOne" class="collapse show" aria-labelledby="headingOne" data-parent="#accordionExample">
<div class="card-body">
<input type="text" name="tags" class="taggble" @if(isset($product)) <input type="text" name="tags" class="taggble" @if(isset($product))
value="{{implode(',',$product->tag_names)}}" value="{{implode(',',$product->tag_names)}}"
@endif> @endif>
</div> </div>
</div> </div>
</div> </div>
<div class="card"> <div class="accordion-item">
<div class="card-header" id="headingTwo"> <h2 class="accordion-header" id="headingTwo">
<h2 class="mb-0"> <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
<button class="btn btn-link btn-block text-left collapsed" type="button" data-toggle="collapse"
data-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
{{__("Discounts")}} {{__("Discounts")}}
</button> </button>
</h2> </h2>
</div> <div id="collapseTwo" class="accordion-collapse collapse" aria-labelledby="headingTwo" data-bs-parent="#accordionExample">
<div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-parent="#accordionExample"> <div class="accordion-body">
<div class="card-body">
<table class="table" id="discounts"> <table class="table" id="discounts">
<tr> <tr>
<th> <th>
@ -114,17 +108,14 @@
</div> </div>
</div> </div>
</div> </div>
<div class="card"> <div class="accordion-item">
<div class="card-header" id="headingThree"> <h2 class="accordion-header" id="headingThree">
<h2 class="mb-0"> <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
<button class="btn btn-link btn-block text-left collapsed" type="button" data-toggle="collapse"
data-target="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
{{__("New Discount")}} {{__("New Discount")}}
</button> </button>
</h2> </h2>
</div> <div id="collapseThree" class="accordion-collapse collapse" aria-labelledby="headingThree" data-bs-parent="#accordionExample">
<div id="collapseThree" class="collapse" aria-labelledby="headingThree" data-parent="#accordionExample"> <div class="accordion-body">
<div class="card-body">
<table class="table" id="new-discount"> <table class="table" id="new-discount">
<thead> <thead>
<tr> <tr>
@ -179,4 +170,6 @@
</div> </div>
</div> </div>
</div> </div>

@ -52,7 +52,7 @@
@break @break
@case('editor') @case('editor')
<textarea name="{{$set->key}}" id="{{$set->key}}" <textarea name="{{$set->key}}" id="{{$set->key}}"
class="ckeditor form-control" class="ckeditorx form-control"
rows="5">{{$set->value}}</textarea> rows="5">{{$set->value}}</textarea>
@break @break
@case('category') @case('category')
@ -169,6 +169,11 @@
@endsection @endsection
@section('js-content') @section('js-content')
<script> <script>
try {
document.querySelector('#price').classList.add('currency'); document.querySelector('#price').classList.add('currency');
} catch(e) {
// console.log(e.message);
}
</script> </script>
@endsection @endsection

@ -18,6 +18,16 @@
<link href="{{ asset('vendor/starter-kit/css/app.css') }}" rel="stylesheet"> <link href="{{ asset('vendor/starter-kit/css/app.css') }}" rel="stylesheet">
<link href="{{ asset('css/app.css') }}" rel="stylesheet"> <link href="{{ asset('css/app.css') }}" rel="stylesheet">
<script>
@php
$lang = \App\Models\Xlang::where('is_default',true)->first();
@endphp
var isRtl = false;
@if($lang !== null && $lang->rtl)
isRtl = true;
@endif
</script>
</head> </head>
<body> <body>
<div id="app"> <div id="app">

@ -31,7 +31,7 @@
{{$log->user->name}} {{$log->user->name}}
</td> </td>
<td> <td>
{{__($log->action)}} {{__("$log->action")}}
</td> </td>
<td> <td>
{{__($log->loggable_type)}}| {{__($log->loggable_type)}}|

@ -52,17 +52,12 @@
<div class="col-md-3 mt-3"> <div class="col-md-3 mt-3">
<div class="form-group"> <div class="form-group">
<br> <div class="form-check form-switch">
<br> <input class="form-check-input" name="active" value="1" @if (old('active',$adv->active??0) != 0)
<label for="chk">
{{__("Active")}}
</label>
<input type="checkbox" id="chk" name="active"
@if (old('active',$adv->active??0) != 0)
checked checked
@endif @endif type="checkbox" id="active">
class="float-end ml-4 mt-1 form-check-inline @error('active') is-invalid @enderror" <label class="form-check-label" for="active">{{__("Active")}}</label>
value=""> </div>
</div> </div>
</div> </div>
<div class="col-md-4 mt-3"> <div class="col-md-4 mt-3">

@ -20,7 +20,7 @@
{{__("All")}} {{__("All")}}
</a> </a>
<a href="?filter=0" data-filter="0" class="btn btn-dark filter"> <a href="?filter=0" data-filter="0" class="btn btn-dark filter">
{{__("Deactivate")}} {{__("Deactive")}}
</a> </a>
<a href="?filter=1" data-filter="1" class="btn btn-dark filter"> <a href="?filter=1" data-filter="1" class="btn btn-dark filter">
{{__("Active")}} {{__("Active")}}

@ -51,7 +51,7 @@
<label for="body"> <label for="body">
{{__('Description')}} {{__('Description')}}
</label> </label>
<textarea name="body" class="form-control @error('body') is-invalid @enderror" <textarea name="body" class="ckeditorx form-control @error('body') is-invalid @enderror"
placeholder="{{__('Description')}}">{{old('body',$clip->body??null)}}</textarea> placeholder="{{__('Description')}}">{{old('body',$clip->body??null)}}</textarea>
</div> </div>
</div> </div>

@ -20,7 +20,7 @@
{{__("All")}} {{__("All")}}
</a> </a>
<a href="?filter=0" data-filter="0" class="btn btn-dark filter"> <a href="?filter=0" data-filter="0" class="btn btn-dark filter">
{{__("Deactivate")}} {{__("Deactive")}}
</a> </a>
<a href="?filter=1" data-filter="1" class="btn btn-dark filter"> <a href="?filter=1" data-filter="1" class="btn btn-dark filter">
{{__("Active")}} {{__("Active")}}

@ -43,6 +43,8 @@
</th> </th>
<th colspan="2"> <th colspan="2">
{{__("Action")}} {{__("Action")}}
<a href="{{route('admin.post.create')}}" class="btn btn-success float-start"><i
class="fa fa-plus"></i></a>
</th> </th>
</tr> </tr>
</thead> </thead>

@ -72,11 +72,19 @@
<div class="container mb-5"> <div class="container mb-5">
<div class="row mt-3"> <div class="row mt-3">
<div class="col-md-6"> <div class="col-md-6">
<div>
<div>
{!! $chartjs->render() !!} {!! $chartjs->render() !!}
</div> </div>
</div>
</div>
<div class="col-md-6"> <div class="col-md-6">
<div>
<div>
{!! $chartjs2->render() !!} {!! $chartjs2->render() !!}
</div> </div>
</div> </div>
</div> </div>
</div>
</div>
@endsection @endsection

@ -40,7 +40,7 @@
</th> </th>
<th> <th>
{{__("Action")}} {{__("Action")}}
<a href="{{route('admin.gallery.create')}}" class="btn btn-success float-end"><i <a href="{{route('admin.gallery.create')}}" class="btn btn-success float-start"><i
class="fa fa-plus"></i></a> class="fa fa-plus"></i></a>
</th> </th>
</tr> </tr>

@ -32,9 +32,9 @@
</li> </li>
<li class="list-group-item" data-can="false"> <li class="list-group-item" data-can="false">
<span> <span>
{{__("News")}} {{__("Posts")}}
</span> </span>
<input type="text" id="news-auto" placeholder="{{__("News search")}}" class="form-control mt-2" /> <input type="text" id="news-auto" placeholder="{{__("Posts search")}}" class="form-control mt-2" />
<input id="news-title" type="text" name="menu[][title]" class="form-control mt-2" <input id="news-title" type="text" name="menu[][title]" class="form-control mt-2"
placeholder="{{__("Title")}}"/> placeholder="{{__("Title")}}"/>
<input type="hidden" name="menu[][meta]" value=""> <input type="hidden" name="menu[][meta]" value="">
@ -75,7 +75,7 @@
</li> </li>
<li class="list-group-item" data-can="false"> <li class="list-group-item" data-can="false">
<span> <span>
{{__("Category with sub news")}} {{__("Category with sub posts")}}
</span> </span>
<select name="menu[][menuableid]" class="form-control"> <select name="menu[][menuableid]" class="form-control">
@foreach($cats as $cat ) @foreach($cats as $cat )
@ -99,7 +99,7 @@
</li> </li>
<li class="list-group-item" data-can="false"> <li class="list-group-item" data-can="false">
<span> <span>
{{__("Tag with sub news")}} {{__("Tag with sub posts")}}
</span> </span>
<input type="text" id="tag-auto2" placeholder="{{__("Tag search")}}" name="menu[][meta]" class="form-control mt-2" /> <input type="text" id="tag-auto2" placeholder="{{__("Tag search")}}" name="menu[][meta]" class="form-control mt-2" />
<input id="tag-sub-title" type="text" name="menu[][title]" class="form-control mt-2" <input id="tag-sub-title" type="text" name="menu[][title]" class="form-control mt-2"
@ -120,7 +120,7 @@
</div> </div>
<div class="col-md-6 p-3"> <div class="col-md-6 p-3">
<div class="alert alert-info"> <div class="alert alert-info">
{{__("Double click to remove")}} {{__("Double click on to remove item")}}
</div> </div>
<form class="" method="post" <form class="" method="post"
enctype="multipart/form-data" enctype="multipart/form-data"
@ -142,7 +142,7 @@
</div> </div>
<input type="hidden" id="tag-search" value="{{route('admin.ckeditor.tagsearch','')}}"/> <input type="hidden" id="tag-search" value="{{route('admin.ckeditor.tagsearch','')}}"/>
<input type="hidden" id="news-search" value="{{route('admin.ckeditor.newssearch','')}}"/> <input type="hidden" id="news-search" value="{{route('admin.ckeditor.newssearch','')}}"/>
<input type="hidden" id="rem-menu" value="{{route('admin.setting.remMenu','')}}"> <input type="hidden" id="rm-item" value="{{route('admin.menu.remItem','')}}"/>
</div> </div>
@endsection @endsection

@ -45,7 +45,7 @@
<label for="body"> <label for="body">
{{__('Text')}} {{__('Text')}}
</label> </label>
<textarea name="body" class="form-control @error('body') is-invalid @enderror" <textarea name="body" class="ckeditorx form-control @error('body') is-invalid @enderror"
placeholder="{{__('Text')}}">{{old('body',$poll->body??null)}}</textarea> placeholder="{{__('Text')}}">{{old('body',$poll->body??null)}}</textarea>
</div> </div>

@ -20,7 +20,7 @@
{{__("All")}} {{__("All")}}
</a> </a>
<a href="?filter=0" data-filter="0" class="btn btn-dark filter"> <a href="?filter=0" data-filter="0" class="btn btn-dark filter">
{{__("Deactivate")}} {{__("Deactive")}}
</a> </a>
<a href="?filter=1" data-filter="1" class="btn btn-dark filter"> <a href="?filter=1" data-filter="1" class="btn btn-dark filter">
{{__("Active")}} {{__("Active")}}

@ -53,7 +53,7 @@
<label for="body"> <label for="body">
{{__('Post Text')}} {{__('Post Text')}}
</label> </label>
<textarea name="body" class="form-control @error('body') is-invalid @enderror" <textarea name="body" class="ckeditorx form-control @error('body') is-invalid @enderror"
placeholder="{{__('Post Text')}}" placeholder="{{__('Post Text')}}"
rows="8">{{old('body',$posts->body??null)}}</textarea> rows="8">{{old('body',$posts->body??null)}}</textarea>
{{-- @trix(\App\Post::class, 'body')--}} {{-- @trix(\App\Post::class, 'body')--}}
@ -105,32 +105,23 @@
</div> </div>
<div class="col-md-3 mt-3"> <div class="col-md-3 mt-3">
<div class="form-group mt-3"> <div class="form-group mt-3">
<br> <div class="form-check form-switch">
<label for="is_breaking"> <input class="form-check-input" name="is_breaking" @if (old('is_breaking',$posts->is_breaking??0) != 0)
{{__('Is breaking news?')}}
</label>
<input name="is_breaking" type="checkbox" id="is_breaking"
class="float-end ml-4 mt-1 form-check-inline @error('is_breaking') is-invalid @enderror"
placeholder="{{__('Is breaking news?')}}"
@if (old('is_breaking',$posts->is_breaking??0) != 0)
checked checked
@endif @endif type="checkbox" id="isbr">
value="1"/> <label class="form-check-label" for="isbr">{{__('Is breaking news?')}}</label>
</div>
</div> </div>
</div> </div>
<div class="col-md-3 mt-3"> <div class="col-md-3 mt-3">
<div class="form-group mt-3"> <div class="form-group mt-3">
<br>
<label for="is_pinned"> <div class="form-check form-switch">
{{__('Pin')}} <input class="form-check-input" name="is_pin" @if (old('is_pin',$posts->is_pin??0) != 0)
</label>
<input name="is_pinned" type="checkbox" id="is_pinned"
class="float-end ml-4 mt-1 form-check-inline @error('is_pinned') is-invalid @enderror"
placeholder="{{__('Is pinned news?')}}"
@if (old('is_pinned',$posts->is_pinned??0) != 0)
checked checked
@endif/> @endif type="checkbox" id="ispin">
<label class="form-check-label" for="ispin">{{__('Pin')}}</label>
</div>
</div> </div>
</div> </div>
</div> </div>

@ -42,23 +42,18 @@
<label for="body"> <label for="body">
{{__('Description')}} {{__('Description')}}
</label> </label>
<textarea name="body" class="form-control @error('body') is-invalid @enderror" <textarea name="body" class="ckeditorx form-control @error('body') is-invalid @enderror"
placeholder="{{__('Description')}}">{{old('body',$slider->body??null)}}</textarea> placeholder="{{__('Description')}}">{{old('body',$slider->body??null)}}</textarea>
</div> </div>
</div> </div>
<div class="col-md-4 mt-3"> <div class="col-md-4 mt-3">
<div class="form-group"> <div class="form-group">
<br> <div class="form-check form-switch">
<br> <input class="form-check-input" name="active" value="1" @if (old('active',$slider->active??0) != 0)
<label for="chk">
{{__("Active")}}
</label>
<input type="checkbox" id="chk" name="active"
@if (old('active',$slider->active??0) != 0)
checked checked
@endif @endif type="checkbox" id="active">
class="float-end ml-4 mt-1 form-check-inline @error('active') is-invalid @enderror" <label class="form-check-label" for="active">{{__("Active")}}</label>
value=""> </div>
</div> </div>
</div> </div>
<div class="col-md-4 mt-3"> <div class="col-md-4 mt-3">

@ -21,7 +21,7 @@
{{__("All")}} {{__("All")}}
</a> </a>
<a href="?filter=0" data-filter="0" class="btn btn-dark filter"> <a href="?filter=0" data-filter="0" class="btn btn-dark filter">
{{__("Deactivate")}} {{__("Deactive")}}
</a> </a>
<a href="?filter=1" data-filter="1" class="btn btn-dark filter"> <a href="?filter=1" data-filter="1" class="btn btn-dark filter">
{{__("Active")}} {{__("Active")}}

@ -55,9 +55,9 @@
</label> </label>
<select name="role" id="" class="form-control @error('role') is-invalid @enderror"> <select name="role" id="" class="form-control @error('role') is-invalid @enderror">
<option value="super-admin" <option value="super-admin"
@if (old('role') == 'super-admin') selected @endif >{{__("Admin")}} </option> @if (old('role',$user->role??null) == 'super-admin') selected @endif >{{__("Admin")}} </option>
<option value="manager" <option value="manager"
@if (old('role',isset($user)?$user->hasRole('manager'):null) == 'manager' ) selected @endif >{{__("User")}} </option> @if (old('role',$user->role??null) == 'manager' ) selected @endif >{{__("User")}} </option>
</select> </select>
</div> </div>
</div> </div>
@ -92,87 +92,11 @@
value="{{old('password_confirmation',$user->password_confirmation??null)}}"/> value="{{old('password_confirmation',$user->password_confirmation??null)}}"/>
</div> </div>
</div> </div>
@if(isset($user) && $user->hasRole('manager'))
<div class="col-12">
<br>
<button class="btn btn-secondary" type="button" data-toggle="collapse"
data-target="#collapseWidthExample" aria-expanded="false"
aria-controls="collapseWidthExample">
{{__("ACL")}}
({{$user->accesses()->count()}})
</button>
<div class="mt-2">
<div class="collapse width" id="collapseWidthExample">
<div class="card card-body">
@foreach($routes as $name => $route)
<div class="switches-holder">
<div class="rule-title">
<div class="form-check form-switch">
<input class="form-check-input main-switch" type="checkbox"
role="switch"
id="main{{$name}}">
<label class="form-check-label"
for="main{{$name}}"> {{__($name)}} </label>
</div>
</div>
<div class="row">
@foreach($route as $r)
<div class="col-md-3">
<div class="px-3 py-2">
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox"
role="switch"
name="acl[]"
@if ($user->hasAccess("admin.{$name}.{$r}"))
checked
@endif
value="admin.{{$name}}.{{$r}}"
id="s{{$r}}">
<label class="form-check-label"
for="s{{$r}}">
@if($r == 'all' || $r == 'index' | $r == 'list')
{{__("Show list")}}
@else
{{__('!'.$r)}}
@endif
</label>
</div>
</div>
</div>
@endforeach
</div>
</div>
<hr>
@endforeach
</div>
</div>
</div>
<hr>
</div>
@endif
<div class="col-md-12"> <div class="col-md-12">
<label> &nbsp;</label> <label> &nbsp;</label>
<input name="" type="submit" class="btn btn-primary mt-2" value="{{__('Save')}}"/> <input name="" type="submit" class="btn btn-primary mt-2" value="{{__('Save')}}"/>
</div> </div>
</div> </div>
</form> </form>
</div> </div>
@endsection @endsection
@section('js-content')
<script>
document.querySelectorAll('.main-switch').forEach(function (chk) {
chk.addEventListener('change', function () {
let state = this.checked;
this.closest('.switches-holder').querySelectorAll('.row input[type="checkbox"]').forEach(function (subCheck) {
subCheck.checked = state;
});
});
})
</script>
@endsection

@ -1,27 +1,23 @@
<li> <li>
<div class="comment-main-level"> <div class="row">
<!-- Avatar --> <div class="col-md-3 text-center">
<div class="comment-avatar"><img src="https://www.gravatar.com/avatar/{{md5($c->email)}}?s=64"></div> <img class="img-avatar" src="https://www.gravatar.com/avatar/{{md5($c->email)}}?s=64" alt="avatar" />
<!-- Contenedor del Comentario -->
<div class="comment-box">
<div class="comment-head">
<h6 class="comment-name">
<a href="#">
{{$c->name}} {{$c->name}}
</a> <br>
</h6> {{$c->persianDate()}}
<span>{{$c->persianDate()}}</span> <br>
<i class="fa fa-reply comment-reply" data-id="{{$c->id}}" title="{{__("reply")}}"></i> <span class="btn-sm btn-secondary comment-reply" data-id="{{$c->id}}" title="{{__("reply")}}">
<i class="fa fa-heart"></i> <i class="fa fa-reply"></i>
</span>
</div> </div>
<div class="comment-content"> <div class="col-md-9">
<p>
{{$c->body}} {{$c->body}}
</div> </p>
</div> </div>
</div> </div>
@if ($c->approved_children()->count()>0) @if ($c->approved_children()->count()>0)
<ul class="comments-list reply-list"> <ul>
@foreach($c->approved_children as $cch) @foreach($c->approved_children as $cch)
<li> <li>
@include('starter-kit::component.comment', ['c' => $cch]) @include('starter-kit::component.comment', ['c' => $cch])

@ -17,7 +17,7 @@
@endif @endif
</script> </script>
@yield('header-content') @yield('header-content')
<!-- CSRF Token --> <!-- CSRF Token -->
<meta name="csrf-token" content="{{ csrf_token() }}"> <meta name="csrf-token" content="{{ csrf_token() }}">
<title>@yield('page_title', '') {{config('app.name', 'Laravel')}} </title> <title>@yield('page_title', '') {{config('app.name', 'Laravel')}} </title>

@ -481,7 +481,7 @@
<label for="body"> <label for="body">
{{__("Text")}} {{__("Text")}}
</label> </label>
<textarea name="body" id="body" class="form-control" <textarea name="body" id="body" class="ckeditorx form-control"
placeholder="{{__("Your question or request...")}}" placeholder="{{__("Your question or request...")}}"
rows="5">{{old('body')}}</textarea> rows="5">{{old('body')}}</textarea>
</div> </div>
@ -509,7 +509,7 @@
<label for="body"> <label for="body">
{{__("Text")}} {{__("Text")}}
</label> </label>
<textarea name="body" id="body" class="form-control" <textarea name="body" id="body" class="ckeditorx form-control"
placeholder="{{__("Application request")}}" placeholder="{{__("Application request")}}"
rows="5">{{old('body')}}</textarea> rows="5">{{old('body')}}</textarea>
</div> </div>

@ -71,7 +71,7 @@
</label> </label>
<textarea required="" minlength="10" id="comment-message" <textarea required="" minlength="10" id="comment-message"
name="body" class="form-control " placeholder="پیام" name="body" class="ckeditorx form-control " placeholder="پیام"
rows="4"></textarea> rows="4"></textarea>
</div> </div>
</div> </div>

@ -289,7 +289,7 @@
</label> </label>
<textarea required="" minlength="10" id="comment-message" <textarea required="" minlength="10" id="comment-message"
name="body" class="form-control " placeholder="پیام" name="body" class="ckeditorx form-control " placeholder="پیام"
rows="4"></textarea> rows="4"></textarea>
</div> </div>
</div> </div>
@ -351,7 +351,7 @@
<span class="name">نام کاربر</span> <span class="name">نام کاربر</span>
</div> </div>
<form id="question-form"> <form id="question-form">
<textarea class="form-control" dir="rtl" name="body" <textarea class="ckeditorx form-control" dir="rtl" name="body"
placeholder="سوال شما..."></textarea> placeholder="سوال شما..."></textarea>
<input type="hidden" name="product_id" value="{{$pro->id}}"> <input type="hidden" name="product_id" value="{{$pro->id}}">
</form> </form>

Loading…
Cancel
Save