Example #1
0
 /**
  * Translates a message to the specified language.
  * Usually used to translate system messages, because system language
  * does not necessary have to be the same as current site (UI) language.
  * See {@link YiiBase::t()} for details.
  */
 public static function t($category, $message, $params = array(), $source = null, $language = null)
 {
     if ($category === 'system') {
         $language = MParams::getSystemLanguage();
     }
     return Yii::t($category, $message, $params, $source, $language);
 }
Example #2
0
 public function tableName()
 {
     // if we haven't retrieved the table prefix yet
     if ($this->tablePrefix === null) {
         // fetch prefix
         $this->tablePrefix = MParams::getTablePrefix();
     }
     // prepend prefix, call our new method
     return $this->tablePrefix . $this->_tableName();
 }
Example #3
0
 /**
  * Displays the contact page
  */
 public function actionContact()
 {
     $contact = new ContactForm();
     if (isset($_POST['ContactForm'])) {
         $contact->attributes = $_POST['ContactForm'];
         if ($contact->validate()) {
             $headers = "From: {$contact->email}\r\nReply-To: {$contact->email}";
             @mail(MParams::getAdminEmailAddress(), $contact->subject, $contact->content, $headers);
             MUserFlash::setTopInfo(Yii::t('hint', 'Thank you for contacting us. We will respond to you as soon as possible.'));
             $this->refresh();
         }
     }
     $this->render($this->action->id, array('contact' => $contact));
 }
Example #4
0
 /**
  * Load params from Yii::app()->params into class properties.
  */
 public static function load()
 {
     // initialize core default parameters
     self::$coreDefaultData = array('adminEmailAddress' => '*****@*****.**', 'adminEmailName' => 'Web3CMS Staff', 'availableInterfaces' => array('ui-lightness' => 'UI Lightness', 'ui-darkness' => 'UI Darkness', 'smoothness' => 'Smoothness', 'start' => 'Start', 'redmond' => 'Redmond', 'sunny' => 'Sunny', 'overcast' => 'Overcast', 'le-frog' => 'Le frog', 'flick' => 'Flick', 'pepper-grinder' => 'Pepper grinder', 'eggplant' => 'Eggplant', 'dark-hive' => 'Dark hive', 'cupertino' => 'Cupertino', 'south-street' => 'South street', 'blitzer' => 'Blitzer', 'humanity' => 'Humanity', 'hot-sneaks' => 'Hot sneaks', 'excite-bike' => 'Excite bike', 'vader' => 'Vader', 'dot-luv' => 'Dot luv', 'mint-choc' => 'Mint choc', 'black-tie' => 'Black tie', 'trontastic' => 'Trontastic', 'swanky-purse' => 'Swanky purse'), 'availableLanguages' => array('en' => 'English', 'ru' => 'Russian'), 'copyrightBy' => 'My Company', 'headerTitle' => MArea::isBackend() ? 'Web3CMS Administrator Area' : 'My Web3CMS', 'htmlDoctype' => 'transitional', 'interface' => 'start', 'language' => 'en', 'mainMenuFullWidth' => true, 'metaDescription' => 'Web3CMS - Web 2.0 Content Management System based on Yii Framework.', 'metaKeywords' => array('web3cms', 'yii'), 'pageLabel' => 'Home', 'pageTitleFormula' => '{pageLabel} - {siteTitle}', 'pathToFiles' => dirname(Yii::app()->basePath) . DIRECTORY_SEPARATOR . 'files' . DIRECTORY_SEPARATOR, 'registerJqueryUI' => true, 'siteTitle' => MArea::isBackend() ? 'Web3CMS Administrator' : 'Web3CMS', 'systemLanguage' => 'en', 'tablePrefix' => 'w3_', 'urlToFiles' => Yii::app()->request->baseUrl . '/files/', 'userLoginWithField' => 'username');
     // initialize core parameters allowed values
     self::$coreDataAllowedValue = array('htmlDoctype' => array('strict', 'transitional'), 'modelAttributes' => array('User' => array('email2' => false)), 'userLoginWithField' => array('_any_', 'email', 'username'));
     // set data from params.php
     $data = Yii::app()->params;
     $parameters = array('systemLanguage', 'adminEmailAddress', 'adminEmailName', 'availableInterfaces', 'availableLanguages', 'language', 'copyrightBy', 'headerTitle', 'htmlDoctype', 'interface', 'mainMenuFullWidth', 'metaDescription', 'metaKeywords', 'modelAttributes', 'pageTitleFormula', 'pathToFiles', 'registerJqueryUI', 'siteTitle', 'tablePrefix', 'urlToFiles', 'userLoginWithField');
     // our universal setters
     foreach ($parameters as $parameter) {
         $setter = 'set' . ucfirst($parameter);
         if (isset($data[$parameter])) {
             call_user_func(array('self', $setter), $data[$parameter]);
         } else {
             call_user_func(array('self', $setter), self::_default);
             Yii::log(W3::t('system', 'Missing parameter in file params.php: {parameter}.', array('{parameter}' => $parameter)), 'error', 'w3');
         }
     }
     // class is loaded
     self::$isLoaded = true;
 }
Example #5
0
 /**
  * This is where the system is being initialized from.
  */
 public function init()
 {
     // Yii initialization is a must
     parent::init();
     // universal storage
     $this->var = new MVariable();
     // call our initialization class
     W3Init::controller();
     // set user preferences (interface, language, and so on)
     if (!Yii::app()->user->isGuest) {
         if (isset(Yii::app()->user->interface) && !empty(Yii::app()->user->interface)) {
             // set user preferred interface
             W3::setInterface(Yii::app()->user->interface);
         }
         if (isset(Yii::app()->user->language) && !empty(Yii::app()->user->language)) {
             // set user preferred language
             W3::setLanguage(Yii::app()->user->language);
         }
     }
     // parameters were loaded before language was set, now they need to be translated
     MParams::i18n();
 }
Example #6
0
<?php

MParams::setPageLabel(Yii::t('page', 'Delete expense'));
MUserFlash::setTopError(_CHtml::errorSummary($model));
if (!MUserFlash::hasTopSuccess() && !MUserFlash::hasTopInfo() && !MUserFlash::hasTopError()) {
    MUserFlash::setContentInfo(Yii::t('hint', 'Are you sure you want to delete this record? Deleted records may not be restored!'));
}
MUserFlash::setSidebarInfo(Yii::t('hint', 'Required: {authRoles}.', $model->invoiceId >= 1 ? array(1, '{authRoles}' => implode(', ', array(Yii::t('t', User::ADMINISTRATOR_T)))) : array(2, '{authRoles}' => implode(', ', array(Yii::t('t', User::MANAGER_T), Yii::t('t', User::ADMINISTRATOR_T))))));
MLinkList::set('sidebar', array('links' => array(array('text' => Yii::t('link', 'Show expense'), 'url' => array('show', 'id' => $model->id), 'icon' => 'zoomin', 'visible' => Yii::app()->user->checkAccess($this->id . '/show')), array('text' => Yii::t('link', 'Edit expense'), 'url' => array('update', 'id' => $model->id), 'icon' => 'pencil', 'visible' => Yii::app()->user->checkAccess($this->id . '/update', array('model' => $model))), array('text' => Yii::t('link', 'List of expenses'), 'url' => array('list'), 'icon' => 'grip-solid-horizontal', 'visible' => false), array('text' => Yii::t('link', 'Grid of expenses'), 'url' => array('grid'), 'icon' => 'calculator', 'visible' => Yii::app()->user->checkAccess($this->id . '/grid')), array('text' => Yii::t('link', 'Create a new expense'), 'url' => array('create'), 'icon' => 'plus', 'visible' => Yii::app()->user->checkAccess($this->id . '/create')))));
$this->widget('application.components.WContentHeader', array('breadcrumbs' => array(array('text' => Yii::t('link', 'Expenses'), 'url' => array($this->id . '/' . $this->defaultAction), 'active' => false, 'visible' => Yii::app()->user->checkAccess($this->id . '/' . $this->defaultAction)), array('text' => Yii::t('link', 'Expense number "{expenseNumber}"', array('{expenseNumber}' => $model->id)), 'url' => array('show', 'id' => $model->id), 'active' => false, 'visible' => Yii::app()->user->checkAccess($this->id . '/show')), array('url' => array($this->action->id, 'id' => $model->id), 'active' => true))));
?>
<div class="w3-main-form-box ui-widget-content ui-corner-all">

<?php 
echo _CHtml::beginForm('', 'post', array('class' => 'w3-main-form')) . "\n";
?>

<div class="w3-form-row w3-first">
  <div class="w3-form-row-input w3-form-row-2columns w3-center">
    <div class="w3-form-row-text">
      <?php 
echo Yii::t('hint', '{saveButton} or {cancelLink}', array('{saveButton}' => _CHtml::submitButton(Yii::t('link', 'Delete'), array('class' => 'w3-input-button ui-state-default ui-corner-all')), '{cancelLink}' => CHtml::link(Yii::t('link', 'Cancel[form]'), array('show', 'id' => $model->id)))) . "\n";
?>
    </div>
  </div>
  <div class="clear">&nbsp;</div>
</div>

<?php 
echo _CHtml::endForm();
?>
Example #7
0
<?php

MParams::setPageLabel(Yii::t('page', 'Grid of invoices'));
MUserFlash::setSidebarInfo(Yii::t('hint', 'Required: {authRoles}.', array(3, '{authRoles}' => implode(', ', array(Yii::t('t', User::CLIENT_T), Yii::t('t', User::MANAGER_T), Yii::t('t', User::ADMINISTRATOR_T))))));
MLinkList::set('sidebar', array('links' => array(array('text' => Yii::t('link', 'View as list'), 'url' => array('list'), 'icon' => 'grip-solid-horizontal', 'visible' => false), array('text' => Yii::t('link', 'Add an invoice'), 'url' => array('create'), 'icon' => 'plus', 'visible' => Yii::app()->user->checkAccess($this->id . '/create')))));
$this->widget('application.components.WContentHeader', array('afterLabel' => false, 'breadcrumbs' => array(array('url' => array($this->action->id), 'active' => true))));
$this->widget('application.components.WPreItemActionBar', array('links' => array(array('dropDown' => array('links' => $allCompany), 'text' => CHtml::encode($companyLinkText), 'options' => array('title' => Yii::t('t', 'Company'))))));
$this->widget('application.components.WGrid', array('columns' => array(array('title' => CHtml::encode($sort->resolveLabel('id'))), array('title' => CHtml::encode($sort->resolveLabel('createTime'))), array('title' => CHtml::encode($sort->resolveLabel('company'))), array('title' => CHtml::encode($sort->resolveLabel('amountTotal'))), array('title' => CHtml::encode(Yii::t('t', 'Actions')))), 'columnsModel' => array(array('name' => 'id', 'width' => 40, 'align' => 'right'), array('name' => 'createTime', 'width' => 75, 'align' => 'right'), array('name' => 'company', 'width' => 450), array('name' => 'amountTotal', 'width' => 74, 'align' => 'right'), array('name' => 'actions', 'width' => 59, 'sortable' => false)), 'pages' => $pages, 'rowNum' => InvoiceController::GRID_PAGE_SIZE, 'rows' => $gridRows, 'sColumns' => array(array('title' => $sort->link('id')), array('title' => $sort->link('createTime')), array('title' => $sort->link('company')), array('title' => $sort->link('amountTotal')), array('title' => Yii::t('t', 'Actions'))), 'sortname' => 'createTime', 'sortorder' => 'desc', 'url' => Yii::app()->createUrl($this->id . '/gridData', $_GET)));
Example #8
0
<?php

MParams::setPageLabel(Yii::t('page', 'List of expenses'));
MLinkList::set('sidebar', array('links' => array(array('text' => Yii::t('link', 'View as grid'), 'url' => array('grid'), 'icon' => 'calculator', 'visible' => Yii::app()->user->checkAccess($this->id . '/grid')), array('text' => Yii::t('link', 'Add an expense'), 'url' => array('create'), 'icon' => 'plus', 'visible' => Yii::app()->user->checkAccess($this->id . '/create')))));
$this->widget('application.components.WContentHeader', array('breadcrumbs' => array(array('url' => array($this->action->id), 'active' => true))));
if ($pages->getPageCount() >= 2) {
    ?>
<div style="padding: .5em 0 .9em 0;">
<?php 
    $this->widget('CLinkPager', array('pages' => $pages));
    ?>
</div>

<?php 
}
?>
<div class="w3-list">
<?php 
foreach ($models as $n => $model) {
    ?>

<div class="w3-item<?php 
    echo $n ? '' : ' w3-first';
    ?>
 ui-widget-content ui-corner-all">
<?php 
    echo CHtml::encode($model->getAttributeLabel('id'));
    ?>
:
<?php 
    echo CHtml::link($model->id, array('show', 'id' => $model->id));
Example #9
0
<?php

MParams::setPageLabel(Yii::t('page', 'View invoice number "{invoiceNumber}"', array('{invoiceNumber}' => $model->id)));
MLinkList::set('sidebar', array('links' => array(array('text' => Yii::t('link', 'Edit invoice'), 'url' => array('update', 'id' => $model->id), 'icon' => 'pencil', 'visible' => Yii::app()->user->checkAccess($this->id . '/update')), array('text' => Yii::t('link', 'List of invoices'), 'url' => array('list'), 'icon' => 'grip-solid-horizontal', 'visible' => false), array('text' => Yii::t('link', 'Grid of invoices'), 'url' => array('grid'), 'icon' => 'calculator', 'visible' => Yii::app()->user->checkAccess($this->id . '/grid')), array('text' => Yii::t('link', 'Create a new invoice'), 'url' => array('create'), 'icon' => 'plus', 'visible' => Yii::app()->user->checkAccess($this->id . '/create')))));
$this->widget('application.components.WContentHeader', array('breadcrumbs' => array(array('text' => Yii::t('link', 'Invoices'), 'url' => array($this->id . '/' . $this->defaultAction), 'active' => false, 'visible' => Yii::app()->user->checkAccess($this->id . '/' . $this->defaultAction)), array('url' => array($this->action->id, 'id' => $model->id), 'active' => true))));
?>
<div class="w3-detail-box ui-widget-content ui-corner-all">

<div class="w3-detail-row w3-first">
  <div class="w3-detail-row-label"><?php 
echo CHtml::encode($model->getAttributeLabel('companyId'));
?>
</div>
  <div class="w3-detail-row-value"><?php 
echo isset($model->company->id) ? CHtml::link(CHtml::encode($model->company->title), array('company/show', 'id' => $model->company->id)) : '';
?>
</div>
  <div class="clear">&nbsp;</div>
</div>
<div class="w3-detail-row">
  <div class="w3-detail-row-label"><?php 
echo CHtml::encode($model->getAttributeLabel('amountTotal'));
?>
</div>
  <div class="w3-detail-row-value"><?php 
echo CHtml::encode($model->amountTotal);
?>
</div>
  <div class="clear">&nbsp;</div>
</div>
<div class="w3-detail-row">
Example #10
0
<?php

MParams::setPageLabel(Yii::t('page', 'Edit time record'));
MUserFlash::setTopError(_CHtml::errorSummary($model));
MUserFlash::setSidebarInfo(Yii::t('hint', 'Required: {authRoles}.', $model->invoiceId >= 1 ? array(1, '{authRoles}' => implode(', ', array(Yii::t('t', User::ADMINISTRATOR_T)))) : array(2, '{authRoles}' => implode(', ', array(Yii::t('t', User::MANAGER_T), Yii::t('t', User::ADMINISTRATOR_T))))));
MLinkList::set('sidebar', array('links' => array(array('text' => Yii::t('link', 'Show time record'), 'url' => array('show', 'id' => $model->id), 'icon' => 'zoomin', 'visible' => Yii::app()->user->checkAccess($this->id . '/show')), array('text' => Yii::t('link', 'Delete time record'), 'url' => array('delete', 'id' => $model->id), 'icon' => 'trash', 'visible' => Yii::app()->user->checkAccess($this->id . '/delete', array('model' => $model))), array('text' => Yii::t('link', 'List of time records'), 'url' => array('list'), 'icon' => 'grip-solid-horizontal', 'visible' => false), array('text' => Yii::t('link', 'Grid of time records'), 'url' => array('grid'), 'icon' => 'calculator', 'visible' => Yii::app()->user->checkAccess($this->id . '/grid')), array('text' => Yii::t('link', 'Create a new time record'), 'url' => array('create'), 'icon' => 'plus', 'visible' => Yii::app()->user->checkAccess($this->id . '/create')))));
$this->widget('application.components.WContentHeader', array('breadcrumbs' => array(array('text' => Yii::t('link', 'Time records'), 'url' => array($this->id . '/' . $this->defaultAction), 'active' => false, 'visible' => Yii::app()->user->checkAccess($this->id . '/' . $this->defaultAction)), array('text' => Yii::t('link', '"{title}" time record', array('{title}' => $model->title)), 'url' => array('show', 'id' => $model->id), 'active' => false, 'visible' => Yii::app()->user->checkAccess($this->id . '/show')), array('url' => array($this->action->id, 'id' => $model->id), 'active' => true))));
echo $this->renderPartial('_form', array('model' => $model, 'update' => true));
Example #11
0
<?php

MParams::setPageLabel(Yii::t('page', 'Create a new company'));
MUserFlash::setTopError(_CHtml::errorSummary($model));
MLinkList::set('sidebar', array('links' => array(array('text' => Yii::t('link', 'List of companies'), 'url' => array('list'), 'icon' => 'grip-solid-horizontal', 'visible' => false), array('text' => Yii::t('link', 'Grid of companies'), 'url' => array('grid'), 'icon' => 'calculator', 'visible' => Yii::app()->user->checkAccess($this->id . '/grid')))));
$this->widget('application.components.WContentHeader', array('breadcrumbs' => array(array('text' => Yii::t('link', 'Companies'), 'url' => array($this->id . '/' . $this->defaultAction), 'active' => false, 'visible' => Yii::app()->user->checkAccess($this->id . '/' . $this->defaultAction)), array('url' => array($this->action->id), 'active' => true))));
echo $this->renderPartial('_form', array('model' => $model, 'update' => false));
Example #12
0
<?php

MParams::setPageLabel(Yii::t('page', 'Create a new expense'));
MUserFlash::setTopError(_CHtml::errorSummary($model));
MLinkList::set('sidebar', array('links' => array(array('text' => Yii::t('link', 'List of expenses'), 'url' => array('list'), 'icon' => 'grip-solid-horizontal', 'visible' => false), array('text' => Yii::t('link', 'Grid of expenses'), 'url' => array('grid'), 'icon' => 'calculator', 'visible' => Yii::app()->user->checkAccess($this->id . '/grid')))));
$this->widget('application.components.WContentHeader', array('breadcrumbs' => array(array('text' => Yii::t('link', 'Expenses'), 'url' => array($this->id . '/' . $this->defaultAction), 'active' => false, 'visible' => Yii::app()->user->checkAccess($this->id . '/' . $this->defaultAction)), array('url' => array($this->action->id), 'active' => true))));
echo $this->renderPartial('_form', array('model' => $model, 'update' => false));
Example #13
0
</div><!-- <?php 
echo MLayout::getContainerCssClass();
?>
 -->
</div><!-- w3-bottom -->


<div class="<?php 
echo MLayout::getContainerCssClass();
?>
">
<div class="<?php 
echo MLayout::getGridCssClass();
?>
">
<div class="w3-footer-box">
<div class="w3-footer">
<?php 
echo Yii::t('t', '{copyrightBy}. All Rights Reserved.', array('{copyrightBy}' => MParams::getCopyrightBy())) . "\n";
echo Yii::t('t', 'Developed by {developedBy} based on {basedOn}.', array('{developedBy}' => CHtml::link('Web3CMS', 'http://www.web3cms.com/', array('rel' => 'external')), '{basedOn}' => CHtml::link('Yii Framework', 'http://www.yiiframework.com/', array('rel' => 'external')))) . "\n";
?>
</div><!-- w3-footer -->
</div><!-- w3-footer-box -->
</div>
<div class="clear">&nbsp;</div>
</div>

</div><!-- w3-document-container -->
</body>

</html>
Example #14
0
<?php

MParams::setPageLabel(Yii::t('page', 'Register a member account'));
MUserFlash::setTopError(_CHtml::errorSummary($model));
MUserFlash::setSidebarInfo(Yii::t('hint', 'Create a new member account. It\'s free and easy!'));
$this->widget('application.components.WContentHeader', array('breadcrumbs' => array(array('text' => Yii::t('link', 'Members'), 'url' => array($this->id . '/' . $this->defaultAction), 'active' => false, 'visible' => Yii::app()->user->checkAccess($this->id . '/' . $this->defaultAction)), array('url' => array($this->action->id), 'active' => true))));
?>
<div class="w3-main-form-box ui-widget-content ui-corner-all">

<?php 
echo _CHtml::beginForm('', 'post', array('class' => 'w3-main-form')) . "\n";
?>

<?php 
if ($model->hasVirtualAttribute('username')) {
    ?>
<div class="w3-form-row w3-first">
  <div class="w3-form-row-label"><?php 
    echo _CHtml::activeLabelEx($model, 'username');
    ?>
</div>
  <div class="w3-form-row-input">
    <?php 
    echo _CHtml::activeTextField($model, 'username', array('class' => 'w3-input-text ui-widget-content ui-corner-all', 'maxlength' => 32)) . "\n";
    ?>
  </div>
  <div class="clear">&nbsp;</div>
</div>
<div class="w3-form-row">
  <div class="w3-form-row-label"><?php 
    echo _CHtml::activeLabelEx($model, 'screenName');
Example #15
0
<?php

MParams::setPageLabel(Yii::t('page', 'Create a new location'));
MUserFlash::setTopError(_CHtml::errorSummary($model));
MLinkList::set('sidebar', array('links' => array(array('text' => Yii::t('link', 'List of locations'), 'url' => array('list'), 'icon' => 'grip-solid-horizontal', 'visible' => false), array('text' => Yii::t('link', 'Grid of locations'), 'url' => array('grid'), 'icon' => 'calculator', 'visible' => Yii::app()->user->checkAccess($this->id . '/grid')))));
$this->widget('application.components.WContentHeader', array('breadcrumbs' => array(array('text' => Yii::t('link', 'Locations'), 'url' => array($this->id . '/' . $this->defaultAction), 'active' => false, 'visible' => Yii::app()->user->checkAccess($this->id . '/' . $this->defaultAction)), array('url' => array($this->action->id), 'active' => true))));
echo $this->renderPartial('_form', array('model' => $model, 'update' => false));
Example #16
0
<?php

MParams::setPageLabel(Yii::t('page', 'Edit project'));
MUserFlash::setTopError(_CHtml::errorSummary($model));
MLinkList::set('sidebar', array('links' => array(array('text' => Yii::t('link', 'Show project'), 'url' => array('show', 'id' => $model->id), 'icon' => 'zoomin', 'visible' => Yii::app()->user->checkAccess($this->id . '/show')), array('text' => Yii::t('link', 'Add a task'), 'url' => array('task/create', 'projectId' => $model->id), 'icon' => 'plus', 'visible' => Yii::app()->user->checkAccess('task/create')), array('text' => Yii::t('link', 'Add an expense'), 'url' => array('expense/create', 'projectId' => $model->id), 'icon' => 'plus', 'visible' => Yii::app()->user->checkAccess('expense/create')), array('text' => Yii::t('link', 'List of projects'), 'url' => array('list'), 'icon' => 'grip-solid-horizontal', 'visible' => false), array('text' => Yii::t('link', 'Grid of projects'), 'url' => array('grid'), 'icon' => 'calculator', 'visible' => Yii::app()->user->checkAccess($this->id . '/grid')), array('text' => Yii::t('link', 'Create a new project'), 'url' => array('create'), 'icon' => 'plus', 'visible' => Yii::app()->user->checkAccess($this->id . '/create')))));
$this->widget('application.components.WContentHeader', array('breadcrumbs' => array(array('text' => Yii::t('link', 'Projects'), 'url' => array($this->id . '/' . $this->defaultAction), 'active' => false, 'visible' => Yii::app()->user->checkAccess($this->id . '/' . $this->defaultAction)), array('text' => Yii::t('link', '"{title}" project', array('{title}' => $model->title)), 'url' => array('show', 'id' => $model->id), 'active' => false, 'visible' => Yii::app()->user->checkAccess($this->id . '/show')), array('url' => array($this->action->id, 'id' => $model->id), 'active' => true))));
echo $this->renderPartial('_form', array('model' => $model, 'update' => true));
Example #17
0
<?php

MParams::setPageLabel(Yii::t('page', 'Edit location'));
MUserFlash::setTopError(_CHtml::errorSummary($model));
MLinkList::set('sidebar', array('links' => array(array('text' => Yii::t('link', 'Show location'), 'url' => array('show', 'id' => $model->id), 'icon' => 'zoomin', 'visible' => Yii::app()->user->checkAccess($this->id . '/show')), array('text' => Yii::t('link', 'List of locations'), 'url' => array('list'), 'icon' => 'grip-solid-horizontal', 'visible' => false), array('text' => Yii::t('link', 'Grid of locations'), 'url' => array('grid'), 'icon' => 'calculator', 'visible' => Yii::app()->user->checkAccess($this->id . '/grid')), array('text' => Yii::t('link', 'Create a new location'), 'url' => array('create'), 'icon' => 'plus', 'visible' => Yii::app()->user->checkAccess($this->id . '/create')))));
$this->widget('application.components.WContentHeader', array('breadcrumbs' => array(array('text' => Yii::t('link', 'Locations'), 'url' => array($this->id . '/' . $this->defaultAction), 'active' => false, 'visible' => Yii::app()->user->checkAccess($this->id . '/' . $this->defaultAction)), array('text' => Yii::t('link', '"{title}" location', array('{title}' => $model->title)), 'url' => array('show', 'id' => $model->id), 'active' => false, 'visible' => Yii::app()->user->checkAccess($this->id . '/show')), array('url' => array($this->action->id, 'id' => $model->id), 'active' => true))));
echo $this->renderPartial('_form', array('model' => $model, 'update' => true));
Example #18
0
<?php

MParams::setPageLabel(Yii::t('page', 'Edit company'));
MUserFlash::setTopError(_CHtml::errorSummary($model));
MLinkList::set('sidebar', array('links' => array(array('text' => Yii::t('link', 'Show company'), 'url' => array('show', 'id' => $model->id), 'icon' => 'zoomin', 'visible' => Yii::app()->user->checkAccess($this->id . '/show')), array('text' => Yii::t('link', 'Add a project'), 'url' => array('project/create', 'companyId' => $model->id), 'icon' => 'plus', 'visible' => Yii::app()->user->checkAccess('project/create')), array('text' => Yii::t('link', 'Add a company payment'), 'url' => array('companyPayment/create', 'companyId' => $model->id), 'icon' => 'plus', 'visible' => Yii::app()->user->checkAccess('companyPayment/create')), array('text' => Yii::t('link', 'Add an invoice'), 'url' => array('invoice/create', 'companyId' => $model->id), 'icon' => 'plus', 'visible' => Yii::app()->user->checkAccess('invoice/create')), array('text' => Yii::t('link', 'List of companies'), 'url' => array('list'), 'icon' => 'grip-solid-horizontal', 'visible' => false), array('text' => Yii::t('link', 'Grid of companies'), 'url' => array('grid'), 'icon' => 'calculator', 'visible' => Yii::app()->user->checkAccess($this->id . '/grid')), array('text' => Yii::t('link', 'Create a new company'), 'url' => array('create'), 'icon' => 'plus', 'visible' => Yii::app()->user->checkAccess($this->id . '/create')))));
$this->widget('application.components.WContentHeader', array('breadcrumbs' => array(array('text' => Yii::t('link', 'Companies'), 'url' => array($this->id . '/' . $this->defaultAction), 'active' => false, 'visible' => Yii::app()->user->checkAccess($this->id . '/' . $this->defaultAction)), array('text' => Yii::t('link', '"{title}" company', array('{title}' => $model->title)), 'url' => array('show', 'id' => $model->id), 'active' => false, 'visible' => Yii::app()->user->checkAccess($this->id . '/show')), array('url' => CHtml::normalizeUrl(array($this->action->id, 'id' => $model->id)), 'active' => true))));
echo $this->renderPartial('_form', array('model' => $model, 'update' => true));
Example #19
0
<?php

MParams::setPageLabel(Yii::t('page', 'Grid of time records'));
MUserFlash::setSidebarInfo(Yii::t('hint', 'Required: {authRoles}.', array(4, '{authRoles}' => implode(', ', array(Yii::t('t', User::CLIENT_T), Yii::t('t', User::CONSULTANT_T), Yii::t('t', User::MANAGER_T), Yii::t('t', User::ADMINISTRATOR_T))))));
MLinkList::set('sidebar', array('links' => array(array('text' => Yii::t('link', 'View as list'), 'url' => array('list'), 'icon' => 'grip-solid-horizontal', 'visible' => false), array('text' => Yii::t('link', 'Time report'), 'url' => array('report'), 'visible' => Yii::app()->user->checkAccess($this->id . '/report')), array('text' => Yii::t('link', 'Add a time record'), 'url' => array('create'), 'icon' => 'plus', 'visible' => Yii::app()->user->checkAccess($this->id . '/create')))));
$this->widget('application.components.WContentHeader', array('afterLabel' => false, 'breadcrumbs' => array(array('url' => array($this->action->id), 'active' => true))));
$this->widget('application.components.WPreItemActionBar', array('links' => array(array('dropDown' => array('links' => $allCompany), 'text' => CHtml::encode($companyLinkText), 'options' => array('title' => Yii::t('t', 'Company'))), array('dropDown' => array('links' => $allProject), 'text' => CHtml::encode($projectLinkText), 'options' => array('title' => Yii::t('t', 'Project'))), array('dropDown' => array('links' => $allTask, 'width' => 440), 'text' => CHtml::encode($taskLinkText), 'options' => array('title' => Yii::t('t', 'Task'))), array('dropDown' => array('links' => $allManager), 'text' => CHtml::encode($managerLinkText), 'options' => array('title' => Yii::t('t', 'Manager'))), array('dropDown' => array('links' => $allConsultant), 'text' => CHtml::encode($consultantLinkText), 'options' => array('title' => Yii::t('t', 'Consultant'))))));
$this->widget('application.components.WGrid', array('columns' => array(array('title' => CHtml::encode($sort->resolveLabel('company'))), array('title' => CHtml::encode($sort->resolveLabel('project'))), array('title' => CHtml::encode($sort->resolveLabel('task'))), array('title' => CHtml::encode($sort->resolveLabel('manager'))), array('title' => CHtml::encode($sort->resolveLabel('consultant'))), array('title' => CHtml::encode($sort->resolveLabel('timeDate'))), array('title' => CHtml::encode($sort->resolveLabel('spentMinute'))), array('title' => CHtml::encode($sort->resolveLabel('billedMinute'))), array('title' => CHtml::encode($sort->resolveLabel('title'))), array('title' => CHtml::encode(Yii::t('t', 'Actions')))), 'columnsModel' => array(array('name' => 'company', 'width' => 85), array('name' => 'project', 'width' => 85), array('name' => 'task', 'width' => 85), array('name' => 'manager', 'width' => 75), array('name' => 'consultant', 'width' => 75), array('name' => 'timeDate', 'width' => 70, 'align' => 'right'), array('name' => 'spentMinute', 'width' => 35), array('name' => 'billedMinute', 'width' => 35), array('name' => 'title', 'width' => 94), array('name' => 'actions', 'width' => 59, 'sortable' => false)), 'pages' => $pages, 'rowNum' => TimeController::GRID_PAGE_SIZE, 'rows' => $gridRows, 'sColumns' => array(array('title' => $sort->link('company')), array('title' => $sort->link('project')), array('title' => $sort->link('task')), array('title' => $sort->link('manager')), array('title' => $sort->link('consultant')), array('title' => $sort->link('timeDate')), array('title' => $sort->link('spentMinute')), array('title' => $sort->link('billedMinute')), array('title' => $sort->link('title')), array('title' => Yii::t('t', 'Actions'))), 'sortname' => 'timeDate', 'sortorder' => 'desc', 'url' => Yii::app()->createUrl($this->id . '/gridData', $_GET)));
Example #20
0
<?php

MParams::setPageLabel(Yii::t('page', 'View expense number "{expenseNumber}"', array('{expenseNumber}' => $model->id)));
MLinkList::set('sidebar', array('links' => array(array('text' => Yii::t('link', 'Edit expense'), 'url' => array('update', 'id' => $model->id), 'icon' => 'pencil', 'visible' => Yii::app()->user->checkAccess($this->id . '/update', array('model' => $model))), array('text' => Yii::t('link', 'Delete expense'), 'url' => array('delete', 'id' => $model->id), 'icon' => 'trash', 'visible' => Yii::app()->user->checkAccess($this->id . '/delete', array('model' => $model))), array('text' => Yii::t('link', 'List of expenses'), 'url' => array('list'), 'icon' => 'grip-solid-horizontal', 'visible' => false), array('text' => Yii::t('link', 'Grid of expenses'), 'url' => array('grid'), 'icon' => 'calculator', 'visible' => Yii::app()->user->checkAccess($this->id . '/grid')), array('text' => Yii::t('link', 'Create a new expense'), 'url' => array('create'), 'icon' => 'plus', 'visible' => Yii::app()->user->checkAccess($this->id . '/create')))));
$this->widget('application.components.WContentHeader', array('breadcrumbs' => array(array('text' => Yii::t('link', 'Expenses'), 'url' => array($this->id . '/' . $this->defaultAction), 'active' => false, 'visible' => Yii::app()->user->checkAccess($this->id . '/' . $this->defaultAction)), array('url' => array($this->action->id, 'id' => $model->id), 'active' => true))));
?>
<div class="w3-detail-box ui-widget-content ui-corner-all">

<div class="w3-detail-row w3-first">
  <div class="w3-detail-row-label"><?php 
echo CHtml::encode($model->getAttributeLabel('companyId'));
?>
</div>
  <div class="w3-detail-row-value"><?php 
echo isset($model->company->id) ? CHtml::link(CHtml::encode($model->company->title), array('company/show', 'id' => $model->company->id)) : '';
?>
</div>
  <div class="clear">&nbsp;</div>
</div>
<div class="w3-detail-row">
  <div class="w3-detail-row-label"><?php 
echo CHtml::encode($model->getAttributeLabel('projectId'));
?>
</div>
  <div class="w3-detail-row-value"><?php 
echo isset($model->project->id) ? CHtml::link(CHtml::encode($model->project->title), array('project/show', 'id' => $model->project->id)) : '';
?>
</div>
  <div class="clear">&nbsp;</div>
</div>
<div class="w3-detail-row">
Example #21
0
<?php

MParams::setPageLabel(Yii::t('page', 'Confirm email address'));
MUserFlash::setTopError(_CHtml::errorSummary($model));
$this->widget('application.components.WContentHeader', array('breadcrumbs' => array(array('url' => array($this->action->id), 'active' => true))));
?>
<div class="w3-main-form-box ui-widget-content ui-corner-all">

<?php 
echo _CHtml::beginForm('', 'post', array('class' => 'w3-main-form')) . "\n";
?>

<div class="w3-form-row w3-first">
  <div class="w3-form-row-label"><?php 
echo _CHtml::activeLabelEx($model, 'email');
?>
</div>
  <div class="w3-form-row-input">
    <?php 
echo _CHtml::activeTextField($model, 'email', array('class' => 'w3-input-text ui-widget-content ui-corner-all', 'maxlength' => 255)) . "\n";
?>
  </div>
  <div class="clear">&nbsp;</div>
</div>
<div class="w3-form-row">
  <div class="w3-form-row-label"><?php 
echo _CHtml::activeLabelEx($model, 'emailConfirmationKey');
?>
</div>
  <div class="w3-form-row-input">
    <?php 
Example #22
0
<?php

MParams::setPageLabel(Yii::t('page', 'Edit invoice'));
MUserFlash::setTopError(_CHtml::errorSummary($model));
MUserFlash::setSidebarInfo(Yii::t('hint', 'Required: {authRoles}.', array(1, '{authRoles}' => implode(', ', array(Yii::t('t', User::ADMINISTRATOR_T))))));
MLinkList::set('sidebar', array('links' => array(array('text' => Yii::t('link', 'Show invoice'), 'url' => array('show', 'id' => $model->id), 'icon' => 'zoomin', 'visible' => Yii::app()->user->checkAccess($this->id . '/show')), array('text' => Yii::t('link', 'List of invoices'), 'url' => array('list'), 'icon' => 'grip-solid-horizontal', 'visible' => false), array('text' => Yii::t('link', 'Grid of invoices'), 'url' => array('grid'), 'icon' => 'calculator', 'visible' => Yii::app()->user->checkAccess($this->id . '/grid')), array('text' => Yii::t('link', 'Create a new invoice'), 'url' => array('create'), 'icon' => 'plus', 'visible' => Yii::app()->user->checkAccess($this->id . '/create')))));
$this->widget('application.components.WContentHeader', array('breadcrumbs' => array(array('text' => Yii::t('link', 'Invoices'), 'url' => array($this->id . '/' . $this->defaultAction), 'active' => false, 'visible' => Yii::app()->user->checkAccess($this->id . '/' . $this->defaultAction)), array('text' => Yii::t('link', 'Invoice number "{invoiceNumber}"', array('{invoiceNumber}' => $model->id)), 'url' => array('show', 'id' => $model->id), 'active' => false, 'visible' => Yii::app()->user->checkAccess($this->id . '/show')), array('url' => array($this->action->id, 'id' => $model->id), 'active' => true))));
echo $this->renderPartial('_form', array('model' => $model, 'update' => true));
Example #23
0
<?php

MParams::setPageLabel(Yii::t('page', 'Member not found'));
MUserFlash::setTopError(Yii::t('hint', 'The requested member does not exist.'));
MLinkList::set('sidebar', array('links' => array(array('text' => Yii::t('link', 'List of members'), 'url' => array('list'), 'icon' => 'grip-solid-horizontal', 'visible' => false), array('text' => Yii::t('link', 'Grid of members'), 'url' => array('grid'), 'icon' => 'calculator', 'visible' => Yii::app()->user->checkAccess($this->id . '/grid')), array('text' => Yii::t('link', 'Create a new member'), 'url' => array('create'), 'icon' => 'plus', 'visible' => Yii::app()->user->checkAccess($this->id . '/create')))));
MUserFlash::setSidebarInfo(Yii::t('hint', 'The requested member was deleted, inactivated or did not exist. Try to browse or search among all members.'));
$this->widget('application.components.WContentHeader', array('breadcrumbs' => array(array('text' => Yii::t('link', 'Members'), 'url' => array($this->id . '/' . $this->defaultAction), 'active' => false, 'visible' => Yii::app()->user->checkAccess($this->id . '/' . $this->defaultAction)))));
Example #24
0
<?php

MParams::setPageLabel(Yii::t('page', 'Time report'));
MUserFlash::setSidebarInfo(Yii::t('hint', 'Required: {authRoles}.', array(4, '{authRoles}' => implode(', ', array(Yii::t('t', User::CLIENT_T), Yii::t('t', User::CONSULTANT_T), Yii::t('t', User::MANAGER_T), Yii::t('t', User::ADMINISTRATOR_T))))));
MLinkList::set('sidebar', array('links' => array(array('text' => Yii::t('link', 'View as grid'), 'url' => array('grid'), 'icon' => 'calculator', 'visible' => Yii::app()->user->checkAccess($this->id . '/grid')), array('text' => Yii::t('link', 'View as list'), 'url' => array('list'), 'icon' => 'grip-solid-horizontal', 'visible' => false), array('text' => Yii::t('link', 'Add a time record'), 'url' => array('create'), 'icon' => 'plus', 'visible' => Yii::app()->user->checkAccess($this->id . '/create')))));
$this->widget('application.components.WContentHeader', array('breadcrumbs' => array(array('text' => Yii::t('link', 'Time'), 'url' => array($this->id . '/' . $this->defaultAction), 'active' => false, 'visible' => Yii::app()->user->checkAccess($this->id . '/' . $this->defaultAction)), array('url' => array($this->action->id), 'active' => true))));
?>

<?php 
$cn = 0;
foreach ($data as $company) {
    if ($cn >= 1) {
        ?>
<div class="w3-between-boxes-big">&nbsp;</div>
<hr/>
<?php 
    }
    if (isset($company['company'])) {
        ?>
<h2 class="w3-regular">
  <span title="<?php 
        echo Yii::t('t', 'Company');
        ?>
"><?php 
        echo $company['company']->title !== '' ? CHtml::encode($company['company']->title) : $company['company']->id;
        ?>
</span>
  <span class="w3-position-absolute"><?php 
        echo CHtml::link('', array('company/show', 'id' => $company['company']->id), array('class' => 'ui-icon ui-icon-extlink', 'rel' => 'external', 'style' => 'margin-top: .3em;', 'title' => Yii::t('link', 'Show company')));
        ?>
</span>
Example #25
0
<?php

MParams::setPageLabel(Yii::t('page', 'Change interface'));
MUserFlash::setTopError(_CHtml::errorSummary($model));
if (Yii::app()->user->checkAccess(User::ADMINISTRATOR)) {
    MUserFlash::setSidebarInfo(Yii::t('hint', 'Required: {authRoles}.', array(1, '{authRoles}' => implode(', ', array(Yii::t('t', User::ADMINISTRATOR_T))))));
}
MLinkList::set('sidebar', array('links' => array(array('text' => Yii::t('link', 'Show my profile'), 'url' => !$pkIsPassed ? array('show') : array('show', 'id' => $model->id), 'icon' => 'person', 'visible' => $model->isMe), array('text' => Yii::t('link', 'Edit my profile'), 'url' => !$pkIsPassed ? array('update') : array('update', 'id' => $model->id), 'icon' => 'pencil', 'visible' => $model->isMe), array('text' => Yii::t('link', 'Show member'), 'url' => array('show', 'id' => $model->id), 'icon' => 'person', 'visible' => !$model->isMe && Yii::app()->user->checkAccess($this->id . '/show')), array('text' => Yii::t('link', 'Edit member\'s profile'), 'url' => array('update', 'id' => $model->id), 'icon' => 'pencil', 'visible' => !$model->isMe && Yii::app()->user->checkAccess($this->id . '/update')), array('text' => Yii::t('link', 'List of members'), 'url' => array('list'), 'icon' => 'grip-solid-horizontal', 'visible' => false), array('text' => Yii::t('link', 'Grid of members'), 'url' => array('grid'), 'icon' => 'calculator', 'visible' => Yii::app()->user->checkAccess($this->id . '/grid')), array('text' => Yii::t('link', 'Create a new member'), 'url' => array('create'), 'icon' => 'plus', 'visible' => Yii::app()->user->checkAccess($this->id . '/create')))));
$this->widget('application.components.WContentHeader', array('breadcrumbs' => array(array('text' => Yii::t('link', 'Members'), 'url' => array($this->id . '/'), 'active' => false), array('text' => Yii::t('link', 'My profile'), 'url' => $pkIsPassed ? array('show', 'id' => $model->id) : array('show'), 'visible' => $model->isMe), array('text' => Yii::t('link', '"{screenName}" member', array('{screenName}' => $model->screenName)), 'url' => array('show', 'id' => $model->id), 'visible' => !$model->isMe), array('url' => $model->isMe && !$pkIsPassed ? array($this->action->id) : array($this->action->id, 'id' => $model->id), 'active' => true))));
?>
<div class="w3-main-form-box ui-widget-content ui-corner-all">

<?php 
echo _CHtml::beginForm('', 'post', array('class' => 'w3-main-form')) . "\n";
?>

<div class="w3-form-row w3-first">
  <div class="w3-form-row-input">
    <div class="w3-form-row-text">
      <?php 
echo _CHtml::activeRadioButtonList($model, 'interface', $model->getAttributeData('interface'), array('template' => '<div style="float: left; height: 145px; text-align: center; width: 160px;">{jqueryUIScreenshot}<br/>{input}&nbsp;{label}</div>', 'separator' => "\n")) . "\n";
?>
    </div>
  </div>
  <div class="clear">&nbsp;</div>
</div>
<div class="w3-form-row w3-last">
  <div class="w3-form-row-input w3-form-row-2columns w3-center">
    <div class="w3-form-row-text">
      <?php 
echo Yii::t('hint', '{saveButton} or {cancelLink}', array('{saveButton}' => _CHtml::submitButton(Yii::t('link', 'Apply selected user interface'), array('class' => 'w3-input-button w3-button-big ui-state-default ui-corner-all')), '{cancelLink}' => CHtml::link(Yii::t('link', 'Cancel[form]'), $model->isMe && !$pkIsPassed ? array('show') : array('show', 'id' => $model->id)))) . "\n";
Example #26
0
<?php

MParams::setPageLabel(Yii::t('page', 'Create a new invoice'));
MUserFlash::setTopError(_CHtml::errorSummary($model));
MUserFlash::setSidebarInfo(Yii::t('hint', 'Required: {authRoles}.', array(1, '{authRoles}' => implode(', ', array(Yii::t('t', User::ADMINISTRATOR_T))))));
MLinkList::set('sidebar', array('links' => array(array('text' => Yii::t('link', 'List of invoices'), 'url' => array('list'), 'icon' => 'grip-solid-horizontal', 'visible' => false), array('text' => Yii::t('link', 'Grid of invoices'), 'url' => array('grid'), 'icon' => 'calculator', 'visible' => Yii::app()->user->checkAccess($this->id . '/grid')))));
$this->widget('application.components.WContentHeader', array('breadcrumbs' => array(array('text' => Yii::t('link', 'Invoices'), 'url' => array($this->id . '/' . $this->defaultAction), 'active' => false, 'visible' => Yii::app()->user->checkAccess($this->id . '/' . $this->defaultAction)), array('url' => array($this->action->id), 'active' => true))));
echo $this->renderPartial('_form', array('model' => $model, 'update' => false));
Example #27
0
<?php

MParams::setPageLabel(Yii::t('page', 'Create a new project'));
MUserFlash::setTopError(_CHtml::errorSummary($model));
MLinkList::set('sidebar', array('links' => array(array('text' => Yii::t('link', 'List of projects'), 'url' => array('list'), 'icon' => 'grip-solid-horizontal', 'visible' => false), array('text' => Yii::t('link', 'Grid of projects'), 'url' => array('grid'), 'icon' => 'calculator', 'visible' => Yii::app()->user->checkAccess($this->id . '/grid')))));
$this->widget('application.components.WContentHeader', array('breadcrumbs' => array(array('text' => Yii::t('link', 'Projects'), 'url' => array($this->id . '/' . $this->defaultAction), 'active' => false, 'visible' => Yii::app()->user->checkAccess($this->id . '/' . $this->defaultAction)), array('url' => array($this->action->id), 'active' => true))));
echo $this->renderPartial('_form', array('model' => $model, 'update' => false));
Example #28
0
<?php

MParams::setPageLabel(Yii::t('page', 'List of company payments'));
MLinkList::set('sidebar', array('links' => array(array('text' => Yii::t('link', 'View as grid'), 'url' => array('grid'), 'icon' => 'calculator', 'visible' => Yii::app()->user->checkAccess($this->id . '/grid')), array('text' => Yii::t('link', 'Add a company payment'), 'url' => array('create'), 'icon' => 'plus', 'visible' => Yii::app()->user->checkAccess($this->id . '/create')))));
$this->widget('application.components.WContentHeader', array('breadcrumbs' => array(array('url' => array($this->action->id), 'active' => true))));
if ($pages->getPageCount() >= 2) {
    ?>
<div style="padding: .5em 0 .9em 0;">
<?php 
    $this->widget('CLinkPager', array('pages' => $pages));
    ?>
</div>

<?php 
}
?>
<div class="w3-list">
<?php 
foreach ($models as $n => $model) {
    ?>

<div class="w3-item<?php 
    echo $n ? '' : ' w3-first';
    ?>
 ui-widget-content ui-corner-all">
<?php 
    echo CHtml::encode($model->getAttributeLabel('companyId'));
    ?>
:
<?php 
    echo isset($model->company->id) ? CHtml::link(CHtml::encode($model->company->title), array('company/show', 'id' => $model->company->id)) : '';
Example #29
0
<?php

/* inspired from http://jqueryui.com/demos/tabs/  'Theming' */
if (MParams::getMainMenuFullWidth()) {
    ?>
<div class="w3-main-menu-box ui-widget ui-widget-header ui-corner-all">
<div class="<?php 
    echo MLayout::getContainerCssClass();
    ?>
">
<div class="<?php 
    echo MLayout::getGridCssClass();
    ?>
">
<?php 
    echo $this->render('wMainMenuContent', array('items' => $items));
    ?>
</div>
<div class="clear">&nbsp;</div>
</div>
</div><!-- w3-main-menu-box -->
<?php 
} else {
    ?>
<div class="<?php 
    echo MLayout::getContainerCssClass();
    ?>
">
<div class="<?php 
    echo MLayout::getGridCssClass();
    ?>
Example #30
0
<?php

MParams::setPageLabel(Yii::t('page', 'List of companies'));
MLinkList::set('sidebar', array('links' => array(array('text' => Yii::t('link', 'View as grid'), 'url' => array('grid'), 'icon' => 'calculator'), array('text' => Yii::t('link', 'Add a company'), 'url' => array('create'), 'icon' => 'plus'))));
$this->widget('application.components.WContentHeader', array('breadcrumbs' => array(array('url' => array($this->action->id), 'active' => true))));
if ($pages->getPageCount() >= 2) {
    ?>
<div style="padding: .5em 0 .9em 0;">
<?php 
    $this->widget('CLinkPager', array('pages' => $pages));
    ?>
</div>

<?php 
}
?>
<div class="w3-list">
<?php 
foreach ($models as $n => $model) {
    ?>

<div class="w3-item<?php 
    echo $n ? '' : ' w3-first';
    ?>
 ui-widget-content ui-corner-all">
<?php 
    echo CHtml::encode($model->getAttributeLabel('id'));
    ?>
:
<?php 
    echo CHtml::link($model->id, array('show', 'id' => $model->id));