Create user via API, create category via API, Bootstrap icons v1.3, improve in creation content
|
@ -61,7 +61,10 @@ class dbJSON {
|
|||
return $this->dbFields[$field];
|
||||
}
|
||||
|
||||
// Save the JSON file
|
||||
/* Save the JSON file
|
||||
|
||||
@returns boolean Returns TRUE if the file was saved successfully, FALSE otherwise
|
||||
*/
|
||||
public function save()
|
||||
{
|
||||
$data = '';
|
||||
|
@ -79,7 +82,7 @@ class dbJSON {
|
|||
if (file_put_contents($this->file, $data, LOCK_EX)) {
|
||||
return true;
|
||||
} else {
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to save the database file.', LOG_TYPE_ERROR);
|
||||
Log::set(__METHOD__.LOG_SEP.'An error occurred while trying to save the database.', LOG_TYPE_ERROR);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,16 +75,24 @@ class dbList extends dbJSON
|
|||
return $key;
|
||||
}
|
||||
|
||||
// Add a new item to the dblist
|
||||
// $args => 'name', 'template', 'description', list'
|
||||
/* Add a new item to the dblist === Bludit v4
|
||||
|
||||
@args array The array $args supports the following keys 'name', 'template', 'description', list'
|
||||
@returns string/boolean Returns the item's key if the item was successfully added, FALSE otherwise
|
||||
*/
|
||||
public function add($args)
|
||||
{
|
||||
$key = $this->generateKey($args['name']);
|
||||
|
||||
$this->db[$key]['name'] = Sanitize::removeTags($args['name']);
|
||||
$this->db[$key]['template'] = isset($args['template'])?Sanitize::removeTags($args['template']):'';
|
||||
$this->db[$key]['description'] = isset($args['description'])?Sanitize::removeTags($args['description']):'';
|
||||
$this->db[$key]['list'] = isset($args['list'])?$args['list']:array();
|
||||
if ($this->exists($key)) {
|
||||
Log::set(__METHOD__.LOG_SEP.'The item already exists. Key: '.$key);
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->db[$key]['name'] = Sanitize::removeTags($args['name']);
|
||||
$this->db[$key]['template'] = isset($args['template'])?Sanitize::removeTags($args['template']):'';
|
||||
$this->db[$key]['description'] = isset($args['description'])?Sanitize::removeTags($args['description']):'';
|
||||
$this->db[$key]['list'] = isset($args['list'])?$args['list']:array();
|
||||
|
||||
$this->sortAlphanumeric();
|
||||
$this->save();
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
// Authorization
|
||||
// ============================================================================
|
||||
|
||||
checkRole(array('admin', 'editor', 'author'));
|
||||
checkRole(array('admin'));
|
||||
|
||||
// ============================================================================
|
||||
// Functions
|
||||
|
@ -14,5 +14,5 @@ checkRole(array('admin', 'editor', 'author'));
|
|||
// Main
|
||||
// ============================================================================
|
||||
|
||||
// View HTML <title>
|
||||
$layout['title'] = $L->g('New content') . ' - ' . $layout['title'];
|
||||
// HTML <title>
|
||||
$layout['title'] .= ' - '.$L->g('New category');
|
|
@ -1,7 +1,7 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
|
||||
// ============================================================================
|
||||
// Check role
|
||||
// Authorization
|
||||
// ============================================================================
|
||||
|
||||
checkRole(array('admin'));
|
||||
|
@ -11,22 +11,8 @@ checkRole(array('admin'));
|
|||
// ============================================================================
|
||||
|
||||
// ============================================================================
|
||||
// Main before POST
|
||||
// Main
|
||||
// ============================================================================
|
||||
|
||||
// ============================================================================
|
||||
// POST Method
|
||||
// ============================================================================
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
if (createUser($_POST)) {
|
||||
Redirect::page('users');
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Main after POST
|
||||
// ============================================================================
|
||||
|
||||
// Title of the page
|
||||
$layout['title'] .= ' - '.$L->g('Add a new user');
|
||||
// HTML <title>
|
||||
$layout['title'] .= ' - '.$L->g('New user');
|
|
@ -32,7 +32,6 @@ $drafts = $pages->getDraftDB(true);
|
|||
$scheduled = $pages->getScheduledDB(true);
|
||||
$static = $pages->getStaticDB(true);
|
||||
$sticky = $pages->getStickyDB(true);
|
||||
$autosave = $pages->getAutosaveDB(true);
|
||||
|
||||
// If the user has the role "Author" filter the content so he/she can edit
|
||||
if (checkRole(array('author'), false)) {
|
||||
|
|
|
@ -1,86 +0,0 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
|
||||
// ============================================================================
|
||||
// Check role
|
||||
// ============================================================================
|
||||
|
||||
if (checkRole(array('author'), false)) {
|
||||
try {
|
||||
$pageKey = isset($_POST['key']) ? $_POST['key'] : $layout['parameters'];
|
||||
$page = new Page($pageKey);
|
||||
} catch (Exception $e) {
|
||||
Alert::set($L->g('You do not have sufficient permissions'));
|
||||
Redirect::page('dashboard');
|
||||
}
|
||||
|
||||
if ($page->username()!==$login->username()) {
|
||||
// Add to syslog
|
||||
$syslog->add(array(
|
||||
'dictionaryKey'=>'access-denied',
|
||||
'notes'=>$login->username()
|
||||
));
|
||||
|
||||
Alert::set($L->g('You do not have sufficient permissions'));
|
||||
Redirect::page('dashboard');
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Functions
|
||||
// ============================================================================
|
||||
|
||||
// ============================================================================
|
||||
// Main before POST
|
||||
// ============================================================================
|
||||
|
||||
// ============================================================================
|
||||
// POST Method
|
||||
// ============================================================================
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
if ($_POST['type']==='delete') {
|
||||
if (deletePage($_POST['key'])) {
|
||||
Alert::set( $L->g('The changes have been saved') );
|
||||
}
|
||||
} else {
|
||||
$key = editPage($_POST);
|
||||
if ($key!==false) {
|
||||
Alert::set( $L->g('The changes have been saved') );
|
||||
Redirect::page('edit-content/'.$key);
|
||||
}
|
||||
}
|
||||
|
||||
Redirect::page('content');
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Main after POST
|
||||
// ============================================================================
|
||||
try {
|
||||
$pageKey = $layout['parameters'];
|
||||
$page = new Page($pageKey);
|
||||
} catch (Exception $e) {
|
||||
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to get the page: '.$pageKey, LOG_TYPE_ERROR);
|
||||
Redirect::page('content');
|
||||
}
|
||||
|
||||
// Images prefix directory
|
||||
define('PAGE_IMAGES_KEY', $page->uuid());
|
||||
|
||||
// Images and thubmnails directories
|
||||
if (IMAGE_RESTRICT) {
|
||||
define('PAGE_IMAGES_DIRECTORY', (IMAGE_RELATIVE_TO_ABSOLUTE? '' : HTML_PATH_UPLOADS_PAGES.PAGE_IMAGES_KEY.'/'));
|
||||
define('PAGE_IMAGES_URL', (IMAGE_RELATIVE_TO_ABSOLUTE? '' : DOMAIN_UPLOADS_PAGES.PAGE_IMAGES_KEY.'/'));
|
||||
define('PAGE_THUMBNAILS_DIRECTORY', PATH_UPLOADS_PAGES.PAGE_IMAGES_KEY.DS.'thumbnails'.DS);
|
||||
define('PAGE_THUMBNAILS_HTML', HTML_PATH_UPLOADS_PAGES.PAGE_IMAGES_KEY.'/thumbnails/');
|
||||
define('PAGE_THUMBNAILS_URL', DOMAIN_UPLOADS_PAGES.PAGE_IMAGES_KEY.'/thumbnails/');
|
||||
} else {
|
||||
define('PAGE_IMAGES_DIRECTORY', (IMAGE_RELATIVE_TO_ABSOLUTE? '' : HTML_PATH_UPLOADS));
|
||||
define('PAGE_IMAGES_URL', (IMAGE_RELATIVE_TO_ABSOLUTE? '' : DOMAIN_UPLOADS));
|
||||
define('PAGE_THUMBNAILS_DIRECTORY', PATH_UPLOADS_THUMBNAILS);
|
||||
define('PAGE_THUMBNAILS_HTML', HTML_PATH_UPLOADS_THUMBNAILS);
|
||||
define('PAGE_THUMBNAILS_URL', DOMAIN_UPLOADS_THUMBNAILS);
|
||||
}
|
||||
|
||||
// Title of the page
|
||||
$layout['title'] .= ' - '.$L->g('Edit content').' - '.$page->title();
|
29
bl-kernel/admin/controllers/editor.php
Normal file
|
@ -0,0 +1,29 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
|
||||
// ============================================================================
|
||||
// Authorization
|
||||
// ============================================================================
|
||||
|
||||
checkRole(array('admin', 'editor', 'author'));
|
||||
|
||||
// ============================================================================
|
||||
// Functions
|
||||
// ============================================================================
|
||||
|
||||
// ============================================================================
|
||||
// Main
|
||||
// ============================================================================
|
||||
|
||||
$pageKey = false;
|
||||
if (!empty($layout['parameters'])) {
|
||||
try {
|
||||
$pageKey = $layout['parameters'];
|
||||
$page = new Page($pageKey);
|
||||
} catch (Exception $e) {
|
||||
Log::set(__METHOD__.LOG_SEP.'An error occurred while trying to get the page: '.$pageKey, LOG_TYPE_ERROR);
|
||||
Redirect::page('content');
|
||||
}
|
||||
}
|
||||
|
||||
// HTML <title>
|
||||
$layout['title'] = $L->g('New content') . ' - ' . $layout['title'];
|
|
@ -1,32 +0,0 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
|
||||
// ============================================================================
|
||||
// Check role
|
||||
// ============================================================================
|
||||
|
||||
checkRole(array('admin'));
|
||||
|
||||
// ============================================================================
|
||||
// Functions
|
||||
// ============================================================================
|
||||
|
||||
// ============================================================================
|
||||
// Main before POST
|
||||
// ============================================================================
|
||||
|
||||
// ============================================================================
|
||||
// POST Method
|
||||
// ============================================================================
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
if (createCategory($_POST)) {
|
||||
Redirect::page('categories');
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Main after POST
|
||||
// ============================================================================
|
||||
|
||||
// Title of the page
|
||||
$layout['title'] .= ' - '.$L->g('New category');
|
|
@ -7,11 +7,23 @@ a {
|
|||
.btn:focus,
|
||||
.form-control:focus,
|
||||
.form-select:focus {
|
||||
outline: none;
|
||||
box-shadow: none;
|
||||
outline: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
.form-control:focus,
|
||||
.form-select:focus {
|
||||
border-color: #999999;
|
||||
}
|
||||
|
||||
|
||||
/* Icons */
|
||||
.bi {
|
||||
margin-right: .5rem!important;
|
||||
}
|
||||
|
||||
/* Buttons */
|
||||
.btn-primary-disabled {
|
||||
background-color: #4792ff !important;
|
||||
border-color: #4792ff !important;
|
||||
}
|
|
@ -23,7 +23,7 @@ div.sidebar .nav-item h4 {
|
|||
/*
|
||||
Editor
|
||||
*/
|
||||
#btnCurrenStatus {
|
||||
#btnCurrenType {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div aria-live="polite" aria-atomic="true" class="position-relative">
|
||||
<div class="toast-container position-absolute top-0 end-0 p-3">
|
||||
<div id="alert" class="toast d-flex align-items-center text-white bg-primary border-0" role="alert" aria-live="assertive" aria-atomic="true">
|
||||
<div class="toast-container position-absolute top-0 end-0 p-3" style="z-index:1050;">
|
||||
<div id="alert" class="toast d-flex align-items-center text-white border-0" role="alert" aria-live="assertive" aria-atomic="true">
|
||||
<div class="toast-body">Hello, I'm a Bludit alert!</div>
|
||||
<button type="button" class="btn-close btn-close-white ms-auto me-2" data-bs-dismiss="toast" aria-label="Close"></button>
|
||||
</div>
|
||||
|
@ -8,11 +8,24 @@
|
|||
</div>
|
||||
|
||||
<script>
|
||||
function showAlert(text) {
|
||||
function showAlert(text, background='primary') {
|
||||
$('#alert').removeClass('bg-danger bg-warning bg-primary').addClass('bg-'+background);
|
||||
$('#alert').children('.toast-body').html(text);
|
||||
$('#alert').toast('show');
|
||||
}
|
||||
|
||||
function showAlertError(text) {
|
||||
showAlert(text, 'danger');
|
||||
}
|
||||
|
||||
function showAlertWarning(text) {
|
||||
showAlert(text, 'warning');
|
||||
}
|
||||
|
||||
function showAlerInfo(text) {
|
||||
showAlert(text, 'primary');
|
||||
}
|
||||
|
||||
function hideAlert(text) {
|
||||
$('#alert').toast('hide');
|
||||
}
|
||||
|
|
|
@ -1,156 +0,0 @@
|
|||
<div class="modal" id="modal-fileManager" tabindex="-1">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
|
||||
<div class="d-flex align-items-center mb-2">
|
||||
<h3 class="me-auto m-0 p-0"><i class="bi bi-image"></i><?php $L->p('File Manager'); ?></h3>
|
||||
<label class="btn btn-primary"><i class="bi bi-upload"></i><?php $L->p('Upload file'); ?><input type="file" id="filesToUpload" name="filesToUpload[]" multiple hidden></label>
|
||||
<div class="progress d-none">
|
||||
<div class="progress-bar" role="progressbar" style="width: 25%" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Preview</th>
|
||||
<th scope="col">Filename</th>
|
||||
<th scope="col">Type</th>
|
||||
<th scope="col">Size</th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="fmFiles">
|
||||
<tr>
|
||||
<td class="align-middle">
|
||||
<img style="width: 32px" src="<?php echo HTML_PATH_CORE_IMG ?>default.svg" />
|
||||
</td>
|
||||
<td class="align-middle">photo.jpg</td>
|
||||
<td class="align-middle">image/jpeg</td>
|
||||
<td class="align-middle">300Kb</td>
|
||||
<td class="align-middle">
|
||||
<i class="bi bi-trash"></i><span><?php $L->p('Delete') ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// Open File Manager modal
|
||||
function fmOpen() {
|
||||
$('#modal-fileManager').modal('show');
|
||||
}
|
||||
|
||||
// Get files for the current page and show them
|
||||
function fmGetFiles() {
|
||||
logs('File Manager. Get files for page: ' + _pageKey);
|
||||
api.getPageFiles({
|
||||
'pageKey': _pageKey
|
||||
}).then(function(files) {
|
||||
fmDisplayFiles(files);
|
||||
});
|
||||
}
|
||||
|
||||
// Show the files in the table
|
||||
function fmDisplayFiles(files) {
|
||||
$('#fmFiles').empty();
|
||||
|
||||
if (files.length == 0) {
|
||||
logs('File Manager. File list empty.');
|
||||
return false;
|
||||
}
|
||||
|
||||
$.each(files, function(key, file) {
|
||||
var row = '<tr>' +
|
||||
' <td class="align-middle">' +
|
||||
' <img style="width: 32px" src="<?php echo HTML_PATH_CORE_IMG ?>default.svg" />' +
|
||||
' </td>' +
|
||||
' <td class="align-middle">' + file.filename + '</td>' +
|
||||
' <td class="align-middle">' + file.mime + '</td>' +
|
||||
' <td class="align-middle">' + formatBytes(file.size) + '</td>' +
|
||||
' <td class="align-middle">' +
|
||||
' <i class="bi bi-trash"></i><span><?php $L->p('Delete') ?></span>' +
|
||||
' </td>' +
|
||||
' </tr>';
|
||||
|
||||
$('#fmFiles').append(row);
|
||||
});
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Upload a file for the current page
|
||||
function fmUploadFile(file) {
|
||||
logs('File Manager. Uploading file.');
|
||||
|
||||
// Check file type/extension
|
||||
const validImageTypes = ['image/gif', 'image/jpeg', 'image/png', 'image/svg+xml'];
|
||||
if (!validImageTypes.includes(file.type)) {
|
||||
logs("File Manager. File type is not supported.");
|
||||
showAlert("<?php echo $L->g('File type is not supported. Allowed types:') . ' ' . implode(', ', $GLOBALS['ALLOWED_IMG_EXTENSION']) ?>");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check file size and compare with PHP upload_max_filesize
|
||||
if (file.size > UPLOAD_MAX_FILESIZE) {
|
||||
logs("File Manager. File size to big for PHP configuration.");
|
||||
showAlert("<?php echo $L->g('Maximum load file size allowed:') . ' ' . ini_get('upload_max_filesize') ?>");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Data to send via AJAX
|
||||
var formData = new FormData();
|
||||
formData.append("file", file);
|
||||
formData.append("token", api.body.token);
|
||||
formData.append("authentication", api.body.authentication);
|
||||
|
||||
$.ajax({
|
||||
url: api.apiURL + 'files/' + _pageKey,
|
||||
type: "POST",
|
||||
data: formData,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
xhr: function() {
|
||||
var xhr = $.ajaxSettings.xhr();
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", function(e) {
|
||||
if (e.lengthComputable) {
|
||||
var percentComplete = (e.loaded / e.total) * 100;
|
||||
logs("File Manager. Uploading file, percent complete: " + percentComplete + "%");
|
||||
}
|
||||
}, false);
|
||||
}
|
||||
return xhr;
|
||||
}
|
||||
}).done(function(data) {
|
||||
logs("File Manager. File uploaded.")
|
||||
logs(data);
|
||||
fmGetFiles();
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
// Input file change event
|
||||
$("#filesToUpload").on("change", function(e) {
|
||||
var filesToUpload = $("#filesToUpload")[0].files;
|
||||
for (var i = 0; i < filesToUpload.length; i++) {
|
||||
fmUploadFile(filesToUpload[i]);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
|
@ -17,7 +17,7 @@
|
|||
<?php $L->p('Website') ?></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'new-content' ?>">
|
||||
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'editor' ?>">
|
||||
<?php $L->p('New content') ?></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
|
|
@ -2,19 +2,19 @@
|
|||
<ul class="nav flex-column">
|
||||
|
||||
<li class="nav-item mb-3">
|
||||
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'new-content' ?>">
|
||||
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'editor' ?>">
|
||||
<i class="bi-plus-circle"></i>
|
||||
<?php $L->p('New content') ?>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'new-content' ?>">
|
||||
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'dashboard' ?>">
|
||||
<i class="bi-kanban"></i>
|
||||
<?php $L->p('Dashboard') ?>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="<?php echo HTML_PATH_ADMIN_ROOT.'new-content' ?>">
|
||||
<a class="nav-link" href="<?php echo DOMAIN_BASE ?>">
|
||||
<i class="bi-house"></i>
|
||||
<?php $L->p('Website') ?>
|
||||
</a>
|
||||
|
|
50
bl-kernel/admin/views/add-category.php
Normal file
|
@ -0,0 +1,50 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
|
||||
|
||||
<div class="d-flex align-items-center mb-4">
|
||||
<h2 class="m-0"><i class="bi bi-bookmark"></i><?php $L->p('New category') ?></h2>
|
||||
<div class="ms-auto">
|
||||
<button id="btnSave" type="button" class="btn btn-primary btn-sm"><?php $L->p('Save') ?></button>
|
||||
<a id="btnCancel" class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT . 'categories' ?>" role="button"><?php $L->p('Cancel') ?></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
echo Bootstrap::formInputText(array(
|
||||
'id' => 'name',
|
||||
'name' => 'name',
|
||||
'label' => $L->g('Name'),
|
||||
'value' => isset($_POST['category']) ? $_POST['category'] : ''
|
||||
));
|
||||
|
||||
echo Bootstrap::formTextarea(array(
|
||||
'id' => 'description',
|
||||
'name' => 'description',
|
||||
'label' => $L->g('Description'),
|
||||
'value' => isset($_POST['description']) ? $_POST['description'] : '',
|
||||
'rows' => 5
|
||||
));
|
||||
?>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#btnSave').on('click', function() {
|
||||
var name = $('#name').val();
|
||||
|
||||
if (name.length < 1) {
|
||||
showAlertError("<?php $L->p('Please complete the name field.') ?>");
|
||||
return false;
|
||||
}
|
||||
|
||||
var args = {
|
||||
name: name,
|
||||
description: $('#description').val()
|
||||
};
|
||||
api.createCategory(args).then(function(key) {
|
||||
logs('Category created. Key: ' + key);
|
||||
window.location.replace('<?php echo HTML_PATH_ADMIN_ROOT . 'categories' ?>');
|
||||
});
|
||||
showAlertInfo("Category created.");
|
||||
return true;
|
||||
});
|
||||
});
|
||||
</script>
|
89
bl-kernel/admin/views/add-user.php
Normal file
|
@ -0,0 +1,89 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
|
||||
|
||||
<div class="d-flex align-items-center mb-4">
|
||||
<h2 class="m-0"><i class="bi bi-person"></i><?php $L->p('New user') ?></h2>
|
||||
<div class="ms-auto">
|
||||
<button id="btnSave" type="button" class="btn btn-primary btn-sm"><?php $L->p('Save') ?></button>
|
||||
<a id="btnCancel" class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT . 'users' ?>" role="button"><?php $L->p('Cancel') ?></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
echo Bootstrap::formInputText(array(
|
||||
'id' => 'username',
|
||||
'name' => 'username',
|
||||
'label' => $L->g('Username'),
|
||||
'value' => ''
|
||||
));
|
||||
|
||||
echo Bootstrap::formInputText(array(
|
||||
'id' => 'password',
|
||||
'name' => 'password',
|
||||
'type' => 'password',
|
||||
'label' => $L->g('Password'),
|
||||
'value' => ''
|
||||
));
|
||||
|
||||
echo Bootstrap::formInputText(array(
|
||||
'id' => 'confirmPassword',
|
||||
'name' => 'confirmPassword',
|
||||
'type' => 'password',
|
||||
'label' => $L->g('Confirm Password'),
|
||||
'value' => ''
|
||||
));
|
||||
|
||||
echo Bootstrap::formSelect(array(
|
||||
'name' => 'role',
|
||||
'label' => $L->g('Role'),
|
||||
'options' => array('author' => $L->g('Author'), 'editor' => $L->g('Editor'), 'admin' => $L->g('Administrator')),
|
||||
'selected' => 'Author',
|
||||
'tip' => $L->g('author-can-write-and-edit-their-own-content')
|
||||
));
|
||||
|
||||
echo Bootstrap::formInputText(array(
|
||||
'id' => 'email',
|
||||
'name' => 'email',
|
||||
'type' => 'email',
|
||||
'label' => $L->g('Email'),
|
||||
'value' => ''
|
||||
));
|
||||
?>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#btnSave').on('click', function() {
|
||||
var username = $('#username').val();
|
||||
var password = $('#password').val();
|
||||
var confirmPassword = $('#confirmPassword').val();
|
||||
|
||||
if (username.length < 1) {
|
||||
showAlertError("<?php $L->p('Please complete the username field.') ?>");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (password.length < PASSWORD_LENGTH) {
|
||||
showAlertError("<?php $L->p('Password must be at least 6 characters long') ?>");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (password !== confirmPassword) {
|
||||
showAlertError("<?php $L->p('The password and confirmation password do not match') ?>");
|
||||
return false;
|
||||
}
|
||||
|
||||
var args = {
|
||||
username: username,
|
||||
password: password,
|
||||
role: $('#role').val(),
|
||||
email: $('#email').val()
|
||||
};
|
||||
api.createUser(args).then(function(username) {
|
||||
logs('User created. Username: ' + username);
|
||||
window.location.replace(HTML_PATH_ADMIN_ROOT + 'users');
|
||||
});
|
||||
|
||||
showAlertInfo("User created.");
|
||||
return true;
|
||||
});
|
||||
});
|
||||
</script>
|
|
@ -1,59 +0,0 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
|
||||
|
||||
<?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
|
||||
|
||||
<div class="align-middle">
|
||||
<div class="float-end mt-1">
|
||||
<button type="submit" class="btn btn-primary btn-sm" name="save"><?php $L->p('Save') ?></button>
|
||||
<a class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT.'themes' ?>" role="button"><?php $L->p('Cancel') ?></a>
|
||||
</div>
|
||||
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('Blocks'), 'icon'=>'box')); ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
// Token CSRF
|
||||
echo Bootstrap::formInputHidden(array(
|
||||
'name'=>'tokenCSRF',
|
||||
'value'=>$security->getTokenCSRF()
|
||||
));
|
||||
|
||||
foreach ($blocks->getAll() as $block) {
|
||||
echo Bootstrap::formTitle(array('title'=>$block->title()));
|
||||
|
||||
if (Text::isNotEmpty( $block->description() )) {
|
||||
echo Bootstrap::alert(array('class'=>'alert-primary', 'text'=>$block->description()));
|
||||
}
|
||||
|
||||
echo Bootstrap::formInputText(array(
|
||||
'name'=>'key[]',
|
||||
'label'=>$L->g('Key'),
|
||||
'value'=>$block->key(),
|
||||
'class'=>'',
|
||||
'placeholder'=>'',
|
||||
'tip'=>'',
|
||||
'readonly'=>true
|
||||
));
|
||||
|
||||
echo Bootstrap::formInputText(array(
|
||||
'name'=>'title[]',
|
||||
'label'=>$L->g('title'),
|
||||
'value'=>$block->title(),
|
||||
'class'=>'',
|
||||
'placeholder'=>'',
|
||||
'tip'=>''
|
||||
));
|
||||
|
||||
echo Bootstrap::formTextarea(array(
|
||||
'name'=>'value[]',
|
||||
'label'=>$L->g('Value'),
|
||||
'value'=>$block->value(),
|
||||
'class'=>'',
|
||||
'placeholder'=>'',
|
||||
'tip'=>'',
|
||||
'rows'=>5
|
||||
));
|
||||
}
|
||||
|
||||
echo Bootstrap::formClose();
|
||||
|
||||
?>
|
|
@ -1,18 +1,20 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
|
||||
|
||||
echo Bootstrap::pageTitle(array('title'=>$L->g('Categories'), 'icon'=>'tags'));
|
||||
<div class="d-flex align-items-center mb-4">
|
||||
<h2 class="m-0"><i class="bi bi-bookmark"></i><?php $L->p('Categories') ?></h2>
|
||||
<div class="ms-auto">
|
||||
<a id="btnNew" class="btn btn-primary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT . 'add-category' ?>" role="button"><i class="bi bi-plus-circle"></i><?php $L->p('Add a new category') ?></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
echo Bootstrap::link(array(
|
||||
'title'=>$L->g('Add a new category'),
|
||||
'href'=>HTML_PATH_ADMIN_ROOT.'new-category',
|
||||
'icon'=>'plus'
|
||||
));
|
||||
<?php
|
||||
|
||||
echo '
|
||||
<table class="table table-striped mt-3">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="border-bottom-0" scope="col">'.$L->g('Name').'</th>
|
||||
<th class="border-bottom-0" scope="col">'.$L->g('Description').'</th>
|
||||
<th class="border-bottom-0" scope="col">'.$L->g('URL').'</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -20,14 +22,19 @@ echo '
|
|||
';
|
||||
|
||||
foreach ($categories->keys() as $key) {
|
||||
$category = new Category($key);
|
||||
echo '<tr>';
|
||||
echo '<td><a href="'.HTML_PATH_ADMIN_ROOT.'edit-category/'.$key.'">'.$category->name().'</a></td>';
|
||||
echo '<td><a href="'.$category->permalink().'">'.$url->filters('category', false).$key.'</a></td>';
|
||||
echo '</tr>';
|
||||
try {
|
||||
$category = new Category($key);
|
||||
echo '<tr>';
|
||||
echo '<td class="pt-3 pb-3"><a href="'.HTML_PATH_ADMIN_ROOT.'edit-category/'.$key.'">'.$category->name().'</a></td>';
|
||||
echo '<td class="pt-3 pb-3"><span>'.$category->description().'</span></td>';
|
||||
echo '<td class="pt-3 pb-3"><a href="'.$category->permalink().'">'.$category->permalink().'</a></td>';
|
||||
echo '</tr>';
|
||||
} catch (Exception $e) {
|
||||
// Continue
|
||||
}
|
||||
}
|
||||
|
||||
echo '
|
||||
</tbody>
|
||||
</table>
|
||||
';
|
||||
';
|
|
@ -1,8 +1,16 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
|
||||
|
||||
<div class="d-flex align-items-center mb-4">
|
||||
<h2 class="m-0"><i class="bi bi-folder"></i><?php $L->p('Content') ?></h2>
|
||||
<div class="ms-auto">
|
||||
<a id="btnNew" class="btn btn-primary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT . 'editor' ?>" role="button"><i class="bi bi-plus-circle"></i><?php $L->p('Add a new page') ?></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
echo Bootstrap::pageTitle(array('title'=>$L->g('Content'), 'icon'=>'archive'));
|
||||
|
||||
function table($type) {
|
||||
function table($type)
|
||||
{
|
||||
global $url;
|
||||
global $L;
|
||||
global $published;
|
||||
|
@ -10,9 +18,8 @@ function table($type) {
|
|||
global $scheduled;
|
||||
global $static;
|
||||
global $sticky;
|
||||
global $autosave;
|
||||
|
||||
if ($type=='published') {
|
||||
if ($type == 'published') {
|
||||
$list = $published;
|
||||
if (empty($list)) {
|
||||
echo '<p class="text-muted p-4">';
|
||||
|
@ -20,7 +27,7 @@ function table($type) {
|
|||
echo '</p>';
|
||||
return false;
|
||||
}
|
||||
} elseif ($type=='draft') {
|
||||
} elseif ($type == 'draft') {
|
||||
$list = $drafts;
|
||||
if (empty($list)) {
|
||||
echo '<p class="text-muted p-4">';
|
||||
|
@ -28,7 +35,7 @@ function table($type) {
|
|||
echo '</p>';
|
||||
return false;
|
||||
}
|
||||
} elseif ($type=='scheduled') {
|
||||
} elseif ($type == 'scheduled') {
|
||||
$list = $scheduled;
|
||||
if (empty($list)) {
|
||||
echo '<p class="text-muted p-4">';
|
||||
|
@ -36,7 +43,7 @@ function table($type) {
|
|||
echo '</p>';
|
||||
return false;
|
||||
}
|
||||
} elseif ($type=='static') {
|
||||
} elseif ($type == 'static') {
|
||||
$list = $static;
|
||||
if (empty($list)) {
|
||||
echo '<p class="text-muted p-4">';
|
||||
|
@ -44,7 +51,7 @@ function table($type) {
|
|||
echo '</p>';
|
||||
return false;
|
||||
}
|
||||
} elseif ($type=='sticky') {
|
||||
} elseif ($type == 'sticky') {
|
||||
$list = $sticky;
|
||||
if (empty($list)) {
|
||||
echo '<p class="text-muted p-4">';
|
||||
|
@ -52,73 +59,76 @@ function table($type) {
|
|||
echo '</p>';
|
||||
return false;
|
||||
}
|
||||
} elseif ($type=='autosave') {
|
||||
$list = $autosave;
|
||||
}
|
||||
|
||||
echo '<table class="table table-striped m-0"><tbody><tr></tr>';
|
||||
echo '<table class="table table-striped"><tbody><tr></tr>';
|
||||
|
||||
if ( (ORDER_BY=='position') || $type=='static' ) {
|
||||
if ((ORDER_BY == 'position') || $type == 'static') {
|
||||
foreach ($list as $pageKey) {
|
||||
try {
|
||||
$page = new Page($pageKey);
|
||||
if (!$page->isChild()) {
|
||||
echo '<tr>
|
||||
<td>
|
||||
<div>
|
||||
<a style="font-size: 1.1em" href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$page->key().'">'
|
||||
.($page->title()?$page->title():'<span class="label-empty-title">'.$L->g('Empty title').'</span> ')
|
||||
.'</a>
|
||||
</div>
|
||||
<div>
|
||||
<p style="font-size: 0.8em" class="m-0 text-uppercase text-muted">'.( ((ORDER_BY=='position') || ($type!='published'))?$L->g('Position').': '.$page->position():$page->date(MANAGE_CONTENT_DATE_FORMAT) ).'</p>
|
||||
</div>
|
||||
echo '<tr>';
|
||||
|
||||
echo '<td class="pt-3 pb-3">
|
||||
<div>
|
||||
<a href="' . HTML_PATH_ADMIN_ROOT . 'editor/' . $page->key() . '">' . ($page->title() ? $page->title() : '<span class="text-muted">' . $L->g('Empty title') . '</span> ') . '</a>
|
||||
</div>
|
||||
<div>
|
||||
<span class="m-0 text-uppercase text-muted" style="font-size: 0.8rem"> ' . (((ORDER_BY == 'position') || ($type != 'published')) ? $L->g('Position') . ': ' . $page->position() : $page->date(MANAGE_CONTENT_DATE_FORMAT)) . '</span>
|
||||
</div>
|
||||
</td>';
|
||||
|
||||
if ($type=='published' || $type=='static' || $type=='sticky') {
|
||||
$friendlyURL = Text::isEmpty($url->filters('page')) ? '/'.$page->key() : '/'.$url->filters('page').'/'.$page->key();
|
||||
echo '<td class="d-none d-lg-table-cell"><a target="_blank" href="'.$page->permalink().'">'.$friendlyURL.'</a></td>';
|
||||
}
|
||||
echo '<td class="pt-3 pb-3 d-none d-lg-table-cell">' . $L->get('Category') . ': ' . ($page->category() ? $page->category() : $L->get('uncategorized')) . '</td>';
|
||||
|
||||
echo '<td class="contentTools pt-3 text-center d-sm-table-cell">'.PHP_EOL;
|
||||
echo '<a class="text-secondary d-none d-md-inline" target="_blank" href="'.$page->permalink().'"><i class="bi-desktop"></i>'.$L->g('View').'</a>'.PHP_EOL;
|
||||
echo '<a class="text-secondary d-none d-md-inline ms-2" href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$page->key().'"><i class="bi-edit"></i>'.$L->g('Edit').'</a>'.PHP_EOL;
|
||||
if (count($page->children())==0) {
|
||||
echo '<a href="#" class="ms-2 text-danger deletePageButton d-block d-sm-inline" data-toggle="modal" data-target="#jsdeletePageModal" data-key="'.$page->key().'"><i class="bi-trash"></i>'.$L->g('Delete').'</a>'.PHP_EOL;
|
||||
echo '<td class="pt-3 text-center d-sm-table-cell">
|
||||
<div class="dropdown">
|
||||
<button type="button" class="btn dropdown-toggle btn-secondary btn-sm" type="button" id="dropdownOptions" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<i class="bi bi-gear"></i></span>' . $L->g('Options') . '
|
||||
</button>
|
||||
<div class="dropdown-menu ps-1 pe-1" aria-labelledby="dropdownOptions">
|
||||
<a class="dropdown-item" target="_blank" href="' . $page->permalink() . '"><i class="bi bi-box-arrow-up-right"></i>' . $L->g('View') . '</a>
|
||||
<a class="dropdown-item" href="' . HTML_PATH_ADMIN_ROOT . 'editor/' . $page->key() . '"><i class="bi bi-pencil-square"></i>' . $L->g('Edit') . '</a>
|
||||
<a><hr class="dropdown-divider"></a>
|
||||
';
|
||||
if (count($page->children()) == 0) {
|
||||
echo '<a data-toggle="modal" data-target="#modalDeletePage" data-key="' . $page->key() . '" class="btnDeletePage dropdown-item" href="#"><i class="bi bi-trash"></i>' . $L->g('Delete') . '</a>';
|
||||
}
|
||||
echo '</td>';
|
||||
echo '</div>
|
||||
</div>
|
||||
</td>';
|
||||
|
||||
echo '</tr>';
|
||||
|
||||
foreach ($page->children() as $child) {
|
||||
//if ($child->published()) {
|
||||
echo '<tr>
|
||||
<td class="child">
|
||||
<div>
|
||||
<a style="font-size: 1.1em" href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$child->key().'">'
|
||||
.($child->title()?$child->title():'<span class="label-empty-title">'.$L->g('Empty title').'</span> ')
|
||||
.'</a>
|
||||
</div>
|
||||
<div>
|
||||
<p style="font-size: 0.8em" class="m-0 text-uppercase text-muted">'.( ((ORDER_BY=='position') || ($type!='published'))?$L->g('Position').': '.$child->position():$child->date(MANAGE_CONTENT_DATE_FORMAT) ).'</p>
|
||||
</div>
|
||||
echo '<tr>';
|
||||
|
||||
echo '<td class="ps-3 pt-3 pb-3">
|
||||
<div>
|
||||
<a href="' . HTML_PATH_ADMIN_ROOT . 'editor/' . $child->key() . '">' . ($child->title() ? $child->title() : '<span class="text-muted">' . $L->g('Empty title') . '</span> ') . '</a>
|
||||
</div>
|
||||
<div>
|
||||
<span class="m-0 text-uppercase text-muted" style="font-size: 0.8rem">'.( ((ORDER_BY=='position') || ($type!='published'))?$L->g('Position').': '.$child->position():$child->date(MANAGE_CONTENT_DATE_FORMAT) ).'</span>
|
||||
</div>
|
||||
</td>';
|
||||
|
||||
if ($type=='published' || $type=='static' || $type=='sticky') {
|
||||
$friendlyURL = Text::isEmpty($url->filters('page')) ? '/'.$child->key() : '/'.$url->filters('page').'/'.$child->key();
|
||||
echo '<td class="d-none d-lg-table-cell"><a target="_blank" href="'.$child->permalink().'">'.$friendlyURL.'</a></td>';
|
||||
}
|
||||
echo '<td class="pt-3 pb-3 d-none d-lg-table-cell">' . $L->get('Category') . ': ' . ($child->category() ? $child->category() : $L->get('uncategorized')) . '</td>';
|
||||
|
||||
echo '<td class="contentTools pt-3 text-center d-sm-table-cell">'.PHP_EOL;
|
||||
if ($type=='published' || $type=='static' || $type=='sticky') {
|
||||
echo '<a class="text-secondary d-none d-md-inline" target="_blank" href="'.$child->permalink().'"><i class="bi-desktop"></i>'.$L->g('View').'</a>'.PHP_EOL;
|
||||
}
|
||||
echo '<a class="text-secondary d-none d-md-inline ms-2" href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$child->key().'"><i class="bi-edit"></i>'.$L->g('Edit').'</a>'.PHP_EOL;
|
||||
echo '<a class="ms-2 text-danger deletePageButton d-block d-sm-inline" href="#" data-toggle="modal" data-target="#jsdeletePageModal" data-key="'.$child->key().'"><i class="bi-trash"></i>'.$L->g('Delete').'</a>'.PHP_EOL;
|
||||
echo '</td>';
|
||||
echo '<td class="pt-3 text-center d-sm-table-cell">
|
||||
<div class="dropdown">
|
||||
<button type="button" class="btn dropdown-toggle btn-secondary btn-sm" type="button" id="dropdownOptions" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<i class="bi bi-gear"></i></span>' . $L->g('Options') . '
|
||||
</button>
|
||||
<div class="dropdown-menu ps-1 pe-1" aria-labelledby="dropdownOptions">
|
||||
<a class="dropdown-item" target="_blank" href="' . $child->permalink() . '"><i class="bi bi-box-arrow-up-right"></i>' . $L->g('View') . '</a>
|
||||
<a class="dropdown-item" href="' . HTML_PATH_ADMIN_ROOT . 'editor/' . $child->key() . '"><i class="bi bi-pencil-square"></i>' . $L->g('Edit') . '</a>
|
||||
<a><hr class="dropdown-divider"></a>
|
||||
<a data-toggle="modal" data-target="#modalDeletePage" data-key="' . $child->key() . '" class="btnDeletePage dropdown-item" href="#"><i class="bi bi-trash"></i>' . $L->g('Delete') . '</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>';
|
||||
|
||||
echo '</tr>';
|
||||
//}
|
||||
}
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
|
@ -130,28 +140,31 @@ function table($type) {
|
|||
try {
|
||||
$page = new Page($pageKey);
|
||||
echo '<tr>';
|
||||
echo '<td class="pt-3">
|
||||
|
||||
echo '<td class="pt-3 pb-3">
|
||||
<div>
|
||||
<a style="font-size: 1.1em" href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$page->key().'">'
|
||||
.($page->title()?$page->title():'<span class="label-empty-title">'.$L->g('Empty title').'</span> ')
|
||||
.'</a>
|
||||
<a href="' . HTML_PATH_ADMIN_ROOT . 'editor/' . $page->key() . '">' . ($page->title() ? $page->title() : '<span class="text-muted">' . $L->g('Empty title') . '</span> ') . '</a>
|
||||
</div>
|
||||
<div>
|
||||
<p style="font-size: 0.8em" class="m-0 text-uppercase text-muted">'.( ($type=='scheduled')?$L->g('Scheduled').': '.$page->date(SCHEDULED_DATE_FORMAT):$page->date(MANAGE_CONTENT_DATE_FORMAT) ).'</p>
|
||||
<span class="m-0 text-uppercase text-muted" style="font-size: 0.8rem"> ' . (($type == 'scheduled') ? $L->g('Scheduled') . ': ' . $page->date(SCHEDULED_DATE_FORMAT) : $page->date(MANAGE_CONTENT_DATE_FORMAT)) . '</span>
|
||||
</div>
|
||||
</td>';
|
||||
|
||||
echo '<td class="pt-3 d-none d-lg-table-cell">'.$L->get('Category').': '.($page->category()?$page->category():$L->get('uncategorized')).'</td>';
|
||||
echo '<td class="pt-3 pb-3 d-none d-lg-table-cell">' . $L->get('Category') . ': ' . ($page->category() ? $page->category() : $L->get('uncategorized')) . '</td>';
|
||||
|
||||
echo '<td class="contentTools pt-3 text-center d-sm-table-cell">'.PHP_EOL;
|
||||
if ($type=='published' || $type=='static' || $type=='sticky') {
|
||||
echo '<a class="text-secondary d-none d-md-inline" target="_blank" href="'.$page->permalink().'"><i class="bi-desktop"></i>'.$L->g('View').'</a>'.PHP_EOL;
|
||||
}
|
||||
echo '<a class="text-secondary d-none d-md-inline ms-2" href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$page->key().'"><i class="bi-edit"></i>'.$L->g('Edit').'</a>'.PHP_EOL;
|
||||
if (count($page->children())==0) {
|
||||
echo '<a href="#" class="ms-2 text-danger deletePageButton d-block d-sm-inline" data-toggle="modal" data-target="#jsdeletePageModal" data-key="'.$page->key().'"><i class="bi-trash"></i>'.$L->g('Delete').'</a>'.PHP_EOL;
|
||||
}
|
||||
echo '</td>';
|
||||
echo '<td class="pt-3 text-center d-sm-table-cell">
|
||||
<div class="dropdown">
|
||||
<button type="button" class="btn dropdown-toggle btn-secondary btn-sm" type="button" id="dropdownOptions" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<i class="bi bi-gear"></i></span>' . $L->g('Options') . '
|
||||
</button>
|
||||
<div class="dropdown-menu ps-1 pe-1" aria-labelledby="dropdownOptions">
|
||||
<a class="dropdown-item" target="_blank" href="' . $page->permalink() . '"><i class="bi bi-box-arrow-up-right"></i>' . $L->g('View') . '</a>
|
||||
<a class="dropdown-item" href="' . HTML_PATH_ADMIN_ROOT . 'editor/' . $page->key() . '"><i class="bi bi-pencil-square"></i>' . $L->g('Edit') . '</a>
|
||||
<a><hr class="dropdown-divider"></a>
|
||||
<a data-toggle="modal" data-target="#modalDeletePage" data-key="' . $page->key() . '" class="btnDeletePage dropdown-item" href="#"><i class="bi bi-trash"></i>' . $L->g('Delete') . '</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>';
|
||||
|
||||
echo '</tr>';
|
||||
} catch (Exception $e) {
|
||||
|
@ -168,142 +181,115 @@ function table($type) {
|
|||
|
||||
?>
|
||||
|
||||
<!-- TABS -->
|
||||
<!-- Tabs -->
|
||||
<ul class="nav nav-tabs ps-3" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" id="pages-tab" data-toggle="tab" href="#pages" role="tab"><?php $L->p('Pages') ?></a>
|
||||
<a class="nav-link active" id="pages-tab" data-bs-toggle="tab" href="#pages" role="tab" aria-controls="pages" aria-selected="true"><?php $L->p('Pages') ?></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="static-tab" data-toggle="tab" href="#static" role="tab"><?php $L->p('Static') ?></a>
|
||||
<a class="nav-link" id="static-tab" data-bs-toggle="tab" href="#static" role="tab" aria-controls="static" aria-selected="true"><?php $L->p('Static') ?></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="sticky-tab" data-toggle="tab" href="#sticky" role="tab"><?php $L->p('Sticky') ?></a>
|
||||
<a class="nav-link" id="sticky-tab" data-bs-toggle="tab" href="#sticky" role="tab" aria-controls="sticky" aria-selected="true"><?php $L->p('Sticky') ?></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="scheduled-tab" data-toggle="tab" href="#scheduled" role="tab"><?php $L->p('Scheduled') ?> <?php if (count($scheduled)>0) { echo '<span class="badge badge-danger">'.count($scheduled).'</span>'; } ?></a>
|
||||
<a class="nav-link" id="scheduled-tab" data-bs-toggle="tab" href="#scheduled" role="tab" aria-controls="scheduled" aria-selected="true"><?php $L->p('Scheduled') ?>
|
||||
<?php if (count($scheduled) > 0) {
|
||||
echo '<span class="badge badge-danger">' . count($scheduled) . '</span>';
|
||||
} ?>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="draft-tab" data-toggle="tab" href="#draft" role="tab"><?php $L->p('Draft') ?></a>
|
||||
<a class="nav-link" id="draft-tab" data-bs-toggle="tab" href="#draft" role="tab" aria-controls="draft" aria-selected="true"><?php $L->p('Draft') ?></a>
|
||||
</li>
|
||||
<?php if (!empty($autosave)): ?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="autosave-tab" data-toggle="tab" href="#autosave" role="tab"><?php $L->p('Autosave') ?></a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- TABS PAGES -->
|
||||
<div class="tab-pane show active" id="pages" role="tabpanel">
|
||||
<!-- End Tabs -->
|
||||
|
||||
<!-- Content -->
|
||||
<div class="tab-content">
|
||||
|
||||
<!-- Tab pages -->
|
||||
<div class="tab-pane show active" id="pages" role="tabpanel">
|
||||
<?php table('published'); ?>
|
||||
|
||||
<?php if (Paginator::numberOfPages() > 1): ?>
|
||||
<!-- Paginator -->
|
||||
<nav class="paginator pt-3">
|
||||
<ul class="pagination flex-wrap justify-content-center">
|
||||
<!-- The paginator is defined in the rule 99.paginator.php for the admin area -->
|
||||
<?php if (Paginator::numberOfPages() > 1) : ?>
|
||||
<nav class="mt-4 mb-4">
|
||||
<ul class="pagination flex-wrap justify-content-center">
|
||||
<!-- First button -->
|
||||
<li class="page-item <?php if (!Paginator::showPrev()) echo 'disabled' ?>">
|
||||
<a class="page-link" href="<?php echo Paginator::firstPageUrl() ?>"><i class="bi bi-arrow-left-circle"></i><?php echo $L->get('First'); ?></a>
|
||||
</li>
|
||||
|
||||
<!-- First button -->
|
||||
<li class="page-item <?php if (!Paginator::showPrev()) echo 'disabled' ?>">
|
||||
<a class="page-link" href="<?php echo Paginator::firstPageUrl() ?>"><span class="align-middle bi-media-skip-backward"></span> <?php echo $L->get('First'); ?></a>
|
||||
</li>
|
||||
<!-- Previous button -->
|
||||
<li class="page-item <?php if (!Paginator::showPrev()) echo 'disabled' ?>">
|
||||
<a class="page-link" href="<?php echo Paginator::previousPageUrl() ?>"><?php echo $L->get('Previous'); ?></a>
|
||||
</li>
|
||||
|
||||
<!-- Previous button -->
|
||||
<li class="page-item <?php if (!Paginator::showPrev()) echo 'disabled' ?>">
|
||||
<a class="page-link" href="<?php echo Paginator::previousPageUrl() ?>"><?php echo $L->get('Previous'); ?></a>
|
||||
</li>
|
||||
<li class="page-item"><span class="page-link text-muted"><?php echo Paginator::currentPage() ?> / <?php echo Paginator::numberOfPages() ?></span></li>
|
||||
|
||||
<!-- Next button -->
|
||||
<li class="page-item <?php if (!Paginator::showNext()) echo 'disabled' ?>">
|
||||
<a class="page-link" href="<?php echo Paginator::nextPageUrl() ?>"><?php echo $L->get('Next'); ?></a>
|
||||
</li>
|
||||
<!-- Next button -->
|
||||
<li class="page-item <?php if (!Paginator::showNext()) echo 'disabled' ?>">
|
||||
<a class="page-link" href="<?php echo Paginator::nextPageUrl() ?>"><?php echo $L->get('Next'); ?></a>
|
||||
</li>
|
||||
|
||||
<!-- Last button -->
|
||||
<li class="page-item <?php if (!Paginator::showNext()) echo 'disabled' ?>">
|
||||
<a class="page-link" href="<?php echo Paginator::lastPageUrl() ?>"><?php echo $L->get('Last'); ?> <span class="align-middle bi-media-skip-forward"></span></a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
<!-- Last button -->
|
||||
<li class="page-item <?php if (!Paginator::showNext()) echo 'disabled' ?>">
|
||||
<a class="page-link" href="<?php echo Paginator::lastPageUrl() ?>"><?php echo $L->get('Last'); ?><i class="ms-2 bi bi-arrow-right-circle"></i></a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
<!-- End Paginator -->
|
||||
</div>
|
||||
<!-- End Tab pages -->
|
||||
|
||||
<!-- TABS STATIC -->
|
||||
<div class="tab-pane" id="static" role="tabpanel">
|
||||
<?php table('static'); ?>
|
||||
<?php table('static'); ?>
|
||||
</div>
|
||||
|
||||
<!-- TABS STICKY -->
|
||||
<div class="tab-pane" id="sticky" role="tabpanel">
|
||||
<?php table('sticky'); ?>
|
||||
<?php table('sticky'); ?>
|
||||
</div>
|
||||
|
||||
<!-- TABS SCHEDULED -->
|
||||
<div class="tab-pane" id="scheduled" role="tabpanel">
|
||||
<?php table('scheduled'); ?>
|
||||
<?php table('scheduled'); ?>
|
||||
</div>
|
||||
|
||||
<!-- TABS DRAFT -->
|
||||
<div class="tab-pane" id="draft" role="tabpanel">
|
||||
<?php table('draft'); ?>
|
||||
<?php table('draft'); ?>
|
||||
</div>
|
||||
|
||||
<!-- TABS AUTOSAVE -->
|
||||
<?php if (!empty($autosave)): ?>
|
||||
<div class="tab-pane" id="autosave" role="tabpanel">
|
||||
<?php table('autosave'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<!-- End Content -->
|
||||
|
||||
<!-- Modal for delete page -->
|
||||
<?php
|
||||
echo Bootstrap::modal(array(
|
||||
'buttonPrimary'=>$L->g('Delete'),
|
||||
'buttonPrimaryClass'=>'btn-danger deletePageModalAcceptButton',
|
||||
'buttonSecondary'=>$L->g('Cancel'),
|
||||
'buttonSecondaryClass'=>'btn-link',
|
||||
'modalTitle'=>$L->g('Delete content'),
|
||||
'modalText'=>$L->g('Are you sure you want to delete this page'),
|
||||
'modalId'=>'jsdeletePageModal'
|
||||
));
|
||||
?>
|
||||
<!-- Modal Delete page -->
|
||||
<div class="modal" id="modalDeletePage" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<p class="fw-bold text-danger"><?php $L->p('Are you sure you want to delete this page') ?></p>
|
||||
<p class="fw-bold" id="deletePageTip"></p>
|
||||
</div>
|
||||
<div class="modal-footer ps-2 pe-2 pt-1 pb-1">
|
||||
<button id="btnCancel" type="button" class="btn fw-bold me-auto"><i class="bi bi-x-square"></i>Cancel</button>
|
||||
<button id="btnConfirm" type="button" class="btn fw-bold text-success"><i class="bi bi-check-square"></i>Confirm</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var key = false;
|
||||
|
||||
// Button for delete a page in the table
|
||||
$(".deletePageButton").on("click", function() {
|
||||
key = $(this).data('key');
|
||||
$(document).ready(function() {
|
||||
// Button for delete a page
|
||||
$(".btnDeletePage").on("click", function() {
|
||||
var key = $(this).data('key');
|
||||
$('#deletePageTip').html(key);
|
||||
$('#modalDeletePage').modal('show');
|
||||
});
|
||||
});
|
||||
|
||||
// Event from button accept from the modal
|
||||
$(".deletePageModalAcceptButton").on("click", function() {
|
||||
|
||||
var form = jQuery('<form>', {
|
||||
'action': HTML_PATH_ADMIN_ROOT+'edit-content/'+key,
|
||||
'method': 'post',
|
||||
'target': '_top'
|
||||
}).append(jQuery('<input>', {
|
||||
'type': 'hidden',
|
||||
'name': 'tokenCSRF',
|
||||
'value': tokenCSRF
|
||||
}).append(jQuery('<input>', {
|
||||
'type': 'hidden',
|
||||
'name': 'key',
|
||||
'value': key
|
||||
}).append(jQuery('<input>', {
|
||||
'type': 'hidden',
|
||||
'name': 'type',
|
||||
'value': 'delete'
|
||||
}))));
|
||||
|
||||
form.hide().appendTo("body").submit();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
// Open the tab defined in the URL
|
||||
const anchor = window.location.hash;
|
||||
$(`a[href="${anchor}"]`).tab('show');
|
||||
</script>
|
||||
<!-- End Modal Delete page -->
|
|
@ -74,7 +74,7 @@
|
|||
html += '<div class="search-suggestion-item">'+data.text+' <span class="badge badge-pill badge-light">'+data.type+'</span></div>';
|
||||
html += '<div class="search-suggestion-options">';
|
||||
html += '<a target="_blank" href="'+DOMAIN_PAGES+data.id+'"><?php $L->p('view') ?></a>';
|
||||
html += '<a class="ms-2" href="'+DOMAIN_ADMIN+'edit-content/'+data.id+'"><?php $L->p('edit') ?></a>';
|
||||
html += '<a class="ms-2" href="'+DOMAIN_ADMIN+'editor/'+data.id+'"><?php $L->p('edit') ?></a>';
|
||||
html += '</div></div>';
|
||||
}
|
||||
|
||||
|
|
|
@ -1,556 +0,0 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
|
||||
|
||||
<?php
|
||||
|
||||
// FORM START
|
||||
echo Bootstrap::formOpen(array(
|
||||
'id'=>'jsform',
|
||||
'class'=>'d-flex flex-column h-100'
|
||||
));
|
||||
|
||||
// Token CSRF
|
||||
echo Bootstrap::formInputHidden(array(
|
||||
'name'=>'tokenCSRF',
|
||||
'value'=>$security->getTokenCSRF()
|
||||
));
|
||||
|
||||
// UUID
|
||||
// The UUID is generated in the controller
|
||||
echo Bootstrap::formInputHidden(array(
|
||||
'name'=>'uuid',
|
||||
'value'=>$page->uuid()
|
||||
));
|
||||
|
||||
// Type = published, draft, sticky, static
|
||||
echo Bootstrap::formInputHidden(array(
|
||||
'name'=>'type',
|
||||
'value'=>$page->type()
|
||||
));
|
||||
|
||||
// Cover image
|
||||
echo Bootstrap::formInputHidden(array(
|
||||
'name'=>'coverImage',
|
||||
'value'=>$page->coverImage(false)
|
||||
));
|
||||
|
||||
// Content
|
||||
echo Bootstrap::formInputHidden(array(
|
||||
'name'=>'content',
|
||||
'value'=>''
|
||||
));
|
||||
|
||||
// Current page key
|
||||
echo Bootstrap::formInputHidden(array(
|
||||
'name'=>'key',
|
||||
'value'=>$page->key()
|
||||
));
|
||||
?>
|
||||
|
||||
<!-- TOOLBAR -->
|
||||
<div id="editorToolbar" class="mb-1">
|
||||
<div id="editorToolbarRight" class="btn-group btn-group-sm float-end" role="group" aria-label="Toolbar right">
|
||||
<button type="button" class="btn btn-light" id="jsmediaManagerOpenModal" data-toggle="modal" data-target="#jsmediaManagerModal"><span class="bi-image"></span> <?php $L->p('Images') ?></button>
|
||||
<button type="button" class="btn btn-light" id="jsoptionsSidebar" style="z-index:30"><span class="bi-cog"></span> <?php $L->p('Options') ?></button>
|
||||
</div>
|
||||
|
||||
<div id="jseditorToolbarLeft">
|
||||
<button type="button" class="btn btn-sm btn-primary" id="jsbuttonSave"><?php echo $L->g('Save') ?></button>
|
||||
<button id="jsbuttonPreview" type="button" class="btn btn-sm btn-secondary"><?php $L->p('Preview') ?></button>
|
||||
<span id="jsswitchButton" data-switch="<?php echo ($page->draft()?'draft':'publish') ?>" class="ms-2 text-secondary switch-button"><i class="bi-square switch-icon-<?php echo ($page->draft()?'draft':'publish') ?>"></i> <?php echo ($page->draft()?$L->g('Draft'):$L->g('Publish')) ?></span>
|
||||
</div>
|
||||
|
||||
<?php if($page->scheduled()): ?>
|
||||
<div class="alert alert-warning p-1 mt-1 mb-0"><?php $L->p('scheduled') ?>: <?php echo $page->date(SCHEDULED_DATE_FORMAT) ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#jsoptionsSidebar").on("click", function() {
|
||||
$("#jseditorSidebar").toggle();
|
||||
$("#jsshadow").toggle();
|
||||
});
|
||||
|
||||
$("#jsshadow").on("click", function() {
|
||||
$("#jseditorSidebar").toggle();
|
||||
$("#jsshadow").toggle();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- SIDEBAR OPTIONS -->
|
||||
<div id="jseditorSidebar">
|
||||
<nav>
|
||||
<div class="nav nav-tabs" id="nav-tab" role="tablist">
|
||||
<a class="nav-link active show" id="nav-general-tab" data-toggle="tab" href="#nav-general" role="tab" aria-controls="general"><?php $L->p('General') ?></a>
|
||||
<a class="nav-link" id="nav-advanced-tab" data-toggle="tab" href="#nav-advanced" role="tab" aria-controls="advanced"><?php $L->p('Advanced') ?></a>
|
||||
<?php if (!empty($site->customFields())): ?>
|
||||
<a class="nav-link" id="nav-custom-tab" data-toggle="tab" href="#nav-custom" role="tab" aria-controls="custom"><?php $L->p('Custom') ?></a>
|
||||
<?php endif ?>
|
||||
<a class="nav-link" id="nav-seo-tab" data-toggle="tab" href="#nav-seo" role="tab" aria-controls="seo"><?php $L->p('SEO') ?></a>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="tab-content pe-3 ps-3 pb-3">
|
||||
<div id="nav-general" class="tab-pane fade show active" role="tabpanel" aria-labelledby="general-tab">
|
||||
<?php
|
||||
// Category
|
||||
echo Bootstrap::formSelectBlock(array(
|
||||
'name'=>'category',
|
||||
'label'=>$L->g('Category'),
|
||||
'selected'=>$page->categoryKey(),
|
||||
'class'=>'',
|
||||
'emptyOption'=>'- '.$L->g('Uncategorized').' -',
|
||||
'options'=>$categories->getKeyNameArray()
|
||||
));
|
||||
|
||||
// Description
|
||||
echo Bootstrap::formTextareaBlock(array(
|
||||
'name'=>'description',
|
||||
'label'=>$L->g('Description'),
|
||||
'selected'=>'',
|
||||
'class'=>'',
|
||||
'value'=>$page->description(),
|
||||
'rows'=>5,
|
||||
'placeholder'=>$L->get('this-field-can-help-describe-the-content')
|
||||
));
|
||||
?>
|
||||
|
||||
<!-- Cover Image -->
|
||||
<?php
|
||||
$coverImage = $page->coverImage(false);
|
||||
$externalCoverImage = '';
|
||||
if (filter_var($coverImage, FILTER_VALIDATE_URL)) {
|
||||
$coverImage = '';
|
||||
$externalCoverImage = $page->coverImage(false);
|
||||
}
|
||||
?>
|
||||
<label class="mt-4 mb-2 pb-2 border-bottom text-uppercase w-100"><?php $L->p('Cover Image') ?></label>
|
||||
<div>
|
||||
<img id="jscoverImagePreview" class="mx-auto d-block w-100" alt="Cover image preview" src="<?php echo (empty($coverImage) ? HTML_PATH_CORE_IMG.'default.svg' : $page->coverImage() ) ?>" />
|
||||
</div>
|
||||
<div class="mt-2 text-center">
|
||||
<button type="button" id="jsbuttonSelectCoverImage" class="btn btn-primary btn-sm"><?php echo $L->g('Select cover image') ?></button>
|
||||
<button type="button" id="jsbuttonRemoveCoverImage" class="btn btn-secondary btn-sm"><?php echo $L->g('Remove cover image') ?></button>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#jscoverImagePreview").on("click", function() {
|
||||
openMediaManager();
|
||||
});
|
||||
|
||||
$("#jsbuttonSelectCoverImage").on("click", function() {
|
||||
openMediaManager();
|
||||
});
|
||||
|
||||
$("#jsbuttonRemoveCoverImage").on("click", function() {
|
||||
$("#jscoverImage").val('');
|
||||
$("#jscoverImagePreview").attr('src', HTML_PATH_CORE_IMG+'default.svg');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<div id="nav-advanced" class="tab-pane fade" role="tabpanel" aria-labelledby="advanced-tab">
|
||||
<?php
|
||||
// Date
|
||||
echo Bootstrap::formInputTextBlock(array(
|
||||
'name'=>'date',
|
||||
'label'=>$L->g('Date'),
|
||||
'placeholder'=>'',
|
||||
'value'=>$page->dateRaw(),
|
||||
'tip'=>$L->g('date-format-format')
|
||||
));
|
||||
|
||||
// Type
|
||||
echo Bootstrap::formSelectBlock(array(
|
||||
'name'=>'typeSelector',
|
||||
'label'=>$L->g('Type'),
|
||||
'selected'=>$page->type(),
|
||||
'options'=>array(
|
||||
'published'=>'- '.$L->g('Default').' -',
|
||||
'sticky'=>$L->g('Sticky'),
|
||||
'static'=>$L->g('Static')
|
||||
),
|
||||
'tip'=>''
|
||||
));
|
||||
|
||||
// Position
|
||||
echo Bootstrap::formInputTextBlock(array(
|
||||
'name'=>'position',
|
||||
'label'=>$L->g('Position'),
|
||||
'tip'=>$L->g('Field used when ordering content by position'),
|
||||
'value'=>$page->position()
|
||||
));
|
||||
|
||||
// Tags
|
||||
echo Bootstrap::formInputTextBlock(array(
|
||||
'name'=>'tags',
|
||||
'label'=>$L->g('Tags'),
|
||||
'placeholder'=>'',
|
||||
'tip'=>$L->g('Write the tags separated by comma'),
|
||||
'value'=>$page->tags()
|
||||
));
|
||||
|
||||
// Parent
|
||||
try {
|
||||
$options = array();
|
||||
$parentKey = $page->parent();
|
||||
if (!empty($parentKey)) {
|
||||
$parent = new Page($parentKey);
|
||||
$options = array($parentKey=>$parent->title());
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
// continue
|
||||
}
|
||||
echo Bootstrap::formSelectBlock(array(
|
||||
'name'=>'parent',
|
||||
'label'=>$L->g('Parent'),
|
||||
'options'=>$options,
|
||||
'selected'=>false,
|
||||
'class'=>'',
|
||||
'tip'=>$L->g('Start typing a page title to see a list of suggestions.'),
|
||||
));
|
||||
|
||||
?>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var parent = $("#jsparent").select2({
|
||||
placeholder: "",
|
||||
allowClear: true,
|
||||
theme: "bootstrap4",
|
||||
minimumInputLength: 2,
|
||||
ajax: {
|
||||
url: HTML_PATH_ADMIN_ROOT+"ajax/get-published",
|
||||
data: function (params) {
|
||||
var query = {
|
||||
checkIsParent: true,
|
||||
query: params.term
|
||||
}
|
||||
return query;
|
||||
},
|
||||
processResults: function (data) {
|
||||
return data;
|
||||
}
|
||||
},
|
||||
escapeMarkup: function(markup) {
|
||||
return markup;
|
||||
},
|
||||
templateResult: function(data) {
|
||||
var html = data.text
|
||||
if (data.type=="static") {
|
||||
html += '<span class="badge badge-pill badge-light">'+data.type+'</span>';
|
||||
}
|
||||
return html;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php
|
||||
|
||||
// Template
|
||||
echo Bootstrap::formInputTextBlock(array(
|
||||
'name'=>'template',
|
||||
'label'=>$L->g('Template'),
|
||||
'placeholder'=>'',
|
||||
'value'=>$page->template(),
|
||||
'tip'=>$L->g('Write a template name to filter the page in the theme and change the style of the page.')
|
||||
));
|
||||
|
||||
echo Bootstrap::formInputTextBlock(array(
|
||||
'name'=>'externalCoverImage',
|
||||
'label'=>$L->g('External cover image'),
|
||||
'placeholder'=>"https://",
|
||||
'value'=>$externalCoverImage,
|
||||
'tip'=>$L->g('Set a cover image from external URL, such as a CDN or some server dedicated for images.')
|
||||
));
|
||||
|
||||
// Username
|
||||
echo Bootstrap::formInputTextBlock(array(
|
||||
'name'=>'',
|
||||
'label'=>$L->g('Author'),
|
||||
'placeholder'=>'',
|
||||
'value'=>$page->username(),
|
||||
'tip'=>'',
|
||||
'disabled'=>true
|
||||
));
|
||||
?>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// Changes in External cover image input
|
||||
$("#jsexternalCoverImage").change(function() {
|
||||
$("#jscoverImage").val( $(this).val() );
|
||||
});
|
||||
|
||||
// Datepicker
|
||||
$("#jsdate").datetimepicker({format:DB_DATE_FORMAT});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
<?php if (!empty($site->customFields())): ?>
|
||||
<div id="nav-custom" class="tab-pane fade" role="tabpanel" aria-labelledby="custom-tab">
|
||||
<?php
|
||||
$customFields = $site->customFields();
|
||||
foreach ($customFields as $field=>$options) {
|
||||
if ( !isset($options['position']) ) {
|
||||
if ($options['type']=="string") {
|
||||
echo Bootstrap::formInputTextBlock(array(
|
||||
'name'=>'custom['.$field.']',
|
||||
'value'=>(isset($options['default'])?$options['default']:''),
|
||||
'tip'=>(isset($options['tip'])?$options['tip']:''),
|
||||
'label'=>(isset($options['label'])?$options['label']:''),
|
||||
'placeholder'=>(isset($options['placeholder'])?$options['placeholder']:''),
|
||||
'value'=>$page->custom($field)
|
||||
));
|
||||
} elseif ($options['type']=="bool") {
|
||||
echo Bootstrap::formCheckbox(array(
|
||||
'name'=>'custom['.$field.']',
|
||||
'label'=>(isset($options['label'])?$options['label']:''),
|
||||
'placeholder'=>(isset($options['placeholder'])?$options['placeholder']:''),
|
||||
'checked'=>$page->custom($field),
|
||||
'labelForCheckbox'=>(isset($options['tip'])?$options['tip']:'')
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<div id="nav-seo" class="tab-pane fade" role="tabpanel" aria-labelledby="seo-tab">
|
||||
<?php
|
||||
// Friendly URL
|
||||
echo Bootstrap::formInputTextBlock(array(
|
||||
'name'=>'slug',
|
||||
'tip'=>$L->g('URL associated with the content'),
|
||||
'label'=>$L->g('Friendly URL'),
|
||||
'placeholder'=>$L->g('Leave empty for autocomplete by Bludit.'),
|
||||
'value'=>$page->slug()
|
||||
));
|
||||
|
||||
// Robots
|
||||
echo Bootstrap::formCheckbox(array(
|
||||
'name'=>'noindex',
|
||||
'label'=>'Robots',
|
||||
'labelForCheckbox'=>$L->g('apply-code-noindex-code-to-this-page'),
|
||||
'placeholder'=>'',
|
||||
'checked'=>$page->noindex(),
|
||||
'tip'=>$L->g('This tells search engines not to show this page in their search results.')
|
||||
));
|
||||
|
||||
// Robots
|
||||
echo Bootstrap::formCheckbox(array(
|
||||
'name'=>'nofollow',
|
||||
'label'=>'',
|
||||
'labelForCheckbox'=>$L->g('apply-code-nofollow-code-to-this-page'),
|
||||
'placeholder'=>'',
|
||||
'checked'=>$page->nofollow(),
|
||||
'tip'=>$L->g('This tells search engines not to follow links on this page.')
|
||||
));
|
||||
|
||||
// Robots
|
||||
echo Bootstrap::formCheckbox(array(
|
||||
'name'=>'noarchive',
|
||||
'label'=>'',
|
||||
'labelForCheckbox'=>$L->g('apply-code-noarchive-code-to-this-page'),
|
||||
'placeholder'=>'',
|
||||
'checked'=>$page->noarchive(),
|
||||
'tip'=>$L->g('This tells search engines not to save a cached copy of this page.')
|
||||
));
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Custom fields: TOP -->
|
||||
<?php
|
||||
$customFields = $site->customFields();
|
||||
foreach ($customFields as $field=>$options) {
|
||||
if ( isset($options['position']) && ($options['position']=='top') ) {
|
||||
if ($options['type']=="string") {
|
||||
echo Bootstrap::formInputTextBlock(array(
|
||||
'name'=>'custom['.$field.']',
|
||||
'label'=>(isset($options['label'])?$options['label']:''),
|
||||
'value'=>$page->custom($field),
|
||||
'tip'=>(isset($options['tip'])?$options['tip']:''),
|
||||
'placeholder'=>(isset($options['placeholder'])?$options['placeholder']:''),
|
||||
'class'=>'mb-2',
|
||||
'labelClass'=>'mb-2 pb-2 border-bottom text-uppercase w-100'
|
||||
|
||||
));
|
||||
} elseif ($options['type']=="bool") {
|
||||
echo Bootstrap::formCheckbox(array(
|
||||
'name'=>'custom['.$field.']',
|
||||
'label'=>(isset($options['label'])?$options['label']:''),
|
||||
'placeholder'=>(isset($options['placeholder'])?$options['placeholder']:''),
|
||||
'checked'=>$page->custom($field),
|
||||
'labelForCheckbox'=>(isset($options['tip'])?$options['tip']:''),
|
||||
'class'=>'mb-2',
|
||||
'labelClass'=>'mb-2 pb-2 border-bottom text-uppercase w-100'
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- Title -->
|
||||
<div class="form-group mb-1">
|
||||
<input id="jstitle" name="title" type="text" class="form-control form-control-lg rounded-0" value="<?php echo $page->title() ?>" placeholder="<?php $L->p('Enter title') ?>">
|
||||
</div>
|
||||
|
||||
<!-- Editor -->
|
||||
<textarea id="jseditor" class="editable h-100" style=""><?php echo $page->contentRaw(true) ?></textarea>
|
||||
|
||||
<!-- Custom fields: BOTTOM -->
|
||||
<?php
|
||||
$customFields = $site->customFields();
|
||||
foreach ($customFields as $field=>$options) {
|
||||
if ( isset($options['position']) && ($options['position']=='bottom') ) {
|
||||
if ($options['type']=="string") {
|
||||
echo Bootstrap::formInputTextBlock(array(
|
||||
'name'=>'custom['.$field.']',
|
||||
'label'=>(isset($options['label'])?$options['label']:''),
|
||||
'value'=>$page->custom($field),
|
||||
'tip'=>(isset($options['tip'])?$options['tip']:''),
|
||||
'placeholder'=>(isset($options['placeholder'])?$options['placeholder']:''),
|
||||
'class'=>'mt-2',
|
||||
'labelClass'=>'mb-2 pb-2 border-bottom text-uppercase w-100'
|
||||
|
||||
));
|
||||
} elseif ($options['type']=="bool") {
|
||||
echo Bootstrap::formCheckbox(array(
|
||||
'name'=>'custom['.$field.']',
|
||||
'label'=>(isset($options['label'])?$options['label']:''),
|
||||
'placeholder'=>(isset($options['placeholder'])?$options['placeholder']:''),
|
||||
'checked'=>$page->custom($field),
|
||||
'labelForCheckbox'=>(isset($options['tip'])?$options['tip']:''),
|
||||
'class'=>'mt-2',
|
||||
'labelClass'=>'mb-2 pb-2 border-bottom text-uppercase w-100'
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</form>
|
||||
|
||||
<!-- Modal for Delete page -->
|
||||
<div id="jsdeletePageModal" class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<h3><?php $L->p('Delete content') ?></h3>
|
||||
<p><?php $L->p('Are you sure you want to delete this page') ?></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-link" data-dismiss="modal"><?php $L->p('Cancel') ?></button>
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal" id="jsbuttonDeleteAccept"><?php $L->p('Delete') ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#jsbuttonDeleteAccept").on("click", function() {
|
||||
$("#jstype").val("delete");
|
||||
$("#jscontent").val("");
|
||||
$("#jsform").submit();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
<!-- Modal for Media Manager -->
|
||||
<?php include(PATH_ADMIN_THEMES.'booty/html/media.php'); ?>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
// Define function if they doesn't exist
|
||||
// This helps if the user doesn't activate any plugin as editor
|
||||
if (typeof editorGetContent != "function") {
|
||||
window.editorGetContent = function(){
|
||||
return $("#jseditor").val();
|
||||
};
|
||||
}
|
||||
if (typeof editorInsertMedia != "function") {
|
||||
window.editorInsertMedia = function(filename){
|
||||
$("#jseditor").val($('#jseditor').val()+'<img src="'+filename+'" alt="">');
|
||||
};
|
||||
}
|
||||
|
||||
// Button switch
|
||||
$("#jsswitchButton").on("click", function() {
|
||||
if ($(this).data("switch")=="publish") {
|
||||
$(this).html('<i class="bi-square switch-icon-draft"></i> <?php $L->p('Draft') ?>');
|
||||
$(this).data("switch", "draft");
|
||||
} else {
|
||||
$(this).html('<i class="bi-square switch-icon-publish"></i> <?php $L->p('Publish') ?>');
|
||||
$(this).data("switch", "publish");
|
||||
}
|
||||
});
|
||||
|
||||
// Button preview
|
||||
$("#jsbuttonPreview").on("click", function() {
|
||||
var uuid = $("#jsuuid").val();
|
||||
var title = $("#jstitle").val();
|
||||
var content = editorGetContent();
|
||||
var ajax = new bluditAjax();
|
||||
bluditAjax.saveAsDraft(uuid, title, content).then(function(data) {
|
||||
var preview = window.open("<?php echo DOMAIN_PAGES.'autosave-'.$page->uuid().'?preview='.md5('autosave-'.$page->uuid()) ?>", "bludit-preview");
|
||||
preview.focus();
|
||||
});
|
||||
});
|
||||
|
||||
// Button Save
|
||||
$("#jsbuttonSave").on("click", function() {
|
||||
// If the switch is setted to "published", get the value from the selector
|
||||
if ($("#jsswitchButton").data("switch")=="publish") {
|
||||
var value = $("#jstypeSelector option:selected").val();
|
||||
$("#jstype").val(value);
|
||||
} else {
|
||||
$("#jstype").val("draft");
|
||||
}
|
||||
|
||||
// Get the content
|
||||
$("#jscontent").val( editorGetContent() );
|
||||
|
||||
// Submit the form
|
||||
$("#jsform").submit();
|
||||
});
|
||||
|
||||
// Button Save as draft
|
||||
$("#jsbuttonDraft").on("click", function() {
|
||||
// Set the type as draft
|
||||
$("#jstype").val("draft");
|
||||
|
||||
// Get the content
|
||||
$("#jscontent").val( editorGetContent() );
|
||||
|
||||
// Submit the form
|
||||
$("#jsform").submit();
|
||||
});
|
||||
|
||||
// Autosave
|
||||
var currentContent = editorGetContent();
|
||||
setInterval(function() {
|
||||
var uuid = $("#jsuuid").val();
|
||||
var title = $("#jstitle").val() + "[<?php $L->p('Autosave') ?>]";
|
||||
var content = editorGetContent();
|
||||
// Autosave when content has at least 100 characters
|
||||
if (content.length<100) {
|
||||
return false;
|
||||
}
|
||||
// Autosave only when the user change the content
|
||||
if (currentContent!=content) {
|
||||
currentContent = content;
|
||||
bluditAjax.saveAsDraft(uuid, title, content).then(function(data) {
|
||||
if (data.status==0) {
|
||||
showAlert("<?php $L->p('Autosave') ?>");
|
||||
}
|
||||
});
|
||||
}
|
||||
},1000*60*AUTOSAVE_INTERVAL);
|
||||
|
||||
});
|
||||
</script>
|
|
@ -4,7 +4,7 @@
|
|||
// ----------------------------------------------------------------------------
|
||||
// Variables for the view
|
||||
// ----------------------------------------------------------------------------
|
||||
var _pageKey = null; // The page key is generated the first time the user click on the button "Save"
|
||||
var _pageKey = <?php echo $pageKey ? '"' . $pageKey . '"' : 'null' ?>;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Functions for the view
|
||||
|
@ -18,7 +18,12 @@
|
|||
};
|
||||
}
|
||||
if (typeof editorInsertContent != 'function') {
|
||||
window.editorInsertContent = function(html) {
|
||||
window.editorInsertContent = function(content, type = '') {
|
||||
if (type == 'image') {
|
||||
var html = '<img src="' + content + '" alt="" />';
|
||||
} else {
|
||||
var html = content;
|
||||
}
|
||||
$('#editor').val($('#editor').val() + html);
|
||||
};
|
||||
}
|
||||
|
@ -31,17 +36,29 @@
|
|||
logs('Page created. Key: ' + key);
|
||||
// Set the global variable with the page key
|
||||
_pageKey = key;
|
||||
// Set Friendly URL
|
||||
$('#friendlyURL').val(key);
|
||||
// Get current files
|
||||
fmGetFiles();
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
// Set the page in the editor
|
||||
function setPage() {
|
||||
logs('Setting up the page');
|
||||
// Get current files
|
||||
fmGetFiles();
|
||||
return true;
|
||||
}
|
||||
|
||||
// Save the current page
|
||||
// This function set the global variable "_pageKey"
|
||||
function save(args) {
|
||||
function savePage(args) {
|
||||
logs('Saving page');
|
||||
|
||||
if (_pageKey == null) {
|
||||
showAlert("Error, page not created.");
|
||||
showAlertError("Error, page not created.");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -71,6 +88,14 @@
|
|||
$('#modal-' + fieldName).modal('hide');
|
||||
}
|
||||
|
||||
function disableBtnSave() {
|
||||
$('#btnSave').addClass('btn-primary-disabled').html('<i class="bi bi-check-square"></i><?php $L->p('Saved') ?>');
|
||||
}
|
||||
|
||||
function enableBtnSave() {
|
||||
$('#btnSave').removeClass('btn-primary-disabled').html('<i class="bi bi-save"></i><?php $L->p('Save') ?>');
|
||||
}
|
||||
|
||||
// This function is to catch all key press and provides shortcuts
|
||||
// The editor plugin need to call this function for the event "keydown"
|
||||
function keypress(event) {
|
||||
|
@ -80,19 +105,20 @@
|
|||
// ------------------------------------------------------------------------
|
||||
// Ctrl+S or Command+S
|
||||
if ((event.ctrlKey || event.metaKey) && event.which == 83) {
|
||||
event.preventDefault();
|
||||
var args = {
|
||||
title: $('#title').val(),
|
||||
content: editorGetContent(),
|
||||
category: $('#category option:selected').val(),
|
||||
tags: $('#tags').val()
|
||||
}
|
||||
save(args);
|
||||
$('#btnSave').addClass('btn-primary-disabled').html('<?php $L->p('Saved') ?>');
|
||||
event.preventDefault();
|
||||
savePage(args);
|
||||
disableBtnSave();
|
||||
return false;
|
||||
}
|
||||
|
||||
$('#btnSave').removeClass('btn-primary-disabled').html('<?php $L->p('Save') ?>');
|
||||
enableBtnSave();
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@ -111,27 +137,18 @@
|
|||
title: $('#title').val(),
|
||||
content: editorGetContent(),
|
||||
category: $('#category option:selected').val(),
|
||||
tags: $('#tags').val()
|
||||
tags: $("#tags option:selected").map(function(){ return this.value }).get().join(",")
|
||||
}
|
||||
save(args);
|
||||
$(this).addClass('btn-primary-disabled').html('<?php $L->p('Saved') ?>');
|
||||
savePage(args);
|
||||
disableBtnSave();
|
||||
});
|
||||
|
||||
$("#btnPreview").on("click", function() {
|
||||
var title = $("#jstitle").val();
|
||||
var content = editorGetContent();
|
||||
bluditAjax.saveAsDraft(uuid, title, content).then(function(data) {
|
||||
var preview = window.open("<?php echo DOMAIN_PAGES . 'autosave-' . $uuid . '?preview=' . md5('autosave-' . $uuid) ?>", "bludit-preview");
|
||||
preview.focus();
|
||||
});
|
||||
});
|
||||
|
||||
$('#btnCurrenStatus').on('click', function() {
|
||||
openModal('status');
|
||||
$('#btnCurrenType').on('click', function() {
|
||||
openModal('type');
|
||||
});
|
||||
|
||||
$('#category').on("change", function() {
|
||||
$('#btnSave').html('<?php $L->p('Save') ?>');
|
||||
enableBtnSave();
|
||||
});
|
||||
|
||||
// Modal description events
|
||||
|
@ -140,7 +157,9 @@
|
|||
var args = {
|
||||
description: $('#description').val()
|
||||
};
|
||||
save(args);
|
||||
savePage(args);
|
||||
disableBtnSave();
|
||||
closeModal('description');
|
||||
});
|
||||
|
||||
$('#btnCancelDescription').on('click', function() {
|
||||
|
@ -153,7 +172,9 @@
|
|||
var args = {
|
||||
date: $('#date').val()
|
||||
};
|
||||
save(args);
|
||||
savePage(args);
|
||||
disableBtnSave();
|
||||
closeModal('date');
|
||||
});
|
||||
|
||||
$('#btnCancelDate').on('click', function() {
|
||||
|
@ -166,7 +187,9 @@
|
|||
var args = {
|
||||
slug: $('#friendlyURL').val()
|
||||
};
|
||||
save(args);
|
||||
savePage(args);
|
||||
disableBtnSave();
|
||||
closeModal('friendlyURL');
|
||||
});
|
||||
|
||||
$('#btnCancelFriendlyURL').on('click', function() {
|
||||
|
@ -184,29 +207,32 @@
|
|||
});
|
||||
});
|
||||
|
||||
// Modal status events
|
||||
// Modal type events
|
||||
// ------------------------------------------------------------------------
|
||||
$('#btnSaveStatus').on('click', function() {
|
||||
$('#btnSaveType').on('click', function() {
|
||||
var args = {
|
||||
type: $('input[name="status"]:checked').val()
|
||||
type: $('input[name="type"]:checked').val()
|
||||
};
|
||||
save(args);
|
||||
|
||||
savePage(args);
|
||||
disableBtnSave();
|
||||
closeModal('type');
|
||||
|
||||
if (args['type'] == 'draft') {
|
||||
$('#btnCurrenStatus').html('<i class="bi-square-fill"></i> <?php $L->p('Draft') ?>');
|
||||
$('#btnCurrenType').html('<i class="bi bi-square-fill"></i><?php $L->p('Draft') ?>');
|
||||
} else if (args['type'] == 'published') {
|
||||
$('#btnCurrenStatus').html('<i class="bi-check-square-fill"></i> <?php $L->p('Published') ?>');
|
||||
$('#btnCurrenType').html('<i class="bi bi-check-square-fill"></i><?php $L->p('Published') ?>');
|
||||
} else if (args['type'] == 'unlisted') {
|
||||
$('#btnCurrenStatus').html('<i class="bi-check-square-fill"></i> <?php $L->p('Unlisted') ?>');
|
||||
$('#btnCurrenType').html('<i class="bi bi-check-square-fill"></i><?php $L->p('Unlisted') ?>');
|
||||
} else if (args['type'] == 'sticky') {
|
||||
$('#btnCurrenStatus').html('<i class="bi-check-square-fill"></i> <?php $L->p('Sticky') ?>');
|
||||
$('#btnCurrenType').html('<i class="bi bi-check-square-fill"></i><?php $L->p('Sticky') ?>');
|
||||
} else if (args['type'] == 'static') {
|
||||
$('#btnCurrenStatus').html('<i class="bi-check-square-fill"></i> <?php $L->p('Static') ?>');
|
||||
$('#btnCurrenType').html('<i class="bi bi-check-square-fill"></i><?php $L->p('Static') ?>');
|
||||
}
|
||||
});
|
||||
|
||||
$('#btnCancelStatus').on('click', function() {
|
||||
closeModal('status');
|
||||
$('#btnCancelType').on('click', function() {
|
||||
closeModal('type');
|
||||
});
|
||||
|
||||
// Modal SEO events
|
||||
|
@ -215,7 +241,9 @@
|
|||
var args = {
|
||||
parent: $('#parent').val()
|
||||
};
|
||||
save(args);
|
||||
savePage(args);
|
||||
disableBtnSave();
|
||||
closeModal('seo');
|
||||
});
|
||||
|
||||
$('#btnCancelSeo').on('click', function() {
|
||||
|
@ -228,7 +256,9 @@
|
|||
var args = {
|
||||
parent: $('#parent').val()
|
||||
};
|
||||
save(args);
|
||||
savePage(args);
|
||||
disableBtnSave();
|
||||
closeModal('parent');
|
||||
});
|
||||
|
||||
$('#btnCancelParent').on('click', function() {
|
||||
|
@ -241,14 +271,31 @@
|
|||
// Initlization for the view
|
||||
// ----------------------------------------------------------------------------
|
||||
$(document).ready(function() {
|
||||
// Create the page at the beggining
|
||||
// How do you hang your toilet paper ? over or under ?
|
||||
createPage();
|
||||
|
||||
// Create the page or set the page
|
||||
if (_pageKey == null) {
|
||||
createPage();
|
||||
} else {
|
||||
setPage();
|
||||
}
|
||||
|
||||
// Autosave
|
||||
setInterval(function() {
|
||||
var content = editorGetContent();
|
||||
// Autosave when content has at least 100 characters
|
||||
if (content.length < 100) {
|
||||
return false;
|
||||
}
|
||||
savePage();
|
||||
disableBtnSave();
|
||||
}, 1000 * 60 * AUTOSAVE_INTERVAL);
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- File manager -->
|
||||
<?php include(PATH_ADMIN_THEMES . 'booty/html/file-manager.php'); ?>
|
||||
<?php include(PATH_ADMIN_VIEWS . 'editor' . DS . 'file-manager.php') ?>
|
||||
<!-- End File manager -->
|
||||
|
||||
<!-- Modal Description -->
|
||||
|
@ -258,13 +305,13 @@
|
|||
<div class="modal-body">
|
||||
<div class="m-0">
|
||||
<label for="parent" class="fw-bold mb-2">Page description</label>
|
||||
<textarea id="description" name="description" class="form-control" rows="3"></textarea>
|
||||
<textarea id="description" name="description" class="form-control" rows="3"><?php echo ($pageKey ? $page->description() : '') ?></textarea>
|
||||
<div class="form-text"><?php echo $L->get('this-field-can-help-describe-the-content') ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer ps-2 pe-2 pt-1 pb-1">
|
||||
<button id="btnCancelDescription" type="button" class="btn btn-cancel fw-bold me-auto"><i class="bi-x-square me-2"></i>Cancel</button>
|
||||
<button id="btnSaveDescription" type="button" class="btn btn-save fw-bold text-success"><i class="bi-check-square me-2"></i>Save</button>
|
||||
<button id="btnCancelDescription" type="button" class="btn btn-cancel fw-bold me-auto"><i class="bi bi-x-square"></i>Cancel</button>
|
||||
<button id="btnSaveDescription" type="button" class="btn btn-save fw-bold text-success"><i class="bi bi-check-square"></i>Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -278,13 +325,13 @@
|
|||
<div class="modal-body">
|
||||
<div class="m-0">
|
||||
<label for="date" class="fw-bold mb-2">Publish date</label>
|
||||
<input id="date" name="date" type="text" class="form-control" value="<?php echo Date::current(DB_DATE_FORMAT) ?>">
|
||||
<input id="date" name="date" type="text" class="form-control" value="<?php echo ($pageKey ? $page->dateRaw() : Date::current(DB_DATE_FORMAT)) ?>">
|
||||
<div class="form-text"><?php echo $L->g('date-format-format') ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer ps-2 pe-2 pt-1 pb-1">
|
||||
<button id="btnCancelDate" type="button" class="btn btn-cancel fw-bold me-auto"><i class="bi-x-square me-2"></i>Cancel</button>
|
||||
<button id="btnSaveDate" type="button" class="btn btn-save fw-bold text-success"><i class="bi-check-square me-2"></i>Save</button>
|
||||
<button id="btnCancelDate" type="button" class="btn btn-cancel fw-bold me-auto"><i class="bi bi-x-square"></i>Cancel</button>
|
||||
<button id="btnSaveDate" type="button" class="btn btn-save fw-bold text-success"><i class="bi bi-check-square"></i>Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -306,64 +353,64 @@
|
|||
<div class="m-0">
|
||||
<div class="d-flex mb-2">
|
||||
<label for="friendlyURL" class="p-0 m-0 me-auto fw-bold">Page URL</label>
|
||||
<button id="btnGenURLFromTitle" type="button" class="btn p-0 m-0 text-primary"><i class="bi-hammer me-2"></i>Generate from page title</button>
|
||||
<button id="btnGenURLFromTitle" type="button" class="btn p-0 m-0 text-primary"><i class="bi bi-hammer"></i>Generate from page title</button>
|
||||
</div>
|
||||
<input id="friendlyURL" name="friendlyURL" type="text" class="form-control" value="">
|
||||
<input id="friendlyURL" name="friendlyURL" type="text" class="form-control" value="<?php echo ($pageKey ? $page->slug() : '') ?>">
|
||||
<div class="form-text">https://www.varlogdiego.com/my-page-about-k8s</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer ps-2 pe-2 pt-1 pb-1">
|
||||
<button id="btnCancelFriendlyURL" type="button" class="btn btn-cancel fw-bold me-auto"><i class="bi-x-square me-2"></i>Cancel</button>
|
||||
<button id="btnSaveFriendlyURL" type="button" class="btn btn-save fw-bold text-success"><i class="bi-check-square me-2"></i>Save</button>
|
||||
<button id="btnCancelFriendlyURL" type="button" class="btn btn-cancel fw-bold me-auto"><i class="bi bi-x-square"></i>Cancel</button>
|
||||
<button id="btnSaveFriendlyURL" type="button" class="btn btn-save fw-bold text-success"><i class="bi bi-check-square"></i>Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Modal friendly URL -->
|
||||
|
||||
<!-- Modal Status -->
|
||||
<div class="modal" id="modal-status" tabindex="-1">
|
||||
<!-- Modal Type -->
|
||||
<div class="modal" id="modal-type" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<div class="m-0">
|
||||
<label class="fw-bold mb-2">Page status</label>
|
||||
<label class="fw-bold mb-2">Page type</label>
|
||||
</div>
|
||||
<div class="form-check mb-2">
|
||||
<input id="statusDraft" name="status" class="form-check-input" type="radio" value="draft" checked>
|
||||
<input id="statusDraft" name="type" class="form-check-input" type="radio" value="draft" <?php echo ((($pageKey && $page->draft()) || !$pageKey) ? 'checked' : '') ?>>
|
||||
<label class="form-check-label" for="statusDraft">Draft</label>
|
||||
<div class="form-text">Page as draft, is not visible for visitors.</div>
|
||||
</div>
|
||||
<div class="form-check mb-2">
|
||||
<input id="statusPublish" name="status" class="form-check-input" type="radio" value="published">
|
||||
<input id="statusPublish" name="type" class="form-check-input" type="radio" value="published" <?php echo (($pageKey && $page->published()) ? 'checked' : '') ?>>
|
||||
<label class="form-check-label" for="statusPublish">Publish</label>
|
||||
<div class="form-text">Publish the page, everyone can see it.</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="form-check mb-2">
|
||||
<input id="statusSticky" name="status" class="form-check-input" type="radio" value="sticky">
|
||||
<input id="statusSticky" name="type" class="form-check-input" type="radio" value="sticky" <?php echo (($pageKey && $page->sticky()) ? 'checked' : '') ?>>
|
||||
<label class="form-check-label" for="statusSticky">Publish as sticky</label>
|
||||
<div class="form-text">The page can be seen by everyone in the top of the main page.</div>
|
||||
</div>
|
||||
<div class="form-check mb-2">
|
||||
<input id="statusStatic" name="status" class="form-check-input" type="radio" value="static">
|
||||
<input id="statusStatic" name="type" class="form-check-input" type="radio" value="static" <?php echo (($pageKey && $page->isStatic()) ? 'checked' : '') ?>>
|
||||
<label class="form-check-label" for="statusStatic">Publish as static</label>
|
||||
<div class="form-text">The page can be seen by everyone as static page.</div>
|
||||
</div>
|
||||
<div class="form-check mb-2">
|
||||
<input id="statusUnlisted" name="status" class="form-check-input" type="radio" value="unlisted">
|
||||
<input id="statusUnlisted" name="type" class="form-check-input" type="radio" value="unlisted" <?php echo (($pageKey && $page->unlisted()) ? 'checked' : '') ?>>
|
||||
<label class="form-check-label" for="statusUnlisted">Publish as unlisted</label>
|
||||
<div class="form-text">The page can be seen and shared by anyone with the link.</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer ps-2 pe-2 pt-1 pb-1">
|
||||
<button id="btnCancelStatus" type="button" class="btn btn-cancel fw-bold me-auto"><i class="bi-x-square me-2"></i>Cancel</button>
|
||||
<button id="btnSaveStatus" type="button" class="btn btn-save fw-bold text-success"><i class="bi-check-square me-2"></i>Save</button>
|
||||
<button id="btnCancelType" type="button" class="btn btn-cancel fw-bold me-auto"><i class="bi bi-x-square"></i>Cancel</button>
|
||||
<button id="btnSaveType" type="button" class="btn btn-save fw-bold text-success"><i class="bi bi-check-square"></i>Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Modal Status -->
|
||||
<!-- End Modal Type -->
|
||||
|
||||
<!-- Modal SEO -->
|
||||
<div class="modal" id="modal-seo" tabindex="-1">
|
||||
|
@ -374,24 +421,24 @@
|
|||
<label class="fw-bold mb-2">SEO features</label>
|
||||
</div>
|
||||
<div class="form-check mb-2">
|
||||
<input id="noindex" name="noindex" class="form-check-input" type="checkbox" value="noindex">
|
||||
<input id="noindex" name="noindex" class="form-check-input" type="checkbox" value="noindex" <?php echo (($pageKey && $page->noindex()) ? 'checked' : '') ?>>
|
||||
<label class="form-check-label" for="noindex"><?php echo $L->g('apply-code-noindex-code-to-this-page') ?></label>
|
||||
<div class="form-text"><?php echo $L->g('This tells search engines not to show this page in their search results.') ?></div>
|
||||
</div>
|
||||
<div class="form-check mb-2">
|
||||
<input id="nofollow" name="nofollow" class="form-check-input" type="checkbox" value="nofollow">
|
||||
<input id="nofollow" name="nofollow" class="form-check-input" type="checkbox" value="nofollow" <?php echo (($pageKey && $page->nofollow()) ? 'checked' : '') ?>>
|
||||
<label class="form-check-label" for="nofollow"><?php echo $L->g('apply-code-nofollow-code-to-this-page') ?></label>
|
||||
<div class="form-text"><?php echo $L->g('This tells search engines not to follow links on this page.') ?></div>
|
||||
</div>
|
||||
<div class="form-check mb-2">
|
||||
<input id="noarchive" name="noarchive" class="form-check-input" type="checkbox" value="noarchive">
|
||||
<input id="noarchive" name="noarchive" class="form-check-input" type="checkbox" value="noarchive" <?php echo (($pageKey && $page->noarchive()) ? 'checked' : '') ?>>
|
||||
<label class="form-check-label" for="noarchive"><?php echo $L->g('apply-code-noarchive-code-to-this-page') ?></label>
|
||||
<div class="form-text"><?php echo $L->g('This tells search engines not to save a cached copy of this page.') ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer ps-2 pe-2 pt-1 pb-1">
|
||||
<button id="btnCancelSeo" type="button" class="btn btn-cancel fw-bold me-auto"><i class="bi-x-square me-2"></i>Cancel</button>
|
||||
<button id="btnSaveSeo" type="button" class="btn btn-save fw-bold text-success"><i class="bi-check-square me-2"></i>Save</button>
|
||||
<button id="btnCancelSeo" type="button" class="btn btn-cancel fw-bold me-auto"><i class="bi bi-x-square"></i>Cancel</button>
|
||||
<button id="btnSaveSeo" type="button" class="btn btn-save fw-bold text-success"><i class="bi bi-check-square"></i>Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -410,8 +457,8 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="modal-footer ps-2 pe-2 pt-1 pb-1">
|
||||
<button id="btnCancelParent" type="button" class="btn btn-cancel fw-bold me-auto"><i class="bi-x-square me-2"></i>Cancel</button>
|
||||
<button id="btnSaveParent" type="button" class="btn btn-save fw-bold text-success"><i class="bi-check-square me-2"></i>Save</button>
|
||||
<button id="btnCancelParent" type="button" class="btn btn-cancel fw-bold me-auto"><i class="bi bi-x-square"></i>Cancel</button>
|
||||
<button id="btnSaveParent" type="button" class="btn btn-save fw-bold text-success"><i class="bi bi-check-square"></i>Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -455,39 +502,59 @@
|
|||
<div class="row h-100">
|
||||
<div class="col-sm-9 d-flex flex-column h-100">
|
||||
|
||||
<!-- Toolbar > Save, Preview, Status and Options -->
|
||||
<!-- Toolbar > Save, Preview, Type and Options -->
|
||||
<div id="editorToolbar" class="d-flex align-items-center mb-2">
|
||||
<div id="editorToolbarLeft">
|
||||
<button id="btnSave" type="button" class="btn btn-sm btn-primary"><?php $L->p('Save') ?></button>
|
||||
<button id="btnPreview" type="button" class="btn btn-sm btn-secondary"><?php $L->p('Preview') ?></button>
|
||||
<span id="btnCurrenStatus"><i class="bi-square-fill ms-1 me-1"></i><span><?php $L->p('Draft') ?></span></span>
|
||||
<button id="btnSave" type="button" class="btn btn-sm btn-primary btn-primary-disabled"><i class="bi bi-save"></i><?php $L->p('Saved') ?></button>
|
||||
<button id="btnPreview" type="button" class="btn btn-sm btn-primary"><i class="bi bi-box-arrow-up-right"></i><?php $L->p('Preview') ?></button>
|
||||
<span id="btnCurrenType" class="ms-1">
|
||||
<?php
|
||||
if ($pageKey) {
|
||||
if ($page->draft()) {
|
||||
echo '<i class="bi bi-square-fill"></i><span>' . $L->g('Draft') . '</span>';
|
||||
} elseif ($page->published()) {
|
||||
echo '<i class="bi bi-check-square-fill"></i><span>' . $L->g('Published') . '</span>';
|
||||
} elseif ($page->sticky()) {
|
||||
echo '<i class="bi bi-check-square-fill"></i><span>' . $L->g('Sticky') . '</span>';
|
||||
} elseif ($page->isStatic()) {
|
||||
echo '<i class="bi bi-check-square-fill"></i><span>' . $L->g('Static') . '</span>';
|
||||
} elseif ($page->unlisted()) {
|
||||
echo '<i class="bi bi-check-square-fill"></i><span>' . $L->g('Unlisted') . '</span>';
|
||||
}
|
||||
} else {
|
||||
echo '<i class="bi bi-square-fill"></i><span>' . $L->g('Draft') . '</span>';
|
||||
}
|
||||
?>
|
||||
</span>
|
||||
</div>
|
||||
<div id="editorToolbarRight" class="ms-auto">
|
||||
<div class="dropdown">
|
||||
<button type="button" class="btn dropdown-toggle" type="button" id="dropdownMenuOptions" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<i class="bi-gear me-2"></i></span><?php $L->p('Options') ?>
|
||||
<button type="button" class="btn dropdown-toggle btn-secondary btn-sm" type="button" id="dropdownMenuOptions" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<i class="bi bi-gear"></i></span><?php $L->p('Options') ?>
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuOptions">
|
||||
<a onclick="openModal('description')" class="dropdown-item" href="#"><i class="bi-info-square me-2"></i>Description</a>
|
||||
<a onclick="openModal('date')" class="dropdown-item" href="#"><i class="bi-calendar me-2"></i>Publish date</a>
|
||||
<a onclick="openModal('friendlyURL')" class="dropdown-item" href="#"><i class="bi-link me-2"></i>Change URL</a>
|
||||
<a onclick="openModal('status')" class="dropdown-item" href="#"><i class="bi-eye me-2"></i>Status</a>
|
||||
<a onclick="openModal('seo')" class="dropdown-item" href="#"><i class="bi-compass me-2"></i>SEO features</a>
|
||||
<a onclick="openModal('parent')" class="dropdown-item" href="#"><i class="bi-diagram-2 me-2"></i>Parent page</a>
|
||||
<div class="dropdown-menu ps-1 pe-1" aria-labelledby="dropdownMenuOptions">
|
||||
<a onclick="openModal('description')" class="dropdown-item" href="#"><i class="bi bi-info-square"></i>Description</a>
|
||||
<a onclick="openModal('date')" class="dropdown-item" href="#"><i class="bi bi-calendar"></i>Publish date</a>
|
||||
<a onclick="openModal('friendlyURL')" class="dropdown-item" href="#"><i class="bi bi-link"></i>Change URL</a>
|
||||
<a onclick="openModal('type')" class="dropdown-item" href="#"><i class="bi bi-eye"></i>Type</a>
|
||||
<a onclick="openModal('seo')" class="dropdown-item" href="#"><i class="bi bi-compass"></i>SEO features</a>
|
||||
<a onclick="openModal('parent')" class="dropdown-item" href="#"><i class="bi bi-diagram-2"></i>Parent page</a>
|
||||
<a><hr class="dropdown-divider"></a>
|
||||
<a onclick="fmOpen()" class="dropdown-item" href="#"><i class="bi bi-files"></i>Files & images</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Toolbar > Save, Preview, Status and Options -->
|
||||
<!-- End Toolbar > Save, Preview, Type and Options -->
|
||||
|
||||
<!-- Title -->
|
||||
<div class="mb-2">
|
||||
<input id="title" name="title" type="text" class="form-control form-control-lg" value="" placeholder="<?php $L->p('Enter title') ?>">
|
||||
<input id="title" name="title" type="text" class="form-control form-control-lg" value="<?php echo ($pageKey ? $page->title() : '') ?>" placeholder="<?php $L->p('Enter title') ?>">
|
||||
</div>
|
||||
<!-- End Title -->
|
||||
|
||||
<!-- Editor -->
|
||||
<textarea class="form-control flex-grow-1" placeholder="" id="editor"></textarea>
|
||||
<textarea class="form-control flex-grow-1" placeholder="" id="editor"><?php echo ($pageKey ? $page->contentRaw() : '') ?></textarea>
|
||||
<!-- End Editor -->
|
||||
|
||||
</div> <!-- End <div class="col-sm-9 h-100"> -->
|
||||
|
@ -497,7 +564,7 @@
|
|||
<!-- Cover Image -->
|
||||
<h6 class="text-uppercase"><?php $L->p('Cover Image') ?></h6>
|
||||
<div>
|
||||
<img id="jscoverImagePreview" class="mx-auto d-block w-100" alt="Cover image preview" src="<?php echo HTML_PATH_CORE_IMG ?>default.svg" />
|
||||
<img id="jscoverImagePreview" class="mx-auto d-block w-100" alt="Cover image preview" src="<?php echo (($pageKey && $page->coverImage()) ? $page->coverImage() : HTML_PATH_CORE_IMG . 'default.svg') ?>" />
|
||||
</div>
|
||||
<!-- End Cover Image -->
|
||||
|
||||
|
@ -507,79 +574,72 @@
|
|||
echo Bootstrap::formSelect(array(
|
||||
'id' => 'category',
|
||||
'name' => 'category',
|
||||
'selected' => ($pageKey ? $page->categoryKey() : ''),
|
||||
'options' => array_merge(array('' => $L->g('Uncategorized')), $categories->getKeyNameArray())
|
||||
));
|
||||
?>
|
||||
<!-- End Category -->
|
||||
|
||||
<!-- Tags -->
|
||||
<h6 class="mt-4 mb-2 pb-2 text-uppercase">Tags</h6>
|
||||
<input id="tags" name="tags" type="text" value="">
|
||||
<h6 class="text-uppercase mt-4">Tags</h6>
|
||||
<div class="mb-1">
|
||||
<input id="addTag" name="addTag" type="text" class="form-control" value="" placeholder="<?php $L->p('Add tag') ?>">
|
||||
</div>
|
||||
<select id="tags" size="5" class="form-select" multiple aria-label="multiple select">
|
||||
<?php
|
||||
foreach ($tags->db as $key => $fields) {
|
||||
echo '<option value="'.$key.'" '.($pageKey && in_array($key, $page->tags(true))?'selected':'').'>'.$fields['name'].'</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#tags').tagsInput({
|
||||
placeholder: 'Add a tag',
|
||||
delimiter: ',',
|
||||
removeWithBackspace: true,
|
||||
'autocomplete': {
|
||||
source: [
|
||||
<?php
|
||||
foreach ($tags->db as $key => $fields) {
|
||||
echo '"' . $fields['name'] . '",';
|
||||
}
|
||||
?>
|
||||
]
|
||||
$('#addTag').keypress(function(e) {
|
||||
if (e.which == 13) {
|
||||
var value = $(this).val();
|
||||
if ($("#tags option[value='" + value + "']").length > 0) {
|
||||
$("#tags option[value='" + value + "']").prop('selected', true);
|
||||
} else {
|
||||
$('#tags').prepend($('<option>', {
|
||||
value: $(this).val(),
|
||||
text: $(this).val(),
|
||||
selected: true
|
||||
}));
|
||||
}
|
||||
$(this).val('');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$("#tags").on("mousedown", 'option', function(e) {
|
||||
e.preventDefault();
|
||||
$(this).prop('selected', !$(this).prop('selected'));
|
||||
enableBtnSave();
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!-- End Tags -->
|
||||
|
||||
<!-- Quick files -->
|
||||
<h6 class="text-uppercase mt-4"><?php $L->p('Images') ?></h6>
|
||||
<!-- Quick files
|
||||
<h6 class="text-uppercase mt-4"><?php $L->p('Quick files') ?></h6>
|
||||
<div id="quickFiles">
|
||||
<div class="d-flex align-items-center mb-1">
|
||||
<i class="bi bi-image me-2" style="font-size: 1.6rem;"></i>
|
||||
<i class="bi bi-image" style="font-size: 1.6rem;"></i>
|
||||
<span>photo1.jpg</span>
|
||||
</div>
|
||||
<div class="d-flex align-items-center mb-1">
|
||||
<i class="bi bi-image me-2" style="font-size: 1.6rem;"></i>
|
||||
<i class="bi bi-image" style="font-size: 1.6rem;"></i>
|
||||
<span>test.txt</span>
|
||||
</div>
|
||||
<div class="d-flex align-items-center mb-1">
|
||||
<i class="bi bi-image me-2" style="font-size: 1.6rem;"></i>
|
||||
<i class="bi bi-image" style="font-size: 1.6rem;"></i>
|
||||
<span>test.txt</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Quick files -->
|
||||
End Quick files
|
||||
-->
|
||||
|
||||
</div> <!-- End <div class="col-sm-3 h-100"> -->
|
||||
</div> <!-- End <div class="row h-100"> -->
|
||||
</div> <!-- End <div class="container-fluid h-100"> -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
// Autosave
|
||||
var currentContent = editorGetContent();
|
||||
setInterval(function() {
|
||||
var uuid = $("#jsuuid").val();
|
||||
var title = $("#jstitle").val() + "[<?php $L->p('Autosave') ?>]";
|
||||
var content = editorGetContent();
|
||||
// Autosave when content has at least 100 characters
|
||||
if (content.length < 100) {
|
||||
return false;
|
||||
}
|
||||
// Autosave only when the user change the content
|
||||
if (currentContent != content) {
|
||||
currentContent = content;
|
||||
bluditAjax.saveAsDraft(uuid, title, content).then(function(data) {
|
||||
if (data.status == 0) {
|
||||
showAlert("<?php $L->p('Autosave') ?>");
|
||||
}
|
||||
});
|
||||
}
|
||||
}, 1000 * 60 * AUTOSAVE_INTERVAL);
|
||||
|
||||
});
|
||||
</script>
|
||||
</div> <!-- End <div class="container-fluid h-100"> -->
|
224
bl-kernel/admin/views/editor/file-manager.php
Normal file
|
@ -0,0 +1,224 @@
|
|||
<div class="modal" id="modal-fileManager" tabindex="-1">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
|
||||
<div class="d-flex align-items-center mb-4">
|
||||
<h3 class="me-auto m-0 p-0"><i class="bi bi-image"></i><?php $L->p('File Manager'); ?></h3>
|
||||
<label id="btnUploadFile" class="btn btn-primary"><i class="bi bi-upload"></i><?php $L->p('Upload file'); ?><input type="file" id="filesToUpload" name="filesToUpload[]" multiple hidden></label>
|
||||
<div id="progressUploadFile" class="progress w-25 d-none">
|
||||
<div class="progress-bar" role="progressbar" style="width: 0%" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Preview</th>
|
||||
<th scope="col">Filename</th>
|
||||
<th scope="col">Type</th>
|
||||
<th scope="col">Size</th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="fmFiles">
|
||||
<!-- <tr>
|
||||
<td class="align-middle">
|
||||
<img style="width: 32px" src="<?php echo HTML_PATH_CORE_IMG ?>default.svg" />
|
||||
</td>
|
||||
<td class="align-middle">photo.jpg</td>
|
||||
<td class="align-middle">image/jpeg</td>
|
||||
<td class="align-middle">300Kb</td>
|
||||
<td class="align-middle">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-secondary dropdown-toggle" type="button" id="fileOptions" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
Options
|
||||
</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="fileOptions">
|
||||
<li><a class="dropdown-item" href="#">Insert</a></li>
|
||||
<li><a class="dropdown-item" href="#">Set as cover image</a></li>
|
||||
<li>
|
||||
<hr class="dropdown-divider">
|
||||
</li>
|
||||
<li><a class="dropdown-item" href="#"><?php $L->p('Delete') ?></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr> -->
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// Open File Manager modal
|
||||
function fmOpen() {
|
||||
$('#modal-fileManager').modal('show');
|
||||
}
|
||||
|
||||
// Close File Manager modal
|
||||
function fmClose() {
|
||||
$('#modal-fileManager').modal('hide');
|
||||
}
|
||||
|
||||
// Insert HTML code in the Editor content
|
||||
function fmInsertFile(filename, absoluteURL, mime) {
|
||||
if (mime == 'image/jpeg') {
|
||||
editorInsertContent(absoluteURL, 'image');
|
||||
} else {
|
||||
editorInsertContent('<a href="' + absoluteURL + '">' + filename + '</a>');
|
||||
}
|
||||
}
|
||||
|
||||
// Get the files for the current page and show them
|
||||
function fmGetFiles() {
|
||||
logs('File Manager. Getting files for the current page: ' + _pageKey);
|
||||
api.getPageFiles({
|
||||
'pageKey': _pageKey
|
||||
}).then(function(data) {
|
||||
if (data.status == 0) {
|
||||
fmDisplayFiles(data.data);
|
||||
} else {
|
||||
logs("File Manager. An error occurred while trying to get the files for the current page.");
|
||||
// Alert the user about the error
|
||||
showAlertError('File Manager. ' + data.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Displays the files in the table
|
||||
function fmDisplayFiles(files) {
|
||||
$('#fmFiles').empty();
|
||||
|
||||
if (files.length == 0) {
|
||||
logs('File Manager. There are not files for the current page.');
|
||||
return false;
|
||||
}
|
||||
|
||||
$.each(files, function(key, file) {
|
||||
var row = '<tr>' +
|
||||
'<td class="align-middle">' +
|
||||
' <img style="width: 32px" src="<?php echo HTML_PATH_CORE_IMG ?>default.svg" />' +
|
||||
'</td>' +
|
||||
'<td class="align-middle">' + file.filename + '</td>' +
|
||||
'<td class="align-middle">' + file.mime + '</td>' +
|
||||
'<td class="align-middle">' + formatBytes(file.size) + '</td>' +
|
||||
'<td class="align-middle text-center">' +
|
||||
'<div class="dropdown">' +
|
||||
' <button class="btn btn-sm btn-secondary dropdown-toggle" type="button" id="fileOptions" data-bs-toggle="dropdown" aria-expanded="false"><i class="bi bi-gear"></i>Options</button>' +
|
||||
' <ul class="dropdown-menu" aria-labelledby="fileOptions">' +
|
||||
' <li><a class="dropdown-item" href="#" onClick="fmInsertFile(\'' + file.filename + '\', \'' + file.absoluteURL + '\', \'' + file.mime + '\'); fmClose();"><i class="bi bi-plus-circle"></i><?php $L->p('Insert') ?></a></li>' +
|
||||
' <li><a class="dropdown-item" href="#"><i class="bi bi-image"></i>Set as cover image</a></li>' +
|
||||
' <li><hr class="dropdown-divider"></li>' +
|
||||
' <li><a class="dropdown-item" href="#"><i class="bi bi-trash"></i><?php $L->p('Delete') ?></a></li>' +
|
||||
' </ul>' +
|
||||
'</div>' +
|
||||
'</td>' +
|
||||
'</tr>';
|
||||
$('#fmFiles').append(row);
|
||||
});
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Upload a file for the current page
|
||||
function fmUploadFile(file) {
|
||||
logs('File Manager. Uploading file.');
|
||||
|
||||
// Check file type/extension
|
||||
const validImageTypes = ['image/gif', 'image/jpeg', 'image/png', 'image/svg+xml'];
|
||||
if (!validImageTypes.includes(file.type)) {
|
||||
logs("File Manager. File type is not supported.");
|
||||
showAlertError("<?php echo $L->g('File type is not supported. Allowed types:') . ' ' . implode(', ', $GLOBALS['ALLOWED_IMG_EXTENSION']) ?>");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check file size and compare with PHP upload_max_filesize
|
||||
if (file.size > UPLOAD_MAX_FILESIZE) {
|
||||
logs("File Manager. File size is to big for PHP configuration.");
|
||||
showAlertError("<?php echo $L->g('Maximum load file size allowed:') . ' ' . ini_get('upload_max_filesize') ?>");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Start progress bar
|
||||
$('#btnUploadFile').addClass('d-none');
|
||||
$('#progressUploadFile').removeClass('d-none');
|
||||
$('#progressUploadFile').children('.progress-bar').width('0');
|
||||
|
||||
// Data to send via AJAX
|
||||
var formData = new FormData();
|
||||
formData.append("file", file);
|
||||
formData.append("token", api.body.token);
|
||||
formData.append("authentication", api.body.authentication);
|
||||
|
||||
$.ajax({
|
||||
url: api.apiURL + 'files/' + _pageKey,
|
||||
type: "POST",
|
||||
data: formData,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
xhr: function() {
|
||||
var xhr = $.ajaxSettings.xhr();
|
||||
if (xhr.upload) {
|
||||
xhr.upload.addEventListener("progress", function(e) {
|
||||
if (e.lengthComputable) {
|
||||
var percentComplete = (e.loaded / e.total) * 100;
|
||||
$('#progressUploadFile').children('.progress-bar').width(percentComplete + '%');
|
||||
}
|
||||
}, false);
|
||||
}
|
||||
return xhr;
|
||||
}
|
||||
}).done(function(data) {
|
||||
if (data.status == 0) {
|
||||
logs("File Manager. File uploaded.");
|
||||
// Progress bar
|
||||
$('#progressUploadFile').addClass('d-none');
|
||||
$('#btnUploadFile').removeClass('d-none');
|
||||
// Get current files
|
||||
fmGetFiles();
|
||||
} else {
|
||||
logs("File Manager. An error occurred while trying to upload the file.");
|
||||
// Progress bar
|
||||
$('#progressUploadFile').children('.progress-bar').addClass('bg-danger');
|
||||
// Alert the user about the error
|
||||
showAlertError('File Manager. ' + data.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Initlization and events for the File Manager
|
||||
$(document).ready(function() {
|
||||
// Input file change event
|
||||
$('#filesToUpload').on("change", function(e) {
|
||||
var filesToUpload = $('#filesToUpload')[0].files;
|
||||
for (var i = 0; i < filesToUpload.length; i++) {
|
||||
fmUploadFile(filesToUpload[i]);
|
||||
}
|
||||
});
|
||||
|
||||
// Drag and drop files to upload them
|
||||
$(window).on("dragover dragenter", function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
fmOpen();
|
||||
});
|
||||
$(window).on("drop", function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
$('#filesToUpload').prop('files', e.originalEvent.dataTransfer.files);
|
||||
$('#filesToUpload').trigger('change');
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
|
@ -1,39 +0,0 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
|
||||
|
||||
<?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
|
||||
|
||||
<div class="align-middle">
|
||||
<div class="float-end mt-1">
|
||||
<button type="submit" class="btn btn-primary btn-sm" name="save"><?php $L->p('Save') ?></button>
|
||||
<a class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT.'categories' ?>" role="button"><?php $L->p('Cancel') ?></a>
|
||||
</div>
|
||||
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('New category'), 'icon'=>'tag')); ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
echo Bootstrap::formInputHidden(array(
|
||||
'name'=>'tokenCSRF',
|
||||
'value'=>$security->getTokenCSRF()
|
||||
));
|
||||
|
||||
echo Bootstrap::formInputText(array(
|
||||
'name'=>'name',
|
||||
'label'=>$L->g('Name'),
|
||||
'value'=>isset($_POST['category'])?$_POST['category']:'',
|
||||
'class'=>'',
|
||||
'placeholder'=>'',
|
||||
'tip'=>''
|
||||
));
|
||||
|
||||
echo Bootstrap::formTextarea(array(
|
||||
'name'=>'description',
|
||||
'label'=>$L->g('Description'),
|
||||
'value'=>isset($_POST['description'])?$_POST['description']:'',
|
||||
'class'=>'',
|
||||
'placeholder'=>'',
|
||||
'tip'=>'',
|
||||
'rows'=>3
|
||||
));
|
||||
?>
|
||||
|
||||
<?php echo Bootstrap::formClose(); ?>
|
|
@ -1,67 +0,0 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
|
||||
|
||||
<?php echo Bootstrap::formOpen(array('id'=>'jsform', 'class'=>'tab-content')); ?>
|
||||
|
||||
<div class="align-middle">
|
||||
<div class="float-end mt-1">
|
||||
<button type="submit" class="btn btn-primary btn-sm" name="save"><?php $L->p('Save') ?></button>
|
||||
<a class="btn btn-secondary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>" role="button"><?php $L->p('Cancel') ?></a>
|
||||
</div>
|
||||
<?php echo Bootstrap::pageTitle(array('title'=>$L->g('Add a new user'), 'icon'=>'user')); ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
echo Bootstrap::formInputHidden(array(
|
||||
'name'=>'tokenCSRF',
|
||||
'value'=>$security->getTokenCSRF()
|
||||
));
|
||||
|
||||
echo Bootstrap::formInputText(array(
|
||||
'name'=>'new_username',
|
||||
'label'=>$L->g('Username'),
|
||||
'value'=>(isset($_POST['new_username'])?$_POST['new_username']:''),
|
||||
'class'=>'',
|
||||
'placeholder'=>'',
|
||||
'tip'=>''
|
||||
));
|
||||
|
||||
echo Bootstrap::formInputText(array(
|
||||
'name'=>'new_password',
|
||||
'type'=>'password',
|
||||
'label'=>$L->g('Password'),
|
||||
'value'=>'',
|
||||
'class'=>'',
|
||||
'placeholder'=>'',
|
||||
'tip'=>''
|
||||
));
|
||||
|
||||
echo Bootstrap::formInputText(array(
|
||||
'name'=>'confirm_password',
|
||||
'type'=>'password',
|
||||
'label'=>$L->g('Confirm Password'),
|
||||
'value'=>'',
|
||||
'class'=>'',
|
||||
'placeholder'=>'',
|
||||
'tip'=>''
|
||||
));
|
||||
|
||||
echo Bootstrap::formSelect(array(
|
||||
'name'=>'role',
|
||||
'label'=>$L->g('Role'),
|
||||
'options'=>array('author'=>$L->g('Author'), 'editor'=>$L->g('Editor'), 'admin'=>$L->g('Administrator')),
|
||||
'selected'=>'Author',
|
||||
'class'=>'',
|
||||
'tip'=>$L->g('author-can-write-and-edit-their-own-content')
|
||||
));
|
||||
|
||||
echo Bootstrap::formInputText(array(
|
||||
'name'=>'email',
|
||||
'label'=>$L->g('Email'),
|
||||
'value'=>(isset($_POST['email'])?$_POST['email']:''),
|
||||
'class'=>'',
|
||||
'placeholder'=>'',
|
||||
'tip'=>''
|
||||
));
|
||||
?>
|
||||
|
||||
<?php echo Bootstrap::formClose(); ?>
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
echo Bootstrap::pageTitle(array('title'=>$L->g('Plugins'), 'icon'=>'puzzle-piece'));
|
||||
|
||||
echo Bootstrap::link(array(
|
||||
'title'=>$L->g('Change the position of the plugins'),
|
||||
'href'=>HTML_PATH_ADMIN_ROOT.'plugins-position',
|
||||
'icon'=>'arrows'
|
||||
));
|
||||
// echo Bootstrap::link(array(
|
||||
// 'title'=>$L->g('Change the position of the plugins'),
|
||||
// 'href'=>HTML_PATH_ADMIN_ROOT.'plugins-position',
|
||||
// 'icon'=>'arrows'
|
||||
// ));
|
||||
|
||||
echo Bootstrap::formTitle(array('title'=>$L->g('Search plugins')));
|
||||
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.'); ?>
|
||||
|
||||
<div class="d-flex align-items-center mb-4">
|
||||
<h2 class="m-0"><i class="bi bi-people"></i><?php $L->p('Users') ?></h2>
|
||||
<div class="ms-auto">
|
||||
<a id="btnNew" class="btn btn-primary btn-sm" href="<?php echo HTML_PATH_ADMIN_ROOT . 'add-user' ?>" role="button"><i class="bi bi-plus-circle"></i><?php $L->p('Add a new user') ?></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
echo Bootstrap::pageTitle(array('title'=>$L->g('Users'), 'icon'=>'users'));
|
||||
|
||||
echo Bootstrap::link(array(
|
||||
'title'=>$L->g('add-a-new-user'),
|
||||
'href'=>HTML_PATH_ADMIN_ROOT.'new-user',
|
||||
'icon'=>'plus'
|
||||
));
|
||||
|
||||
echo '
|
||||
<table class="table table-striped mt-3">
|
||||
<thead>
|
||||
|
@ -30,20 +28,20 @@ foreach ($list as $username) {
|
|||
try {
|
||||
$user = new User($username);
|
||||
echo '<tr>';
|
||||
echo '<td><img class="profilePicture me-1" alt="" src="'.(Sanitize::pathFile(PATH_UPLOADS_PROFILES.$user->username().'.png')?DOMAIN_UPLOADS_PROFILES.$user->username().'.png':HTML_PATH_CORE_IMG.'default.svg').'" /><a href="'.HTML_PATH_ADMIN_ROOT.'edit-user/'.$username.'">'.$username.'</a></td>';
|
||||
echo '<td class="d-none d-lg-table-cell">'.$user->nickname().'</td>';
|
||||
echo '<td>'.$user->email().'</td>';
|
||||
echo '<td>'.($user->enabled()?'<b>'.$L->g('Enabled').'</b>':$L->g('Disabled')).'</td>';
|
||||
echo '<td class="pt-3 pb-3"><a href="'.HTML_PATH_ADMIN_ROOT.'edit-user/'.$username.'">'.$username.'</a></td>';
|
||||
echo '<td class="pt-3 pb-3 d-none d-lg-table-cell">'.$user->nickname().'</td>';
|
||||
echo '<td class="pt-3 pb-3">'.$user->email().'</td>';
|
||||
echo '<td class="pt-3 pb-3">'.($user->enabled()?'<b>'.$L->g('Enabled').'</b>':$L->g('Disabled')).'</td>';
|
||||
if ($user->role()=='admin') {
|
||||
echo '<td>'.$L->g('Administrator').'</td>';
|
||||
echo '<td class="pt-3 pb-3">'.$L->g('Administrator').'</td>';
|
||||
} elseif ($user->role()=='editor') {
|
||||
echo '<td>'.$L->g('Editor').'</td>';
|
||||
echo '<td class="pt-3 pb-3">'.$L->g('Editor').'</td>';
|
||||
} elseif ($user->role()=='author') {
|
||||
echo '<td>'.$L->g('Author').'</td>';
|
||||
echo '<td class="pt-3 pb-3">'.$L->g('Author').'</td>';
|
||||
} else {
|
||||
echo '<td>'.$L->g('Reader').'</td>';
|
||||
echo '<td class="pt-3 pb-3">'.$L->g('Reader').'</td>';
|
||||
}
|
||||
echo '<td class="d-none d-lg-table-cell">'.Date::format($user->registered(), DB_DATE_FORMAT, ADMIN_PANEL_DATE_FORMAT).'</td>';
|
||||
echo '<td class="pt-3 pb-3 d-none d-lg-table-cell">'.Date::format($user->registered(), DB_DATE_FORMAT, ADMIN_PANEL_DATE_FORMAT).'</td>';
|
||||
echo '</tr>';
|
||||
} catch (Exception $e) {
|
||||
// Continue
|
||||
|
|
|
@ -16,13 +16,13 @@ $result = array();
|
|||
if (Text::stringContains(Text::lowercase($L->g('New content')), $query)) {
|
||||
$tmp = array('disabled'=>true, 'icon'=>'plus-circle', 'type'=>'menu');
|
||||
$tmp['text'] = $L->g('New content');
|
||||
$tmp['url'] = HTML_PATH_ADMIN_ROOT.'new-content';
|
||||
$tmp['url'] = HTML_PATH_ADMIN_ROOT.'editor';
|
||||
array_push($result, $tmp);
|
||||
}
|
||||
if (Text::stringContains(Text::lowercase($L->g('New category')), $query)) {
|
||||
$tmp = array('disabled'=>true, 'icon'=>'tag', 'type'=>'menu');
|
||||
$tmp['text'] = $L->g('New category');
|
||||
$tmp['url'] = HTML_PATH_ADMIN_ROOT.'new-category';
|
||||
$tmp['url'] = HTML_PATH_ADMIN_ROOT.'add-category';
|
||||
array_push($result, $tmp);
|
||||
}
|
||||
if (Text::stringContains(Text::lowercase($L->g('New user')), $query)) {
|
||||
|
|
|
@ -26,7 +26,7 @@ define('PROFILE_IMG_HEIGHT', 400);
|
|||
define('PROFILE_IMG_QUALITY', 100); // 100%
|
||||
|
||||
// Items per page for admin area
|
||||
define('ITEMS_PER_PAGE_ADMIN', 20);
|
||||
define('ITEMS_PER_PAGE_ADMIN', 12);
|
||||
|
||||
// Password length
|
||||
define('PASSWORD_LENGTH', 6);
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-align-bottom" viewBox="0 0 16 16">
|
||||
<rect width="4" height="12" x="6" y="1" rx="1"/>
|
||||
<path d="M1.5 14a.5.5 0 0 0 0 1v-1zm13 1a.5.5 0 0 0 0-1v1zm-13 0h13v-1h-13v1z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 271 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-align-center" viewBox="0 0 16 16">
|
||||
<path d="M8 1a.5.5 0 0 1 .5.5V6h-1V1.5A.5.5 0 0 1 8 1zm0 14a.5.5 0 0 1-.5-.5V10h1v4.5a.5.5 0 0 1-.5.5zM2 7a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 315 B |
|
@ -1,4 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-align-end" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M14.5 1a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 1 0v-13a.5.5 0 0 0-.5-.5z"/>
|
||||
<path d="M13 7a1 1 0 0 0-1-1H2a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V7z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 318 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-align-middle" viewBox="0 0 16 16">
|
||||
<path d="M6 13a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1v10zM1 8a.5.5 0 0 0 .5.5H6v-1H1.5A.5.5 0 0 0 1 8zm14 0a.5.5 0 0 1-.5.5H10v-1h4.5a.5.5 0 0 1 .5.5z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 316 B |
|
@ -1,4 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-align-start" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M1.5 1a.5.5 0 0 1 .5.5v13a.5.5 0 0 1-1 0v-13a.5.5 0 0 1 .5-.5z"/>
|
||||
<path d="M3 7a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 318 B |
|
@ -1,4 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-align-top" viewBox="0 0 16 16">
|
||||
<rect width="4" height="12" rx="1" transform="matrix(1 0 0 -1 6 15)"/>
|
||||
<path d="M1.5 2a.5.5 0 0 1 0-1v1zm13-1a.5.5 0 0 1 0 1V1zm-13 0h13v1h-13V1z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 287 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-alt" viewBox="0 0 16 16">
|
||||
<path d="M1 13.5a.5.5 0 0 0 .5.5h3.797a.5.5 0 0 0 .439-.26L11 3h3.5a.5.5 0 0 0 0-1h-3.797a.5.5 0 0 0-.439.26L5 13H1.5a.5.5 0 0 0-.5.5zm10 0a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 0-1h-3a.5.5 0 0 0-.5.5z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 326 B |
|
@ -1,4 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-app-indicator" viewBox="0 0 16 16">
|
||||
<path d="M5.5 2A3.5 3.5 0 0 0 2 5.5v5A3.5 3.5 0 0 0 5.5 14h5a3.5 3.5 0 0 0 3.5-3.5V8a.5.5 0 0 1 1 0v2.5a4.5 4.5 0 0 1-4.5 4.5h-5A4.5 4.5 0 0 1 1 10.5v-5A4.5 4.5 0 0 1 5.5 1H8a.5.5 0 0 1 0 1H5.5z"/>
|
||||
<path d="M16 3a3 3 0 1 1-6 0 3 3 0 0 1 6 0z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 387 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-app" viewBox="0 0 16 16">
|
||||
<path d="M11 2a3 3 0 0 1 3 3v6a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V5a3 3 0 0 1 3-3h6zM5 1a4 4 0 0 0-4 4v6a4 4 0 0 0 4 4h6a4 4 0 0 0 4-4V5a4 4 0 0 0-4-4H5z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 282 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-archive-fill" viewBox="0 0 16 16">
|
||||
<path d="M12.643 15C13.979 15 15 13.845 15 12.5V5H1v7.5C1 13.845 2.021 15 3.357 15h9.286zM5.5 7h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1 0-1zM.8 1a.8.8 0 0 0-.8.8V3a.8.8 0 0 0 .8.8h14.4A.8.8 0 0 0 16 3V1.8a.8.8 0 0 0-.8-.8H.8z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 359 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-archive" viewBox="0 0 16 16">
|
||||
<path d="M0 2a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1v7.5a2.5 2.5 0 0 1-2.5 2.5h-9A2.5 2.5 0 0 1 1 12.5V5a1 1 0 0 1-1-1V2zm2 3v7.5A1.5 1.5 0 0 0 3.5 14h9a1.5 1.5 0 0 0 1.5-1.5V5H2zm13-3H1v2h14V2zM5 7.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 401 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-90deg-down" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M4.854 14.854a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 .708-.708L4 13.293V3.5A2.5 2.5 0 0 1 6.5 1h8a.5.5 0 0 1 0 1h-8A1.5 1.5 0 0 0 5 3.5v9.793l3.146-3.147a.5.5 0 0 1 .708.708l-4 4z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 350 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-90deg-left" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M1.146 4.854a.5.5 0 0 1 0-.708l4-4a.5.5 0 1 1 .708.708L2.707 4H12.5A2.5 2.5 0 0 1 15 6.5v8a.5.5 0 0 1-1 0v-8A1.5 1.5 0 0 0 12.5 5H2.707l3.147 3.146a.5.5 0 1 1-.708.708l-4-4z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 349 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-90deg-right" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M14.854 4.854a.5.5 0 0 0 0-.708l-4-4a.5.5 0 0 0-.708.708L13.293 4H3.5A2.5 2.5 0 0 0 1 6.5v8a.5.5 0 0 0 1 0v-8A1.5 1.5 0 0 1 3.5 5h9.793l-3.147 3.146a.5.5 0 0 0 .708.708l4-4z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 350 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-90deg-up" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M4.854 1.146a.5.5 0 0 0-.708 0l-4 4a.5.5 0 1 0 .708.708L4 2.707V12.5A2.5 2.5 0 0 0 6.5 15h8a.5.5 0 0 0 0-1h-8A1.5 1.5 0 0 1 5 12.5V2.707l3.146 3.147a.5.5 0 1 0 .708-.708l-4-4z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 349 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-bar-down" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M1 3.5a.5.5 0 0 1 .5-.5h13a.5.5 0 0 1 0 1h-13a.5.5 0 0 1-.5-.5zM8 6a.5.5 0 0 1 .5.5v5.793l2.146-2.147a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 0 1 .708-.708L7.5 12.293V6.5A.5.5 0 0 1 8 6z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 375 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-bar-left" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M12.5 15a.5.5 0 0 1-.5-.5v-13a.5.5 0 0 1 1 0v13a.5.5 0 0 1-.5.5zM10 8a.5.5 0 0 1-.5.5H3.707l2.147 2.146a.5.5 0 0 1-.708.708l-3-3a.5.5 0 0 1 0-.708l3-3a.5.5 0 1 1 .708.708L3.707 7.5H9.5a.5.5 0 0 1 .5.5z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 375 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-bar-right" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M6 8a.5.5 0 0 0 .5.5h5.793l-2.147 2.146a.5.5 0 0 0 .708.708l3-3a.5.5 0 0 0 0-.708l-3-3a.5.5 0 0 0-.708.708L12.293 7.5H6.5A.5.5 0 0 0 6 8zm-2.5 7a.5.5 0 0 1-.5-.5v-13a.5.5 0 0 1 1 0v13a.5.5 0 0 1-.5.5z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 375 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-bar-up" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M8 10a.5.5 0 0 0 .5-.5V3.707l2.146 2.147a.5.5 0 0 0 .708-.708l-3-3a.5.5 0 0 0-.708 0l-3 3a.5.5 0 1 0 .708.708L7.5 3.707V9.5a.5.5 0 0 0 .5.5zm-7 2.5a.5.5 0 0 1 .5-.5h13a.5.5 0 0 1 0 1h-13a.5.5 0 0 1-.5-.5z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 376 B |
|
@ -1,4 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-clockwise" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M8 3a5 5 0 1 0 4.546 2.914.5.5 0 0 1 .908-.417A6 6 0 1 1 8 2v1z"/>
|
||||
<path d="M8 4.466V.534a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384L8.41 4.658A.25.25 0 0 1 8 4.466z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 352 B |
|
@ -1,4 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-counterclockwise" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M8 3a5 5 0 1 1-4.546 2.914.5.5 0 0 0-.908-.417A6 6 0 1 0 8 2v1z"/>
|
||||
<path d="M8 4.466V.534a.25.25 0 0 0-.41-.192L5.23 2.308a.25.25 0 0 0 0 .384l2.36 1.966A.25.25 0 0 0 8 4.466z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 359 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-down-circle-fill" viewBox="0 0 16 16">
|
||||
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8.5 4.5a.5.5 0 0 0-1 0v5.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V4.5z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 321 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-down-circle" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8.5 4.5a.5.5 0 0 0-1 0v5.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V4.5z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 370 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-down-left-circle-fill" viewBox="0 0 16 16">
|
||||
<path d="M16 8A8 8 0 1 0 0 8a8 8 0 0 0 16 0zm-5.904-2.803a.5.5 0 1 1 .707.707L6.707 10h2.768a.5.5 0 0 1 0 1H5.5a.5.5 0 0 1-.5-.5V6.525a.5.5 0 0 1 1 0v2.768l4.096-4.096z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 326 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-down-left-circle" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-5.904-2.854a.5.5 0 1 1 .707.708L6.707 9.95h2.768a.5.5 0 1 1 0 1H5.5a.5.5 0 0 1-.5-.5V6.475a.5.5 0 1 1 1 0v2.768l4.096-4.097z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 377 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-down-left-square-fill" viewBox="0 0 16 16">
|
||||
<path d="M2 16a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2zm8.096-10.803L6 9.293V6.525a.5.5 0 0 0-1 0V10.5a.5.5 0 0 0 .5.5h3.975a.5.5 0 0 0 0-1H6.707l4.096-4.096a.5.5 0 1 0-.707-.707z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 363 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-down-left-square" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-5.904-2.854a.5.5 0 1 1 .707.708L6.707 9.95h2.768a.5.5 0 1 1 0 1H5.5a.5.5 0 0 1-.5-.5V6.475a.5.5 0 1 1 1 0v2.768l4.096-4.097z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 377 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-down-left" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M2 13.5a.5.5 0 0 0 .5.5h6a.5.5 0 0 0 0-1H3.707L13.854 2.854a.5.5 0 0 0-.708-.708L3 12.293V7.5a.5.5 0 0 0-1 0v6z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 286 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-down-right-circle-fill" viewBox="0 0 16 16">
|
||||
<path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8zm5.904-2.803a.5.5 0 1 0-.707.707L9.293 10H6.525a.5.5 0 0 0 0 1H10.5a.5.5 0 0 0 .5-.5V6.525a.5.5 0 0 0-1 0v2.768L5.904 5.197z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 326 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-down-right-circle" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.854 5.146a.5.5 0 1 0-.708.708L9.243 9.95H6.475a.5.5 0 1 0 0 1h3.975a.5.5 0 0 0 .5-.5V6.475a.5.5 0 1 0-1 0v2.768L5.854 5.146z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 379 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-down-right-square-fill" viewBox="0 0 16 16">
|
||||
<path d="M14 16a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12zM5.904 5.197L10 9.293V6.525a.5.5 0 0 1 1 0V10.5a.5.5 0 0 1-.5.5H6.525a.5.5 0 0 1 0-1h2.768L5.197 5.904a.5.5 0 0 1 .707-.707z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 365 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-down-right-square" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.854 5.146a.5.5 0 1 0-.708.708L9.243 9.95H6.475a.5.5 0 1 0 0 1h3.975a.5.5 0 0 0 .5-.5V6.475a.5.5 0 1 0-1 0v2.768L5.854 5.146z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 379 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-down-right" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M14 13.5a.5.5 0 0 1-.5.5h-6a.5.5 0 0 1 0-1h4.793L2.146 2.854a.5.5 0 1 1 .708-.708L13 12.293V7.5a.5.5 0 0 1 1 0v6z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 289 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-down-short" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M8 4a.5.5 0 0 1 .5.5v5.793l2.146-2.147a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 1 1 .708-.708L7.5 10.293V4.5A.5.5 0 0 1 8 4z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 314 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-down-square-fill" viewBox="0 0 16 16">
|
||||
<path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm6.5 4.5v5.793l2.146-2.147a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 1 1 .708-.708L7.5 10.293V4.5a.5.5 0 0 1 1 0z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 359 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-down-square" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8.5 4.5a.5.5 0 0 0-1 0v5.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V4.5z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 370 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-down-up" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M11.5 15a.5.5 0 0 0 .5-.5V2.707l3.146 3.147a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 1 0 .708.708L11 2.707V14.5a.5.5 0 0 0 .5.5zm-7-14a.5.5 0 0 1 .5.5v11.793l3.146-3.147a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 .708-.708L4 13.293V1.5a.5.5 0 0 1 .5-.5z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 457 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-down" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M8 1a.5.5 0 0 1 .5.5v11.793l3.146-3.147a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 .708-.708L7.5 13.293V1.5A.5.5 0 0 1 8 1z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 309 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-left-circle-fill" viewBox="0 0 16 16">
|
||||
<path d="M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0zm3.5 7.5a.5.5 0 0 1 0 1H5.707l2.147 2.146a.5.5 0 0 1-.708.708l-3-3a.5.5 0 0 1 0-.708l3-3a.5.5 0 1 1 .708.708L5.707 7.5H11.5z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 320 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-left-circle" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-4.5-.5a.5.5 0 0 1 0 1H5.707l2.147 2.146a.5.5 0 0 1-.708.708l-3-3a.5.5 0 0 1 0-.708l3-3a.5.5 0 1 1 .708.708L5.707 7.5H11.5z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 370 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-left-right" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M1 11.5a.5.5 0 0 0 .5.5h11.793l-3.147 3.146a.5.5 0 0 0 .708.708l4-4a.5.5 0 0 0 0-.708l-4-4a.5.5 0 0 0-.708.708L13.293 11H1.5a.5.5 0 0 0-.5.5zm14-7a.5.5 0 0 1-.5.5H2.707l3.147 3.146a.5.5 0 1 1-.708.708l-4-4a.5.5 0 0 1 0-.708l4-4a.5.5 0 1 1 .708.708L2.707 4H14.5a.5.5 0 0 1 .5.5z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 453 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-left-short" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M12 8a.5.5 0 0 1-.5.5H5.707l2.147 2.146a.5.5 0 0 1-.708.708l-3-3a.5.5 0 0 1 0-.708l3-3a.5.5 0 1 1 .708.708L5.707 7.5H11.5a.5.5 0 0 1 .5.5z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 314 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-left-square-fill" viewBox="0 0 16 16">
|
||||
<path d="M16 14a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12zm-4.5-6.5H5.707l2.147-2.146a.5.5 0 1 0-.708-.708l-3 3a.5.5 0 0 0 0 .708l3 3a.5.5 0 0 0 .708-.708L5.707 8.5H11.5a.5.5 0 0 0 0-1z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 362 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-left-square" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-4.5-.5a.5.5 0 0 1 0 1H5.707l2.147 2.146a.5.5 0 0 1-.708.708l-3-3a.5.5 0 0 1 0-.708l3-3a.5.5 0 1 1 .708.708L5.707 7.5H11.5z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 370 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-left" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M15 8a.5.5 0 0 0-.5-.5H2.707l3.147-3.146a.5.5 0 1 0-.708-.708l-4 4a.5.5 0 0 0 0 .708l4 4a.5.5 0 0 0 .708-.708L2.707 8.5H14.5A.5.5 0 0 0 15 8z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 311 B |
|
@ -1,4 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-repeat" viewBox="0 0 16 16">
|
||||
<path d="M11.534 7h3.932a.25.25 0 0 1 .192.41l-1.966 2.36a.25.25 0 0 1-.384 0l-1.966-2.36a.25.25 0 0 1 .192-.41zm-11 2h3.932a.25.25 0 0 0 .192-.41L2.692 6.23a.25.25 0 0 0-.384 0L.342 8.59A.25.25 0 0 0 .534 9z"/>
|
||||
<path fill-rule="evenodd" d="M8 3c-1.552 0-2.94.707-3.857 1.818a.5.5 0 1 1-.771-.636A6.002 6.002 0 0 1 13.917 7H12.9A5.002 5.002 0 0 0 8 3zM3.1 9a5.002 5.002 0 0 0 8.757 2.182.5.5 0 1 1 .771.636A6.002 6.002 0 0 1 2.083 9H3.1z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 582 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-return-left" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M14.5 1.5a.5.5 0 0 1 .5.5v4.8a2.5 2.5 0 0 1-2.5 2.5H2.707l3.347 3.346a.5.5 0 0 1-.708.708l-4.2-4.2a.5.5 0 0 1 0-.708l4-4a.5.5 0 1 1 .708.708L2.707 8.3H12.5A1.5 1.5 0 0 0 14 6.8V2a.5.5 0 0 1 .5-.5z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 373 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-return-right" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M1.5 1.5A.5.5 0 0 0 1 2v4.8a2.5 2.5 0 0 0 2.5 2.5h9.793l-3.347 3.346a.5.5 0 0 0 .708.708l4.2-4.2a.5.5 0 0 0 0-.708l-4-4a.5.5 0 0 0-.708.708L13.293 8.3H3.5A1.5 1.5 0 0 1 2 6.8V2a.5.5 0 0 0-.5-.5z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 372 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-right-circle-fill" viewBox="0 0 16 16">
|
||||
<path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zM4.5 7.5a.5.5 0 0 0 0 1h5.793l-2.147 2.146a.5.5 0 0 0 .708.708l3-3a.5.5 0 0 0 0-.708l-3-3a.5.5 0 1 0-.708.708L10.293 7.5H4.5z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 322 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-right-circle" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM4.5 7.5a.5.5 0 0 0 0 1h5.793l-2.147 2.146a.5.5 0 0 0 .708.708l3-3a.5.5 0 0 0 0-.708l-3-3a.5.5 0 1 0-.708.708L10.293 7.5H4.5z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 372 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-right-short" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 316 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-right-square-fill" viewBox="0 0 16 16">
|
||||
<path d="M0 14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2a2 2 0 0 0-2 2v12zm4.5-6.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5a.5.5 0 0 1 0-1z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 361 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-right-square" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM4.5 7.5a.5.5 0 0 0 0 1h5.793l-2.147 2.146a.5.5 0 0 0 .708.708l3-3a.5.5 0 0 0 0-.708l-3-3a.5.5 0 1 0-.708.708L10.293 7.5H4.5z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 372 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-right" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M1 8a.5.5 0 0 1 .5-.5h11.793l-3.147-3.146a.5.5 0 0 1 .708-.708l4 4a.5.5 0 0 1 0 .708l-4 4a.5.5 0 0 1-.708-.708L13.293 8.5H1.5A.5.5 0 0 1 1 8z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 312 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-up-circle-fill" viewBox="0 0 16 16">
|
||||
<path d="M16 8A8 8 0 1 0 0 8a8 8 0 0 0 16 0zm-7.5 3.5a.5.5 0 0 1-1 0V5.707L5.354 7.854a.5.5 0 1 1-.708-.708l3-3a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1-.708.708L8.5 5.707V11.5z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 320 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-up-circle" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-7.5 3.5a.5.5 0 0 1-1 0V5.707L5.354 7.854a.5.5 0 1 1-.708-.708l3-3a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1-.708.708L8.5 5.707V11.5z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 369 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-up-left-circle-fill" viewBox="0 0 16 16">
|
||||
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-5.904 2.803a.5.5 0 1 0 .707-.707L6.707 6h2.768a.5.5 0 1 0 0-1H5.5a.5.5 0 0 0-.5.5v3.975a.5.5 0 0 0 1 0V6.707l4.096 4.096z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 323 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-up-left-circle" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-5.904 2.803a.5.5 0 1 0 .707-.707L6.707 6h2.768a.5.5 0 1 0 0-1H5.5a.5.5 0 0 0-.5.5v3.975a.5.5 0 0 0 1 0V6.707l4.096 4.096z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 372 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-up-left-square-fill" viewBox="0 0 16 16">
|
||||
<path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm8.096 10.803L6 6.707v2.768a.5.5 0 0 1-1 0V5.5a.5.5 0 0 1 .5-.5h3.975a.5.5 0 1 1 0 1H6.707l4.096 4.096a.5.5 0 1 1-.707.707z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 359 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-up-left-square" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-5.904 2.803a.5.5 0 1 0 .707-.707L6.707 6h2.768a.5.5 0 1 0 0-1H5.5a.5.5 0 0 0-.5.5v3.975a.5.5 0 0 0 1 0V6.707l4.096 4.096z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 372 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-up-left" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M2 2.5a.5.5 0 0 1 .5-.5h6a.5.5 0 0 1 0 1H3.707l10.147 10.146a.5.5 0 0 1-.708.708L3 3.707V8.5a.5.5 0 0 1-1 0v-6z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 284 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-up-right-circle-fill" viewBox="0 0 16 16">
|
||||
<path d="M0 8a8 8 0 1 0 16 0A8 8 0 0 0 0 8zm5.904 2.803a.5.5 0 1 1-.707-.707L9.293 6H6.525a.5.5 0 1 1 0-1H10.5a.5.5 0 0 1 .5.5v3.975a.5.5 0 0 1-1 0V6.707l-4.096 4.096z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 324 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-up-right-circle" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.854 10.803a.5.5 0 1 1-.708-.707L9.243 6H6.475a.5.5 0 1 1 0-1h3.975a.5.5 0 0 1 .5.5v3.975a.5.5 0 1 1-1 0V6.707l-4.096 4.096z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 376 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-up-right-square-fill" viewBox="0 0 16 16">
|
||||
<path d="M14 0a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h12zM5.904 10.803L10 6.707v2.768a.5.5 0 0 0 1 0V5.5a.5.5 0 0 0-.5-.5H6.525a.5.5 0 1 0 0 1h2.768l-4.096 4.096a.5.5 0 0 0 .707.707z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 363 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-up-right-square" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.854 10.803a.5.5 0 1 1-.708-.707L9.243 6H6.475a.5.5 0 1 1 0-1h3.975a.5.5 0 0 1 .5.5v3.975a.5.5 0 1 1-1 0V6.707l-4.096 4.096z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 376 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-up-right" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M14 2.5a.5.5 0 0 0-.5-.5h-6a.5.5 0 0 0 0 1h4.793L2.146 13.146a.5.5 0 0 0 .708.708L13 3.707V8.5a.5.5 0 0 0 1 0v-6z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 287 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-up-short" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M8 12a.5.5 0 0 0 .5-.5V5.707l2.146 2.147a.5.5 0 0 0 .708-.708l-3-3a.5.5 0 0 0-.708 0l-3 3a.5.5 0 1 0 .708.708L7.5 5.707V11.5a.5.5 0 0 0 .5.5z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 315 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-up-square-fill" viewBox="0 0 16 16">
|
||||
<path d="M2 16a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H2zm6.5-4.5V5.707l2.146 2.147a.5.5 0 0 0 .708-.708l-3-3a.5.5 0 0 0-.708 0l-3 3a.5.5 0 1 0 .708.708L7.5 5.707V11.5a.5.5 0 0 0 1 0z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 358 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-up-square" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-7.5 3.5a.5.5 0 0 1-1 0V5.707L5.354 7.854a.5.5 0 1 1-.708-.708l3-3a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1-.708.708L8.5 5.707V11.5z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 369 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrow-up" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M8 15a.5.5 0 0 0 .5-.5V2.707l3.146 3.147a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 1 0 .708.708L7.5 2.707V14.5a.5.5 0 0 0 .5.5z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 309 B |
|
@ -1,3 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrows-angle-contract" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M.172 15.828a.5.5 0 0 0 .707 0l4.096-4.096V14.5a.5.5 0 1 0 1 0v-3.975a.5.5 0 0 0-.5-.5H1.5a.5.5 0 0 0 0 1h2.768L.172 15.121a.5.5 0 0 0 0 .707zM15.828.172a.5.5 0 0 0-.707 0l-4.096 4.096V1.5a.5.5 0 1 0-1 0v3.975a.5.5 0 0 0 .5.5H14.5a.5.5 0 0 0 0-1h-2.768L15.828.879a.5.5 0 0 0 0-.707z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 463 B |