public function loadModel($id)
 {
     $model = MastersDepartments::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
示例#2
0
						<?php 
echo CHtml::activeDropDownList($salary, 'city_area_id', CHtml::listData(PayrollCities::model()->findAll(), 'id', 'name'), array('data-placeholder' => at('Please select one...'), 'prompt' => '', 'data-live-search' => 'true', 'class' => 'validate[required] form-control select', 'id' => 'field_city_area_id'));
?>
						<?php 
echo CHtml::error($salary, 'city_area_id');
?>
					</div>
				</div>
				
				<div class="form-group">
					<?php 
echo CHtml::activeLabelEx($salary, 'department_id', array('class' => $label_class));
?>
					<div class="col-md-6 col-xs-12">
						<?php 
echo CHtml::activeDropDownList($salary, 'department_id', CHtml::listData(MastersDepartments::model()->byOrder()->findAll(), 'id', 'name'), array('data-placeholder' => at('Please select one...'), 'prompt' => '', 'data-live-search' => 'true', 'class' => 'validate[required] form-control select', 'id' => 'field_department_id', 'ajax' => array('type' => 'GET', 'url' => array('departments/actionDynamicSections'), 'data' => array('id' => 'js:this.value'), 'success' => 'function(data){
																updateDropdown(this, $("#MastersEmployees_section_id"), data);
															}')));
?>
						<?php 
echo CHtml::error($salary, 'department_id');
?>
					</div>
				</div>

				<div class="form-group">
					<?php 
echo CHtml::activeLabelEx($salary, 'section_id', array('class' => $label_class));
?>
					<div class="col-md-6 col-xs-12">
						<?php 
示例#3
0
?>
							</div>
						</div>
						<?php 
echo CHtml::error($model, 'start_date');
?>
					</div>
				</div>
				
				<div class="form-group">
					<?php 
echo CHtml::activeLabelEx($model, 'department_id', array('class' => $label_class));
?>
					<div class="col-md-6">
						<?php 
echo CHtml::activeDropDownList($model, 'department_id', CHtml::listData(MastersDepartments::model()->byOrder()->findAll(), 'id', 'name'), array('data-placeholder' => at('Please select one...'), 'prompt' => '', 'data-live-search' => 'true', 'class' => 'validate[required] form-control select'));
?>
						<?php 
echo CHtml::error($model, 'department_id');
?>
					</div>
				</div>
				
				<div class="form-group">
					<?php 
echo CHtml::activeLabelEx($model, 'employee_id', array('class' => $label_class));
?>
					<div class="col-md-6 col-xs-12">                                                                                                                                           
						<div class="input-group">
							<?php 
echo CHtml::textField('employee_name', $model->viewChooseEmployee(), array('readonly' => true, 'class' => 'validate[required] form-control disabled'));
示例#4
0
"><?php 
    echo at('Generate Recap');
    ?>
</button>
			<button class="btn btn-info" id="view_<?php 
    echo $deparment->id;
    ?>
"><?php 
    echo at('View Recap');
    ?>
</button>
		</td>
	</tr>
	
	<?php 
    $deparment_childs = MastersDepartments::model()->findAll(array('condition' => 'parent_id = :parent_id', 'params' => array(':parent_id' => $deparment->id)));
    ?>
	<?php 
    foreach ($deparment_childs as $child) {
        ?>
		<tr role="row" class="<?php 
        echo $i % 1 == 1 ? 'odd' : 'even';
        ?>
">
			<td><?php 
        echo $i;
        ?>
</td>
			<td> &nbsp; <i class="fa fa-ellipsis-h"></i> &nbsp; &nbsp; <?php 
        echo $child->name;
        ?>