6
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
7
* Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
9
* Licensed under The MIT License
10
* Redistributions of files must retain the above copyright notice.
12
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
13
* @link http://cakephp.org CakePHP(tm) Project
15
* @subpackage cake.cake.console.libs.templates.views
16
* @since CakePHP(tm) v 0.10.0.1076
17
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
20
<div class="<?php echo $pluralVar;?> index">
21
<h2><?php echo $pluralHumanName;?></h2>
22
<table cellpadding="0" cellspacing="0">
24
<?php foreach ($scaffoldFields as $_field):?>
25
<th><?php echo $this->Paginator->sort($_field);?></th>
27
<th><?php __('Actions');?></th>
31
foreach (${$pluralVar} as ${$singularVar}):
34
$class = ' class="altrow"';
37
echo "\t<tr{$class}>\n";
38
foreach ($scaffoldFields as $_field) {
40
if (!empty($associations['belongsTo'])) {
41
foreach ($associations['belongsTo'] as $_alias => $_details) {
42
if ($_field === $_details['foreignKey']) {
44
echo "\t\t<td>\n\t\t\t" . $this->Html->link(${$singularVar}[$_alias][$_details['displayField']], array('controller' => $_details['controller'], 'action' => 'view', ${$singularVar}[$_alias][$_details['primaryKey']])) . "\n\t\t</td>\n";
49
if ($isKey !== true) {
50
echo "\t\t<td>\n\t\t\t" . ${$singularVar}[$modelClass][$_field] . " \n\t\t</td>\n";
54
echo "\t\t<td class=\"actions\">\n";
55
echo "\t\t\t" . $this->Html->link(__('View', true), array('action' => 'view', ${$singularVar}[$modelClass][$primaryKey])) . "\n";
56
echo "\t\t\t" . $this->Html->link(__('Edit', true), array('action' => 'edit', ${$singularVar}[$modelClass][$primaryKey])) . "\n";
57
echo "\t\t\t" . $this->Html->link(__('Delete', true), array('action' => 'delete', ${$singularVar}[$modelClass][$primaryKey]), null, __('Are you sure you want to delete', true).' #' . ${$singularVar}[$modelClass][$primaryKey]) . "\n";
66
echo $this->Paginator->counter(array(
67
'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
71
<?php echo "\t" . $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class' => 'disabled')) . "\n";?>
72
| <?php echo $this->Paginator->numbers() . "\n"?>
73
<?php echo "\t ". $this->Paginator->next(__('next', true) .' >>', array(), null, array('class' => 'disabled')) . "\n";?>
77
<h3><?php __('Actions'); ?></h3>
79
<li><?php echo $this->Html->link(sprintf(__('New %s', true), $singularHumanName), array('action' => 'add')); ?></li>
82
foreach ($associations as $_type => $_data) {
83
foreach ($_data as $_alias => $_details) {
84
if ($_details['controller'] != $this->name && !in_array($_details['controller'], $done)) {
85
echo "\t\t<li>" . $this->Html->link(sprintf(__('List %s', true), Inflector::humanize($_details['controller'])), array('controller' => $_details['controller'], 'action' => 'index')) . "</li>\n";
86
echo "\t\t<li>" . $this->Html->link(sprintf(__('New %s', true), Inflector::humanize(Inflector::underscore($_alias))), array('controller' => $_details['controller'], 'action' => 'add')) . "</li>\n";
87
$done[] = $_details['controller'];
b'\\ No newline at end of file'