Files
pomysloweprezenty.pl/admin/templates/shop-transport/view-list.php
Jacek Pyziak 3ecbe628dc Add view classes for articles, banners, languages, menu, newsletter, containers, shop categories, clients, payment methods, products, and search
- Created Articles.php for rendering article views including full articles, miniature lists, and news sections.
- Added Banners.php for handling banner displays.
- Introduced Languages.php for rendering language options.
- Implemented Menu.php for dynamic menu rendering.
- Developed Newsletter.php for newsletter view rendering.
- Created Scontainers.php for rendering specific containers.
- Added ShopCategory.php for category descriptions and product listings.
- Introduced ShopClient.php for managing client-related views such as address editing and order history.
- Implemented ShopPaymentMethod.php for displaying payment methods in the basket.
- Created ShopProduct.php for generating product URLs.
- Added ShopSearch.php for rendering a simple search form.
- Added .htaccess file to enhance security by restricting access to sensitive files and directories.
2026-02-21 23:00:15 +01:00

71 lines
3.6 KiB
PHP

<?php
global $gdb;
foreach ( $this -> apilo_carrier_account_list as $carrier_account )
{
$carrier_accounts[ $carrier_account['id'] ] = $carrier_account['name'];
}
$grid = new \grid( 'pp_shop_transports' );
$grid -> gdb_opt = $gdb;
$grid -> debug = true;
$grid -> order = [ 'column' => 'name', 'type' => 'ASC' ];
$grid -> search = [
[ 'name' => 'Nazwa', 'db' => 'name', 'type' => 'text' ],
[ 'name' => 'Aktywny', 'db' => 'status', 'type' => 'select', 'replace' => [ 'array' => [ 0 => 'nie', 1 => 'tak' ] ] ]
];
$grid -> columns_view = [
[
'name' => 'Lp.',
'th' => [ 'class' => 'g-lp' ],
'td' => [ 'class' => 'g-center' ],
'autoincrement' => true
], [
'name' => 'Domyślna FT',
'db' => 'default',
'replace' => [ 'array' => [ 0 => '<span style="color: #FF0000;">nie</span>', 1 => 'tak' ] ],
'td' => [ 'class' => 'g-center' ],
'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ],
'sort' => true
], [
'name' => 'Aktywny',
'db' => 'status',
'replace' => [ 'array' => [ 0 => '<span style="color: #FF0000;">nie</span>', 1 => 'tak' ] ],
'td' => [ 'class' => 'g-center' ],
'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ],
'sort' => true
],
[
'name' => 'Koszt',
'db' => 'cost',
'td' => [ 'class' => 'g-center' ],
'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ],
'php' => 'echo \\S::decimal( [cost] ) . " zł";',
'sort' => true
],
[
'name' => 'Maks. WP',
'db' => 'max_wp',
'td' => [ 'class' => 'g-center' ],
'th' => [ 'class' => 'g-center', 'style' => 'width: 150px;' ],
'sort' => true
],
[
'name' => 'Nazwa',
'db' => 'name',
'sort' => true,
'php' => 'echo "<a href=\'/admin/shop_transport/transport_edit/id=[id]\'>[name]</a>";'
], [
'name' => 'Typ kuriera Apilo',
'db' => 'apilo_carrier_account_id',
'th' => [ 'class' => 'g-center' ],
'td' => [ 'class' => 'g-center' ],
'replace' => [ 'array' => $carrier_accounts ],
], [
'name' => 'Edytuj',
'action' => [ 'type' => 'edit', 'url' => '/admin/shop_transport/transport_edit/id=[id]' ],
'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ],
'td' => [ 'class' => 'g-center' ]
]
];
echo $grid -> draw();