mirror of
https://github.com/itflow-org/itflow
synced 2026-12-05 10:39:00 +00:00
Copy a Knowledge Base article's link from its menu on its page and in the list: Copy Public Link, Copy Portal Link or Copy Link to its agent page by who can read it, with one that won't open yet greyed out and saying why, and the menu shown with just these to agents who can read articles but not edit them; 26.12.6 changelog
This commit is contained in:
@@ -42,6 +42,7 @@ $review = kbReviewState($row);
|
||||
$audience = kbAudiencesFor([$kb_article_id])[$kb_article_id];
|
||||
$visibility = isset(KB_VISIBILITY[$row['kb_article_visibility']]) ? $row['kb_article_visibility'] : 'agents';
|
||||
$public_url = kbPublicUrl($kb_article_id, $row['kb_article_title']);
|
||||
$copy_links = kbCopyLinks($row);
|
||||
|
||||
$versions = [];
|
||||
$sql_versions = mysqli_query($mysqli, "SELECT kb_article_version_id, kb_article_version_title, kb_article_version_created_at, user_name
|
||||
@@ -128,11 +129,16 @@ $page_title = $row['kb_article_title'];
|
||||
<button type="button" class="dropdown-item" onclick="window.print();"><i class="fas fa-fw fa-print me-2"></i>Print</button>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($can_edit) { ?>
|
||||
<?php if ($can_edit || $copy_links) { ?>
|
||||
<div class="dropdown">
|
||||
<button type="button" class="btn btn-outline-secondary" data-bs-toggle="dropdown" title="More actions"><i class="fas fa-ellipsis-v"></i></button>
|
||||
<div class="dropdown-menu dropdown-menu-end">
|
||||
<?php if (!$archived) { ?>
|
||||
<?php // Its links, for whoever reads it - one that won't open yet says why ?>
|
||||
<?= kbCopyLinksMenuHtml($copy_links) ?>
|
||||
<?php if ($copy_links && $can_edit) { ?>
|
||||
<div class="dropdown-divider"></div>
|
||||
<?php } ?>
|
||||
<?php if ($can_edit && !$archived) { ?>
|
||||
<?php if ($published) { ?>
|
||||
<a class="dropdown-item" href="post.php?draft_kb_article=<?= $kb_article_id ?>&csrf_token=<?= $csrf ?>" title="Back to a draft - not finished"><i class="fas fa-fw fa-pencil-alt me-2"></i>Make Draft</a>
|
||||
<?php } ?>
|
||||
@@ -142,7 +148,7 @@ $page_title = $row['kb_article_title'];
|
||||
<a class="dropdown-item" href="post.php?copy_kb_article=<?= $kb_article_id ?>&csrf_token=<?= $csrf ?>" title="A new draft starting from this one"><i class="far fa-fw fa-copy me-2"></i>Copy</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item text-danger" href="post.php?archive_kb_article=<?= $kb_article_id ?>&csrf_token=<?= $csrf ?>"><i class="fas fa-fw fa-archive me-2"></i>Archive</a>
|
||||
<?php } else { ?>
|
||||
<?php } elseif ($can_edit) { ?>
|
||||
<a class="dropdown-item" href="post.php?restore_kb_article=<?= $kb_article_id ?>&csrf_token=<?= $csrf ?>"><i class="fas fa-fw fa-redo me-2"></i>Restore</a>
|
||||
<?php } ?>
|
||||
<?php if ($can_delete) { ?>
|
||||
|
||||
Reference in New Issue
Block a user