From 68407ad75ef94523b3c045a6a4a75bacc56ba507 Mon Sep 17 00:00:00 2001
From: Diego Najar
Date: Fri, 24 May 2019 19:00:22 +0200
Subject: [PATCH] Autosave tab, and autosave type for pages
---
bl-kernel/admin/controllers/content.php | 1 +
bl-kernel/admin/themes/booty/init.php | 2 +-
bl-kernel/admin/views/content.php | 34 +++++++++++++------
...{content-list.php => content-get-list.php} | 15 +++++++-
bl-kernel/ajax/save-as-draft.php | 4 ++-
bl-kernel/js/bludit-ajax.php | 3 +-
bl-kernel/pages.class.php | 17 +++++++++-
7 files changed, 61 insertions(+), 15 deletions(-)
rename bl-kernel/ajax/{content-list.php => content-get-list.php} (66%)
diff --git a/bl-kernel/admin/controllers/content.php b/bl-kernel/admin/controllers/content.php
index 42172756..d8db3787 100644
--- a/bl-kernel/admin/controllers/content.php
+++ b/bl-kernel/admin/controllers/content.php
@@ -40,6 +40,7 @@ $drafts = $pages->getDraftDB(true);
$scheduled = $pages->getScheduledDB(true);
$static = $pages->getStaticDB(true);
$sticky = $pages->getStickyDB(true);
+$autosave = $pages->getAutosaveDB(true);
// If the user is an Author filter the content he/she can edit
if (checkRole(array('author'), false)) {
diff --git a/bl-kernel/admin/themes/booty/init.php b/bl-kernel/admin/themes/booty/init.php
index 96a86a90..095cef36 100644
--- a/bl-kernel/admin/themes/booty/init.php
+++ b/bl-kernel/admin/themes/booty/init.php
@@ -44,7 +44,7 @@ EOF;
}
if (isset($args['icon'])) {
- return ' '.$args['title'].'';
+ return ''.$args['title'].'';
}
return ''.$args['title'].'';
diff --git a/bl-kernel/admin/views/content.php b/bl-kernel/admin/views/content.php
index 5a9dd5e2..f47dc0d5 100644
--- a/bl-kernel/admin/views/content.php
+++ b/bl-kernel/admin/views/content.php
@@ -10,6 +10,7 @@ function table($type) {
global $scheduled;
global $static;
global $sticky;
+ global $autosave;
if ($type=='published') {
$list = $published;
@@ -51,6 +52,8 @@ function table($type) {
echo '
';
return false;
}
+ } elseif ($type=='autosave') {
+ $list = $autosave;
}
echo '
@@ -180,8 +183,13 @@ function table($type) {
p('Scheduled') ?> 0) { echo ''.count($scheduled).''; } ?>
- p('Draft') ?> 0) { echo ''.count($drafts).''; } ?>
+ p('Draft') ?>
+
+
+ p('Autosave') ?>
+
+
@@ -222,12 +230,11 @@ function table($type) {