Respect custom sort_order column value

Adds support to the ReorderController behavior for custom `sort_order` column names.
This commit is contained in:
Luke Towers 2017-01-30 19:05:16 -06:00 committed by GitHub
parent b2301a8056
commit 13aef49ebb
1 changed files with 6 additions and 2 deletions

View File

@ -1,6 +1,10 @@
<?php foreach ($records as $record): ?>
<li data-record-id="<?= $record->getKey() ?>" data-record-sort-order="<?= $record->sort_order ?>">
<li data-record-id="<?= $record->getKey() ?>"
<?php if ($reorderSortMode === 'simple') : ?>
data-record-sort-order="<?= $record->{$record->getSortOrderColumn()} ?>"
<?php endif ?>
>
<div class="record">
<a href="javascript:;" class="move"></a>
<span><?= $this->reorderGetRecordName($record) ?></span>
@ -16,4 +20,4 @@
<?php endif ?>
</li>
<?php endforeach ?>
<?php endforeach ?>