/** * This is the default 'index' action that is invoked * when an action is not explicitly requested by users. */ public function actionIndex() { $oLogItemNaoCadastrado = LogItemNaoCadastrado::model()->naoCadastrado()->exibir()->findAll(); $oOrdemServico = new OrdemServico('search'); $oOrdemServico->unsetAttributes(); $oSearchForm = new SearchForm(); $oOrdemServico->status = LogOrdemServico::ABERTA; if (isset($_GET['OrdemServico'])) { $oOrdemServico->attributes = $_GET['OrdemServico']; $oSearchForm->request = $_GET['OrdemServico']; } $this->render('index', array('oLogItemNaoCadastrado' => $oLogItemNaoCadastrado, 'oOrdemServico' => $oOrdemServico, 'exibeFormularioBusca' => $oSearchForm->checaRequisicaoVazia())); }
<div class="row"> <div class="col-md-12"> <h3 class="page-header"><?php echo $data['pagetitle']; ?> </h3> </div> </div> <!--Teste de Perfil--> <div class="row"> <div class="col-md-12"> <div class="jumbotron"> <?php $perfil = $data['perfil']; $action = new OrdemServico(); $action->removerOrdemServico($perfil); ?> <?php if (!Input::exists()) { ?> <h1><span class="glyphicon glyphicon-arrow-right"></span> Atenção!</h1> <p>Deseja deletar a Ordem de Servico <strong><?php echo $perfil->getDescAssunto(); ?> </strong>?</p> <!-- form --> <form action="" method="post">
<?php $perfil = $data['perfil']; $perfil_form = new OrdemServico(); $cadastrado = $perfil_form->cadastra($perfil); // Não cadastra na entrada pois ainda nao tem token $id_check = $data['id']; $token = Token::generate(); ?> <div class="container"> <div class="row"> <div class="col-sm-12"> <h3 class="page-header"><?php echo $data['pagetitle']; ?> <small><?php echo $data['pagesubtitle']; ?> </small> <?php if ($id_check) { ?> <span class="btn-panel pull-right"> <a href="OrdemServico/visualizar/<?php echo $id_check; ?> " data-toggle="tooltip" data-placement="top" title="Ver Perfil!" class="btn btn-circle btn-lg"> <i class="fa fa-eye"></i> </a>
/** * 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 $id the ID of the model to be loaded * @return OrdemServico the loaded model * @throws CHttpException */ public function loadModel($id) { $model = OrdemServico::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }