/**
  * Class object initialization
  */
 public function init()
 {
     $this->title = CHtml::image(Yii::app()->request->baseUrl . '/images/portlets/charts.png') . " " . Yii::t('portlet', 'ProjectsProgressTitle');
     $this->decorationCssClass = "portlet-header";
     $this->titleCssClass = "portlet-title";
     parent::init();
 }
 public function init()
 {
     if ($this->title === NULL) {
         $this->title = Yum::t('Login');
     }
     parent::init();
 }
 public function init()
 {
     if (!$this->dialogMode) {
         $this->title = Yii::t('CalModule.fullCal', 'Events list');
     }
     parent::init();
 }
 /**
  * Class object initialization
  */
 public function init()
 {
     $this->title = CHtml::image(Yii::app()->request->baseUrl . '/images/portlets/overdue.png') . " " . Yii::t('portlet', 'UpcomingMilestonesTitle');
     $this->decorationCssClass = "portlet-header";
     $this->titleCssClass = "portlet-title";
     parent::init();
 }
Exemple #5
0
 public function init()
 {
     $assets = Yii::app()->assetManager->publish(dirname(__FILE__) . DIRECTORY_SEPARATOR . '../assets');
     $clientScript = Yii::app()->clientScript;
     $clientScript->registerCssFile($assets . '/widget-widget.css');
     parent::init();
 }
 /**
  * Class object initialization
  */
 public function init()
 {
     $this->title = CHtml::image(Yii::app()->request->baseUrl . '/images/portlets/invoices.png') . " " . Yii::t('portlet', 'InvoicesStatisticsTitle');
     $this->decorationCssClass = "portlet-header";
     $this->titleCssClass = "portlet-title";
     parent::init();
 }
 public function init()
 {
     $this->title = Yii::t('portlet', 'MyProjectsTitle');
     $this->decorationCssClass = "portlet-header";
     $this->titleCssClass = "portlet-title";
     parent::init();
 }
 /**
  * Class object initialization
  */
 public function init()
 {
     $this->title = CHtml::image(Yii::app()->request->baseUrl . '/images/portlets/bug.png') . " " . Yii::t('portlet', 'TasksToDoTitle');
     $this->decorationCssClass = "portlet-header";
     $this->titleCssClass = "portlet-title";
     parent::init();
 }
 public function init()
 {
     $this->title = Yii::t('portlet', 'EmailNotificationsTitle');
     $this->decorationCssClass = "portlet-header";
     $this->titleCssClass = "portlet-title";
     parent::init();
 }
 /**
  * Class object initialization
  */
 public function init()
 {
     $this->title = Yii::t('comments', 'CommentsTitle');
     $this->decorationCssClass = "portlet-header";
     $this->titleCssClass = "portlet-title";
     parent::init();
 }
Exemple #11
0
 public function run()
 {
     if (!$this->renderDirect) {
         parent::run();
     } else {
         $this->renderContent();
     }
 }
 public function run()
 {
     if (!Shop::getCartContent()) {
         return false;
     }
     $this->render('shopping_cart', array('products' => Shop::getCartContent()));
     return parent::run();
 }
 public function init()
 {
     if (Yum::module('message')->messageSystem === false) {
         return false;
     }
     $this->title = Yum::t('New messages');
     parent::init();
 }
 public function run()
 {
     $dataProvider = new CActiveDataProvider('News', array('criteria' => array('condition' => "status = 1", 'order' => 'created_time DESC', 'limit' => '6')));
     //var_dump($dataProvider);
     //$dataProvider->pagination->pageSize=5;
     $this->render(Yii::app()->params['web_path'] . 'views.wNews.hotnews', array('dataProvider' => $dataProvider));
     return parent::run();
 }
Exemple #15
0
 public function init()
 {
     $this->hideOnEmpty = true;
     $controllerId = Yii::app()->controller;
     if (method_exists($controllerId, 'getSubMenu')) {
         $this->menu = $controllerId->getSubMenu();
     }
     parent::init();
 }
Exemple #16
0
 public function run()
 {
     $params = CMap::mergeArray($this->defaultParams, $this->params);
     $colorList = $sizeList = array();
     $colorList = CHtml::listData(Yii::app()->db->createCommand("SELECT DISTINCT(`color`) FROM `catalog_product` WHERE `color` <> '' AND id_category = 1 AND (hide = 0 OR hide is NULL);")->queryAll(), 'color', 'color');
     $sizeList = CHtml::listData(Yii::app()->db->createCommand("SELECT DISTINCT(`size`) FROM `catalog_product` WHERE `size` <> '' AND id_category = 2 AND (hide = 0 OR hide is NULL);")->queryAll(), 'size', 'size');
     $this->render($this->view, array('params' => $params, 'colorList' => $colorList, 'sizeList' => $sizeList));
     return parent::run();
 }
 protected function renderContent()
 {
     parent::renderContent();
     if (Yii::app()->user->isGuest) {
         return false;
     }
     $user = YumUser::model()->findByPk(Yii::app()->user->id);
     $this->render('profile_comments', array('comments' => Yii::app()->user->data()->profile->recentComments()));
 }
Exemple #18
0
 /**
  * Initializes the portlet.
  */
 public function init()
 {
     $assets = Yii::app()->assetManager->publish(dirname(__FILE__) . DIRECTORY_SEPARATOR . '../assets');
     $clientScript = Yii::app()->clientScript;
     $clientScript->registerCssFile($assets . '/poll.css');
     $this->_poll = $this->poll_id == 0 ? Poll::model()->latest()->find() : Poll::model()->findByPk($this->poll_id);
     if ($this->_poll) {
         $this->title = $this->_poll->title;
     }
     parent::init();
 }
 protected function renderContent()
 {
     if (!Yum::module('profile')->enableProfileVisitLogging) {
         return false;
     }
     parent::renderContent();
     if (Yii::app()->user->isGuest) {
         return false;
     }
     $this->render('profile_visits', array('visits' => Yii::app()->user->data()->visits));
 }
Exemple #20
0
 /**
  * Initializes the portlet.
  */
 public function init()
 {
     // Set the poll module (also kicks in the CSS via the module init)
     $this->_module = Yii::app()->getModule('poll');
     $this->attachBehavior('pollBehavior', 'poll.behaviors.PollBehavior');
     $this->_poll = $this->poll_id == 0 ? Poll::model()->with('choices', 'votes', 'totalVotes')->latest()->find() : Poll::model()->with('choices', 'votes', 'totalVotes')->findByPk($this->poll_id);
     if ($this->_poll) {
         $this->title = $this->_poll->title;
     }
     parent::init();
 }
 public function init()
 {
     $this->htmlOptions['class'] = 'dashboard-portlet';
     $this->decorationCssClass = 'dashboard-portlet-header';
     $this->titleCssClass = 'dashboard-portlet-title';
     $this->contentCssClass = 'dashboard-portlet-content';
     $this->title = $this->getTitle();
     $this->id = $this->getClassName();
     if (!$this->visible) {
         $this->htmlOptions['class'] .= ' dashboard-portlet-invisible';
     }
     parent::init();
 }
Exemple #22
0
 public function init()
 {
     $this->hideOnEmpty = true;
     $controllerId = Yii::app()->controller;
     if (method_exists($controllerId, 'getMainMenu')) {
         $this->menu = $controllerId->getMainMenu();
     }
     for ($i = 1; $i <= 3; $i++) {
         $dataReader[] = array('label' => 'Example-' . $i, 'url' => array('#'));
     }
     $dataReader[] = array('label' => 'Home', 'url' => array('/site/index'));
     $dataReader[] = array('label' => 'About', 'url' => array('/site/page', 'view' => 'about'));
     $dataReader[] = array('label' => 'Contact', 'url' => array('/site/contact'));
     foreach ($dataReader as $row) {
         $this->menu[] = array('label' => $row['label'], 'url' => $row['url']);
     }
     parent::init();
 }
 /**
  * Initializes the widget.
  * This method will publish JUI assets if necessary.
  * It will also register jquery and JUI JavaScript files and the theme CSS file.
  * If you override this method, make sure you call the parent implementation first.
  */
 public function init()
 {
     Yii::import('rbam.extensions.alphapager.ApPagination');
     Yii::import('rbam.extensions.alphapager.ApArrayDataProvider');
     $owner = $this->getOwner();
     $this->id = $this->relationship;
     $this->title = CHtml::tag('p', array(), $this->hint($this->relationship)) . $this->relationship($this->relationship);
     $attribute = 'name';
     foreach ($owner->types as $type) {
         if ($this->relationship === 'parents' && $type < $this->item->type || $this->relationship === 'children' && $type > $this->item->type) {
             continue;
         }
         $getter = 'getE' . ucfirst($this->relationship);
         $alphaPagination = new ApPagination($attribute);
         $data = array_values($this->item->{$getter}($type));
         $alphaPagination->activeCharSet = $owner->activeChars($data, $attribute);
         $this->_relations[$type] = new ApArrayDataProvider($data, array('keyField' => $attribute, 'alphapagination' => $alphaPagination, 'pagination' => array('pageSize' => is_null($owner->module->relationshipsPageSize) ? $owner->module->pageSize : $owner->module->relationshipsPageSize), 'sort' => array('attributes' => array('name', 'description'), 'defaultOrder' => array('name' => false, 'description' => false))));
     }
     parent::init();
 }
 public function run()
 {
     if ($this->products === true) {
         $this->products = Products::model()->findAll('status = 1');
     }
     if (!is_array($this->products)) {
         $this->products = array($products);
     }
     if (!$this->selected) {
         $this->selected = $this->products[0]->product_id;
     }
     $products = array();
     foreach ($this->products as $product) {
         if (is_numeric($product)) {
             $products[$product] = Products::model()->findByPk($product);
         } else {
             $products[$product->product_id] = $product;
         }
     }
     $this->render($this->view, array('selected' => $this->selected, 'ask_for_amount' => $this->ask_for_amount, 'products' => $products));
     return parent::run();
 }
 public function run()
 {
     // устанавливаем условие для отбора
     $criteria = new CDbCriteria();
     $criteria->select = 't.title,t.photo,t.price,t.link, t.article, t.state';
     $criteria->compare('on_main', true);
     $criteria->with = array('idCategoryFast');
     /*$dataProvider = new CActiveDataProvider('CatalogProduct', array(
                'criteria'=>$criteria,
     		'sort' => array(
     			'defaultOrder' => 'sort_order ASC',
     			),
                'pagination'=>false,
            ));*/
     $products = CatalogProduct::model()->findAll($criteria);
     // Тасуем продукты
     if (is_array($products)) {
         shuffle($products);
     }
     $this->render('prodtomain', array('products' => $products));
     return parent::run();
 }
    public function init()
    {
        $updateLink = CHtml::link('<i class="icon-pencil"></i> Update', array('update', 'id' => $this->material_model->id), array());
        $deleteLink = CHtml::link('<i class="icon-trash"></i> Delete', array('delete', 'id' => $this->material_model->id), array('confirm' => "Are you sure you want to delete this record ?"));
        $this->title = <<<EOL
    <div>
        <div class="btn-group" style="float:right">
          <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"><span class="icon-cog"></span><span class="caret"></span></a>
          <ul class="dropdown-menu">
            <li>
                {$updateLink}
            </li>
            <li>
                {$deleteLink}
            </li>
          </ul>
        </div>
        <div class='clearfix'></div>
    </div>
EOL;
        parent::init();
    }
 public function init()
 {
     parent::init();
 }
Exemple #28
0
 public function init()
 {
     $this->title = 'Новости';
     parent::init();
 }
Exemple #29
0
 public function init()
 {
     $this->title = 'Main Menu';
     parent::init();
 }
Exemple #30
0
 public function run()
 {
     $this->render('adminmenu');
     return parent::run();
 }