Exemplo n.º 1
0
<?php 
/* @var $this ResolutionController */
/* @var $dataProvider CActiveDataProvider */
$this->breadcrumbs = array('Resolutions');
$this->menu = array(array('label' => 'Create Resolution', 'url' => array('create')), array('label' => 'Manage Resolution', 'url' => array('admin')));
$this->menu = array(array('label' => 'Monthly Committee Reports', 'url' => array('reportsOthers/commReportMonthly')), array('label' => 'Yearly Committee Reports', 'url' => array('reportsOthers/commReportYearly')), array('label' => 'Monitor Ordinances', 'url' => array('monitorOrd/index')), array('label' => 'Track Communications', 'url' => array('reportsOthers/viewTracking')));
Yii::app()->clientScript->registerScript('search', "\r\n\r\n\$('.search-form form').submit(function(){\r\n\t\$('#track-communication-for-resolution-grid').yiiGridView('update', {\r\n\t\tdata: \$(this).serialize()\r\n\t});\r\n\treturn false;\r\n});\r\n\r\n\$('.search-form form').submit(function(){\r\n\t\$('#track-communication-for-ordinance-grid').yiiGridView('update', {\r\n\t\tdata: \$(this).serialize()\r\n\t});\r\n\treturn false;\r\n});\r\n");
$box = $this->beginWidget('bootstrap.widgets.TbBox', array('title' => 'Track Communications for Resolution', 'headerIcon' => 'icon-th-list', 'htmlOptions' => array('class' => 'bootstrap-widget-table', 'style' => 'width:126%; text-align:center;')));
?>

<?php 
$this->widget('bootstrap.widgets.TbGridView', array('id' => 'track-communication-for-resolution-grid', 'dataProvider' => $forResolution->forResolution(), 'filter' => Communication::model(), 'htmlOptions' => array('style' => 'padding:15px', 'style' => 'width:100%;'), 'template' => "{items}{pager}", 'columns' => array(array('name' => 'ctrl_no', 'value' => '$data->ctrl_no', 'htmlOptions' => array('style' => 'width:10%;')), array('header' => 'Agenda Date', 'value' => '$data->date_agenda'), array('header' => 'Origin', 'filter' => CHtml::listData(Origin::model()->findAll(), 'orig_id', 'orig_name'), 'value' => '$data->orig->orig_name'), array('name' => 'subject_matter', 'value' => '$data->subject_matter', 'htmlOptions' => array('style' => 'width:20%;')), array('header' => 'Date Referred', 'value' => ' $data->getReferral($data->ctrl_no)'), array('header' => 'Date Meeting/s', 'value' => '$data->getCommMeetings($data->ctrl_no)'), array('header' => 'Action Taken', 'value' => '$data->getActionTaken($data->ctrl_no)'), array('header' => 'Date Reported', 'value' => '$data->getCommReport($data->ctrl_no)'), array('header' => 'Ordinance/Resolution No.', 'value' => '$data->getTitle($data->ctrl_no)'))));
?>



<?php 
$this->endWidget();
?>

<?php 
$box = $this->beginWidget('bootstrap.widgets.TbBox', array('title' => 'Track Communications for Ordinance', 'headerIcon' => 'icon-th-list', 'htmlOptions' => array('class' => 'bootstrap-widget-table', 'style' => 'width:126%; text-align:center;')));
?>

<?php 
$this->widget('bootstrap.widgets.TbGridView', array('id' => 'track-communication-for-ordinance-grid', 'dataProvider' => $forOrdinance->forOrdinance(), 'filter' => $forOrdinance, 'htmlOptions' => array('style' => 'padding:15px', 'style' => 'width:100%;'), 'template' => "{items}{pager}", 'columns' => array('ctrl_no', array('header' => 'Agenda Date', 'value' => '$data->date_agenda'), array('header' => 'Origin', 'value' => '$data->orig->orig_name'), array('name' => 'subject_matter', 'value' => '$data->subject_matter'), array('header' => 'Date Referred', 'value' => ' $data->getReferral($data->ctrl_no)'), array('header' => 'Date Meeting/s', 'value' => '$data->getCommMeetings($data->ctrl_no)'), array('header' => 'Action Taken', 'value' => '$data->getActionTaken($data->ctrl_no)'), array('header' => 'Date Reported', 'value' => '$data->getCommReport($data->ctrl_no)'), array('header' => 'Ordinance/Resolution No.', 'value' => '$data->getTitle($data->ctrl_no)'))));
?>


Exemplo n.º 2
0
 /**
  * Add Role for super user
  * 
  * Add user have id = 1 to role's id = 1
  */
 public function addRootOrigin()
 {
     $rootOrigin = array('aid' => 1, 'rid' => 1);
     $origin = Origin::model()->findByPk($rootOrigin);
     if (empty($origin)) {
         $add = new Origin();
         $add->attributes = $rootOrigin;
         try {
             $add->save();
             $this->redirect('/admin');
         } catch (Exception $ex) {
             $data['errmsg'] = $ex->getMessage();
             $this->render('origin', $data);
         }
     } else {
         $this->redirect('/admin');
     }
 }
Exemplo n.º 3
0
?>

	<?php 
echo $form->datepickerRow($model, 'date_received', array('prepend' => '<i class="icon-calendar"></i>', 'options' => array('format' => 'yyyy-mm-dd')));
?>

	<?php 
echo $form->dropDownListRow($model, 'cat_id', CHtml::listData(Category::model()->findAll(), 'cat_id', 'cat_name'), array('class' => 'span4', 'prompt' => '------ Select Category  ------'));
?>

	<?php 
echo $form->dropDownListRow($model, 'type_comm', array(0 => 'Urgent', 1 => 'Not Urgent'), array('class' => 'span4', 'prompt' => '------ Select Type of Communication  ------'));
?>

	<?php 
echo $form->dropDownListRow($model, 'orig_id', CHtml::listData(Origin::model()->findAll(), 'orig_id', 'orig_name'), array('class' => 'span4', 'prompt' => '------ Select Origin  ------'));
?>

	<?php 
echo $form->datepickerRow($model, 'date_agenda', array('prepend' => '<i class="icon-calendar"></i>', 'options' => array('format' => 'yyyy-mm-dd')));
?>

	<div class="form-actions">
	<?php 
$this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'submit', 'type' => 'primary', 'label' => 'Search'));
?>
             </div>
</div>

<?php 
$this->endWidget();
Exemplo n.º 4
0
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer $id the ID of the model to be loaded
  * @return Origin the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = Origin::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Exemplo n.º 5
0
    ?>
	
	<?php 
    echo $form->datepickerRow($model, 'date_agenda', array('prepend' => '<i class="icon-calendar"></i>', 'options' => array('format' => 'yyyy-mm-dd')));
    ?>

	<?php 
    echo $form->fileFieldRow($model, 'comm_letter');
} else {
    ?>
	<?php 
    echo $form->dropDownListRow($model, 'type_comm', array(0 => 'Urgent', 1 => 'Not Urgent'), array('class' => 'span4', 'prompt' => '------ Select Type of Communication ------'));
    ?>

	<?php 
    echo $form->select2Row($model, 'orig_id', array('asDropDownList' => true, 'data' => CHtml::listData(Origin::model()->findAll(array('order' => 'orig_name asc')), 'orig_id', 'orig_name'), 'multiple' => 'multiple', 'data-placeholder' => '           ------------ Select Origin ------------', 'options' => array('maximumSelectionSize' => 1, 'width' => '63%')));
    ?>
	
	<?php 
    echo $form->datepickerRow($model, 'date_agenda', array('prepend' => '<i class="icon-calendar"></i>', 'options' => array('format' => 'yyyy-mm-dd')));
    ?>
	
  <?php 
    echo $form->fileFieldRow($model, 'comm_letter');
}
?>

	<div class="form-actions">
	<?php 
$this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'submit', 'type' => 'primary', 'label' => $model->isNewRecord ? 'Submit' : 'Save', 'htmlOptions' => array('confirm' => 'Do you want to continue?')));
$this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'reset', 'type' => 'warning', 'label' => 'Reset', 'htmlOptions' => array('style' => 'margin-left:1%;')));