mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
80 lines
4.5 KiB
PHP
80 lines
4.5 KiB
PHP
<?= $this->include('themes/_commonPartialsBs/select2bs5') ?>
|
|
<?= $this->include('themes/_commonPartialsBs/datatables') ?>
|
|
<?= $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">
|
|
<input type="hidden" name="slug" id="section-slug">
|
|
<input type="hidden" name="wiki_page_id" id="wiki-section-id" value="<?= $section->id ?>">
|
|
<input type="hidden" name="wiki_page_id" id="wiki-page-id">
|
|
<input type="hidden" name="wiki_page_id" id="wiki-content-id">
|
|
</form>
|
|
<div class="col-md-12">
|
|
<div id="editorjs"></div>
|
|
</div>
|
|
</div>
|
|
</div><!--//.card-body -->
|
|
<div class="card-footer">
|
|
|
|
</div><!--//.card-footer -->
|
|
</div><!--//.card -->
|
|
</div><!--//.col -->
|
|
</div><!--//.row -->
|
|
<?= view("themes/vuexy/components/modals/modalSection") ?>
|
|
|
|
<?= $this->endSection() ?>
|
|
|
|
<?= $this->section('css') ?>
|
|
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/sweetalert2/sweetalert2.css') ?>" />
|
|
<?= $this->endSection() ?>
|
|
|
|
<?= $this->section("additionalExternalJs") ?>
|
|
|
|
<script src="<?= site_url('themes/vuexy/vendor/libs/sweetalert2/sweetalert2.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() ?>
|