Ejemplo n.º 1
0
theme::header_start('Menubar', 'manage menubars using the list view.');
Plugin_search_sort::field();
theme::header_button('Back', $controller_path, 'reply');
theme::header_end();
theme::table_start(['Text', 'URL', 'Access', 'Parent', 'Active' => 'text-center', 'Actions' => 'text-center'], [], $records);
foreach ($records as $record) {
    theme::table_start_tr();
    o::e($record->text);
    theme::table_row();
    o::e($record->url);
    theme::table_row();
    o::smart_model('o_access', $record->access_id, 'key');
    theme::table_row();
    o::smart_model('o_menubar', $record->parent_id, 'text');
    theme::table_row('text-center larger');
    theme::enum_icon($record->active);
    theme::table_row('actions text-center');
    if ($record->is_editable) {
        theme::table_action('edit', $this->controller_path . '/edit/' . $record->id);
    }
    if (has_access('orange::advanced menubar')) {
        theme::table_action('pencil-square', $this->controller_path . '/edit/' . $record->id . '/advanced');
    }
    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();
Ejemplo n.º 2
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();
Ejemplo n.º 3
0
theme::table_tabs($records['records'], ['human' => true]);
theme::table_tabs_start();
asort($records['records']);
foreach ($records['records'] as $tab => $tab_records) {
    theme::table_tab_pane_start($tab);
    theme::table_start(['Name', 'Description', 'Key', 'Actions' => 'text-center']);
    uasort($tab_records, function ($a, $b) {
        return $a->name > $b->name ? 1 : -1;
    });
    foreach ($tab_records as $record) {
        theme::table_start_tr();
        o::e($record->name);
        theme::table_row();
        o::e($record->description);
        theme::table_row();
        o::e($record->key);
        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_action('list-ul', $this->controller_path . '/details/' . $record->id);
        theme::table_end_tr();
    }
    theme::table_end();
    theme::table_tab_pane_end();
}
theme::table_tabs_end();
theme::return_to_top();
Ejemplo n.º 4
0
<?php

theme::header_start('Log Files', 'File based log files in "..' . str_replace(ROOTPATH, '', setting('config.log_path') . '".'));
Plugin_search_sort::field();
if (has_access('log_file_viewer::delete logs')) {
    theme::header_button('Delete All', ['href' => $controller_path . '/delete', 'icon' => 'trash']);
}
theme::header_end();
theme::table_start(['Filename', 'Actions' => 'text-center'], [], $records);
foreach ($records as $record) {
    theme::table_start_tr();
    theme::e($record->name);
    theme::table_row('actions text-center');
    theme::table_action('eye', $controller_path . '/details/' . $record->id);
    theme::table_end_tr();
}
theme::table_end();
theme::return_to_top();
Ejemplo n.º 5
0
theme::header_start('Manage ' . $controller_titles, 'Manage all ' . $controller_titles . '. <span id="servertime"></span>');
Plugin_search_sort::field();
theme::header_button('new');
theme::header_end();
theme::table_start(['Enabled' => 'text-center', 'Description', 'When', 'URL', 'Keep' => 'text-center', 'Actions' => 'text-center'], [], $records);
foreach ($records as $record) {
    theme::table_start_tr('', 'text-center');
    theme::enum_icon($record->is_enabled);
    theme::table_row();
    theme::e($record->description);
    theme::table_row();
    $time = trim($record->minute . ' ' . $record->hour . ' ' . $record->day_of_month . ' ' . $record->month . ' ' . $record->day_of_week);
    try {
        $cron = Cron\CronExpression::factory($time);
        echo 'Previous: ' . $cron->getPreviousRunDate()->format("F j, Y, g:i a") . '<br>Next: ' . $cron->getNextRunDate()->format("F j, Y, g:i a");
    } catch (Exception $e) {
        echo '<span class="text-danger">Invalid trigger ' . $time . '</span>';
    }
    theme::table_row();
    theme::e($record->url);
    theme::table_row('text-center');
    theme::e($record->keep);
    theme::table_row('actions text-center');
    theme::table_action('edit', $this->controller_path . '/edit/' . $record->id);
    o_dialog::confirm_a_delete($this->controller_path . '/delete/' . $record->id);
    theme::table_action('eye', $this->controller_path . '/view/' . $record->id);
    theme::table_end_tr();
}
theme::table_end();
theme::return_to_top();
Ejemplo n.º 6
0
<?php

$options = ['/admin/configure/export-config/folder/production' => 'production', '/admin/configure/export-config/folder/testing' => 'testing', '/admin/configure/export-config/folder/development' => 'development'];
/* has the environment already been added? */
if (!isset($options[ENVIRONMENT])) {
    $options['/admin/configure/export-config/folder/environment'] = ENVIRONMENT;
    /* current environment */
}
theme::header_start('Setting Groups', 'export settings to a file system level config file');
Plugin_search_sort::field();
//theme::header_button('Export All','/admin/configure/export-config/all','download');
theme::header_button_dropdown('Export', $options, ['icon' => 'download']);
theme::header_button('back', ['href' => '/admin/configure/setting', 'icon' => 'reply']);
theme::header_end();
theme::table_start(['Settings', 'Total Settings' => 'text-center', 'Actions' => 'text-center'], [], $records);
//kd($records);
foreach ($records as $name => $record) {
    theme::table_start_tr();
    theme::e($name);
    theme::table_row('text-center');
    theme::e(count($record));
    theme::table_row('actions text-center');
    theme::table_action('eye', $this->controller_path . '/export/' . bin2hex($name));
    theme::table_end_tr();
}
theme::table_end();
theme::return_to_top();
Ejemplo n.º 7
0
theme::header_end();
theme::table_start(['Created', 'Expires', 'Username', 'Email', 'Expired' => 'text-center', 'Complete' => 'text-center', 'Activate' => 'text-center', 'Resend Email' => 'text-center', 'Delete' => 'text-center'], [], $records);
//kd($records);
foreach ($records as $record) {
    $user = json_decode($record->json);
    theme::table_start_tr();
    theme::date($record->created_on);
    theme::table_row();
    theme::date($record->timeout);
    theme::table_row();
    theme::e($user->username);
    theme::table_row();
    theme::e($user->email);
    theme::table_row('text-center');
    theme::enum_icon($record->expired);
    theme::table_row('text-center');
    theme::enum_icon($record->complete);
    theme::table_row('actions text-center');
    if (!$record->complete) {
        theme::table_action('user-plus', $this->controller_path . '/activate/' . $record->register_key);
    }
    theme::table_row('actions text-center');
    if (!$record->complete) {
        theme::table_action('envelope-o', $this->controller_path . '/resend-activation/' . $record->register_key);
    }
    theme::table_row('actions text-center');
    o_dialog::confirm_a_delete($this->controller_path . '/delete/' . $record->register_key);
    theme::table_end_tr();
}
theme::table_end();
theme::return_to_top();