Files
crmPRO/templates/backend_sites/topic_edit.php
Jacek Pyziak 9dfa15b115 Add backend site management for collective topics and topics
- 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.
2025-05-04 19:08:48 +02:00

84 lines
1.9 KiB
PHP

<?
global $db;
ob_start();
?>
<?= \Html::input( [
'label' => 'Strona',
'name' => 'strona',
'id' => 'strona',
'value' => $this -> topic['strona'],
'inline' => true
] );?>
<?= \Html::input( [
'label' => 'Kategoria',
'name' => 'kategoria',
'id' => 'kategoria',
'value' => $this -> topic['kategoria'],
'inline' => true
] );?>
<?= \Html::input( [
'label' => 'Kategoria ID',
'name' => 'kategoria_id',
'id' => 'kategoria_id',
'value' => $this -> topic['kategoria_id'],
'inline' => true
] );?>
<?= \Html::input( [
'label' => 'Link',
'name' => 'link',
'id' => 'link',
'value' => $this -> topic['link'],
'inline' => true
] );?>
<?= \Html::input( [
'label' => 'Temat',
'name' => 'temat',
'id' => 'temat',
'value' => $this -> topic['temat'],
'inline' => true
] );?>
<?= \Html::input( [
'label' => 'Data publikacji',
'name' => 'data_publikacji',
'id' => 'data_publikacji',
'value' => $this -> topic['data_publikacji'],
'inline' => true
] );?>
<?= \Html::input_switch( [
'label' => 'Opublikowany',
'name' => 'opublikowany',
'id' => 'opublikowany',
'checked' => $this -> topic['opublikowany'] == 1 ? true : false,
'inline' => true
] );?>
<?= \Html::input_switch( [
'label' => 'Zaakceptowany',
'name' => 'zaakceptowany',
'id' => 'zaakceptowany',
'checked' => $this -> topic['zaakceptowany'] == 1 ? true : false,
'inline' => true
] );?>
<?
$out = ob_get_clean();
$grid = new \gridEdit;
$grid -> id = 'client-edit';
$grid -> gdb_opt = $gdb;
$grid -> include_plugins = true;
$grid -> title = 'Edycja <strong>tematu zbiorowego</strong>';
$grid -> fields = [
[
'db' => 'id',
'type' => 'hidden',
'value' => $this -> topic['id']
]
];
$grid -> external_code = $out;
$grid -> actions = [
'save' => [ 'url' => '/backend_sites/topic_save/', 'back_url' => '/backend_sites/topics/' ],
'cancel' => [ 'url' => '/backend_sites/topics/' ]
];
$grid -> persist_edit = true;
$grid -> id_param = 'id';
echo $grid -> draw();
?>