gdb_opt = $gdb; $grid -> order = [ 'column' => 'author', 'type' => 'ASC' ]; $grid -> search = [ [ 'author' => 'Autor', 'db' => 'name', 'type' => 'text' ] ]; $grid -> columns_view = [ [ 'name' => 'Lp.', 'th' => [ 'class' => 'g-lp' ], 'td' => [ 'class' => 'g-center' ], 'autoincrement' => true ], [ 'name' => 'Autor', 'db' => 'author', 'sort' => true, 'php' => 'echo "[author]";' ], [ 'name' => 'Edytuj', 'action' => [ 'type' => 'edit', 'url' => '/admin/authors/edit/id=[id]' ], 'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ], 'td' => [ 'class' => 'g-center' ] ], [ 'name' => 'UsuĊ„', 'action' => [ 'type' => 'delete', 'url' => '/admin/authors/delete/id=[id]' ], 'th' => [ 'class' => 'g-center', 'style' => 'width: 70px;' ], 'td' => [ 'class' => 'g-center' ] ] ]; $grid -> buttons = [ [ 'label' => 'Dodaj autora', 'url' => '/admin/authors/edit/', 'icon' => 'fa-plus-circle', 'class' => 'btn-success' ] ]; echo $grid -> draw();