refactor newsletter module and disable prepare/user templates

This commit is contained in:
2026-02-12 23:26:28 +01:00
parent 76287923e8
commit 0ac74b6cf4
26 changed files with 1182 additions and 602 deletions

View File

@@ -1,30 +1 @@
<?php
global $gdb;
$grid = new \grid( 'pp_newsletter' );
$grid -> gdb_opt = $gdb;
$grid -> order = [ 'column' => 'email', 'type' => 'ASC' ];
$grid -> search = [
[ 'name' => 'Email', 'db' => 'email', 'type' => 'text' ]
];
$grid -> columns_view = [
[
'name' => 'Lp.',
'th' => [ 'class' => 'g-lp' ],
'td' => [ 'class' => 'g-center' ],
'autoincrement' => true
],
[
'name' => 'Email',
'db' => 'email',
'sort' => true
],
[
'name' => 'Potwierdzony',
'db' => 'status',
'sort' => true,
'replace' => [ 'array' => [ 0 => '<span style="color: #FF0000;">nie</span>', 1 => 'tak' ] ]
]
];
$grid -> actions = [ 'delete' => true ];
echo $grid -> draw();
<?= \Tpl::view('components/table-list', ['list' => $this->viewModel]); ?>