Exemplo n.º 1
0
<?php

theme::header_start('Banners', 'mange banners.');
Plugin_search_sort::field();
if (has_access('templates::add')) {
    theme::header_button('new');
}
theme::header_end();
theme::table_start(['Title', 'Starts After', 'End After', 'Points To', 'Weight' => 'text-center', 'Actions' => 'text-center'], [], $records);
foreach ($records as $key => $record) {
    theme::table_start_tr();
    theme::e($record->title);
    theme::table_row();
    theme::date($record->start_on);
    theme::table_row();
    theme::date($record->end_on);
    theme::table_row();
    theme::e($record->url);
    theme::table_row('text-center');
    theme::e($record->weight);
    theme::table_row('actions text-center');
    if ($record->is_editable) {
        theme::table_action('edit', $this->controller_path . '/edit/' . $record->id);
    }
    if ($record->is_deletable) {
        o_dialog::confirm_a_delete($this->controller_path . '/delete/' . $record->id);
    }
    theme::table_end_tr();
}
theme::table_end();
theme::return_to_top();