Empty states: one shared empty state on every list page, drawn by includes/inc_empty_state.php from each page's $empty_state through the new emptyStateHtml() in functions/format.php - a grey round tile with the list's icon, a title, a line on what goes there and the page's own New and Import buttons when nothing has been added, No X match with a Clear filters button that keeps the client, archived and the current tab when a search or filters leave nothing, Nothing in {tab} with the tab's description for an empty pill and a tick for pills that flag trouble, and No archived X for an empty archive; pills count as views rather than filters; replaces the pages' own empty blocks so a filtered-to-nothing list no longer shows two messages; files, notifications and racks use it in their own layouts; adds emptyStateFiltered(), emptyStateClearUrl() and emptyStatePill() and the .itflow-empty-state styles; changelog updated

This commit is contained in:
johnnyq
2026-10-17 00:47:32 -04:00
parent 74df1625e6
commit 59e75764f8
55 changed files with 720 additions and 315 deletions

View File

@@ -160,6 +160,14 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
</form>
</div>
<?php
$empty_state = [
'thing' => 'API keys',
'icon' => 'fa-key',
'text' => 'A key lets another system read and write ITFlow through its API.',
'actions' => [['label' => 'New API Key', 'modal' => 'modals/api/api_key_add.php']],
];
?>
<?php require_once "../includes/filter_footer.php"; ?>
</div>