mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
editor form
This commit is contained in:
@ -9,6 +9,7 @@ use App\Models\Wiki\WikiPageModel;
|
||||
use App\Models\Wiki\WikiSectionModel;
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use CodeIgniter\I18n\Time;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class WikiController extends BaseController
|
||||
@ -70,6 +71,7 @@ class WikiController extends BaseController
|
||||
$this->wikiContentModel->insert([
|
||||
"locale" => $this->locale,
|
||||
"page_id" => $wikiPageId,
|
||||
"last_edit_by" => auth()->user()->id,
|
||||
"editor_data" => json_encode($bodyData)
|
||||
]);
|
||||
return $this->response->setJSON(["data" => [], "message" => lang("App.global_alert_save_success")]);
|
||||
@ -80,11 +82,14 @@ class WikiController extends BaseController
|
||||
$wikiSectionPage = $this->wikiSectionModel->find($section_id)->page();
|
||||
if ($wikiSectionPage) {
|
||||
$wikiPageId = $wikiSectionPage->id;
|
||||
$this->wikiContentModel->update($wikiPageId,[
|
||||
"locale" => $this->locale,
|
||||
"page_id" => $wikiPageId,
|
||||
$wikiContentId = $this->wikiContentModel->where("page_id",$wikiPageId)->where('locale',$this->locale)->first()->id;
|
||||
$this->wikiContentModel->update($wikiContentId,[
|
||||
"published_by" => auth()->user()->id,
|
||||
"last_edit_by" => auth()->user()->id,
|
||||
"editor_data" => json_encode($bodyData),
|
||||
"published_data" => json_encode($bodyData)
|
||||
"published_data" => json_encode($bodyData),
|
||||
"published_at" => Time::now()->format('Y-m-d H:i:s'),
|
||||
|
||||
]);
|
||||
$response = $this->response->setJSON(["data" => [], "message" => lang("App.global_alert_save_success")]);
|
||||
} else {
|
||||
|
||||
@ -31,6 +31,18 @@ class WikiContentsMigration extends Migration
|
||||
'type' => 'LONGTEXT',
|
||||
'null' => true,
|
||||
],
|
||||
'published_by' => [
|
||||
'type' => 'INT',
|
||||
'unsigned' => true,
|
||||
'null' => true,
|
||||
'constraint' => 10,
|
||||
],
|
||||
'last_edit_by' => [
|
||||
'type' => 'INT',
|
||||
'unsigned' => true,
|
||||
'null' => true,
|
||||
'constraint' => 10,
|
||||
],
|
||||
];
|
||||
|
||||
public function up()
|
||||
@ -38,6 +50,11 @@ class WikiContentsMigration extends Migration
|
||||
$this->forge->addField($this->COLUMNS);
|
||||
$currenttime = new RawSql('CURRENT_TIMESTAMP');
|
||||
$this->forge->addField([
|
||||
'published_at' => [
|
||||
'type' => 'TIMESTAMP',
|
||||
'null' => true,
|
||||
],
|
||||
|
||||
'created_at' => [
|
||||
'type' => 'TIMESTAMP',
|
||||
'default' => $currenttime,
|
||||
@ -54,6 +71,8 @@ class WikiContentsMigration extends Migration
|
||||
]);
|
||||
$this->forge->addPrimaryKey('id');
|
||||
$this->forge->addForeignKey('page_id','wiki_pages','id');
|
||||
$this->forge->addForeignKey('published_by','users','id');
|
||||
$this->forge->addForeignKey('last_edit_by','users','id');
|
||||
$this->forge->createTable("wiki_contents");
|
||||
}
|
||||
|
||||
|
||||
@ -8,65 +8,96 @@ use CodeIgniter\Database\Seeder;
|
||||
|
||||
class WikiSectionSeeder extends Seeder
|
||||
{
|
||||
protected array $data = [
|
||||
protected array $dataAdmin = [
|
||||
[
|
||||
"name" => 'Introducción',
|
||||
"slug" => 'intro',
|
||||
"slug" => 'intro-admin',
|
||||
"icon" => 'ti ti-home-2'
|
||||
],
|
||||
[
|
||||
"name" => 'Presupuesto',
|
||||
"slug" => 'presupuesto-administrador',
|
||||
"icon" => 'ti ti-currency-dollar'
|
||||
],
|
||||
[
|
||||
"name" => 'Presupuesto cliente',
|
||||
"slug" => 'presupuesto-cliente',
|
||||
"role" => 'cliente',
|
||||
"slug" => 'presupuesto-admin',
|
||||
"icon" => 'ti ti-currency-dollar'
|
||||
],
|
||||
[
|
||||
"name" => 'Pedidos',
|
||||
"slug" => 'pedidos',
|
||||
"slug" => 'pedidos-admin',
|
||||
"icon" => 'ti ti-file-description'
|
||||
|
||||
],
|
||||
[
|
||||
"name" => 'Facturación',
|
||||
"slug" => 'facturacion',
|
||||
"slug" => 'facturacion-admin',
|
||||
"icon" => 'ti ti-file-dollar'
|
||||
|
||||
],
|
||||
[
|
||||
"name" => 'Logística',
|
||||
"slug" => 'logistica',
|
||||
"slug" => 'logistica-admin',
|
||||
"icon" => 'ti ti-truck'
|
||||
|
||||
],
|
||||
[
|
||||
"name" => 'Tarifas',
|
||||
"slug" => 'tarifas',
|
||||
"slug" => 'tarifas-admin',
|
||||
"icon" => 'ti ti-receipt'
|
||||
|
||||
],
|
||||
[
|
||||
"name" => 'Configuración',
|
||||
"slug" => 'config',
|
||||
"slug" => 'config-admin',
|
||||
"icon" => 'ti ti-adjustments-horizontal'
|
||||
|
||||
],
|
||||
[
|
||||
"name" => 'Mensajería',
|
||||
"slug" => 'messages',
|
||||
"slug" => 'messages-admin',
|
||||
"icon" => 'ti ti-message'
|
||||
|
||||
]
|
||||
];
|
||||
protected array $dataCliente = [
|
||||
[
|
||||
"name" => 'Presupuesto(Cliente)',
|
||||
"slug" => 'presupuesto-cliente',
|
||||
"role" => 'cliente',
|
||||
"icon" => 'ti ti-currency-dollar',
|
||||
"role" => 'cliente',
|
||||
],
|
||||
[
|
||||
"name" => 'Pedidos(Cliente)',
|
||||
"slug" => 'pedidos-cliente',
|
||||
"icon" => 'ti ti-file-description',
|
||||
"role" => 'cliente',
|
||||
],
|
||||
[
|
||||
"name" => 'Facturación (Cliente)',
|
||||
"slug" => 'facturacion-cliente',
|
||||
"icon" => 'ti ti-file-dollar',
|
||||
"role" => 'cliente',
|
||||
],
|
||||
[
|
||||
"name" => 'Tarifas (Cliente)',
|
||||
"slug" => 'tarifas-cliente',
|
||||
"icon" => 'ti ti-receipt',
|
||||
"role" => 'cliente',
|
||||
],
|
||||
[
|
||||
"name" => 'Mensajería (Cliente)',
|
||||
"slug" => 'messages-cliente',
|
||||
"icon" => 'ti ti-message',
|
||||
"role" => 'cliente',
|
||||
]
|
||||
];
|
||||
public function run()
|
||||
{
|
||||
|
||||
$wikiSectionModel = model(WikiSectionModel::class);
|
||||
foreach ($this->data as $key => $row) {
|
||||
foreach ($this->dataAdmin as $key => $row) {
|
||||
# code...
|
||||
$wikiSectionModel->insert($row);
|
||||
}
|
||||
foreach ($this->dataCliente as $key => $row) {
|
||||
# code...
|
||||
$wikiSectionModel->insert($row);
|
||||
}
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entities\Wiki;
|
||||
|
||||
use App\Models\Usuarios\UserModel;
|
||||
use CodeIgniter\Entity\Entity;
|
||||
|
||||
class WikiContentEntity extends Entity
|
||||
@ -10,12 +12,24 @@ class WikiContentEntity extends Entity
|
||||
"page_id" => null,
|
||||
"editor_data" => null,
|
||||
"published_data" => null,
|
||||
"last_edit_by" => null,
|
||||
"published_by" => null,
|
||||
"published_at" => null,
|
||||
];
|
||||
protected $casts = [
|
||||
"locale" => "string",
|
||||
"page_id" => "int",
|
||||
"editor_data" => "string",
|
||||
"published_data" => "string",
|
||||
"last_edit_by" => "int",
|
||||
"published_by" => "int",
|
||||
"published_at" => "string",
|
||||
];
|
||||
public function publish_by() : string
|
||||
{
|
||||
$m = model(UserModel::class);
|
||||
$user = $m->find($this->attributes['published_by']);
|
||||
return $user->first_name." ".$user->last_name;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
namespace App\Entities\Wiki;
|
||||
|
||||
use App\Models\Usuarios\UserModel;
|
||||
use CodeIgniter\Entity\Entity;
|
||||
|
||||
class WikiPageEntity extends Entity
|
||||
@ -12,4 +13,6 @@ class WikiPageEntity extends Entity
|
||||
"section_id" => "int",
|
||||
];
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -58,4 +58,6 @@ class WikiSectionEntity extends Entity
|
||||
}
|
||||
return $content;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -10,6 +10,11 @@ return [
|
||||
'tarifas' => "Tariff",
|
||||
'config' => "Configuration",
|
||||
'messages' => "Messages",
|
||||
'save' => "Save",
|
||||
'release' => "Release",
|
||||
'preview' => "Preview",
|
||||
'edit' => "Edit",
|
||||
'new_section' => "New section",
|
||||
'errors' => [
|
||||
'publish_before_save' => "You have to save before publish the content"
|
||||
],
|
||||
|
||||
@ -1,18 +1,34 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'intro' => "Introducción",
|
||||
'presupuesto-cliente' => "Presupuesto cliente",
|
||||
'presupuesto-administrador' => "Presupuesto admin",
|
||||
'pedidos' => "Pedidos",
|
||||
'facturacion' => "Facturación",
|
||||
'logistica' => "Logística",
|
||||
'tarifas' => "Tarifas",
|
||||
'config' => "Configuración",
|
||||
'messages' => "Mensajería",
|
||||
'intro-admin' => "Introducción",
|
||||
'intro-cliente' => "Introducción",
|
||||
'presupuesto-cliente' => "Presupuesto (Cliente)",
|
||||
'presupuesto-admin' => "Presupuesto admin",
|
||||
'pedidos-admin' => "Pedidos",
|
||||
'pedidos-cliente' => "Pedidos (Cliente)",
|
||||
'facturacion-admin' => "Facturación",
|
||||
'facturacion-cliente' => "Facturación(Cliente)",
|
||||
'logistica-admin' => "Logística",
|
||||
'tarifas-admin' => "Tarifas",
|
||||
'tarifas-cliente' => "Tarifas (Cliente)",
|
||||
'config-admin' => "Configuración",
|
||||
'messages-admin' => "Mensajería",
|
||||
'messages-cliente' => "Mensajería (Cliente)",
|
||||
'save' => "Guardar",
|
||||
'release' => "Publicar",
|
||||
'preview' => "Vista previa",
|
||||
'edit' => "Editar",
|
||||
'name' => "Nombre sección",
|
||||
'icon' => "Icono sección",
|
||||
'section_placeholder' => "Introduce el nombre de la sección",
|
||||
'section_icon_placeholder' => "Introduce el nombre de la sección",
|
||||
'edit_section' => "Editar sección",
|
||||
'new_section' => "Nueva sección",
|
||||
'header-placeholder' => "Escribe un encabezado ...",
|
||||
'errors' => [
|
||||
'publish_before_save' => "Es necesario guardar antes de publicar"
|
||||
],
|
||||
'published' => 'Publicado',
|
||||
'not_published' => 'Sin publicar'
|
||||
'not_published' => 'Sin publicar',
|
||||
];
|
||||
|
||||
@ -17,7 +17,10 @@ class WikiContentModel extends Model
|
||||
"locale",
|
||||
"page_id",
|
||||
"editor_data",
|
||||
"published_data"
|
||||
"published_data",
|
||||
"last_edit_by",
|
||||
"published_by",
|
||||
"published_at"
|
||||
|
||||
];
|
||||
|
||||
@ -50,4 +53,6 @@ class WikiContentModel extends Model
|
||||
protected $afterFind = [];
|
||||
protected $beforeDelete = [];
|
||||
protected $afterDelete = [];
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -58,6 +58,6 @@ class WikiSectionModel extends Model
|
||||
*/
|
||||
public function sections() : array
|
||||
{
|
||||
return $this->where('role','admin')->findAll();
|
||||
return $this->findAll();
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,39 @@
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="modalSection" tabindex="-1" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel1"><?= lang('Wiki.new_section') ?></h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="formSection">
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="col-12 mb-2">
|
||||
<label for="section-name" class="form-label"><?= lang('Wiki.name') ?></label>
|
||||
<input type="text" id="section-name" name="title" placeholder="<?= lang('Wiki.section_placeholder') ?>" name="name" class="form-control" required />
|
||||
</div>
|
||||
<div class="col-12 mb-2">
|
||||
<label for="section-icon" class="form-label"><?= lang('Wiki.icon') ?></label>
|
||||
<input type="text" id="section-icon" name="icon" placeholder="<?= lang('Wiki.section_icon_placeholder') ?>" name="name" class="form-control" required />
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-label-secondary" data-bs-dismiss="modal"><?= lang('App.global_come_back') ?></button>
|
||||
<?php if (auth()->user()->inGroup('admin')) { ?>
|
||||
<button type="button" id="submit-new-section" class="btn btn-primary d-none"><?= lang('App.global_save') ?></button>
|
||||
<button type="button" id="submit-update-section" class="btn btn-primary d-none"><?= lang('App.global_save') ?></button>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -1,8 +1,16 @@
|
||||
|
||||
<!-- Messages -->
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to('showWikiPage','intro') ?>" class="menu-link">
|
||||
<?php if(auth()->user()->inGroup('admin')):?>
|
||||
<a href="<?= route_to('showWikiPage','intro-admin') ?>" class="menu-link">
|
||||
<i class="menu-icon tf-icons ti ti-books"></i>
|
||||
<?= lang("Wiki") ?>
|
||||
</a>
|
||||
<?php endif;?>
|
||||
<?php if(auth()->user()->inGroup('cliente-editor')):?>
|
||||
<a href="<?= route_to('showWikiPage','presupuesto-cliente') ?>" class="menu-link">
|
||||
<i class="menu-icon tf-icons ti ti-books"></i>
|
||||
<?= lang("Wiki") ?>
|
||||
</a>
|
||||
<?php endif;?>
|
||||
</li>
|
||||
@ -109,16 +109,16 @@ $picture = "/assets/img/default-user.png";
|
||||
|
||||
<!-- Iterate throught sections -->
|
||||
<?php foreach ($wiki_sections as $key => $value) : ?>
|
||||
<li class="menu-item <?= $value->slug == $slug ? 'active' : "" ?>">
|
||||
<!-- Check if user can view the section link -->
|
||||
<?php if (auth()->user()->inGroup($value->role) || auth()->user()->inGroup('admin') ): ?>
|
||||
<a href="<?= site_url("wiki/view/".$value->slug) ?>" class="menu-link" >
|
||||
<?php if (auth()->user()->inGroup($value->role) || auth()->user()->inGroup('admin')): ?>
|
||||
<li class="menu-item <?= $value->slug == $slug ? 'active' : "" ?>">
|
||||
<!-- Check if user can view the section link -->
|
||||
<a href="<?= site_url("wiki/view/" . $value->slug) ?>" class="menu-link">
|
||||
<i class="menu-icon tf-icons <?= $value->icon ?>"></i>
|
||||
<?= lang("Wiki.".$value->slug) ?>
|
||||
<?= lang("Wiki." . $value->slug) ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
</ul>
|
||||
</aside>
|
||||
@ -135,9 +135,20 @@ $picture = "/assets/img/default-user.png";
|
||||
<i class="ti ti-menu-2 ti-sm"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="navbar-nav-left d-flex align-items-center" id="navbar-collapse">
|
||||
|
||||
<ul class="navbar-nav flex-row justify-content-start align-items-center ms-auto">
|
||||
<div>
|
||||
<a class="nav-link" href="<?= route_to("home") ?>">
|
||||
<i class="ti ti-home rounded-circle me-1 fs-3"></i>
|
||||
</a>
|
||||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="navbar-nav-right d-flex align-items-center" id="navbar-collapse">
|
||||
|
||||
<ul class="navbar-nav flex-row align-items-center ms-auto">
|
||||
<ul class="navbar-nav flex-row justify-content-start align-items-center ms-auto">
|
||||
|
||||
<!-- Language -->
|
||||
<li class="nav-item dropdown-language dropdown me-2 me-xl-0">
|
||||
@ -145,6 +156,7 @@ $picture = "/assets/img/default-user.png";
|
||||
data-bs-toggle="dropdown">
|
||||
<i class="fi <?= getCurrentLanguageFlag(); ?> fis rounded-circle me-1 fs-3"></i>
|
||||
</a>
|
||||
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<li>
|
||||
<a class="dropdown-item" href="<?= site_url('lang/es'); ?>" data-language="es">
|
||||
|
||||
@ -3,15 +3,44 @@
|
||||
<?= $this->include('themes/_commonPartialsBs/_confirm2delete') ?>
|
||||
<?= $this->include("themes/_commonPartialsBs/sweetalert") ?>
|
||||
<?= $this->extend('themes/vuexy/wiki/layout') ?>
|
||||
<?php
|
||||
|
||||
use CodeIgniter\I18n\Time;
|
||||
?>
|
||||
<?= $this->section('content'); ?>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="card card-info">
|
||||
<div class="card-header">
|
||||
<div class="row">
|
||||
<div class="col-md-6 d-flex flex-row flex-wrap justify-content-start align-items-center pb-2 gap-2">
|
||||
<?php if ($section->content()?->published_data): ?>
|
||||
<span class="badge badge-center rounded-pill text-bg-success"><i class="ti ti-check"></i></span>
|
||||
<strong><?= lang('Wiki.published') ?></strong>
|
||||
<strong><?= $section->content()->published_at ? Time::createFromFormat('Y-m-d H:i:s', $section->content()->published_at)->format('d/m/Y H:i') : "" ?></strong>
|
||||
<strong class="text-secondary"><?= $section->content()->publish_by() ?></strong>
|
||||
|
||||
<?php else: ?>
|
||||
<span class="badge badge-center rounded-pill text-bg-danger"><i class="ti ti-alert-circle"></i></span>
|
||||
<strong><?= lang('Wiki.not_published') ?></strong>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-6 d-flex flex-row flex-wrap justify-content-end align-items-stretch pb-2 gap-2">
|
||||
<?php if (auth()->user()->inGroup('admin')): ?>
|
||||
<button type="button" class="btn btn-success btn-xs col-xs-12 " id="new-section"><i class="icon-base ti ti-plus icon-xs me-2"></i><?= lang('Wiki.new_section') ?></button>
|
||||
<button type="button" class="btn btn-warning btn-xs col-auto " id="edit-section"><i class="icon-base ti ti-pencil icon-xs me-2"></i><?= lang('Wiki.edit_section') ?></button>
|
||||
<button type="button" class="btn btn-primary btn-xs col-auto " id="save-editor"><i class="icon-base ti ti-device-floppy icon-xs me-2"></i><?= lang('App.global_save') ?></button>
|
||||
<button type="button" class="btn btn-danger btn-xs col-auto " id="release-editor"><i class="icon-base ti ti-upload icon-xs me-2"></i>Publicar</button>
|
||||
<button type="button" class="btn btn-secondary btn-xs d-none col-auto " id="preview-editor"><i class="icon-base ti ti-eye icon-xs me-2"></i>Vista previa</button>
|
||||
<button type="button" class="btn btn-warning btn-xs col-auto " id="edit-editor"><i class="icon-base ti ti-pencil icon-xs me-2"></i>Editar</button>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div><!--//.card-header -->
|
||||
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<form action="POST" id="form-wiki">
|
||||
@ -20,37 +49,9 @@
|
||||
<input type="hidden" name="wiki_page_id" id="wiki-page-id">
|
||||
<input type="hidden" name="wiki_page_id" id="wiki-content-id">
|
||||
</form>
|
||||
<?php if (auth()->user()->inGroup('admin')): ?>
|
||||
|
||||
<div class="col-md-12 d-flex flex-row justify-content-between align-items-center pb-2">
|
||||
<div class="d-flex flex-row gap-2 justify-content-start align-items-center">
|
||||
<?php if ($section->content()?->published_data): ?>
|
||||
<span class="badge badge-center rounded-pill text-bg-success"><i class="ti ti-check"></i></span>
|
||||
<strong><?= lang('Wiki.published') ?></strong>
|
||||
<?php else: ?>
|
||||
<span class="badge badge-center rounded-pill text-bg-danger"><i class="ti ti-alert-circle"></i></span>
|
||||
<strong><?= lang('Wiki.not_published') ?></strong>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
<div class="btn-group btn-group-sm" role="group">
|
||||
<button type="button" class="btn btn-primary" id="save-editor"><i class="icon-base ti ti-device-floppy icon-xs me-2"></i><?= lang('App.global_save') ?></button>
|
||||
<button type="button" class="btn btn-danger" id="release-editor"><i class="icon-base ti ti-upload icon-xs me-2"></i>Publicar</button>
|
||||
<button type="button" class="btn btn-secondary d-none" id="preview-editor"><i class="icon-base ti ti-eye icon-xs me-2"></i>Vista previa</button>
|
||||
<button type="button" class="btn btn-warning" id="edit-editor"><i class="icon-base ti ti-pencil icon-xs me-2"></i>Editar</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div id="editorjs"></div>
|
||||
</div>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div id="editorjs"></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div id="editorjs"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!--//.card-body -->
|
||||
<div class="card-footer">
|
||||
@ -59,6 +60,8 @@
|
||||
</div><!--//.card -->
|
||||
</div><!--//.col -->
|
||||
</div><!--//.row -->
|
||||
<?= view("themes/vuexy/components/modals/modalSection") ?>
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
<?= $this->section('css') ?>
|
||||
@ -68,6 +71,10 @@
|
||||
<?= $this->section("additionalExternalJs") ?>
|
||||
|
||||
<script src="<?= site_url('themes/vuexy/vendor/libs/sweetalert2/sweetalert2.js') ?>"></script>
|
||||
<script type="module" src="<?= site_url('assets/js/safekat/pages/wiki/home.js') ?>"></script>
|
||||
<?php if (auth()->user()->inGroup('admin')) : ?>
|
||||
<script type="module" src="<?= site_url('assets/js/safekat/pages/wiki/home.js') ?>"></script>
|
||||
<?php else : ?>
|
||||
<script type="module" src="<?= site_url('assets/js/safekat/pages/wiki/viewOnly.js') ?>"></script>
|
||||
<?php endif; ?>
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
Reference in New Issue
Block a user