Updated all the view.ctp files to use the new style infobox. I should probably create an element for it, but I'll hold off for now.

git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@135 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-06-15 21:01:22 +00:00
parent 543e2daa43
commit 23f4a29fc7
9 changed files with 207 additions and 221 deletions

View File

@@ -1,9 +1,6 @@
<?php /* -*- mode:PHP -*- */ ?>
<?php /* -*- mode:PHP -*- */
<div class="ledger view">
<?php
; // Editor alignment
echo '<div class="ledger view">' . "\n";
/**********************************************************************
**********************************************************************
@@ -12,14 +9,19 @@
* Ledger Detail Main Section
*/
$rows = array(array('ID', $ledger['Ledger']['id']),
array('Name', $ledger['Ledger']['name']),
array('Account', $html->link($ledger['Account']['name'],
array('controller' => 'accounts',
'action' => 'view',
$ledger['Account']['id']))),
array('Status', $ledger['Ledger']['closed'] ? 'Closed' : 'Open'),
array('Comment', $ledger['Ledger']['comment']));
$account = $ledger['Account'];
if (isset($ledger['Ledger']))
$ledger = $ledger['Ledger'];
$rows = array(array('ID', $ledger['id']),
array('Name', $ledger['name']),
array('Account', $html->link($account['name'],
array('controller' => 'accounts',
'action' => 'view',
$account['id']))),
array('Status', $ledger['closed'] ? 'Closed' : 'Open'),
array('Comment', $ledger['comment']));
echo $this->element('table',
array('class' => 'item ledger detail',
@@ -32,30 +34,19 @@ echo $this->element('table',
* Ledger Info Box
*/
?>
echo '<div class="infobox">' . "\n";
$rows = array();
$rows[] = array('Debits:', FormatHelper::currency($stats['debits']));
$rows[] = array('Credits:', FormatHelper::currency($stats['credits']));
$rows[] = array('Ledger Balance:', FormatHelper::currency($stats['balance']));
echo $this->element('table',
array('class' => 'summary',
'rows' => $rows,
'column_class' => array('field', 'value'),
'suppress_alternate_rows' => true,
));
echo '</div>' . "\n";
<DIV CLASS="infobox">
<TABLE CLASS="summary">
<TR>
<TD>Debits:</TD>
<TD><?php echo FormatHelper::currency($stats['debits']); ?></TD>
</TR>
<TR>
<TD>Credits:</TD>
<TD><?php echo FormatHelper::currency($stats['credits']); ?></TD>
</TR>
<TR>
<TD>Ledger Balance:</TD>
<TD><?php echo FormatHelper::currency($stats['balance']); ?></TD>
</TR>
</TABLE>
</DIV>
<DIV CLASS="detail supporting">
<?php
; // Editor alignment
/**********************************************************************
**********************************************************************
@@ -64,18 +55,21 @@ echo $this->element('table',
* Supporting Elements Section
*/
echo '<div CLASS="detail supporting">' . "\n";
/**********************************************************************
* Ledger
*/
echo $this->element('ledger_entries',
array('caption' => $ledger['Ledger']['name'],
'ledger_id' => $ledger['Ledger']['id'],
'account_type' => $ledger['Account']['type'],
array('caption' => $ledger['name'],
'ledger_id' => $ledger['id'],
'account_type' => $account['type'],
));
/* End "detail supporting" DIV */ ?>
</DIV>
/* End "detail supporting" div */
echo '</div>' . "\n";
</div>
/* End page div */
echo '</div>' . "\n";