echo at('Type'); ?> </th> <th width="10%"><?php echo at('Reason'); ?> </th> <th width="10%"><?php echo at('Status'); ?> </th> </tr> </thead> <tbody> <?php $absences = AttendanceAbsences::model()->findAllByAttributes(array('employee_id' => Yii::app()->user->id)); ?> <?php foreach ($absences as $absence) { ?> <tr> <td><?php echo $absence->start_date; ?> </td> <td><?php echo $absence->end_date; ?> </td> <td><?php echo $absence->type;
public function actionDelete($id) { $model = AttendanceAbsences::model()->findByPk($id); $model->is_deleted = 1; $model->save(); // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser if (!isset($_GET['ajax'])) { $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin')); } }