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:
johnnyq
2026-11-21 13:33:17 -05:00
parent a878495046
commit 5cfd08134a
6 changed files with 1552 additions and 20 deletions

View File

@@ -51,7 +51,7 @@ function starterItemLook($pack, $row) {
/* The packs whose items have more to them than a line - shown whole by Preview. */
function starterPreviewPacks() {
return ['ticket_templates', 'project_templates', 'canned_responses', 'vendor_templates', 'document_templates', 'license_templates', 'products'];
return ['ticket_templates', 'project_templates', 'canned_responses', 'kb_articles', 'vendor_templates', 'document_templates', 'license_templates', 'products'];
}
/* [Words in brackets] in a template, marked as the bits filled in as it is used. */
@@ -171,6 +171,16 @@ function starterItemPreview($pack, $row) {
$html .= starterPreviewFillIns((array) ($row['fill_ins'] ?? []));
return $html . '<h3 class="itflow-starter-preview-head">What it says</h3><div class="itflow-starter-preview-doc">' . starterPreviewFills($row['content'] ?? '') . '</div>';
case 'kb_articles':
$review = intval($row['review_months'] ?? 0);
$html .= '<dl class="itflow-starter-preview-facts">'
. starterPreviewFact('Category', escapeHtml((string) ($row['category'] ?? '')))
. starterPreviewFact('Tags', escapeHtml(implode(', ', (array) ($row['tags'] ?? []))))
. starterPreviewFact('Reviewed', $review ? 'Every ' . ($review === 12 ? 'year' : "$review months") : '')
. starterPreviewFact('Comes in as', 'A draft only your team can see')
. '</dl>';
return $html . '<h3 class="itflow-starter-preview-head">What it says</h3><div class="itflow-starter-preview-doc">' . starterKbFill($row['content'] ?? '') . '</div>';
case 'license_templates':
$html .= '<dl class="itflow-starter-preview-facts">'
. starterPreviewFact('Type', escapeHtml((string) ($row['type'] ?? '')))