public function run() { $clientScript = O::app()->clientScript; $clientScript->registerCoreScript('jquery.ui'); //$clientScript->registerScriptFile(O::app()->request->baseUrl . '/js/jquery-ui' . (!YII_DEBUG ? '.min' : '') . '.js'); $clientScript->registerScriptFile(O::app()->request->baseUrl . '/js/jquery.form' . (!YII_DEBUG ? '.min' : '') . '.js'); $this->formOptions['id'] = $this->formId; $this->formOptions['action'] = $this->action; if (!isset($this->formOptions['htmlOptions'])) { $this->formOptions['htmlOptions'] = array(); } if (!isset($this->formOptions['htmlOptions']['class'])) { $this->formOptions['htmlOptions']['class'] = ''; } $this->formOptions['htmlOptions']['class'] .= 'oprecx-sort-form'; if (!isset($this->listOptions['class'])) { $this->listOptions['class'] = ''; } $this->listOptions['class'] .= 'oprecx-sort-list'; $this->listOptions['id'] = $this->listId; if (!$this->addButtonText) { $this->addButtonText = O::t('oprecx', 'Add Item'); } if (!$this->saveButtonText) { $this->saveButtonText = O::t('oprecx', 'Save'); } $this->render($this->view, $this->viewOptions); }
public function run() { if ($this->buttons == null) { $this->buttons = array(array('type' => 'primary', 'label' => O::t('oprecx', 'OK'), 'url' => '#', 'htmlOptions' => array('data-dismiss' => 'modal')), array('label' => O::t('oprecx', 'Cancel'), 'url' => '#', 'htmlOptions' => array('data-dismiss' => 'modal'))); } echo '</div><div class="modal-footer">'; foreach ($this->buttons as $btn) { $this->controller->widget('bootstrap.widgets.TbButton', $btn); } echo '</div>'; parent::run(); }
/** * * @param UserStateInterviewSlots[] $slotStatus * @param RegisterController $controller Description */ function renderInterviewSlotStatus($slotStatus, $controller) { $formatter = O::app()->getLocale()->getDateFormatter(); $ul = HtmlTag::tag('ul'); foreach ($slotStatus as $status) { if ($status->time) { $utime = strtotime($status->time); $time = O::t('oprecx', '{date} at {time}', array('{date}' => $formatter->formatDateTime($utime, 'full', null), '{time}' => $formatter->formatDateTime($utime, null, 'medium'))); } else { $time = O::t('oprecx', 'You have not choosen a slot'); } $ul->appendLi('<strong>' . CHtml::link($status->slot_name, $controller->getURL('interview', array('edit' => 1, 'slotid' => $status->slot_id))) . '</strong>: ' . $time); } $ul->render(true); }
/** * * @return Recruitment */ public function getRec() { if ($this->_rec) { return $this->_rec; } if (isset($this->actionParams['rec'])) { /* @var $rec Recruitment */ if (($rec = Recruitment::model()->findByName($this->actionParams['rec'])) == NULL) { throw new CHttpException(404, O::t('oprecx', 'Recruitment "{rec}" can not be found.', array('{rec}' => $this->actionParams['rec']))); } else { O::app()->setTimeZone($rec->timezone); } } else { $rec = NULL; } return $this->_rec = $rec; }
public function actionNew() { $model = new NewSlotForm(); if (isset($_POST['NewSlotForm'])) { $model->setAttributes($_POST['NewSlotForm']); if ($model->validate() && $model->submit($this->rec->id)) { $this->redirect(array('edit', 'id' => $model->getId())); } } else { $model->name = O::t('oprecx', 'Interview Slot'); $model->timeRanges = array('08:00:00', '12:00:00', '13:00:00', '15:00:00', '15:00:00', '18:00:00'); $model->dateRange = date('Y-m-d', time()) . ' - ' . date('Y-m-d', time() + 432000); // 432000 = 5 * 24 * 60 * 60 $model->defaultMax = 1; $model->duration = 3600; $model->divList = array_keys($this->divList); } $this->render('new', array('model' => $model)); }
public function init() { $params = $this->actionParams; if (isset($params['rec_name'])) { $this->_rec = Recruitment::model()->findByName($params['rec_name']); // Organizations::model()->findByAttributes(array('name' => $params['org'])); if (null == $this->_rec) { throw new CHttpException(404, O::t('oprecx', 'Recruitment {rec} Not Found.', array('{rec}' => $params['rec_name']))); } try { $timezone = $this->_rec->timezone; O::app()->setTimeZone($timezone); } catch (Exception $e) { O::log('Setting timezone failed'); } } else { throw new CHttpException(404, O::t('oprecx', 'Page Not Found "{action}".')); } //$this->isWizard = isset($params['wiz']) && $params['wiz'] == 1; //var_dump($this->actionParams); }
$label_class .= 'time-label-available'; } } else { $label_class .= 'time-label-full'; } echo '<span class="time">', CHtml::radioButton($radioName, $checked, array('id' => $radio_id, 'value' => $value, 'data-role' => 'none', 'disabled' => $user_count >= $max_user)), CHtml::label(substr($time[0], 0, 5) . '-' . substr($time[1], 0, 5), $radio_id, array('data-slotid' => $slot->id, 'data-time' => $date_str, 'class' => $label_class)), '</span>', PHP_EOL; } echo '</div></div>'; } echo '</div></fieldset>', PHP_EOL; } $this->beginWidget('CActiveForm', array('id' => 'interview-slot-form', 'enableClientValidation' => false, 'clientOptions' => array('validateOnSubmit' => false))); ?> <p class="current-time"> <?php echo O::t('oprecx', 'Current time: {time}', array('{time}' => O::app()->dateFormatter->formatDateTime(time()))); ?> </p> <?php generateInterviewTables($model); $this->renderPartial('submit'); $this->endWidget(); ?> <div id="submit-popup" data-role="popup"> <?php // FIXME i have no idea what i am doing $this->beginWidget('CActiveForm', array('id' => 'interview-slot-form', 'enableClientValidation' => false, 'clientOptions' => array('validateOnSubmit' => false), 'htmlOptions' => array('data-role' => 'content'))); ?> <input type="hidden" id="interview-time-input" /> <p><span id="selected-time"></span><input type="submit" value="Submit" data-theme="b" id="submit-button-alt" /></p>
public function validateDivision($attribute, $param) { //$div = $this->divisions; $divs = array(); foreach ($this->choices as $div_id) { if ($div_id != '') { if (!isset($this->_allDivisionsName[$div_id])) { $this->addError('choices', O::t('oprecx', 'Division with id "{div_id}" not found.', array('{div_id}' => $div_id))); } $divs[$div_id] = 1; } } $divs = array_keys($divs); $div_count = count($divs); $this->choices = $divs; if ($div_count < $this->min_choice || $div_count > $this->max_choice) { $this->addError('choices', O::t('oprecx', 'You must select at least {min} and at most {max}.', array('{min}' => O::t('oprecx', '1#a division|>1#{n} divisions', $this->min_choice), '{max}' => O::t('oprecx', '1#a division|>1#{n} divisions', $this->max_choice)))); } }
public function attributeLabels() { return array('name' => O::t('oprecx', 'Name'), 'full_name' => O::t('oprecx', 'Title'), 'email' => O::t('oprecx', 'Email'), 'description' => O::t('oprecx', 'Description'), 'type' => O::t('oprecx', 'Type'), 'scope' => O::t('oprecx', 'Scope'), 'location' => O::t('oprecx', 'Location'), 'link' => O::t('oprecx', 'Link'), 'visibility' => O::t('oprecx', 'Visibility'), 'regTime' => O::t('oprecx', 'Registration date range'), 'div_min' => O::t('oprecx', 'Minimum Division'), 'div_max' => O::t('oprecx', 'Maximum Division')); }
<?php /* @var $this UserController */ /* @var $form CForm */ $this->pageTitle = O::app()->name; $form->buttons['login']->attributes['data-theme'] = 'b'; $form->activeForm['htmlOptions']['data-ajax'] = 'false'; ?> <div class="ui-grid-a"> <div class="ui-block-a"> <?php echo $form->render(); ?> <?php echo CHtml::link(O::t('oprecx', 'Forget password'), array('/user/forget')); ?> </div> <div class="ui-block-b"> <h3>Why login?</h3> <p></p> </div> </div>
<?php if (O::app()->user->isGuest) { ?> <p class="view-division"> <?php echo CHtml::link(O::t('oprecx', 'View all divisions on {org}', array('{org}' => $this->rec->full_name)), $this->getURL('division')); ?> </p> <hr /> <p><?php /* echo O::t('oprecx', 'To register this recruitment, you must {register} or {login}.', array( '{register}' => '<b>' . CHtml::link(O::t('oprecx', 'create an account'), '#user-register-form', array('data-rel' => 'external')) . '</b>', '{login}' => '<b>' . CHtml::link(O::t('oprecx', 'login to your own account'), '#user-login-form', array('data-rel' => 'external')) . '</b>', )); */ echo O::t('oprecx', 'To register this recruitment, you must create an <strong>Oprecx account</strong>. OR, if you already have it, you just need to {login}.', array('{login}' => CHtml::link(O::t('oprecx', 'login to your own account'), array('/user/login', 'nexturl' => $this->getURL('index', array('just_login' => 1)))))); ?> </p> <?php /* $grid = JqmGrid::createGrid(); $regForm->activeForm['htmlOptions']['data-ajax'] = 'false'; $regForm->buttons['register']->attributes['data-theme'] = 'b'; $grid->addColumn($regForm->render())->id('userregister'); $loginForm->activeForm['htmlOptions']['data-ajax'] = 'false'; $loginForm->buttons['login']->attributes['data-theme'] = 'b'; $grid->addColumn($loginForm->render())->id('userregister'); //->appendContent(O::t('oprecx', 'Have Facebook or Twitter account? You can login via {facebook} or {twiiter}.'));
<div class="wrapper"> <h1 class="org-name"> <!-- a href="#main-panel" data-role="button" data-inline="true" data-iconpos="notext" data-icon="arrow-r" class="ui-icon-alt" data-theme="c" data-mini="true" id="panel-show-button">Menu</a --> <?php echo CHtml::link($this->rec->full_name, $this->getURL('index')); ?> </h1> <div class="user-name"> <?php if (!$user->isGuest) { echo '<span>', CHtml::encode($user->getState('fullname')), '</span> | '; echo CHtml::link(O::t('oprecx', 'Log Out'), array('/user/logout'), array('rel' => 'external')); } else { echo O::t('oprecx', 'Hi, there! {login} or {reg}?.', array('{reg}' => CHtml::link(O::t('oprecx', 'register'), array('/user/register', 'nexturl' => $_SERVER['REQUEST_URI'])), '{login}' => CHtml::link(O::t('oprecx', 'login'), array('/user/login', 'nexturl' => $_SERVER['REQUEST_URI'])))); } ?> </div> </div> <div class="clear"></div> </div><!-- /header --> <div data-role="content" class="wrapper" style="clear: both"> <?php echo $content; ?> </div><!-- /content --> <?php
<?php /* @var $this AdminController */ /* @var $slots InterviewSlot[] */ $this->widget('SortForm', array('title' => O::t('oprecx', 'Interview Slot'), 'listItemData' => $slots, 'id' => 'interview-slot-list-form', 'listItemView' => '_slot_item', 'action' => array('sort'), 'addButtonLink' => $this->createUrl('new'))); ?> <?php $this->beginWidget('TbModalEx', array('id' => 'editElementDialog', 'modalTitle' => 'Title')); ?> <p>One fine body...</p> <?php $this->endWidget(); ?> <script> jQuery(function($){ $('#interview-slot-list-form .action-edit').click(function(){ $this = $(this); }); }); </script>
public function createForm($form_class = 'CForm', $option = array()) { return new $form_class(array_merge(array('title' => O::t('oprecx', 'Login'), 'action' => array('/user/login'), 'id' => 'user-login-form', 'elements' => array('email' => array('type' => 'email'), 'password' => array('type' => 'password')), 'buttons' => array('login' => array('type' => 'submit', 'label' => O::t('oprecx', 'Login')))), $option), $this); }
?> <?php echo $form->dropDownListRow($model, 'scope', array('school' => O::t('oprecx', 'School'), 'university' => O::t('oprecx', 'University'), 'faculty' => O::t('oprecx', 'Faculty'), 'other' => O::t('oprecx', 'Other'))); ?> <?php echo $form->textFieldRow($model, 'location'); ?> <?php echo $form->dropDownListRow($model, 'visibility', array('public' => O::t('oprecx', 'Show this recruitment on Oprecx Homepage'), 'private' => O::t('oprecx', 'Hide this recruitment on Oprecx Homepage'))); ?> <?php echo $form->dateRangeRow($model, 'regTime', array('prepend' => '<i class="icon-calendar"></i>', 'label' => O::t('oprecx', 'Visible time'), 'labelOptions' => array('required' => true), 'options' => array('format' => 'yyyy-MM-dd'))); ?> <?php echo $form->checkBoxListRow($model, 'options', array('set' => 'Option one is this and that—be sure to include why it\'s great', 'Option two can also be checked and included in form results', 'Option three can—yes, you guessed it—also be checked and included in form results'), array('hint' => '<strong>Note:</strong> Labels surround all the options for much larger click areas.')); ?> </fieldset> <div class="form-actions"> <?php $this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'submit', 'type' => 'primary', 'label' => 'Submit')); ?> <?php $this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'reset', 'label' => 'Reset')); ?> </div> <?php
<?php echo $content; ?> <div data-role="footer" class="footer wrapper"> <p> Copyright 2013 <a href="<?php echo O::app()->request->baseUrl; ?> /">The Oprecx Team</a> | <?php echo CHtml::link(O::t('oprecx', 'About'), array('/site/page', 'view' => 'oprecx')); ?> | <?php echo CHtml::link(O::t('oprecx', 'Admin'), array('/admin'), array('rel' => 'external')); ?> </p> <p><?php $langs = array(); $curLang = O::app()->language; foreach (O::app()->params['supportedLang'] as $k => $v) { if ($curLang == $k) { $langs[] = '<b>' . $v . '</b>'; } else { $langs[] = CHtml::link($v, array('/site/lang', 'locale' => $k, 'return' => $_SERVER['REQUEST_URI']), array('data-ajax' => 'false')); } } echo implode(' | ', $langs); ?> </p>
echo O::t('oprecx', 'Copy this url, and share it'); ?> </p> <div class="row-fluid share-org-input"> <input class="span12" type="text" readonly="readonly" id="share-link-url" value="<?php echo $url; ?> "> <?php echo CHtml::link(O::t('oprecx', 'Goto link'), $url, array('target' => '_blank')); ?> </div> <p><?php echo O::t('oprecx', 'or just click these buttons'); ?> </p> <div> <a href="http://www.facebook.com/sharer.php?u=<?php echo $url_encoded; ?> " class="share-link facebook">Facebook</a> <a href="http://twitter.com/share?url=<?php echo $url_encoded; ?> &via=oprecx" class="share-link twitter">Twitter</a> <a href="https://plus.google.com/share?url=<?php echo $url_encoded; ?> " class="share-link gplus">Google Plus</a>
public function actionForm() { $this->cekLogin('form'); if ($this->isWizard) { $this->backAction = 'division'; } $model = new RegistrationForm(); $model->initComponent($this->rec->id, O::app()->user->id); $form = new CForm(array('elements' => $model->elements, 'buttons' => array('submit-form' => array('type' => 'submit', 'label' => O::t('oprecx', 'Save'))), 'activeForm' => array('class' => 'CActiveForm'), 'attributes' => array('id' => 'reg-form')), $model); if ($form->submitted('save') && $form->validate() && $model->save()) { //if ($this->isWizard) $this->redirect($this->getURL('interview', array('wiz' => 1))); if ($this->afterSave('interview')) { return; } } $this->render('form', array('form' => $form)); }
echo O::t('oprecx', 'Delete Division'); ?> </h3> </div> <div class="modal-body"> <?php echo O::t('oprecx', 'Are you sure you want to remove "{division}"? All data about this division will be removed.', array('{division}' => '<strong id="divisionRemoveName"></strong>')); ?> </div> <div class="modal-footer"> <button class="btn" data-dismiss="modal" aria-hidden="true"><?php echo O::t('oprecx', 'Cancel'); ?> </button> <button class="btn btn-danger" id="btn-division-remove"><?php echo O::t('oprecx', 'Delete'); ?> </button> </div> </div> <script> jQuery(function($){ $('.action-edit').click(function(){ var div_id = $(this).attr('data-divid'); $('#DivisionName').val($('#division-name-' + div_id).text().trim()); $('#DivisionDescription').val($('#division-description-' + div_id).text().trim()); $('#DivisionId').val(div_id); }); $('#division-list .btn-item-add').click(function(){
$this->beginContent(); ?> <div data-role="header" class="head"> <div class="wrapper"> <h1 class="oprecx-logo"> <?php echo CHtml::link(CHtml::image(O::app()->request->baseUrl . '/images/logo.png', 'Oprecx', array('title' => O::t('oprecx', 'Goto homepage'))), O::app()->homeUrl); ?> </h1> <div class="user-name"> <?php if (!$user->isGuest) { echo '<span>', CHtml::encode(UserIdentity::getFullName($user->id)), '</span> | '; echo CHtml::link(O::t('oprecx', 'Log Out'), array('/user/logout')); } else { echo O::t('oprecx', 'Hi, gees! please {reg}/{login}.', array('{reg}' => CHtml::link(O::t('oprecx', 'register'), array('user/register')), '{login}' => CHtml::link(O::t('oprecx', 'login'), array('user/register')))); } ?> </div> </div> <div class="clear"></div> </div><!-- /header --> <div data-role="content" class="wrapper" style="clear: both"> <?php echo $content; ?> </div><!-- /content -->
} ?> class="slot-options-enablerelateive" value="<?php echo $choiceOptions ? $choiceOptions['n'] : '1'; ?> " /> <?php echo CHtml::dropDownList('slotdur', $choiceOptions ? $choiceOptions['unit'] : 'd', array('d' => O::t('oprecx', 'day|days', 9999), 'h' => O::t('oprecx', 'hour|hours', 9999), 'm' => O::t('oprecx', 'minute|minutes', 9999)), array('id' => 'slot-options-enabletime-unit', 'class' => 'slot-options-enablerelateive', 'disabled' => $choiceOptions ? NULL : 'disabled')); ?> </div> </div> </fieldset> <div class="form-actions"> <?php $this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'submit', 'type' => 'primary', 'label' => O::t('oprecx', 'Save'), 'icon' => 'icon-ok icon-white', 'htmlOptions' => array('id' => 'btn-slot-save', 'class' => 'pull-right save-button'))); ?> </div> <?php $this->endWidget(); ?> <?php O::app()->clientScript->registerCoreScript('jquery.ui'); ?> <script> jQuery(function($) { var defaultMaxUserPerSlot = <?php echo $slot->max_user_per_slot; ?> ,
<?php echo $form->html5EditorRow($model, 'description', array('rows' => 5, 'height' => '200', 'options' => array('image' => false, 'font-styles' => false))); ?> <?php echo $form->dateRangeRow($model, 'dateRange', array('prepend' => '<i class="icon-calendar"></i>', 'label' => O::t('oprecx', 'Visible time'), 'labelOptions' => array('required' => true), 'options' => array('format' => 'yyyy-MM-dd'))); ?> <?php echo $form->numberFieldRow($model, 'defaultMax', array('hint' => O::t('oprecx', 'maximum number user per slot'), 'min' => 0)); ?> <?php echo $form->numberFieldRow($model, 'duration', array('hint' => O::t('oprecx', 'duration'), 'min' => 0)); ?> <div class="control-group "> <?php echo CHtml::activeLabelEx($model, 'timeRanges', array('class' => 'control-label ')); ?> <div class="controls"> <div id="time-range-input-container"> <?php $timeRange = $model->timeRanges; for ($i = 0; $i < count($timeRange); $i += 2) { echo '<p>', CHtml::activeTextField($model, 'timeRanges[]', array('class' => 'input-time input-small', 'value' => $timeRange[$i])), ' - ', CHtml::activeTextField($model, 'timeRanges[]', array('class' => 'input-time input-small', 'value' => $timeRange[$i + 1])), ' <a href="#" class="time-delete-icon"><i class="icon-remove"></i></a>', '</p>'; } ?> </div>
public function attributeLabels() { return array('name' => O::t('oprecx', 'Full Name'), 'password2' => O::t('oprecx', 'Retype Password')); }
public function attributeLabels() { return array('name' => O::t('oprecx', 'Name'), 'description' => O::t('oprecx', 'Description'), 'dateRange' => O::t('oprecx', 'Data Range'), 'timeRanges' => O::t('oprecx', 'Time Ranges'), 'defaultMax' => O::t('oprecx', 'Default Max'), 'duration' => O::t('oprecx', 'Interview Duration'), 'divList' => O::t('oprecx', 'For Divisions')); }
<?php /** @var string $submit_name */ /** @var RegisterController $this */ if (!isset($submit_name)) { $submit_name = 'save'; } $grid = JqmGrid::createGrid('fieldset'); $back_link_args = $this->isWizard ? array('wiz' => 1) : array(); $grid->addColumn(JqmTag::buttonLink(O::t('oprecx', 'Back'), $this->getURL($this->backAction, $back_link_args))->icon('back')->iconPos('left')); $grid->addColumn(JqmTag::jSubmit($this->isWizard ? O::t('oprecx', 'Next') : O::t('oprecx', 'Save'), $submit_name)->icon('check')->theme('b')->iconPos('right')); $grid->render(true);
</div> </div> <script> jQuery(function($){ var idToRemove; var closeMessage = null; window.onbeforeunload = function(){ return closeMessage; } window.setModified = function setModified() { closeMessage = "<?php echo addslashes(O::t('admin', 'There are changes that have not been saved. Click save button to save it')); ?> "; $('#btn-sort-save').attr('disabled', false); } $('#division-sort').submit(function() { var saveText = $('#btn-sort-save').html(); $('#btn-sort-save').attr('disabled', true); $('#btn-sort-save').html('Loading...'); $(this).ajaxSubmit({ dataType : 'json', success : function(data) { $('#btn-sort-save').html(saveText); closeMessage = null; }
<?php /* * To change this template, choose Tools | Templates * and open the template in the editor. */ ?> <h1>Conratulation!</h1> You have successfully registered on this recruitment. <?php JqmTag::buttonLink(O::t('oprecx', 'Review my registration'), $this->getURL('index'))->theme('b')->render(true); JqmTag::buttonLink(O::t('oprecx', 'Log Out'), array('/user/logout'))->render(true);
<h2><?php echo O::t('oprecx', 'Welcome to Oprecx!'); ?> </h2> <?php //echo O::t('oprecx', '<p>Oprecx is web based open recruitment system') ?> <p>Oprecx adalah sistem rekruitmen terbuka berbasis web.</p> <hr /> <h2><?php echo O::t('oprecx', 'Active Open Recruitment'); ?> </h2> <?php /* @var $rec Recruitment */ //JqmTag::listview()->render(TRUE); //* if ($recs) { $ul = JqmTag::listview()->inset()->theme('d')->icon('false')->data('filter', true)->data('filter-placeholder', O::t('oprecx', 'Search recruitment')); foreach ($recs as $rec) { $ul->appendLvItem(HtmlTag::link($rec->full_name, array('registration/default/index', 'rec_name' => $rec->name))); } $ul->render(true); } // */ ?> </div>
} $fieldSet->render(true); echo CHtml::error($model, 'choices'); // render submit button $this->renderPartial('submit'); // end $this->endWidget(); } ?> <?php foreach ($divisions as $division) { ?> <div class="division"> <h3 class="division-name"><?php echo CHtml::encode($division->name); ?> </h3> <div class="division-description"><?php echo $division->description; ?> </div> </div> <?php } ?> <?php if (O::app()->user->getIsGuest()) { JqmTag::buttonLink(O::t('oprecx', 'Register Now'), $this->getURL('index'))->theme('b')->render(true); }
<?php /* @var $this AdminController */ $menu_items = array(array('label' => O::t('oprecx', 'SETTING')), array('label' => O::t('oprecx', 'General'), 'url' => array('setting/general'), 'icon' => 'home'), array('label' => O::t('oprecx', 'Divisions'), 'url' => array('setting/division'), 'icon' => 'th-list'), array('label' => O::t('oprecx', 'COMPONENTS')), array('label' => O::t('oprecx', 'Forms'), 'icon' => 'file-alt', 'url' => array('form/index')), array('label' => O::t('oprecx', 'Interview Slots'), 'icon' => 'calendar', 'url' => array('slot/index')), array('label' => O::t('oprecx', 'Tasks'), 'icon' => 'tasks', 'url' => array('task/index'))); //O::app()->request-> $curPath = $this->id . '/' . $this->action->id; foreach ($menu_items as &$menu_item) { if (isset($menu_item['url'])) { if ($menu_item['url'][0] == $curPath) { $menu_item['active'] = true; } } } $this->beginContent(); ?> <div class="row-fluid"> <div class="span3"> <div class="well well-small" style="padding-left: 0; padding-right: 0"> <?php $this->widget('bootstrap.widgets.TbMenu', array('type' => 'list', 'items' => $menu_items)); ?> </div> <div class="admin-help"><h5>Help</h5></div> </div> <div class="span9"> <?php echo $content; ?> </div> </div>