コード例 #1
0
ファイル: _formPlanLimit.php プロジェクト: yasirgit/hotmall
echo $form->labelEx($modelPlanLimit, 'limit_amount');
?>
		<?php 
echo $form->textField($modelPlanLimit, 'limit_amount', array('class' => "full"));
?>
		<?php 
echo $form->error($modelPlanLimit, 'limit_amount');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($modelPlanLimit, 'resource_type');
?>
		<?php 
echo $form->dropDownList($modelPlanLimit, 'resource_type', CHtml::listData(PlanResourceType::findAllByType(PlanType::ADVERTISER_PLAN), 'id', 'name'));
?>
		<?php 
echo $form->error($modelPlanLimit, 'resource_type');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($modelPlanLimit, 'plan_id');
?>
		<?php 
echo $form->dropDownList($modelPlanLimit, 'plan_id', CHtml::listData(Plan::model()->findAllByType(PlanType::ADVERTISER_PLAN), 'plan_id', 'name'));
?>
		
		<?php 
コード例 #2
0
ファイル: view.php プロジェクト: yasirgit/hotmall
?>
</div>
<div class="portlet-content">

<?php 
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array('p_whitelabel.name', 'p_plans.name', 'date_created', 'p_plans.duration', 'method', 'price')));
?>

<br/><br/>
<div class="title title-spacing">
<h3>Plan Limitations</h3>
</div>

<?php 
if ($modelLimits != null) {
    $this->widget('zii.widgets.grid.CGridView', array('id' => 'purchased-plan-limit-grid', 'dataProvider' => $modelLimits->getLimits($model->plan_id), 'filter' => null, 'enableSorting' => false, 'columns' => array(array('name' => 'resource_type', 'filter' => CHtml::listData(PlanResourceType::findAllByType(PlanType::ADVERTISER_PLAN), 'id', 'name'), 'value' => '$data->getType($data->resource_type)'), 'limit_amount', array('class' => 'CButtonColumn', 'template' => ''))));
} else {
    echo "No limitations defined!";
}
?>


<br/><br/>
<div class="title title-spacing">
<h3>Plan Payments</h3>
</div>

<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'purchased-plan-limit-grid', 'dataProvider' => $modelPayments->search($model->pplan_id), 'filter' => null, 'enableSorting' => false, 'columns' => array('date_paid', 'date_expire', 'transaction_id', array('class' => 'CButtonColumn', 'template' => ''))));
?>
コード例 #3
0
ファイル: index.php プロジェクト: yasirgit/hotmall
    ?>
	
		

<div class="portlet">
<div class="portlet-header">Limit Plans</div>
<div class="portlet-content">

<?php 
    echo $this->renderPartial('_formPlanLimit', array('modelPlanLimit' => $modelPlanLimit));
    ?>
</div>
</div>


<div class="portlet">
<div class="portlet-header">View Plans</div>
<div class="portlet-content">


<?php 
    $this->widget('zii.widgets.grid.CGridView', array('id' => 'plan-limit-grid', 'dataProvider' => $modelPlanLimit->search(PlanType::ADVERTISER_PLAN), 'filter' => null, 'columns' => array(array('name' => 'plan_id', 'filter' => CHtml::listData(Plan::model()->findAllByType(PlanType::ADVERTISER_PLAN), 'plan_id', 'name'), 'value' => '$data->p_plans->name'), array('name' => 'resource_type', 'filter' => CHtml::listData(PlanResourceType::findAllByType(PlanType::ADVERTISER_PLAN), 'id', 'name'), 'value' => '$data->getType($data->resource_type)'), 'limit_amount', array('class' => 'CButtonColumn', 'template' => '{update}{delete}', 'buttons' => array('update' => array('label' => 'Update', 'url' => 'Yii::app()->createUrl("siteadmin/plan/updateLimit", array("id"=>$data->plimit_id))'), 'delete' => array('label' => 'Delete', 'url' => 'Yii::app()->createUrl("siteadmin/plan/deleteLimit", array("id"=>$data->plimit_id))'))))));
    ?>
</div>
</div>

<?php 
}
?>