示例#1
0
    <h3><?php 
echo Html::encode($this->title);
?>
</h3>
    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>

    
    <?php 
$lbl2 = '';
$pdfHeader = ['L' => ['content' => \Yii::$app->params['lblName']], 'C' => ['content' => $this->title . $lbl2, 'font-style' => 'B'], 'R' => ['content' => '']];
$pdfFooter = ['L' => ['content' => \Yii::$app->params['lblName2']], 'C' => ['content' => 'página {PAGENO} de {nb}'], 'R' => ['content' => 'Fecha:{DATE d/m/Y}']];
$columns = ['id', 'concepto', ['attribute' => 'es_multa', 'value' => function ($model) {
    return InfracConceptos::getSiNo($model->es_multa);
}, 'filter' => InfracConceptos::getSiNo()], ['attribute' => 'dias_verif', 'hAlign' => 'right'], ['attribute' => 'multa_unidad', 'value' => 'multaUnidad.unidad', 'filter' => InfracUnidades::getLista()], ['attribute' => 'multa_precio', 'format' => ['decimal', 2], 'hAlign' => 'right'], ['attribute' => 'multa_reincidencia', 'value' => function ($model) {
    return InfracConceptos::getSiNo($model->multa_reincidencia);
}, 'filter' => InfracConceptos::getSiNo()], ['attribute' => 'multa_reinc_porc', 'format' => ['decimal', 2], 'hAlign' => 'right'], ['attribute' => 'multa_reinc_dias', 'hAlign' => 'right'], ['attribute' => 'multa_personas', 'value' => function ($model) {
    return InfracConceptos::getSiNo($model->multa_personas);
}, 'filter' => InfracConceptos::getSiNo()], ['attribute' => 'multa_personas_precio', 'format' => ['decimal', 2], 'hAlign' => 'right'], ['attribute' => 'estado', 'value' => function ($model) {
    return InfracConceptos::getEstados($model->estado);
}, 'filter' => InfracConceptos::getEstados()], ['class' => 'kartik\\grid\\ActionColumn', 'header' => Html::a('<span class="glyphicon glyphicon-plus-sign"></span>', ['create'], ['class' => 'btn-sm btn-primary', 'title' => Yii::t('app', 'Nuevo concepto')]), 'template' => '{view} {comentario}', 'buttons' => ['comentario' => function ($url, $model) {
    $c = Comentarios::getComentariosByModelId($model->className(), $model->id);
    $text = '<span class="glyphicon glyphicon-copyright-mark"';
    if (!empty($c)) {
        $text .= ' style="color:#FF8000"></span>';
        $titl = 'Ingresar nuevo/Ver comentarios';
    } else {
        $text .= '></span>';
        $titl = 'Ingresar nuevo comentario';
    }
示例#2
0
}
echo Collapse::widget(['encodeLabels' => false, 'items' => [['label' => $lbl, 'content' => $this->render('_searchfec', ['model' => $searchModel])]]]);
if (\Yii::$app->session->get('infracFecDesde')) {
    $lbl2 = ' (' . Yii::$app->formatter->asDate(\Yii::$app->session->get('infracFecDesde')) . '-' . Yii::$app->formatter->asDate(\Yii::$app->session->get('infracFecHasta')) . ')';
} else {
    $lbl2 = '';
}
$pdfHeader = ['L' => ['content' => Html::img(Yii::$app->homeUrl . 'images/logoreportes.png')], 'C' => ['content' => $this->title . $lbl2, 'font-style' => 'B'], 'R' => ['content' => \Yii::$app->params['lblName']]];
$pdfFooter = ['L' => ['content' => \Yii::$app->params['lblName2']], 'C' => ['content' => 'página {PAGENO} de {nb}'], 'R' => ['content' => 'Fecha:{DATE d/m/Y}']];
$columns = ['id', ['attribute' => 'id_uf', 'format' => 'raw', 'value' => function ($model, $index, $widget) {
    return Html::a($model->id_uf, Yii::$app->urlManager->createUrl(['uf/view', 'id' => $model->id_uf]), ['title' => 'Ver detalle de la unidad funcional', 'target' => '_blank', 'data-pjax' => '0']);
}], ['attribute' => 'fecha', 'format' => 'date'], ['attribute' => 'hora', 'format' => 'time'], 'nro_acta', 'lugar', ['attribute' => 'rConcepto', 'value' => 'concepto.concepto', 'filter' => InfracConceptos::getLista()], 'descripcion', ['attribute' => 'notificado', 'value' => function ($model) {
    return Infracciones::getSiNo($model->notificado);
}, 'filter' => Infracciones::getSiNo()], ['attribute' => 'fecha_verif', 'format' => 'date'], ['attribute' => 'verificado', 'value' => function ($model) {
    return Infracciones::getSiNo($model->verificado);
}, 'filter' => Infracciones::getSiNo()], ['attribute' => 'rUnidad', 'value' => 'multaUnidad.unidad', 'filter' => InfracUnidades::getLista()], 'multa_total', ['attribute' => 'estado', 'value' => function ($model) {
    return Infracciones::getEstados($model->estado);
}, 'filter' => Infracciones::getEstados()], ['class' => 'kartik\\grid\\ActionColumn', 'header' => Html::a('<span class="glyphicon glyphicon-plus-sign"></span>', ['create'], ['class' => 'btn-sm btn-primary', 'title' => Yii::t('app', 'Alta de infracción/multa')]), 'template' => '{view} {comentario}', 'buttons' => ['comentario' => function ($url, $model) {
    $c = Comentarios::getComentariosByModelId($model->className(), $model->id);
    $text = '<span class="glyphicon glyphicon-copyright-mark"';
    if (!empty($c)) {
        $text .= ' style="color:#FF8000"></span>';
        $titl = 'Ingresar nuevo/Ver comentarios';
    } else {
        $text .= '></span>';
        $titl = 'Ingresar nuevo comentario';
    }
    return Html::a($text, $url, ['title' => $titl, 'onclick' => '$.ajax({
							type     :"POST",
							cache    : false,
							url  : $(this).attr("href"),