コード例 #1
0
 public function loadModel($id)
 {
     $m = Fdm1Dimension1::model();
     // apply scope, if available
     $scopes = $m->scopes();
     if (isset($scopes[$this->scope])) {
         $m->{$this->scope}();
     }
     $model = $m->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, Yii::t('D2fixrModule.crud', 'The requested page does not exist.'));
     }
     return $model;
 }
コード例 #2
0
 public function actionAdmin($fdm1_id)
 {
     $model = new Fdm2Dimension2('search');
     $scopes = $model->scopes();
     if (isset($scopes[$this->scope])) {
         $model->{$this->scope}();
     }
     $model->unsetAttributes();
     if (isset($_GET['Fdm2Dimension2'])) {
         $model->attributes = $_GET['Fdm2Dimension2'];
     }
     $model->fdm2_fdm1_id = $fdm1_id;
     $fdm1 = Fdm1Dimension1::model()->findByPk($fdm1_id);
     $this->render('admin', array('model' => $model, 'fdm1' => $fdm1));
 }
コード例 #3
0
ファイル: level2.php プロジェクト: dbrisinajumi/d2fixr
<?php

$this->renderPartial('levels_js');
$fdm1 = Fdm1Dimension1::model()->findByPk($fdm1_id);
$breadcrumbs[Yii::t('D2fixrModule.model', 'Home')] = array('level1', 'year' => $year);
$breadcrumbs[] = $fdm1->itemLabel;
$this->widget("TbD2Breadcrumbs", array('links' => $breadcrumbs));
?>

<div class="table-header">
    <?php 
echo Yii::t('D2fixrModule.model', 'Dimensions:') . ' ';
echo $fdm1->itemLabel . ' / ';
echo Yii::t('D2fixrModule.model', 'Year:');
$prev_year = $year - 1;
$next_year = $year + 1;
$this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'link', 'type' => 'primary', 'size' => 'mini', 'icon' => 'icon-chevron-left', 'url' => array('level2', 'year' => $prev_year, 'fdm1_id' => $fdm1_id), 'htmlOptions' => array('title' => $prev_year, 'data-toggle' => 'tooltip', 'icon_class' => '')));
echo $year;
$this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'link', 'type' => 'primary', 'size' => 'mini', 'icon' => 'icon-chevron-right', 'url' => array('level2', 'year' => $next_year, 'fdm1_id' => $fdm1_id), 'htmlOptions' => array('title' => $next_year, 'data-toggle' => 'tooltip', 'icon_class' => '')));
?>
</div>

<table class="items table table-striped table-bordered table-hover" id="dim_transactions">
    <thead>
        <tr>
            <td></td>
            <?php 
foreach ($months as $m) {
    ?>
<th><?php 
    echo $m['label'];
コード例 #4
0
 /**
  * level 1 month transactions
  * @param type $fdm1_id
  * @param type $year
  * @param type $month
  */
 public function actionLevel1transactions($fdm1_id, $year, $month)
 {
     $fdpe_id = FdpeDimPeriod::getIdByYearMonth($year, $month);
     $data = FdpeDimPeriod::getDimMonthPositions($fdpe_id, $fdm1_id);
     $fdm1 = Fdm1Dimension1::model()->findByPk($fdm1_id);
     $this->renderPartial('transactions', array('year' => $year, 'month' => $month, 'label' => $fdm1->fdm1_name, 'data' => $data));
 }