Пример #1
0
<?php

/**
 * @var $this   \Cerberus\Yii\Controllers\WebController
 * @var $models Instance[]
 */
use DreamFactory\Common\Enums\PageLocation;
use DreamFactory\Fabric\Yii\Models\Auth\User;
use DreamFactory\Fabric\Yii\Models\Deploy\Instance;
use DreamFactory\Yii\Utility\Pii;
if (!isset($models) || empty($models)) {
    $models = array();
}
$_html = null;
$_pdo = Pii::pdo('db.fabric_auth');
Pii::cssFile('/css/df.datatables.css');
Pii::scriptFile(array('/static/datatables/js/jquery.dataTables.js', '/js/df.datatables.js'), PageLocation::End);
foreach ($models as $_model) {
    if (isset($_model['email_addr_text'])) {
        $_email = '<a title="Click to view this user in Drupal" target="_blank" href="https://www.dreamfactory.com/user/' . $_model['drupal_id'] . '">' . $_model['email_addr_text'] . '</a>';
        $_lastLogin = $_model['last_login_date'];
    } else {
        $_email = 'Unknown';
        $_lastLogin = '******';
    }
    $_html .= '<tr id="' . $this->hashId($_model['id']) . '">';
    $_html .= '<td>' . $_model['instance_name_text'] . '<a title="Click to edit this row" class="pull-right" href="#"><i class="icon-pencil hide edit-row"></i></a></td>';
    $_html .= '<td><a title="Click to browse this URL" target="_blank" href="http://' . $_model['public_host_text'] . '">' . $_model['public_host_text'] . '</a></td>';
    $_html .= '<td>' . $_email . '</td>';
    $_html .= '<td>' . $_model['create_date'] . '</td>';
    $_html .= '<td>' . $_lastLogin . '</td>';