Skip to content

Commit

Permalink
Correções de sintaxe no Controller CertifiedModels
Browse files Browse the repository at this point in the history
  • Loading branch information
michelmotta committed Jul 8, 2013
1 parent c67341c commit 8c4cd2a
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 51 deletions.
16 changes: 8 additions & 8 deletions Controller/CertifiedModelsController.php
Expand Up @@ -41,7 +41,7 @@ public function add() {
$this->CertifiedModel->create();
if ($this->CertifiedModel->save($this->request->data)) {
$this->Session->setFlash(
__('O certificado foi salvo', __('certified model')),
__('O certificado foi salvo'),
'alert',
array(
'plugin' => 'TwitterBootstrap',
Expand All @@ -51,7 +51,7 @@ public function add() {
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(
__('O certificado não foi salvo. Por favor, tente novamente.', __('certified model')),
__('O certificado não foi salvo. Por favor, tente novamente.'),
'alert',
array(
'plugin' => 'TwitterBootstrap',
Expand All @@ -76,7 +76,7 @@ public function edit($id = null) {
if ($this->request->is('post') || $this->request->is('put')) {
if ($this->CertifiedModel->save($this->request->data)) {
$this->Session->setFlash(
__('O certificado foi alterado', __('certified model')),
__('O certificado foi alterado'),
'alert',
array(
'plugin' => 'TwitterBootstrap',
Expand All @@ -86,7 +86,7 @@ public function edit($id = null) {
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(
__('O certificado não foi alterado. Por favor, tente novamente.', __('certified model')),
__('O certificado não foi alterado. Por favor, tente novamente.'),
'alert',
array(
'plugin' => 'TwitterBootstrap',
Expand Down Expand Up @@ -115,7 +115,7 @@ public function delete($id = null) {
}
if ($this->CertifiedModel->delete()) {
$this->Session->setFlash(
__('O certificado foi excluído', __('certified model')),
__('O certificado foi excluído'),
'alert',
array(
'plugin' => 'TwitterBootstrap',
Expand All @@ -125,7 +125,7 @@ public function delete($id = null) {
$this->redirect(array('action' => 'index'));
}
$this->Session->setFlash(
__('O certificado não foi excluído', __('certified model')),
__('O certificado não foi excluído'),
'alert',
array(
'plugin' => 'TwitterBootstrap',
Expand Down Expand Up @@ -167,7 +167,7 @@ public function admin_add() {
$this->CertifiedModel->create();
if ($this->CertifiedModel->save($this->request->data)) {
$this->Session->setFlash(
__('O certificado foi salvo', __('certified model')),
__('O certificado foi salvo'),
'alert',
array(
'plugin' => 'TwitterBootstrap',
Expand All @@ -177,7 +177,7 @@ public function admin_add() {
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(
__('O certificado não foi salvo. Por favor, tente novamente.', __('certified model')),
__('O certificado não foi salvo. Por favor, tente novamente.'),
'alert',
array(
'plugin' => 'TwitterBootstrap',
Expand Down
63 changes: 31 additions & 32 deletions View/CertifiedModels/admin_index.ctp
@@ -1,33 +1,32 @@
<div class="row-fluid">
<ul class="nav nav-tabs nav-stacked span2">
<li><?php echo $this->Html->link(__('Novo Modelo'), array('action' => 'add')); ?></li>
</ul>
<ul class="nav nav-tabs nav-stacked span2">
<li><?php echo $this->Html->link(__('Novo Modelo'), array('action' => 'add')); ?></li>
</ul>

<div class="events index span10">
<h2><?php echo __('Modelos de Certificado');?></h2>
<table class="table table-striped table-bordered table-condensed">
<tr>
<th><?php echo $this->Paginator->sort('CertifiedModel.title', __('Título'));?></th>
<th><?php echo $this->Paginator->sort('CertifiedModel.description', __('Descrição'));?></th>
<th><?php echo $this->Paginator->sort('CertifiedModel.image', __('Imagem'));?></th>
<th class="actions"><?php echo __('Ações');?></th>
</tr>
<?php
foreach ($certifiedModels as $model):
?>
<tr>
<td><?php echo $model['CertifiedModel']['title']?></td>
<td><?php echo $model['CertifiedModel']['description']?></td>
<td><?php echo $model['CertifiedModel']['image']?></td>
<td>
<?php
echo $this->Form->postLink(__('Remover'), array('action' => 'delete', $model['CertifiedModel']['id']), null, __('Você quer mesmo apagar o modelo \'%s\'?', $model['CertifiedModel']['title']));
?>
</td>
</tr>
<?php
endforeach;
?>
</table>
</div>
</div>
<div class="events index span10">
<h2><?php echo __('Modelos de Certificado');?></h2>
<table class="table table-striped table-bordered table-condensed">
<tr>
<th><?php echo $this->Paginator->sort('CertifiedModel.title', __('Título'));?></th>
<th><?php echo $this->Paginator->sort('CertifiedModel.description', __('Descrição'));?></th>
<th><?php echo $this->Paginator->sort('CertifiedModel.image', __('Imagem'));?></th>
<th class="actions"><?php echo __('Ações');?></th>
</tr>
<?php
foreach ($certifiedModels as $model):
?>
<tr>
<td><?php echo $model['CertifiedModel']['title']?></td>
<td><?php echo $model['CertifiedModel']['description']?></td>
<td><?php echo $model['CertifiedModel']['image']?></td>
<td>

<?php
echo $this->Form->postLink(__('Remover'), array('action' => 'delete', $model['CertifiedModel']['id']), null, __('Você quer mesmo apagar o modelo \'%s\'?', $model['CertifiedModel']['title']));
?>
</td>
</tr>
<?php
endforeach;
?>
</table>
</div>
10 changes: 4 additions & 6 deletions View/Layouts/default.ctp
Expand Up @@ -57,13 +57,11 @@
</div>
</div>
<?php endif; ?>

<div class="row-fluid">
<?php
echo $this->element('alerts');

echo $this->fetch('content');
?>
<?php echo $this->element('alerts'); ?>
</div>
<div class="row-fluid">
<?php echo $this->fetch('content'); ?>
</div>
<hr></hr>
<div id="footer" class="row-fluid">
Expand Down
6 changes: 2 additions & 4 deletions View/Messages/admin_send_message.ctp
Expand Up @@ -7,12 +7,10 @@
$this->Form->defineRow(array(3, 3, 2));
echo $this->Form->input('Message.to', array(
'label' => __('Enviar para'),
'options' => $types
));
'options' => $types));
echo $this->Form->input('Message.toFilter', array(
'label' => __('Selecione um filtro'),
'options' => $filters
));
'options' => $filters));
echo $this->Form->input('Message.event_id', array('label' => __('Evento'),'options' => $events));

$this->Form->defineRow(array(8));
Expand Down

0 comments on commit 8c4cd2a

Please sign in to comment.