- Introduced new backend site management features including the ability to accept, unaccept, save, edit, and display topics and collective topics. - Added new views for editing and listing collective topics and topics. - Implemented necessary backend logic in the `BackendSites` and `factory\BackendSites` classes to handle CRUD operations for topics and collective topics. - Updated the layout to include links for accessing the new backend features based on user permissions.
59 lines
1.7 KiB
PHP
59 lines
1.7 KiB
PHP
<?php global $gdb;?>
|
|
<div class="block-header">
|
|
<h2>Lista <strong>tematów ogólnych </strong></h2>
|
|
</div>
|
|
<?php
|
|
$grid = new \grid( 'zaplecze_tematy_zbiorcze' );
|
|
$grid -> debug = true;
|
|
$grid -> gdb_opt = $gdb;
|
|
$grid -> order = [ 'column' => 'przetworzony', 'type' => 'ASC' ];
|
|
$grid -> columns_view = [
|
|
[
|
|
'name' => 'Lp.',
|
|
'th' => [ 'class' => 'g-lp', 'style' => 'width: 75px' ],
|
|
'td' => [ 'class' => 'g-center' ],
|
|
'autoincrement' => true
|
|
], [
|
|
'name' => 'Strona',
|
|
'db' => 'strona'
|
|
], [
|
|
'name' => 'Kategoria',
|
|
'db' => 'kategoria',
|
|
], [
|
|
'name' => 'Kategoria ID',
|
|
'db' => 'kategoria_id',
|
|
], [
|
|
'name' => 'Temat',
|
|
'db' => 'temat_ogolny',
|
|
], [
|
|
'name' => 'Data przetworzenia',
|
|
'db' => 'data_przetworzenia',
|
|
], [
|
|
'name' => 'Przetworzony',
|
|
'db' => 'przetworzony',
|
|
'php' => 'echo ( (int)[przetworzony] == 1 ) ? "tak" : "nie";',
|
|
], [
|
|
'name' => 'Edytuj',
|
|
'action' => [ 'type' => 'edit', 'url' => '/backend_sites/collective_topic_edit/id=[id]' ],
|
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
|
'td' => [ 'class' => 'g-center' ]
|
|
], [
|
|
'name' => 'Usuń',
|
|
'action' => [ 'type' => 'delete', 'url' => '/backend_sites/collective_topic_delete/id=[id]' ],
|
|
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
|
|
'td' => [ 'class' => 'g-center' ]
|
|
]
|
|
];
|
|
$grid -> buttons = [
|
|
[
|
|
'label' => 'Dodaj temat ogólny',
|
|
'url' => '/backend_sites/collective_topic_edit/',
|
|
'icon' => 'fa-plus-circle',
|
|
'class' => 'btn-success'
|
|
]
|
|
];
|
|
$grid -> hide_columns = false;
|
|
$grid -> limit = 25;
|
|
echo $grid -> draw();
|
|
?>
|