diff options
| author | Patrick Seeger <pseeger@ccwn.org> | 2012-04-13 23:11:05 +0200 |
|---|---|---|
| committer | Patrick Seeger <pseeger@ccwn.org> | 2012-04-13 23:11:05 +0200 |
| commit | 341cc4dd9c53ffbfb863e026dd58549c1082c7a7 (patch) | |
| tree | 1bbbed20313bafb9b063b6b4d894fe580d8b000f /framework/cli/views/shell/crud/_view.php | |
Diffstat (limited to 'framework/cli/views/shell/crud/_view.php')
| -rw-r--r-- | framework/cli/views/shell/crud/_view.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/framework/cli/views/shell/crud/_view.php b/framework/cli/views/shell/crud/_view.php new file mode 100644 index 0000000..02f383d --- /dev/null +++ b/framework/cli/views/shell/crud/_view.php @@ -0,0 +1,29 @@ +<?php +/** + * This is the template for generating the partial view for rendering a single model. + * The following variables are available in this template: + * - $ID: the primary key name + * - $modelClass: the model class name + * - $columns: a list of column schema objects + */ +?> +<div class="view"> + +<?php +echo "\t<b><?php echo CHtml::encode(\$data->getAttributeLabel('{$ID}')); ?>:</b>\n"; +echo "\t<?php echo CHtml::link(CHtml::encode(\$data->{$ID}), array('view', 'id'=>\$data->{$ID})); ?>\n\t<br />\n\n"; +$count=0; +foreach($columns as $column) +{ + if($column->isPrimaryKey) + continue; + if(++$count==7) + echo "\t<?php /*\n"; + echo "\t<b><?php echo CHtml::encode(\$data->getAttributeLabel('{$column->name}')); ?>:</b>\n"; + echo "\t<?php echo CHtml::encode(\$data->{$column->name}); ?>\n\t<br />\n\n"; +} +if($count>=7) + echo "\t*/ ?>\n"; +?> + +</div>
\ No newline at end of file |
