_search.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * The following variables are available in this template:
  4. * - $this: the CrudCode object
  5. */
  6. ?>
  7. <?php echo "<?php\n"; ?>
  8. /* @var $this <?php echo $this->getControllerClass(); ?> */
  9. /* @var $model <?php echo $this->getModelClass(); ?> */
  10. /* @var $form CActiveForm */
  11. ?>
  12. <div class="wide form">
  13. <?php echo "<?php \$form=\$this->beginWidget('CActiveForm', array(
  14. 'action'=>Yii::app()->createUrl(\$this->route),
  15. 'method'=>'get',
  16. )); ?>\n"; ?>
  17. <?php foreach($this->tableSchema->columns as $column): ?>
  18. <?php
  19. $field=$this->generateInputField($this->modelClass,$column);
  20. if(strpos($field,'password')!==false)
  21. continue;
  22. ?>
  23. <div class="row">
  24. <?php echo "<?php echo \$form->label(\$model,'{$column->name}'); ?>\n"; ?>
  25. <?php echo "<?php echo ".$this->generateActiveField($this->modelClass,$column)."; ?>\n"; ?>
  26. </div>
  27. <?php endforeach; ?>
  28. <div class="row buttons">
  29. <?php echo "<?php echo CHtml::submitButton('Search'); ?>\n"; ?>
  30. </div>
  31. <?php echo "<?php \$this->endWidget(); ?>\n"; ?>
  32. </div><!-- search-form -->