| @@ -1127,9 +1127,16 @@ | ||
| 1127 | 1127 | </span> |
| 1128 | 1128 | </div> |
| 1129 | 1129 | </td> |
| 1130 | 1130 | <td class="mxchat-url-cell" style="padding: 12px 16px; font-size: 13px;"> |
| 1131 | - <?php echo MxChat_Knowledge_Manager::mxchat_source_cell_html($source_url, $current_bot_id, true); ?> | |
| 1131 | + <?php if (!empty($source_url) && strpos($source_url, 'mxchat://') !== 0 && strpos($source_url, '_ungrouped_') !== 0) : ?> | |
| 1132 | + <a href="<?php echo esc_url($source_url); ?>" target="_blank" style="color: var(--mxch-primary); text-decoration: none;"> | |
| 1133 | + <span class="dashicons dashicons-external" style="font-size: 14px;"></span> | |
| 1134 | + <?php esc_html_e('View Source', 'mxchat'); ?> | |
| 1135 | + </a> | |
| 1136 | + <?php else : ?> | |
| 1137 | + <span style="color: var(--mxch-text-muted);"><?php esc_html_e('Manual Content', 'mxchat'); ?></span> | |
| 1138 | + <?php endif; ?> | |
| 1132 | 1139 | </td> |
| 1133 | 1140 | <td class="mxchat-actions-cell" style="padding: 12px 16px; white-space: nowrap;"> |
| 1134 | 1141 | <button type="button" |
| 1135 | 1142 | class="mxch-btn mxch-btn-ghost mxch-btn-sm mxchat-inspect-entry-btn" |
| @@ -1278,10 +1285,16 @@ | ||
| 1278 | 1285 | $actual_source = $source_url; |
| 1279 | 1286 | if (strpos($source_url, '_ungrouped_') === 0) { |
| 1280 | 1287 | $actual_source = $prompt->source_url ?? ''; |
| 1281 | 1288 | } |
| 1282 | - echo MxChat_Knowledge_Manager::mxchat_source_cell_html($actual_source, $current_bot_id, false); | |
| 1283 | - ?> | |
| 1289 | + if (!empty($actual_source) && strpos($actual_source, 'mxchat://') !== 0) : ?> | |
| 1290 | + <a href="<?php echo esc_url($actual_source); ?>" target="_blank" style="color: var(--mxch-primary); text-decoration: none;"> | |
| 1291 | + <span class="dashicons dashicons-external" style="font-size: 14px;"></span> | |
| 1292 | + <?php esc_html_e('View', 'mxchat'); ?> | |
| 1293 | + </a> | |
| 1294 | + <?php else : ?> | |
| 1295 | + <span style="color: var(--mxch-text-muted);"><?php esc_html_e('Manual', 'mxchat'); ?></span> | |
| 1296 | + <?php endif; ?> | |
| 1284 | 1297 | </td> |
| 1285 | 1298 | <td style="padding: 12px 16px; white-space: nowrap;"> |
| 1286 | 1299 | <button type="button" |
| 1287 | 1300 | class="mxch-btn mxch-btn-ghost mxch-btn-sm mxchat-inspect-entry-btn" |
| @@ -1414,20 +1427,8 @@ | ||
| 1414 | 1427 | </div> |
| 1415 | 1428 | <button type="button" class="mxch-btn mxch-btn-secondary" id="mxchat-kb-reimport-check"><?php esc_html_e('Check knowledge base', 'mxchat'); ?></button> |
| 1416 | 1429 | </div> |
| 1417 | 1430 | <p class="mxch-field-hint"><?php esc_html_e('The date is the release that carried the last of these fixes. Choose a later one if this site was updated after that.', 'mxchat'); ?></p> |
| 1418 | - | |
| 1419 | - <!-- Also offer entries whose page was edited after they were imported (plan a00ef8); off by default --> | |
| 1420 | - <div class="mxch-field mxch-kb-reimport-edited"> | |
| 1421 | - <label class="toggle-switch"> | |
| 1422 | - <input type="checkbox" id="mxchat-kb-reimport-edited" name="mxchat_kb_reimport_edited" value="1" /> | |
| 1423 | - <span class="slider"></span> | |
| 1424 | - </label> | |
| 1425 | - <div class="mxch-kb-reimport-edited-text"> | |
| 1426 | - <label class="mxch-field-label" for="mxchat-kb-reimport-edited"><?php esc_html_e('Also rewrite entries whose page was edited after they were imported', 'mxchat'); ?></label> | |
| 1427 | - <p class="mxch-field-description"><?php esc_html_e('An entry older than its post, page, product or media file is rebuilt from it as it reads today. A site with auto-sync on does not need this.', 'mxchat'); ?></p> | |
| 1428 | - </div> | |
| 1429 | - </div> | |
| 1430 | 1431 | |
| 1431 | 1432 | <div class="mxch-kb-reimport-progress" hidden> |
| 1432 | 1433 | <div class="mxch-progress-bar" hidden><div class="mxch-progress-bar-fill"></div></div> |
| 1433 | 1434 | <p class="mxch-progress-label" aria-live="polite"></p> |