public function getNotated_date() { if ($this->makeup > 0) { return '<strong>' . CHtml::encode(ZHtml::shortDate($this->meeting_date)) . '</strong>' . CHtml::encode('+'); } else { if ($this->note == '') { return CHtml::encode(ZHtml::shortDate($this->meeting_date)); } else { return '<strong>' . CHtml::encode(ZHtml::shortDate($this->meeting_date)) . '</strong>' . CHtml::encode('*'); } } }
<?php echo $form->textField($model, "[{$index}]signup_date", array('size' => 20)); echo $form->error($model, "[{$index}]signup_date"); ?> </td> <td> <?php echo $form->checkbox($model, "[{$index}]scholarship"); echo $form->error($model, "[{$index}]scholarship"); ?> </td> <td> <?php echo ZHtml::enumDropDownList($model, "[{$index}]status"); ?> </div> <?php echo $form->error($model, "[{$index}]status"); ?> </td> <td> <?php echo $form->textField($model, "[{$index}]note", array('size' => 20, 'maxlength' => 256)); echo $form->error($model, "[{$index}]note"); ?> </td> <td> <?php
<?php Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$.fn.yiiGridView.update('instructor-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n"); ?> <h1>Manage Instructors</h1> <p> You may optionally enter a comparison operator (<b><</b>, <b><=</b>, <b>></b>, <b>>=</b>, <b><></b> or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done. </p> <?php echo CHtml::link('Advanced Search', '#', array('class' => 'search-button')); ?> <div class="search-form" style="display:none"> <?php $this->renderPartial('_search', array('model' => $model)); ?> </div><!-- search-form --> <?php $this->widget('zii.widgets.grid.CGridView', array('id' => 'instructor-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'htmlOptions' => array('style' => 'cursor: pointer;'), 'selectionChanged' => ZHtml::clickableRow('Instructor/view'), 'columns' => array('first_name', 'last_name', 'alias', 'instructor_type.description:text:Type', 'company.name:text:Company', 'email:email', 'cell_phone', 'other_phone', 'note', array('class' => 'CButtonColumn', 'template' => '{view}{delete}')))); echo CHTML::link("Add New Instructor", array("Instructor/create", 'returnTo' => Yii::app()->request->requestUri));
<h1>Enrollment Status for <?php echo CHtml::encode($this->savedSessionSummary()); ?> </h1> <p>Students listed in order of application/payment received.</p> <table class="signups" > <?php print '<tr>'; foreach ($days as $day) { print '<th>' . CHtml::encode(ZHtml::weekdayTranslation($day)) . '</th>'; } print '</tr>'; print '<tr>'; foreach ($days as $day) { echo '<td>'; if (isset($classes[$day])) { foreach ($classes[$day] as $c) { if ($c->status != "Cancelled") { echo $this->renderPartial('_signup_public', array('model' => $c)); } } } echo '</td>'; } print '</tr>'; ?> </table>
<span class="span-5"> Grades: <?php echo $model->gradeSummary('long'); ?> </span> <span class="span-7"> <?php echo ZHtml::weekdayTranslation($model->day_of_week); ?> s, <?php echo ZHtml::militaryToCivilian($model->start_time); ?> - <?php echo ZHtml::militaryToCivilian($model->end_time); ?> </span> <span class="span-4 last"> <?php echo CHtml::encode($model->location); ?> </span> <br /> <br /> $<?php echo $model->cost_per_class; ?>
<?php $this->widget('zii.widgets.jui.CJuiDatePicker', array('model' => $model, 'attribute' => 'returned', 'value' => $model->returned, 'options' => array('showAnim' => 'fold', 'showButtonPanel' => true, 'autoSize' => true, 'dateFormat' => 'yy-mm-dd', 'defaultDate' => $model->returned))); ?> <?php echo $form->error($model, 'returned'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'session_id'); ?> <?php // NOTE: DO NOT LET THEM CHANGE THE SESSION!!! ZHtml::multiEndedDropDown($model, $form, 'session_id', "CHtml::listData(ClassSession::model()->findAll(), \n 'id', 'summary')", 'CHtml::encode($model->session->summary)'); ?> <?php echo $form->error($model, 'session_id'); ?> </div> <div class="row buttons"> <?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); if ($model->isNewRecord) { echo " (You will assign the check to a class and student after creating the check first)"; } ?> </div>
<?php echo $form->textField($model, 'description', array('rows' => 6, 'cols' => 50, 'class' => 'form-control', 'placeholder' => '對於這群組的說明')); ?> <?php echo $form->error($model, 'description'); ?> </div> </div> <div class="row"> <div class="form-group"> <?php echo $form->labelEx($model, 'type'); ?> <?php echo ZHtml::enumDropDownList($model, 'type', array('class' => 'form-control', 'placeholder' => '對於這群組的說明')); ?> <?php echo $form->error($model, 'type'); ?> </div> </div> <div class="row buttons"> <?php echo CHtml::submitButton($model->isNewRecord ? '新增' : 'Save', array("class" => "btn btn-primary btn-large")); ?> </div> <?php $this->endWidget();
<?php $form = $this->beginWidget('CActiveForm', array('id' => 'requirement-status-form', 'enableAjaxValidation' => false)); ?> <p class="note">Fields with <span class="required">*</span> are required.</p> <?php echo $form->errorSummary($model); ?> <div class="row"> <?php echo $form->labelEx($model, 'instructor_id'); ?> <?php ZHtml::multiEndedDropDown($model, $form, 'instructor_id', "CHtml::listData(Instructor::model()->findAll(), 'id', 'full_name')", 'CHtml::encode($model->instructor->full_name)'); ?> <?php echo $form->error($model, 'instructor_id'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'requirement_type_id'); ?> <?php echo $form->dropDownList($model, 'requirement_type_id', CHtml::listData(RequirementType::model()->findAll(), 'id', 'description'));
echo $form->labelEx($model, 'scholarship'); ?> <?php echo $form->checkbox($model, 'scholarship'); ?> <?php echo $form->error($model, 'scholarship'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'status'); ?> <?php echo ZHtml::enumDropDownList($model, 'status'); ?> <?php echo $form->error($model, 'status'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'note'); ?> <?php echo $form->textField($model, 'note', array('size' => 60, 'maxlength' => 256)); ?> <?php echo $form->error($model, 'note');
$form = $this->beginWidget('bootstrap.widgets.BootActiveForm', array('id' => 'activity-form', 'enableAjaxValidation' => false, 'type' => 'horizontal')); ?> <?php echo $form->errorSummary($model); ?> <?php echo $form->dropDownListRow($model, 'goalId', CHtml::listData($goals, 'id', 'description'), array('prompt' => 'Select a Goal')); ?> <?php echo $form->textFieldRow($model, 'description', array('maxlength' => 256)); ?> <?php echo $form->textFieldRow($model, 'day', array()); ?> <?php echo $form->dropDownListRow($model, 'status', ZHtml::enumItem($model, 'status')); ?> <div class="form-actions"> <?php $this->widget('bootstrap.widgets.BootButton', array('buttonType' => 'submit', 'type' => 'primary', 'label' => $model->isNewRecord ? 'Create' : 'Save')); ?> </div> <?php $this->endWidget();
<?php $this->widget('zii.widgets.grid.CGridView', array('id' => 'income-grid', 'dataProvider' => new KArrayDataProvider($model->incomes), 'selectionChanged' => ZHtml::clickableRow('CheckIncome/view', 'join'), 'columns' => array('class.summary:text:Class', 'amount:currency:Split Check Amount Assigned', 'check.check_num:text:Check #', 'check.payer:text:Payer', 'check.amount:currency:Total Check Amount', 'check.check_date:date:Check Date', 'check.delivered:date:Delivered to Company', 'check.deposit.deposited_date:date:Deposited', 'check.returned:date:Returned to Payer', array('class' => 'CompositeButtonColumn', 'modelClassName' => 'Income', 'template' => '{update}{delete}', 'returnTo' => Yii::app()->request->requestUri))));
public static function getPlaceOfDelivery() { $placeOfDelivery = ZHtml::enumItem(ChildHealth::model(), 'place_of_delivery'); $placeOfDelivery[''] = ''; asort($placeOfDelivery); return $placeOfDelivery; }
<?php $this->widget('zii.widgets.grid.CGridView', array('id' => 'instructor-grid', 'ajaxUpdate' => false, 'dataProvider' => new KArrayDataProvider($model->instructors), 'selectionChanged' => ZHtml::clickableRow('Instructor/view'), 'columns' => array('full_name:text:Instructor', array('class' => 'CompositeButtonColumn', 'modelClassName' => 'Instructor', 'template' => '{view}{delete}', 'returnTo' => Yii::app()->request->requestUri)))); ?> <?php echo CHTML::link(CHtml::encode("Add New Instructor"), array("Instructor/create", 'company_id' => $model->id, 'returnTo' => Yii::app()->request->requestUri));
<?php $this->breadcrumbs = array('Check Expenses' => array('index'), 'Manage'); $this->menu = array(array('label' => 'Create Check Payables', 'url' => array('create'))); Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$.fn.yiiGridView.update('check-expense-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n"); ?> <h1>Checks (Payables) for <?php echo CHtml::encode($this->savedSessionSummary()); ?> </h1> <p> You may optionally enter a comparison operator (<b><</b>, <b><=</b>, <b>></b>, <b>>=</b>, <b><></b> or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done. </p> <?php echo CHtml::link('Advanced Search', '#', array('class' => 'search-button')); ?> <div class="search-form" style="display:none"> <?php $this->renderPartial('_search', array('model' => $model)); ?> </div><!-- search-form --> <?php $this->widget('zii.widgets.grid.CGridView', array('id' => 'check-expense-grid', 'dataProvider' => $model->search(), 'selectionChanged' => ZHtml::clickableRow('CheckExpense/update'), 'filter' => $model, 'columns' => array('check_num:ntext', 'amount:currency', 'check_date:date', 'payee.full_name:text:Payee', 'delivered:date', 'payer:ntext', array('class' => 'CButtonColumn', 'template' => '{update}{delete}'))));
public function actionUpdate() { $data = $_POST; //will be empty if CSRF authentication fails if (!empty($data)) { $data['name'] = trim($data['name']); $data['server_type'] = trim($data['server_type']); $data['hostname'] = trim($data['hostname']); $data['public_ip'] = trim($data['public_ip']); $data['private_ip'] = trim($data['private_ip']); $data['network'] = trim($data['network']); $data['location'] = trim($data['location']); $data['description'] = trim($data['description']); $data['production_date'] = trim($data['production_date']); $data['termination_date'] = trim($data['termination_date']); // making it null instead of an empty string will evade integrity constraint errors if (strlen($data['public_ip']) == 0) { $data['public_ip'] = null; } if (strlen($data['private_ip']) == 0) { $data['private_ip'] = null; } //FORM VALIDATION HERE $errors = array(); $duplicate = NULL; //name is required if (strlen($data['name']) == 0) { array_push($errors, 'NAME_ERROR: Name is required'); } //network is required if (strlen($data['network']) == 0) { array_push($errors, 'NETWORK_ERROR: Network is required'); } $server_types = ZHtml::enumItem(Servers::model(), 'server_type'); //server type is required if (strlen($data['server_type']) == 0) { array_push($errors, 'TYPE_ERROR: Type is required'); //server type should be valid } else { if (!in_array($data['server_type'], $server_types)) { array_push($errors, 'TYPE_ERROR: Type is invalid'); } } //public IP must be unique if (strlen($data['public_ip']) != 0) { $duplicate = Servers::model()->find('public_ip=:public_ip', array(':public_ip' => $data['public_ip'])); if ($duplicate != NULL && $duplicate->server_id != $data['server_id']) { array_push($errors, 'PUBLIC_ERROR: Public IP is already assigned'); } } //private IP + network must be unique if (strlen($data['private_ip']) != 0 && strlen($data['network']) != 0) { $duplicate = Servers::model()->find('private_ip=:private_ip AND network=:network', array(':private_ip' => $data['private_ip'], ':network' => $data['network'])); if ($duplicate != NULL && $duplicate->server_id != $data['server_id']) { array_push($errors, 'PRIVATE_ERROR: Private IP is already assigned'); } } //data is good if (count($errors) == 0) { $updates = array('name' => $data['name'], 'server_type' => $data['server_type'], 'hostname' => $data['hostname'], 'public_ip' => $data['public_ip'], 'private_ip' => $data['private_ip'], 'network' => $data['network'], 'location' => $data['location'], 'description' => $data['description'], 'production_date' => $data['production_date'], 'termination_date' => $data['termination_date'], 'date_updated' => date("Y-m-d H:i:s"), 'updated_by' => Yii::app()->user->name); Servers::model()->updateByPk((int) $data['server_id'], $updates); $updates['name'] = str_replace('<', '<', $updates['name']); $updates['hostname'] = str_replace('<', '<', $updates['hostname']); $updates['public_ip'] = str_replace('<', '<', $updates['public_ip']); $updates['private_ip'] = str_replace('<', '<', $updates['private_ip']); $updates['network'] = str_replace('<', '<', $updates['network']); $updates['location'] = str_replace('<', '<', $updates['location']); $updates['description'] = str_replace('<', '<', $updates['description']); echo CJSON::encode(array('type' => 'success', 'data' => $updates)); } else { echo CJSON::encode(array('type' => 'error', 'data' => implode(',', $errors), 'duplicate' => $duplicate)); } } else { echo CJSON::encode(array('type' => 'error', 'data' => 'CSRF_ERROR: CSRF Token did not match')); } }
</div><!-- End Field --> <div class="field field-input-name"> <div class="field-secondary"><span class="label">Type*</span></div> <div id="app-main-create-modal-container" class="field-primary"> <div class="pseudo-field"> <input id="app-main-create-type" type="text" class="text"/> <span id="app-main-create-type-error" class="field-input-name-error error-message" style="display: none;"></span> </div> </div><!-- End Field Primary --> </div><!-- End Field --> <div class="field field-input-name"> <div class="field-secondary"><span class="label">Accessibility*</span></div> <div class="field-primary"> <div class="pseudo-field"> <?php echo ZHtml::enumDropDownList(Applications::model(), 'accessibility', array('id' => 'app-main-create-accessibility', 'class' => 'select')); ?> <span id="app-main-create-accessibility-error" class="field-input-name-error error-message" style="display: none;"></span> </div> </div><!-- End Field Primary --> </div><!-- End Field --> <div class="field field-input-name"> <div class="field-secondary"><span class="label">Repository</span></div> <div class="field-primary"> <div class="pseudo-field"> <input id="app-main-create-repository" type="text" class="text"></input> </div> </div><!-- End Field Primary --> </div><!-- End Field --> <div class="field field-input-name"> <div class="field-secondary"><span class="label">Uses Mobile Patterns</span></div>
<?php $server_types = ZHtml::enumItem(Servers::model(), 'server_type'); $select_types = array('' => '--Select Server Type--') + $server_types; ?> <div id="app-main-list" class="table-main" style="display:none";> <fieldset> <input type="hidden" id="app-main-list-csrf" value="<?php echo Yii::app()->request->csrfToken; ?> " /> <div class="table-header-block"> <div class="header-block-button"> <a id="app-main-list-create-button" class="button round blue image-right ic-add text-upper" href="#">Create Application</a> </div><!-- End Header Block Button --> <div class="header-block-side"> <div class="page-nav"> <div class="page-count"> <span class="current-page" id="app-main-list-part"></span> <span class="all-page" id="app-main-list-total"></span> </div> <div class="page-nav-arrow"> <a id="app-main-list-prev" class="prev" href="#" title="Previous"><span class="icon"></span></a> <a id="app-main-list-next" class="next" href="#" title="Next"><span class="icon"></span></a> </div> </div> </div><!-- End Header Block Side --> </div><!-- End Table Header Block -->
<?php echo CHtml::link("Auto-Populate Cash for " . $model->summary, array("populateCash", 'id' => $model->id, 'returnTo' => Yii::app()->request->requestUri)); $this->widget('zii.widgets.grid.CGridView', array('id' => 'cash-grid', 'dataProvider' => new KArrayDataProvider($model->cash), 'selectionChanged' => ZHtml::clickableRow('CheckIncome/view', 'join'), 'columns' => array('check_num:ntext:Cash?', 'amount:currency:Cash Amount', 'payer:ntext:Payer', 'check_date:date:Cash Date', 'unassigned:currency:Un-Assigned', array('class' => 'CButtonColumn', 'template' => '{my_button}', 'buttons' => array('my_button' => array('label' => 'Un-Deposit', 'url' => 'Yii::app()->controller->createUrl("/CheckIncome/undeposit", array("id" => $data->id))', 'imageUrl' => Yii::app()->request->baseUrl . '/images/delete.png', 'options' => array('ajax' => array('type' => 'GET', 'url' => "js:\$(this).attr('href')", 'success' => 'js:function(data){ $.fn.yiiGridView.update("cash-grid");}')))))))); ?> <div class="span-8"> <?php $this->renderPartial("_cash_summary", array('model' => $model)); ?> </div> <div class="span-8 last"> <?php $this->renderPartial("_coin_summary", array('model' => $model)); ?> </div> <div class="clear"> </div> <?php $this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array('subtotal_cash_payments:currency:Cash Total from Payments', 'subtotal_reconciliation:currency:Cash from Reconciliation', 'discrepancy:currency:Discrepancy'))); echo '<div><br /></div>'; echo CHTML::link("Un-Deposit all Cash from " . $model->summary, '#', array('submit' => array('unassignAll', 'id' => $model->id, 'type' => 'cash', 'returnTo' => Yii::app()->request->requestUri), 'confirm' => 'Really remove all cash from deposit?'));
<?php // Items for dropdownlists $status = ZHtml::enumItem(Projects::model(), 'status'); // Add default blank value for search fields. $search_status = array('' => '') + $status; ?> <div id="projects-list" class="table-main" style="display:none"> <?php echo CHtml::form('', 'post', array('id' => 'export-form', 'enctype' => 'multipart/form-data')); ?> <fieldset> <input type="hidden" id="projects-list-csrf" value="<?php echo Yii::app()->request->csrfToken; ?> " /> <div class="table-header-block"> <div class="header-block-button"> <a id="projects-list-create-button" class="button round blue image-right ic-add text-upper" href="#">Create Project</a> </div><!-- End Header Block Button --> <div class="header-block-side"> <div class="page-nav"> <div class="page-count"> <span class="current-page" id="projects-list-part"></span> <span class="all-page" id="projects-list-total"></span> </div> <div class="page-nav-arrow"> <a id="projects-list-prev" class="prev" href="#" title="Previous"><span class="icon"></span></a> <a id="projects-list-next" class="next" href="#" title="Next"><span class="icon"></span></a>
echo $form->textField($model, 'note', array('size' => 60, 'maxlength' => 256)); ?> <?php echo $form->error($model, 'note'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'class_id'); ?> <?php ZHtml::multiEndedDropDown($model, $form, 'class_id', "CHtml::listData(ClassInfo::model()->findAll(), \n 'id', 'summary')", 'CHtml::encode($model->class->summary)'); ?> <?php echo $form->error($model, 'class_id'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'makeup'); ?> <?php echo $form->checkbox($model, 'makeup');
<?php echo $form->textField($model, 'contact_no', array('size' => 15, 'maxlength' => 15, 'class' => 'form-control')); ?> <?php echo $form->error($model, 'contact_no', array('class' => 'text-danger')); ?> </div> </div> <div class="form-group"> <?php echo $form->labelEx($model, 'gender', array('class' => 'control-label col-sm-3')); ?> <div class="col-sm-9"> <?php echo $form->dropDownList($model, 'gender', ZHtml::enumItem($model, 'gender'), array('class' => 'form-control')); ?> <?php echo $form->error($model, 'gender', array('class' => 'text-danger')); ?> </div> </div> <div class="form-group"> <?php echo $form->labelEx($model, 'height', array('class' => 'control-label col-sm-3')); ?> <div class="col-sm-9"> <?php echo $form->textField($model, 'height', array('class' => 'form-control')); ?>
public static function getReasonsForExamination() { $reasons = ZHtml::enumItem(NtpLaboratoryRequest::model(), 'reason_for_examination'); $reasons[''] = ''; asort($reasons); return $reasons; }
public static function getGenders() { $genders = ZHtml::enumItem(Patient::model(), 'gender'); $genders[''] = ''; asort($genders); return $genders; }
public static function getPositions() { $positions = ZHtml::enumItem(User::model(), 'position'); $positions[''] = ''; asort($positions); return $positions; }
<?php echo $form->textField($model, 'birth_order', array('size' => 60, 'maxlength' => 255, 'class' => 'form-control')); ?> <?php echo $form->error($model, 'birth_order', array('class' => 'text-danger')); ?> </div> </div> <div class="form-group"> <?php echo $form->labelEx($model, 'place_of_delivery', array('class' => 'control-label col-sm-4')); ?> <div class="col-sm-8 radio"> <?php echo $form->radioButtonList($model, 'place_of_delivery', ZHtml::enumItem($model, 'place_of_delivery'), array('size' => 60, 'maxlength' => 255)); ?> <?php echo $form->error($model, 'place_of_delivery', array('class' => 'text-danger')); ?> </div> </div> <div class="form-group"> <?php echo $form->labelEx($model, 'mothers_name', array('class' => 'control-label col-sm-4')); ?> <div class="col-sm-8"> <?php echo $form->textField($model, 'mothers_name', array('size' => 60, 'maxlength' => 255, 'class' => 'form-control')); ?>
if (count($daysoff) > 0) { echo CHtml::encode('--'); echo 'No classes on ' . implode(', ', array_map(function ($i) { return ZHtml::shortDate($i->school_day); }, $daysoff)); } ?> </span> <br /> <span class="span-12"> </span> <span class="span-6 last"> <?php // the notes $notes = $model->noted_meetings; if (count($notes) > 0) { echo CHtml::encode('--'); foreach ($notes as $m) { echo CHtml::encode('*' . $m->note) . " on " . CHtml::encode(ZHtml::shortDate($m->meeting_date)) . '<br />'; } } if ($model->makeup_day_count > 0) { echo CHtml::encode('--'); foreach ($model->makeup_days as $m) { echo CHtml::encode('+Make-up day ') . CHtml::encode(ZHtml::shortDate($m->meeting_date)) . '<br />'; } } ?> </span>
echo $form->errorSummary($model); ?> <?php echo $form->textFieldRow($model, 'email', array('maxlength' => 128)); ?> <?php echo $form->textFieldRow($model, 'firstname', array('maxlength' => 128)); ?> <?php echo $form->textFieldRow($model, 'lastname', array('maxlength' => 128)); ?> <?php echo $form->dropDownListRow($model, 'gender', ZHtml::enumItem($model, 'gender')); ?> <?php echo $form->passwordFieldRow($model, 'password', array('maxlength' => 128)); ?> <div class="form-actions"> <?php $this->widget('bootstrap.widgets.BootButton', array('buttonType' => 'submit', 'type' => 'primary', 'label' => $model->isNewRecord ? 'Create' : 'Save')); ?> </div> <?php $this->endWidget();
</label> <?php echo ZHtml::enumDropDownList($model, "content_type", array("class" => "form-control", "empty" => "--เลือกประเภทเนื้อหา--")); ?> </div> <div class="form-group"> <label> <?php echo $form->labelEx($model, "state"); ?> </label> <?php echo ZHtml::enumDropDownList($model, "state", array("class" => "form-control", "empty" => "--เลือกสถานะ--")); ?> </div> <div clas="form-group"> <label> <?php echo $form->labelEx($model, "image"); ?> </label> <?php echo CHtml::activeFileField($model, 'image'); ?> </div>
public static function getTypeOfAcceptor() { $types = ZHtml::enumItem(FamilyPlanningService::model(), 'type_of_acceptor'); $types[''] = ''; asort($types); return $types; }
<h1>Scholarship Report for <?php echo CHtml::encode(ClassSession::current()->summary); ?> </h1> <h2>CONFIDENTIAL</h2> <?php $dp = new KArrayDataProvider($model, array('pagination' => false)); $this->widget('zii.widgets.grid.CGridView', array('id' => 'signup-grid', 'dataProvider' => $dp, 'rowCssClassExpression' => 'ZHtml::rowHack($this, $data, $row)', 'selectionChanged' => ZHtml::compositeClickableRow('Signup/update', array('student_id', 'class_id'), Yii::app()->request->requestUri), 'columns' => array('student.full_name:text:Name', 'class.summary:text:Class', array('name' => 'Cost', 'value' => 'isset($data->class) ? $data->class->costSummary : 0', 'type' => 'currency', 'htmlOptions' => array('style' => 'text-align: right'), 'footerHtmlOptions' => array('style' => 'text-align: right'), 'footer' => 'TOTAL: ' . Yii::app()->format->currency(array_reduce($dp->data, function ($i, $j) { $i += isset($j->class) ? $j->class->costSummary : 0; return $i; }))), 'note:ntext:Note', array('class' => 'CompositeButtonColumn', 'modelClassName' => 'Signup', 'template' => '{update}', 'returnTo' => Yii::app()->request->requestUri)))); ?>