コード例 #1
0
 /**
  * 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();
 }
コード例 #2
0
 public function init()
 {
     if ($this->title === NULL) {
         $this->title = Yum::t('Login');
     }
     parent::init();
 }
コード例 #3
0
 public function init()
 {
     if (!$this->dialogMode) {
         $this->title = Yii::t('CalModule.fullCal', 'Events list');
     }
     parent::init();
 }
コード例 #4
0
 /**
  * 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();
 }
コード例 #5
0
ファイル: NewsRandom.php プロジェクト: buildshop/bs-common
 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();
 }
コード例 #6
0
 /**
  * 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();
 }
コード例 #7
0
 public function init()
 {
     $this->title = Yii::t('portlet', 'MyProjectsTitle');
     $this->decorationCssClass = "portlet-header";
     $this->titleCssClass = "portlet-title";
     parent::init();
 }
コード例 #8
0
 /**
  * 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();
 }
コード例 #9
0
 public function init()
 {
     $this->title = Yii::t('portlet', 'EmailNotificationsTitle');
     $this->decorationCssClass = "portlet-header";
     $this->titleCssClass = "portlet-title";
     parent::init();
 }
コード例 #10
0
 /**
  * Class object initialization
  */
 public function init()
 {
     $this->title = Yii::t('comments', 'CommentsTitle');
     $this->decorationCssClass = "portlet-header";
     $this->titleCssClass = "portlet-title";
     parent::init();
 }
コード例 #11
0
ファイル: CPortletExt.php プロジェクト: wpp8909/findzhibo
 public function run()
 {
     if (!$this->renderDirect) {
         parent::run();
     } else {
         $this->renderContent();
     }
 }
コード例 #12
0
 public function run()
 {
     if (!Shop::getCartContent()) {
         return false;
     }
     $this->render('shopping_cart', array('products' => Shop::getCartContent()));
     return parent::run();
 }
コード例 #13
0
 public function init()
 {
     if (Yum::module('message')->messageSystem === false) {
         return false;
     }
     $this->title = Yum::t('New messages');
     parent::init();
 }
コード例 #14
0
 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();
 }
コード例 #15
0
ファイル: Submenu.php プロジェクト: kuzmina-mariya/gallery
 public function init()
 {
     $this->hideOnEmpty = true;
     $controllerId = Yii::app()->controller;
     if (method_exists($controllerId, 'getSubMenu')) {
         $this->menu = $controllerId->getSubMenu();
     }
     parent::init();
 }
コード例 #16
0
ファイル: SearchboxWidget.php プロジェクト: kvvn/homeforpets
 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();
 }
コード例 #17
0
 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()));
 }
コード例 #18
0
ファイル: EPoll.php プロジェクト: josemanuel3dx/SEMMIO
 /**
  * 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();
 }
コード例 #19
0
 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));
 }
コード例 #20
0
ファイル: EPoll.php プロジェクト: phamvanvung1993/yii-poll
 /**
  * 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();
 }
コード例 #21
0
 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();
 }
コード例 #22
0
ファイル: MainMenu.php プロジェクト: antonfunk/yiitask
 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();
 }
コード例 #23
0
 /**
  * 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();
 }
コード例 #24
0
 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();
 }
コード例 #25
0
 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();
    }
コード例 #27
0
 public function init()
 {
     parent::init();
 }
コード例 #28
0
ファイル: NewsAdminmenuWidget.php プロジェクト: xPashaNx/diet
 public function init()
 {
     $this->title = 'Новости';
     parent::init();
 }
コード例 #29
0
ファイル: MainMenuPortlet.php プロジェクト: xyzz/CrashFix
 public function init()
 {
     $this->title = 'Main Menu';
     parent::init();
 }
コード例 #30
0
ファイル: AdminmenuWidget.php プロジェクト: rash012/cms
 public function run()
 {
     $this->render('adminmenu');
     return parent::run();
 }