amm-dev-tem team mailing list archive
-
amm-dev-tem team
-
Mailing list archive
-
Message #00011
[Branch ~amm-dev-tem/amm/trunk] Rev 32: Modified detailed view of 'Events' for better information
------------------------------------------------------------
revno: 32
committer: The Whole Life To Learn <thewholelifetolearn@xxxxxxxxx>
branch nick: sources
timestamp: Tue 2011-07-12 21:59:25 +0200
message:
Modified detailed view of 'Events' for better information
modified:
app/views/events/view.ctp
app/views/people/view.ctp
--
lp:amm
https://code.launchpad.net/~amm-dev-tem/amm/trunk
Your team AMM dev team is subscribed to branch lp:amm.
To unsubscribe from this branch go to https://code.launchpad.net/~amm-dev-tem/amm/trunk/+edit-subscription
=== modified file 'app/views/events/view.ctp'
--- app/views/events/view.ctp 2011-05-28 10:19:54 +0000
+++ app/views/events/view.ctp 2011-07-12 19:59:25 +0000
@@ -48,7 +48,7 @@
<tr>
<th><?php __('Name'); ?></th>
<th><?php __('Surname'); ?></th>
- <th><?php __('Birthday'); ?></th>
+ <th><?php __('Age at event'); ?></th>
<th><?php __('Address'); ?></th>
<th><?php __('Contact'); ?></th>
<th class="actions"><?php __('Actions');?></th>
@@ -64,8 +64,20 @@
<tr<?php echo $class;?>>
<td><?php echo $person['name'];?></td>
<td><?php echo $person['surname'];?></td>
- <td><?php echo $person['birthday'];?></td>
- <td><?php echo $person['address'].' '.$person['addr_comp'].', '.$person['postal_code'].' '.$person['town'];?></td>
+ <td>
+ <?php
+ $date = new DateTime($person['birthday']);
+ $int = $date->diff(new DateTime($event['Event']['date_begin']), true);
+ echo $int->format('%y');
+ ?>
+ </td>
+ <td>
+ <?php
+ echo $person['address'];
+ echo (empty($person['addr_comp'])) ? '' : ' '.$person['addr_comp'];
+ echo ', '.$person['postal_code'].' '.$person['town'];
+ ?>
+ </td>
<td><?php echo $person['phone'].' '.$person['email'];?></td>
<td class="actions">
<?php echo $this->Html->link(__('View', true), array('controller' => 'people', 'action' => 'view', $person['id'])); ?>
=== modified file 'app/views/people/view.ctp'
--- app/views/people/view.ctp 2011-05-31 18:55:15 +0000
+++ app/views/people/view.ctp 2011-07-12 19:59:25 +0000
@@ -16,7 +16,7 @@
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
<?php
$date = new DateTime($person['Person']['birthday']);
- echo $date->format('d F Y')
+ echo $date->format('d F Y');
?>
</dd>