mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
#10493 fixed pagination in collection
This commit is contained in:
parent
dfadbb0f80
commit
2f1060af56
@ -597,9 +597,10 @@ if ((bool) $id !== false || $new_component
|
|||||||
$search_id_group = (int) get_parameter('search_id_group');
|
$search_id_group = (int) get_parameter('search_id_group');
|
||||||
$search_string = (string) get_parameter('search_string');
|
$search_string = (string) get_parameter('search_string');
|
||||||
|
|
||||||
|
$offset = (int) get_parameter('offset');
|
||||||
$url = ui_get_url_refresh(
|
$url = ui_get_url_refresh(
|
||||||
[
|
[
|
||||||
'offset' => false,
|
'offset' => $offset,
|
||||||
'search_string' => $search_string,
|
'search_string' => $search_string,
|
||||||
'search_id_group' => $search_id_group,
|
'search_id_group' => $search_id_group,
|
||||||
'id' => $id,
|
'id' => $id,
|
||||||
@ -607,7 +608,7 @@ $url = ui_get_url_refresh(
|
|||||||
true,
|
true,
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
$name_url = 'index.php?sec=templates&sec2=godmode/modules/manage_network_components';
|
||||||
$table = new stdClass();
|
$table = new stdClass();
|
||||||
$table->width = '100%';
|
$table->width = '100%';
|
||||||
$table->class = 'databox filters';
|
$table->class = 'databox filters';
|
||||||
@ -712,8 +713,9 @@ $total_components = network_components_get_network_components(
|
|||||||
'COUNT(*) AS total'
|
'COUNT(*) AS total'
|
||||||
);
|
);
|
||||||
$total_components = $total_components[0]['total'];
|
$total_components = $total_components[0]['total'];
|
||||||
ui_pagination($total_components, $url);
|
$offset_delete = ($offset >= ($total_components - 1)) ? ($offset - $config['block_size']) : $offset;
|
||||||
$filter['offset'] = (int) get_parameter('offset');
|
ui_pagination($total_components, $name_url);
|
||||||
|
$filter['offset'] = $offset;
|
||||||
$filter['limit'] = (int) $config['block_size'];
|
$filter['limit'] = (int) $config['block_size'];
|
||||||
$components = network_components_get_network_components(
|
$components = network_components_get_network_components(
|
||||||
false,
|
false,
|
||||||
@ -791,7 +793,7 @@ foreach ($components as $component) {
|
|||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
$data[0] = '<a href="index.php?sec='.$sec.'&sec2=godmode/modules/manage_network_components&id='.$component['id_nc'].'&pure='.$pure.'">';
|
$data[0] = '<a href="index.php?sec='.$sec.'&sec2=godmode/modules/manage_network_components&id='.$component['id_nc'].'&pure='.$pure.'&offset='.$offset.'">';
|
||||||
$data[0] .= io_safe_output($component['name']);
|
$data[0] .= io_safe_output($component['name']);
|
||||||
$data[0] .= '</a>';
|
$data[0] .= '</a>';
|
||||||
} else {
|
} else {
|
||||||
@ -855,7 +857,7 @@ foreach ($components as $component) {
|
|||||||
|
|
||||||
if ($is_management_allowed === true) {
|
if ($is_management_allowed === true) {
|
||||||
$table->cellclass[][6] = 'action_buttons';
|
$table->cellclass[][6] = 'action_buttons';
|
||||||
$data[6] = '<a class="inline_line float-left" href="'.$url.'&search_id_group='.$search_id_group.'search_string='.$search_string.'&duplicate_network_component=1&source_id='.$component['id_nc'].'">'.html_print_image(
|
$data[6] = '<a class="inline_line float-left" href="'.$url.'&search_id_group='.$search_id_group.'search_string='.$search_string.'&duplicate_network_component=1&source_id='.$component['id_nc'].'&offset='.$offset.'">'.html_print_image(
|
||||||
'images/copy.png',
|
'images/copy.png',
|
||||||
true,
|
true,
|
||||||
[
|
[
|
||||||
@ -864,7 +866,7 @@ foreach ($components as $component) {
|
|||||||
'class' => 'invert_filter',
|
'class' => 'invert_filter',
|
||||||
]
|
]
|
||||||
).'</a>';
|
).'</a>';
|
||||||
$data[6] .= '<a href="'.$url.'&delete_component=1&id='.$component['id_nc'].'&search_id_group='.$search_id_group.'search_string='.$search_string.'" onclick="if (! confirm (\''.__('Are you sure?').'\')) return false" >'.html_print_image(
|
$data[6] .= '<a href="'.$url.'&delete_component=1&id='.$component['id_nc'].'&search_id_group='.$search_id_group.'search_string='.$search_string.'&offset='.$offset_delete.'" onclick="if (! confirm (\''.__('Are you sure?').'\')) return false" >'.html_print_image(
|
||||||
'images/cross.png',
|
'images/cross.png',
|
||||||
true,
|
true,
|
||||||
[
|
[
|
||||||
@ -887,7 +889,7 @@ if (isset($data) === true) {
|
|||||||
html_print_table($table);
|
html_print_table($table);
|
||||||
ui_pagination(
|
ui_pagination(
|
||||||
$total_components,
|
$total_components,
|
||||||
$url,
|
$name_url,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
false,
|
false,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user