'', 'label' => __('Alerts'), ], [ 'link' => '', 'label' => __('Special days'), ], ] ); } $is_management_allowed = \is_management_allowed(); if ($is_management_allowed === false) { if (\is_metaconsole() === false) { $url_link = ''; $url_link .= __('metaconsole'); $url_link .= ''; } else { $url_link = __('any node'); } \ui_print_warning_message( __( 'This node is configured with centralized mode. All alert calendar information is read only. Go to %s to manage it.', $url_link ) ); } if (empty($message) === false) { echo $message; } // Datatables list. try { $columns = [ [ 'text' => 'id', 'class' => 'invisible', ], 'name', 'id_group', 'description', [ 'text' => 'options', 'class' => 'w150px table_action_buttons', ], ]; $column_names = [ __('ID'), __('Name'), __('Group'), __('Description'), __('Options'), ]; $tableId = 'calendar_list'; // Load datatables user interface. ui_print_datatable( [ 'id' => $tableId, 'class' => 'info_table', 'style' => 'width: 99%', 'columns' => $columns, 'column_names' => $column_names, 'ajax_url' => $ajax_url, 'ajax_data' => ['method' => 'drawListCalendar'], 'no_sortable_columns' => [-1], 'order' => [ 'field' => 'id', 'direction' => 'asc', ], 'search_button_class' => 'sub filter float-right', 'form' => [ 'inputs' => [ [ 'label' => __('Free search'), 'type' => 'text', 'class' => 'w25p', 'id' => 'free_search', 'name' => 'free_search', ], ], ], 'filter_main_class' => 'box-flat white_table_graph fixed_filter_bar', 'dom_elements' => 'lftpB', ] ); } catch (Exception $e) { echo $e->getMessage(); } if ((bool) check_acl($config['id_user'], 0, 'LM') === true) { $form_create = HTML::printForm( [ 'form' => [ 'action' => $url.'&op=edit', 'method' => 'POST', ], 'inputs' => [ [ 'arguments' => [ 'name' => 'button', 'label' => __('Create'), 'type' => 'submit', 'attributes' => ['icon' => 'wand'], ], ], ], ], true ); html_print_action_buttons($form_create); }