Example #1
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function editarsancion($id)
 {
     //$todocampeonato = Campeonato::all();
     //return View::make('campeonato.editar')->with('todocampeonato',$todocampeonato);
     $sancion = Sancion::where('idsancion', '=', $id)->get();
     return View::make('sancion.editar')->with('sancion', $sancion);
 }
Example #2
0
/** @var SancionController $this */
/** @var Sancion $model */
/** @var AweActiveForm $form */
$form = $this->beginWidget('ext.AweCrud.components.AweActiveForm', array('id' => 'sancion-form', 'type' => 'horizontal', 'enableAjaxValidation' => true, 'clientOptions' => array('validateOnSubmit' => false, 'validateOnChange' => true), 'enableClientValidation' => false));
?>
<div class="row-fluid">
    <div class="span12">
        <!-- widget button -->
        <div class="widget border-cyan" id="widget-button">

            <!-- widget header -->
            <div class="widget-header bg-cyan">
                <!-- widget title -->
                <h4 class="widget-title"><i class="aweso-user"></i> <?php 
echo Yii::t('AweCrud.app', $model->isNewRecord ? 'Create' : 'Update') . ' ' . Sancion::label();
?>
</h4>
                <!-- widget action, you can also use btn, btn-group, nav-tabs or nav-pills (also support dropdown). enjoy! -->
                <div class="widget-action">
                    <button data-toggle="collapse" data-collapse="#widget-button" class="btn">
                        <i class="aweso-chevron-up color-cyan" data-toggle-icon="aweso-chevron-down  aweso-chevron-up"></i>
                    </button>
                </div>
            </div><!-- /widget header -->
            <div class="widget-content form bg-white">


                <p class="note">
                    <?php 
echo Yii::t('AweCrud.app', 'Fields with');
Example #3
0
<?php

/** @var SancionController $this */
/** @var Sancion $model */
$this->breadcrumbs = array('Sancions' => array('index'), $model->id);
$this->header = '<i class="aweso-info-sign aweso-2x"></i> ' . Yii::t('AweCrud.app', 'View') . ' ' . Sancion::label() . ' ' . CHtml::encode($model);
$this->menu = array(array('label' => Yii::t('AweCrud.app', 'Manage'), 'icon' => 'list-alt', 'url' => array('admin')));
?>

<fieldset>
    <div class="row-fluid">
        <div class="span5">
            <!-- widget button -->
            <div class="widget border-cyan" id="widget-button">

                <!-- widget header -->
                <div class="widget-header bg-cyan">
                    <!-- widget title -->
                    <h4 class="widget-title"><i class="aweso-info"></i> Informacion General</h4>
                    <!-- widget action, you can also use btn, btn-group, nav-tabs or nav-pills (also support dropdown). enjoy! -->
                    <div class="widget-action">
                        <button data-toggle="collapse" data-collapse="#widget-button" class="btn">
                            <i class="aweso-chevron-up color-cyan" data-toggle-icon="aweso-chevron-down  aweso-chevron-up"></i>
                        </button>
                    </div>
                </div><!-- /widget header -->
                <!-- widget content -->
                <div class="widget-content bg-white">

                    <?php 
$this->widget('bootstrap.widgets.TbDetailView', array('data' => $model, 'attributes' => array('id', 'fecaha_inicio', 'fecha_fin', 'descripcion', 'observacion', array('name' => 'empleado_id', 'value' => $model->empleado !== null ? CHtml::link($model->empleado->nombre_completo, array('/empleado/view', 'id' => $model->empleado->id)) . ' ' : null, 'type' => 'html'), array('name' => 'tipo_sancion_id', 'value' => $model->tipoSancion !== null ? CHtml::link($model->tipoSancion, array('/tipoSancion/view', 'id' => $model->tipoSancion->id)) . ' ' : null, 'type' => 'html'))));
Example #4
0
<?php

/** @var SancionController $this */
/** @var Sancion $model */
$this->breadcrumbs = array('Sancions');
$this->menu = array(array('label' => Yii::t('AweCrud.app', 'Create') . ' ' . Sancion::label(), 'icon' => 'plus', 'url' => array('create')), array('label' => Yii::t('AweCrud.app', 'Manage'), 'icon' => 'list-alt', 'url' => array('admin')));
?>

<fieldset>
    <legend>
        <?php 
echo Yii::t('AweCrud.app', 'List');
?>
 <?php 
echo Sancion::label(2);
?>
    </legend>

<?php 
$this->widget('bootstrap.widgets.TbListView', array('dataProvider' => $dataProvider, 'itemView' => '_view'));
?>
</fieldset>
 /**
  * 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 the ID of the model to be loaded
  */
 public function loadModel($id, $modelClass = __CLASS__)
 {
     $model = Sancion::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }