mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-16 11:58:25 +00:00
9d1d0201ec
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@405 3807eeeb-6ff5-0310-8944-8be069107fe0
94 lines
No EOL
1.7 KiB
Text
94 lines
No EOL
1.7 KiB
Text
<h1>New <?php echo Inflector::camelize($this->name); ?></h1>
|
|
<?php echo $html->formTag('/'.$this->viewPath.'/create');?>
|
|
<table cellspacing="0" class="inav">
|
|
<tr>
|
|
<th>Column Type</th>
|
|
<th>Column Name</th>
|
|
</tr>
|
|
<?php
|
|
$model = Inflector::pluralize($this->name);
|
|
$table = Inflector::singularize($this->name);
|
|
$columnCount = 0;
|
|
$evenNum = 1;
|
|
$css = false;
|
|
|
|
foreach ($this->$table->_table_info as $tables) {
|
|
foreach ($tables as $tabl) {?>
|
|
|
|
<?php
|
|
|
|
if ($evenNum % 2 == 0 ){
|
|
$css = ' class="or"';
|
|
}else{
|
|
$css = false;
|
|
}
|
|
$evenNum++;
|
|
?>
|
|
<?php echo "<tr$css>";?>
|
|
<td> <?php echo $tabl['type'];?> </td>
|
|
<td> <?php echo $tabl['name'];?> </td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
$columnCount++;
|
|
}
|
|
?>
|
|
|
|
</table>
|
|
<?php
|
|
if(!empty($this->$table->joinedHasOne)){?>
|
|
<table cellspacing="0" class="inav">
|
|
<tr>
|
|
<th>Joined Table</th>
|
|
<th> </th>
|
|
</tr>
|
|
<tr>
|
|
<th>Column Type</th>
|
|
<th>Column Name</th>
|
|
</tr>
|
|
|
|
<?php
|
|
|
|
|
|
$joinedCount = count($this->$table->joinedHasOne);
|
|
$count = $columnCount;
|
|
$evenNum = 1;
|
|
$css = false;
|
|
|
|
for ($i = 0; $i <= $joinedCount-1; $i++) {
|
|
foreach ($this->$table->joinedHasOne[$i]->_table_info as $tab) {
|
|
foreach($tab as $test){?>
|
|
<?php
|
|
|
|
if ($evenNum % 2 == 0 ){
|
|
$css = ' class="or"';
|
|
}else{
|
|
$css = false;
|
|
}
|
|
$evenNum++;
|
|
?>
|
|
<?php echo "<tr$css>";?>
|
|
<td> <?php echo $test['type'];?> </td>
|
|
<td> <?php echo $test['name'];?> </td>
|
|
</tr>
|
|
|
|
<?php
|
|
|
|
$count++;
|
|
}
|
|
}
|
|
}
|
|
?>
|
|
</table>
|
|
<?php }?>
|
|
|
|
|
|
<table cellspacing="0" class="inav">
|
|
<br /><?php echo $html->submitTag('Save')?></p>
|
|
</form>
|
|
<tr>
|
|
<td>
|
|
<?php echo $html->linkTo('<span style="color: red;">Back</span>', "/{$this->viewPath}/list/")?>
|
|
</td>
|
|
</tr>
|
|
</table> |