Update admin.php

Add a message when there are no pages in the Page Index to list so it's less confusing than just an empty table.
This commit is contained in:
Brian Huisman 2023-05-19 12:47:23 -04:00
parent 0728849ea4
commit 956af77655

View file

@ -2434,7 +2434,7 @@ document.write(mustache.render(
<tr>
<th class="pe-0"></th>
<th class="fs-5" scope="col">URL</th>
<td class="text-center">
<td class="text-center w-100">
<span class="d-none d-sm-inline">Showing pages </span><?php
echo min($_RDATA['page_index_offset'] + 1, $_RDATA['page_index_found_rows']);
?> &ndash; <?php
@ -2489,6 +2489,7 @@ document.write(mustache.render(
if (count($_ODATA['sp_domains']) == 1)
$repStr = '/^'.preg_quote(key($_ODATA['sp_domains']), '/').'/';
if (count($_RDATA['page_index_rows'])) {
foreach ($_RDATA['page_index_rows'] as $key => $row) { ?>
<tr class="lh-sm">
<td class="align-middle pe-0">
@ -2529,6 +2530,17 @@ document.write(mustache.render(
echo htmlspecialchars($row['priority']);
?></td>
</tr><?php
}
// No pages to list with these filters
} else { ?>
<tr>
<td colspan="100%">
<p class="text-center m-0">
No pages to list.
</p>
</td>
</tr><?php
} ?>
</tbody>
</table>