_search.php 977 B

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