29
0
mirror of https://github.com/joomla/joomla-cms.git synced 2024-07-02 18:13:43 +00:00

[4.0] com_finder indexed content [a11y] (#34630)

The count of indexed content in each group in the published and unpublished states now has a tooltip
This commit is contained in:
Brian Teeman 2021-06-27 11:05:30 +01:00 committed by GitHub
parent 781932f637
commit ac18b22618
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -121,16 +121,28 @@ $wa->useScript('com_finder.maps');
<?php endif; ?>
<td class="text-center btns itemnumber">
<?php if ($item->level > 1) : ?>
<a class="btn <?php echo ((int) $item->count_published > 0) ? 'btn-success' : 'btn-secondary'; ?>" title="<?php echo Text::_('COM_FINDER_MAPS_COUNT_PUBLISHED_ITEMS'); ?>" href="<?php echo Route::_('index.php?option=com_finder&view=index&filter[state]=1&filter[content_map]=' . $item->id); ?>">
<?php echo (int) $item->count_published; ?></a>
<a class="btn <?php echo ((int) $item->count_published > 0) ? 'btn-success' : 'btn-secondary'; ?>"
href="<?php echo Route::_('index.php?option=com_finder&view=index&filter[state]=1&filter[content_map]=' . $item->id); ?>"
aria-describedby="tip-publish<?php echo $i; ?>">
<?php echo (int) $item->count_published; ?>
</a>
<div role="tooltip" id="tip-publish<?php echo $i; ?>">
<?php echo Text::_('COM_FINDER_MAPS_COUNT_PUBLISHED_ITEMS'); ?>
</div>
<?php else : ?>
-
<?php endif; ?>
</td>
<td class="text-center btns itemnumber">
<?php if ($item->level > 1) : ?>
<a class="btn <?php echo ((int) $item->count_unpublished > 0) ? 'btn-danger' : 'btn-secondary'; ?>" title="<?php echo Text::_('COM_FINDER_MAPS_COUNT_UNPUBLISHED_ITEMS'); ?>" href="<?php echo Route::_('index.php?option=com_finder&view=index&filter[state]=0&filter[content_map]=' . $item->id); ?>">
<?php echo (int) $item->count_unpublished; ?></a>
<a class="btn <?php echo ((int) $item->count_unpublished > 0) ? 'btn-danger' : 'btn-secondary'; ?>"
href="<?php echo Route::_('index.php?option=com_finder&view=index&filter[state]=0&filter[content_map]=' . $item->id); ?>"
aria-describedby="tip-unpublish<?php echo $i; ?>">
<?php echo (int) $item->count_unpublished; ?>
</a>
<div role="tooltip" id="tip-unpublish<?php echo $i; ?>">
<?php echo Text::_('COM_FINDER_MAPS_COUNT_UNPUBLISHED_ITEMS'); ?>
</div>
<?php else : ?>
-
<?php endif; ?>