Created
April 5, 2017 09:43
-
-
Save wdog/eb82043505ec5f7c80e6db231a1906ad to your computer and use it in GitHub Desktop.
Alternative Nayjest/Grid sorting_control.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<small style="white-space: nowrap"> | |
<?php if (!$column->isSortedAsc() && !$column->isSortedDesc()): ?> | |
<a | |
class="text-success" | |
title="Sort ascending" | |
href="<?= $grid->getSorter()->link($column, 'ASC') ?>" | |
> | |
<span class="glyphicon glyphicon-sort" aria-hidden="true"></span> | |
</a> | |
<?php elseif ($column->isSortedAsc()): ?> | |
<a title="Sort descending" | |
class="text-success" | |
href="<?= $grid->getSorter()->link($column, 'DESC') ?>" | |
> | |
<span class="glyphicon glyphicon-sort-by-attributes" aria-hidden="true"></span> | |
</a> | |
<?php elseif ($column->isSortedDesc()): ?> | |
<a | |
title="Sort ASC" class="text-success" | |
href="<?= $grid->getSorter()->link($column, 'ASC') ?>" | |
> | |
<span class="glyphicon glyphicon-sort-by-attributes-alt" aria-hidden="true"></span> | |
</a> | |
<?php endif ?> | |
</small> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
smaller sorting controls for https://github.com/Nayjest/Grids