Ejemplo n.º 1
0
echo CHtml::activeLabel($filter, 'toDate');
$this->widget('zii.widgets.jui.CJuiDatePicker', array('model' => $filter, 'attribute' => 'toDate', 'name' => 'toDate', 'options' => array('changeMonth' => 'true', 'changeYear' => 'true', 'showButtonPanel' => 'true')));
?>
 
			</div>
			<div>
				<?php 
echo CHtml::activeLabel($filter, 'agregatedDomainID');
echo CHtml::activeDropDownList($filter, 'agregatedDomainID', CHtml::listData(Domain::model()->findAll(), 'id', 'name'), array('empty' => ' '));
?>
			</div>
			<div>
				<?php 
$domainID = $filter->agregatedDomainID;
if (isset($domainID) && $domainID > 0) {
    $subdomain = SubDomain::model()->findAllByAttributes(array('domain_id' => $domainID));
} else {
    $subdomain = array();
}
echo CHtml::activeLabel($filter, 'subdomainID');
echo CHtml::activeDropDownList($filter, 'subdomainID', CHtml::listData($subdomain, 'id', 'name'), array('empty' => ' '));
?>
			</div>
			<div>
				<?php 
echo CHtml::activeLabel($filter, 'exclusiveDomainID');
echo CHtml::activeDropDownList($filter, 'exclusiveDomainID', CHtml::listData(Domain::model()->findAll(), 'id', 'name'), array('empty' => ' '));
?>
			</div>
			<div>
				<?php 
Ejemplo n.º 2
0
 public static function getAllSubdomainsInUse()
 {
     return SubDomain::model()->findAllBySql("SELECT DISTINCT subdomain.* FROM subdomain INNER JOIN ticket ON ticket.subdomain_id = subdomain.id ORDER BY subdomain.name");
 }