mirror of
https://github.com/itflow-org/itflow
synced 2026-11-24 05:17:25 +00:00
QoL 69: a Knowledge Base Articles starter pack of 29 client how-tos loaded as agent-only drafts with Knowledge Base categories and article tags in their packs, and a demo Knowledge Base with every kind of audience, reads, feedback, versions, a review due, searches that found nothing and links from ticket replies, removed with the demo along with its clients' ticket read marks
This commit is contained in:
@@ -182,6 +182,26 @@ if (isset($_POST['update_starter_vendor_templates'])) {
|
||||
|
||||
}
|
||||
|
||||
if (isset($_POST['update_starter_kb_articles'])) {
|
||||
|
||||
// The starter Knowledge Base articles already here, brought up to this version
|
||||
validateCSRFToken();
|
||||
|
||||
require_once 'starter_content_model.php';
|
||||
|
||||
$counts = starterUpdateKbArticles();
|
||||
|
||||
if ($counts['replaced']) {
|
||||
logAudit("Starter Content", "Edit", "$session_name brought {$counts['replaced']} starter Knowledge Base articles up to date");
|
||||
flashAlert("Brought <strong>{$counts['replaced']}</strong> starter Knowledge Base articles up to date - any whose words changed keep what they said before in their versions");
|
||||
} else {
|
||||
flashAlert("None of the starter Knowledge Base articles are here to update - add them instead", 'info');
|
||||
}
|
||||
|
||||
redirect();
|
||||
|
||||
}
|
||||
|
||||
if (isset($_POST['update_starter_license_templates'])) {
|
||||
|
||||
// The starter license templates already here, brought up to this version
|
||||
@@ -210,12 +230,15 @@ if (isset($_POST['load_demo_data'])) {
|
||||
|
||||
$counts = demoDataLoad($mysqli);
|
||||
|
||||
if (!$counts['clients']) {
|
||||
if (!$counts['clients'] && !$counts['kb']) {
|
||||
flashAlert("Nothing to add - every demo client is already here", 'info');
|
||||
redirect();
|
||||
}
|
||||
|
||||
$summary = "{$counts['clients']} clients, {$counts['contacts']} contacts, {$counts['assets']} assets, {$counts['documentation']} documentation records, {$counts['tickets']} tickets, {$counts['projects']} projects, {$counts['billing']} billing records, {$counts['company']} company records";
|
||||
$summary = $counts['clients'] ? "{$counts['clients']} clients, {$counts['contacts']} contacts, {$counts['assets']} assets, {$counts['documentation']} documentation records, {$counts['tickets']} tickets, {$counts['projects']} projects, {$counts['billing']} billing records, {$counts['company']} company records" : '';
|
||||
if ($counts['kb']) {
|
||||
$summary .= ($summary !== '' ? ', ' : '') . "{$counts['kb']} Knowledge Base articles";
|
||||
}
|
||||
|
||||
|
||||
logAudit("Demo Data", "Create", "$session_name loaded demo data - $summary");
|
||||
|
||||
Reference in New Issue
Block a user