mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-06-05 22:09:38 +02:00
fix: navigazione record per moduli custom
This commit is contained in:
34
editor.php
34
editor.php
@@ -186,25 +186,27 @@ if (empty($record) || !$has_access) {
|
|||||||
$posizioni = $module_query ? $dbo->fetchArray($module_query) : 0;
|
$posizioni = $module_query ? $dbo->fetchArray($module_query) : 0;
|
||||||
$key = $posizioni ? array_search($id_record, array_column($posizioni, 'id')) : 0;
|
$key = $posizioni ? array_search($id_record, array_column($posizioni, 'id')) : 0;
|
||||||
|
|
||||||
// Precedente
|
if (is_array($posizioni)) {
|
||||||
$prev = $posizioni[$key - 1]['id'];
|
// Precedente
|
||||||
|
$prev = $posizioni[$key - 1]['id'];
|
||||||
|
|
||||||
// Successivo
|
// Successivo
|
||||||
$next = $posizioni[$key + 1]['id'];
|
$next = $posizioni[$key + 1]['id'];
|
||||||
|
|
||||||
echo '<span class="d-sm-inline">';
|
echo '<span class="d-sm-inline">';
|
||||||
|
|
||||||
echo '
|
echo '
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<a class="btn btn-default'.($prev ? '' : ' disabled').'" href="'.base_path().'/editor.php?id_module='.$id_module.'&id_record='.$prev.'">
|
<a class="btn btn-default'.($prev ? '' : ' disabled').'" href="'.base_path().'/editor.php?id_module='.$id_module.'&id_record='.$prev.'">
|
||||||
<i class="fa fa-arrow-circle-left"></i>
|
<i class="fa fa-arrow-circle-left"></i>
|
||||||
</a>
|
</a>
|
||||||
<span class="btn btn-default disabled">'.($key + 1).'/'.count($posizioni).'</span>
|
<span class="btn btn-default disabled">'.($key + 1).'/'.count($posizioni).'</span>
|
||||||
<a class="btn btn-default'.($next ? '' : ' disabled').'" href="'.base_path().'/editor.php?id_module='.$id_module.'&id_record='.$next.'">
|
<a class="btn btn-default'.($next ? '' : ' disabled').'" href="'.base_path().'/editor.php?id_module='.$id_module.'&id_record='.$next.'">
|
||||||
<i class="fa fa-arrow-circle-right"></i>
|
<i class="fa fa-arrow-circle-right"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</span>';
|
</span>';
|
||||||
|
}
|
||||||
|
|
||||||
echo '<div class="extra-buttons d-sm-inline">';
|
echo '<div class="extra-buttons d-sm-inline">';
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user