Skip to content

Commit 6c7f4c7

Browse files
committed
Adding 2.x upgrade
1 parent 1f65ef1 commit 6c7f4c7

File tree

11 files changed

+63
-63
lines changed

11 files changed

+63
-63
lines changed
File renamed without changes.

controllers/configurations_controller.php renamed to Controller/ConfigurationsController.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function admin_index() {
1111

1212
function admin_view($id = null) {
1313
if (!$id) {
14-
$this->Session->setFlash(__('Invalid Configuration.', true));
14+
$this->Session->setFlash(__('Invalid Configuration.'));
1515
$this->redirect(array('action'=>'index'));
1616
}
1717
$this->set('configuration', $this->Configuration->read(null, $id));
@@ -21,25 +21,25 @@ function admin_add() {
2121
if (!empty($this->data)) {
2222
$this->Configuration->create();
2323
if ($this->Configuration->save($this->data)) {
24-
$this->Session->setFlash(__('The Configuration has been saved', true));
24+
$this->Session->setFlash(__('The Configuration has been saved'));
2525
$this->redirect(array('action'=>'index'));
2626
} else {
27-
$this->Session->setFlash(__('The Configuration could not be saved. Please, try again.', true));
27+
$this->Session->setFlash(__('The Configuration could not be saved. Please, try again.'));
2828
}
2929
}
3030
}
3131

3232
function admin_edit($id = null) {
3333
if (!$id && empty($this->data)) {
34-
$this->Session->setFlash(__('Invalid Configuration', true));
34+
$this->Session->setFlash(__('Invalid Configuration'));
3535
$this->redirect(array('action'=>'index'));
3636
}
3737
if (!empty($this->data)) {
3838
if ($this->Configuration->save($this->data)) {
39-
$this->Session->setFlash(__('The Configuration has been saved', true));
39+
$this->Session->setFlash(__('The Configuration has been saved'));
4040
$this->redirect(array('action'=>'index'));
4141
} else {
42-
$this->Session->setFlash(__('The Configuration could not be saved. Please, try again.', true));
42+
$this->Session->setFlash(__('The Configuration could not be saved. Please, try again.'));
4343
}
4444
}
4545
if (empty($this->data)) {
@@ -49,11 +49,11 @@ function admin_edit($id = null) {
4949

5050
function admin_delete($id = null) {
5151
if (!$id) {
52-
$this->Session->setFlash(__('Invalid id for Configuration', true));
52+
$this->Session->setFlash(__('Invalid id for Configuration'));
5353
$this->redirect(array('action'=>'index'));
5454
}
5555
if ($this->Configuration->del($id)) {
56-
$this->Session->setFlash(__('Configuration deleted', true));
56+
$this->Session->setFlash(__('Configuration deleted'));
5757
$this->redirect(array('action'=>'index'));
5858
}
5959
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

View/configurations/admin_edit.ctp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<h1>Edit Configuration</h1>
2+
<div class="configurations form">
3+
<?php echo $form->create('Configuration');?>
4+
<fieldset>
5+
<?php
6+
echo $form->input('id');
7+
echo $form->input('name');
8+
echo $form->input('value');
9+
?>
10+
</fieldset>
11+
<?php echo $form->end('Submit');?>
12+
</div>
13+
<div class="actions">
14+
<ul>
15+
<li><?php echo $html->link(__('Delete'), array('action'=>'delete', $form->value('Configuration.id')), null, sprintf(__('Are you sure you want to delete # %s?'), $form->value('Configuration.id'))); ?></li>
16+
<li><?php echo $html->link(__('List Configurations'), array('action'=>'index'));?></li>
17+
</ul>
18+
</div>

views/configurations/admin_index.ctp renamed to View/configurations/admin_index.ctp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<div class="configurations index">
2-
<h1><?php __('Configurations');?></h1>
2+
<h1><?php echo __('Configurations');?></h1>
33
<p>
44
<?php
55
echo $paginator->counter(array(
6-
'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
6+
'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%')
77
));
88
?></p>
99
<table cellpadding="0" cellspacing="0">
1010
<tr>
1111
<th><?php echo $paginator->sort('id');?></th>
1212
<th><?php echo $paginator->sort('name');?></th>
1313
<th><?php echo $paginator->sort('value');?></th>
14-
<th class="actions"><?php __('Actions');?></th>
14+
<th class="actions"><?php echo __('Actions');?></th>
1515
</tr>
1616
<?php
1717
$i = 0;
@@ -32,21 +32,21 @@ foreach ($configurations as $configuration):
3232
<?php echo $configuration['Configuration']['value']; ?>
3333
</td>
3434
<td class="actions">
35-
<?php echo $html->link(__('View', true), array('action'=>'view', $configuration['Configuration']['id'])); ?>
36-
<?php echo $html->link(__('Edit', true), array('action'=>'edit', $configuration['Configuration']['id'])); ?>
37-
<?php echo $html->link(__('Delete', true), array('action'=>'delete', $configuration['Configuration']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $configuration['Configuration']['id'])); ?>
35+
<?php echo $html->link(__('View'), array('action'=>'view', $configuration['Configuration']['id'])); ?>
36+
<?php echo $html->link(__('Edit'), array('action'=>'edit', $configuration['Configuration']['id'])); ?>
37+
<?php echo $html->link(__('Delete'), array('action'=>'delete', $configuration['Configuration']['id']), null, sprintf(__('Are you sure you want to delete # %s?'), $configuration['Configuration']['id'])); ?>
3838
</td>
3939
</tr>
4040
<?php endforeach; ?>
4141
</table>
4242
</div>
4343
<div class="paging">
44-
<?php echo $paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?>
44+
<?php echo $paginator->prev('<< '.__('previous'), array(), null, array('class'=>'disabled'));?>
4545
| <?php echo $paginator->numbers();?>
46-
<?php echo $paginator->next(__('next', true).' >>', array(), null, array('class'=>'disabled'));?>
46+
<?php echo $paginator->next(__('next').' >>', array(), null, array('class'=>'disabled'));?>
4747
</div>
4848
<div class="actions">
4949
<ul>
50-
<li><?php echo $html->link(__('New Configuration', true), array('action'=>'add')); ?></li>
50+
<li><?php echo $html->link(__('New Configuration'), array('action'=>'add')); ?></li>
5151
</ul>
5252
</div>

View/configurations/admin_view.ctp

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<div class="configurations view">
2+
<h1><?php echo __('Configuration');?></h1>
3+
<dl><?php $i = 0; $class = ' class="altrow"';?>
4+
<dt<?php if ($i % 2 == 0) echo $class;?>><?php echo __('Id'); ?></dt>
5+
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
6+
<?php echo $configuration['Configuration']['id']; ?>
7+
&nbsp;
8+
</dd>
9+
<dt<?php if ($i % 2 == 0) echo $class;?>><?php echo __('Name'); ?></dt>
10+
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
11+
<?php echo $configuration['Configuration']['name']; ?>
12+
&nbsp;
13+
</dd>
14+
<dt<?php if ($i % 2 == 0) echo $class;?>><?php echo __('Value'); ?></dt>
15+
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
16+
<?php echo $configuration['Configuration']['value']; ?>
17+
&nbsp;
18+
</dd>
19+
</dl>
20+
</div>
21+
<div class="actions">
22+
<ul>
23+
<li><?php echo $html->link(__('Edit Configuration'), array('action'=>'edit', $configuration['Configuration']['id'])); ?> </li>
24+
<li><?php echo $html->link(__('Delete Configuration'), array('action'=>'delete', $configuration['Configuration']['id']), null, sprintf(__('Are you sure you want to delete # %s?'), $configuration['Configuration']['id'])); ?> </li>
25+
<li><?php echo $html->link(__('List Configurations'), array('action'=>'index')); ?> </li>
26+
<li><?php echo $html->link(__('New Configuration'), array('action'=>'add')); ?> </li>
27+
</ul>
28+
</div>

views/configurations/admin_edit.ctp

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)