예제 #1
0
                <th>年</th>
                <th>月</th>
                <th>幅度</th>
            </tr>
            </thead>
           <tbody>
           <?php 
foreach ($datas as $data) {
    ?>
               <tr>
                   <td><?php 
    echo $data['year'];
    ?>
</td>
                   <td><?php 
    echo $data['month'];
    ?>
</td>
                   <td><?php 
    echo \common\models\FundNum::getRate($data['sum_rate']);
    ?>
</td>
               </tr>
           <?php 
}
?>
           </tbody>
        </table>
    </div>
</div>
예제 #2
0
파일: index.php 프로젝트: specialnote/myYii
<?php

use yii\helpers\Html;
use yii\grid\GridView;
use common\models\FundNum;
/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = '自选基金';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="fund-choose-index">

    <p>
        <?php 
echo Html::a('添加自选', ['create'], ['class' => 'btn btn-success']);
?>
    </p>

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'columns' => ['id', 'fund_num', ['attribute' => 'created_at', 'value' => function ($model) {
    return date('Y-m-d', $model->created_at);
}], ['header' => '累计涨幅', 'content' => function ($model) {
    return FundNum::getRate($model->getTotalRate());
}], ['class' => 'yii\\grid\\ActionColumn']]]);
?>

</div>
예제 #3
0
파일: sort.php 프로젝트: specialnote/myYii
                    <th>rate</th>
                </tr>
            </thead>
            <tbody class="sort-tbody">
                <?php 
if ($datas) {
    ?>
                    <?php 
    foreach ($datas as $v) {
        ?>
                        <tr>
                            <td><?php 
        echo $v['fund_num'];
        ?>
</td>
                            <td><?php 
        echo \common\models\FundNum::getRate($v['rate']);
        ?>
</td>
                        </tr>
                    <?php 
    }
    ?>
                <?php 
}
?>
            </tbody>
        </table>
    </div>
</div>
예제 #4
0
}
?>
    </ul>
</div>
<div class="row">
    <table id="month-sort-ul"  class="table table-striped table-hover">
        <?php 
foreach ($posts as $v) {
    ?>
            <tr>
                <td><?php 
    echo $v['fund_num'];
    ?>
</td>
                <td><?php 
    echo FundNum::getRate($v['rate']);
    ?>
</td>
                <td><a target="_blank" href="<?php 
    echo Url::to(['/fund/month-detail', 'num' => $v['fund_num']]);
    ?>
">月详情</a></td>
                <td><a target="_blank" href="<?php 
    echo Url::to(['/fund/week-detail', 'num' => $v['fund_num']]);
    ?>
">周详情</a></td>
                <td><a target="_blank" href="<?php 
    echo Url::to(['/fund/day-detail', 'num' => $v['fund_num']]);
    ?>
">日详情</a></td>
            </tr>