/**
  * @param string $view the view to be rendered
  * @return bool
  */
 public function beforeRender($view)
 {
     $this->pageTitle = $this->pageHeading = Yii::t('dressing', 'My Account');
     if ($view != 'login') {
         $this->menu = YdSiteMenu::getItemsFromMenu('User');
     }
     return parent::beforeRender($view);
 }
Ejemplo n.º 2
0
<?php

/**
 * @var $this YdWebController
 *
 * @author Brett O'Donnell <*****@*****.**>
 * @author Zain Ul abidin <*****@*****.**>
 * @copyright 2013 Mr PHP
 * @link https://github.com/cornernote/yii-skeleton
 * @license BSD-3-Clause https://raw.github.com/cornernote/yii-dressing/master/license.txt
 */
$this->pageTitle = Yii::t('dressing', 'Documentation');
// menu
$this->menu = YdSiteMenu::getItemsFromMenu('Help');
// breadcrumbs
$this->addBreadcrumb(Yii::t('dressing', 'Help'), array('/site/page', 'view' => 'help'));
echo '<h2>' . Yii::t('dressing', 'Vendor Documentation') . '</h2>';
$this->widget('bootstrap.widgets.TbMenu', array('type' => 'pills', 'stacked' => false, 'items' => array(array('label' => Yii::t('dressing', 'Yii'), 'url' => 'http://www.yiiframework.com/doc/'), array('label' => Yii::t('dressing', 'YiiExt'), 'url' => 'http://yiiext.github.io/'), array('label' => Yii::t('dressing', 'Yii Booster'), 'url' => 'http://yiibooster.clevertech.biz/'), array('label' => Yii::t('dressing', 'Yii Bootstrap'), 'url' => 'http://www.cniska.net/yii-bootstrap'), array('label' => Yii::t('dressing', 'Bootstrap'), 'url' => 'http://twitter.github.io/bootstrap/'), array('label' => Yii::t('dressing', 'jQuery'), 'url' => 'http://api.jquery.com/'), array('label' => Yii::t('dressing', 'Swift Mailer'), 'url' => 'http://swiftmailer.org/docs/introduction.html'), array('label' => Yii::t('dressing', 'Mustache PHP'), 'url' => 'https://github.com/bobthecow/mustache.php'), array('label' => Yii::t('dressing', 'Kint'), 'url' => 'http://raveren.github.io/kint/'), array('label' => Yii::t('dressing', 'Highcharts'), 'url' => 'http://api.highcharts.com/highcharts'))));
Ejemplo n.º 3
0
<?php

/**
 * @var $this SettingController
 * @var $settings YdSetting[]
 *
 * @author Brett O'Donnell <*****@*****.**>
 * @author Zain Ul abidin <*****@*****.**>
 * @copyright 2013 Mr PHP
 * @link https://github.com/cornernote/yii-dressing
 * @license BSD-3-Clause https://raw.github.com/cornernote/yii-dressing/master/license.txt
 */
$this->pageTitle = Yii::t('dressing', 'Settings');
$this->menu = YdSiteMenu::getItemsFromMenu('Settings', YdSiteMenu::MENU_ADMIN);
/** @var YdActiveForm $form */
$form = $this->beginWidget('dressing.widgets.YdActiveForm', array('id' => 'setting-form', 'type' => 'horizontal'));
echo $form->beginModalWrap();
echo $form->errorSummary($settings);
echo '<h2>' . Yii::t('dressing', 'Core Settings') . '</h2>';
echo '<fieldset><legend>' . Yii::t('dressing', 'Version Settings') . '</legend>';
echo $form->textFieldRow($settings['id'], 'value', array('name' => 'YdSetting[id][value]', 'labelOptions' => array('for' => 'YdSetting_id_value')));
echo $form->dropDownListRow($settings['app_version'], 'value', YdSetting::appVersions(), array('name' => 'YdSetting[app_version][value]', 'labelOptions' => array('for' => 'YdSetting_app_version_value')));
//echo $form->dropDownListRow($settings['yii_version'], 'value', YdSetting::yiiVersions(), array('name' => 'YdSetting[yii_version][value]', 'labelOptions' => array('for' => 'YdSetting_yii_version_value')));
//echo $form->checkBoxRow($settings['yii_lite'], 'value', array('name' => 'YdSetting[yii_lite][value]', 'labelOptions' => array('for' => 'YdSetting_yii_lite_value')));
echo '</fieldset>';
echo '<fieldset><legend>' . Yii::t('dressing', 'Debug Settings') . '</legend>';
echo $form->checkBoxRow($settings['debug'], 'value', array('name' => 'YdSetting[debug][value]', 'labelOptions' => array('for' => 'YdSetting_debug_value')));
echo $form->textFieldRow($settings['debug_levels'], 'value', array('name' => 'YdSetting[debug_levels][value]', 'labelOptions' => array('for' => 'YdSetting_debug_levels_value')));
echo $form->checkBoxRow($settings['debug_db'], 'value', array('name' => 'YdSetting[debug_db][value]', 'labelOptions' => array('for' => 'YdSetting_debug_db_value')));
echo $form->textFieldRow($settings['error_email'], 'value', array('name' => 'YdSetting[error_email][value]', 'labelOptions' => array('for' => 'YdSetting_error_email_value')));
echo '</fieldset>';
Ejemplo n.º 4
0
<?php

/**
 * @var $this YdAccountController
 * @var $form YdActiveForm
 * @var $user YdUser
 *
 * @author Brett O'Donnell <*****@*****.**>
 * @author Zain Ul abidin <*****@*****.**>
 * @copyright 2013 Mr PHP
 * @link https://github.com/cornernote/yii-dressing
 * @license BSD-3-Clause https://raw.github.com/cornernote/yii-dressing/master/license.txt
 */
$this->pageTitle = Yii::t('dressing', 'Account Settings');
$this->menu = YdSiteMenu::getItemsFromMenu('User');
/** @var YdActiveForm $form */
$form = $this->beginWidget('dressing.widgets.YdActiveForm', array('id' => 'account-form', 'type' => 'horizontal'));
echo $form->beginModalWrap();
echo $form->errorSummary($user);
?>
    <div class="control-group">
        <?php 
echo CHtml::label(Yii::t('dressing', 'Theme'), 'UserEav_theme', array('class' => 'control-label'));
?>
        <div class="controls">
            <?php 
echo CHtml::dropDownList('UserEav[theme]', $user->getEavAttribute('theme'), YdSetting::themes());
?>
        </div>
    </div>
<?php 
Ejemplo n.º 5
0
<?php

/**
 * @var $this YdUserController
 * @var $user YdUser
 *
 * @author Brett O'Donnell <*****@*****.**>
 * @author Zain Ul abidin <*****@*****.**>
 * @copyright 2013 Mr PHP
 * @link https://github.com/cornernote/yii-dressing
 * @license BSD-3-Clause https://raw.github.com/cornernote/yii-dressing/master/license.txt
 */
// index
if (!isset($user)) {
    $this->menu = YdSiteMenu::getItemsFromMenu('Manage', YdSiteMenu::MENU_ADMIN);
    return;
    // no more links
}
$menu = array();
// create
if ($user->isNewRecord) {
    //$menu[] = array(
    //    'label' => Yii::t('app', 'Create'),
    //    'url' => array('/user/create'),
    //);
    return;
    // no more links
}
// view
$menu[] = array('label' => Yii::t('app', 'View'), 'url' => $user->getUrl());
// others
Ejemplo n.º 6
0
<?php

/**
 * @var $this YdAttachmentController
 * @var $attachment YdAttachment
 *
 * @author Brett O'Donnell <*****@*****.**>
 * @author Zain Ul abidin <*****@*****.**>
 * @copyright 2013 Mr PHP
 * @link https://github.com/cornernote/yii-dressing
 * @license BSD-3-Clause https://raw.github.com/cornernote/yii-dressing/master/license.txt
 */
Yii::app()->user->setState('index.attachment', Yii::app()->request->requestUri);
$this->pageTitle = $this->getName() . ' ' . Yii::t('dressing', 'List');
$this->menu = YdSiteMenu::getItemsFromMenu('Main');
echo '<div class="spacer">';
$this->widget('bootstrap.widgets.TbButton', array('label' => Yii::t('dressing', 'Create') . ' ' . $this->getName(), 'url' => array('/attachment/create'), 'type' => 'primary', 'htmlOptions' => array('data-toggle' => 'modal-remote')));
echo ' ';
$this->widget('bootstrap.widgets.TbButton', array('label' => Yii::t('dressing', 'Search'), 'htmlOptions' => array('class' => 'attachment-grid-search'), 'toggle' => true));
if (Yii::app()->user->getState('index.attachment') != Yii::app()->createUrl('/attachment/index')) {
    echo ' ';
    $this->widget('bootstrap.widgets.TbButton', array('label' => Yii::t('dressing', 'Reset Filters'), 'url' => array('/attachment/index')));
}
echo '</div>';
// search
$this->renderPartial('/attachment/_search', array('attachment' => $attachment));
// grid
$this->renderPartial('/attachment/_grid', array('attachment' => $attachment));
Ejemplo n.º 7
0
<?php

/**
 * @var $this ToolController
 */
$this->pageTitle = Yii::t('dressing', 'Tools');
echo '<h2>' . t('Manage') . '</h2>';
$this->widget('bootstrap.widgets.TbMenu', array('type' => 'pills', 'items' => YdSiteMenu::getItemsFromMenu('Manage', YdSiteMenu::MENU_ADMIN)));
echo '<h2>' . t('Settings') . '</h2>';
$this->widget('bootstrap.widgets.TbMenu', array('type' => 'pills', 'items' => YdSiteMenu::getItemsFromMenu('Settings', YdSiteMenu::MENU_ADMIN)));
echo '<h2>' . t('Reports') . '</h2>';
$this->widget('bootstrap.widgets.TbMenu', array('type' => 'pills', 'items' => YdSiteMenu::getItemsFromMenu('Reports', YdSiteMenu::MENU_ADMIN)));
echo '<h2>' . t('Logs') . '</h2>';
$this->widget('bootstrap.widgets.TbMenu', array('type' => 'pills', 'items' => YdSiteMenu::getItemsFromMenu('Logs', YdSiteMenu::MENU_ADMIN)));
echo '<h2>' . t('Tools') . '</h2>';
$this->widget('bootstrap.widgets.TbMenu', array('type' => 'pills', 'items' => YdSiteMenu::getItemsFromMenu('Tools', YdSiteMenu::MENU_ADMIN)));