Example #1
0
	<b><?php 
echo CHtml::encode($data->getAttributeLabel('schemeid'));
?>
:</b>
	<?php 
echo CHtml::encode(Schemes::model()->findByPk($data->schemeid)->name);
?>
	<br />

	
	<b><?php 
echo CHtml::encode($data->getAttributeLabel('from'));
?>
:</b>
	<?php 
echo CHtml::encode(Designation::model()->findByPk($data->from)->name);
?>
	<br />

	<b><?php 
echo CHtml::encode($data->getAttributeLabel('to'));
?>
:</b>
	<?php 
echo CHtml::encode($data->to);
?>
	<br />

		<b><?php 
echo CHtml::encode($data->getAttributeLabel('description'));
?>
Example #2
0
<?php 
$form = $this->beginWidget('CActiveForm', array('id' => 'instructions-form', 'enableAjaxValidation' => false));
?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php 
echo $form->errorSummary($model);
?>

	<?php 
foreach (Designation_types::model()->findAll() as $model1) {
    $listData[$model1->id] = $model1->name;
}
$from = Designation::model()->findByAttributes(array('user' => Yii::app()->user->id))->id;
?>
	<table>
	<tr>
	<td>
		
		<div class="row">
		<?php 
echo $form->labelEx($model, 'to');
?>
		<?php 
echo CHtml::dropDownList("designation_type", '', $listData, array('ajax' => array('type' => 'POST', 'url' => CController::createUrl('issues/getLevelDetails'), 'update' => '#Instructions_to')));
?>
		<?php 
echo $form->dropDownList($model, 'to', array());
?>
Example #3
0
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer the ID of the model to be loaded
  */
 public function loadModel($id)
 {
     $model = Designation::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Example #4
0
File: view.php Project: ranvirp/rdp
<?php 
$this->breadcrumbs = array('Issues' => array('index'), $model->id);
$this->menu = array(array('label' => 'List Issues ', 'url' => array('index')), array('label' => 'Create Issue', 'url' => array('create')), array('label' => 'Update Issue', 'url' => array('update', 'id' => $model->id)), array('label' => 'Delete Issue', 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => 'Do you want to delete this entry?')), array('label' => 'Issue Management', 'url' => array('admin')));
?>

<h1>Issue # <?php 
echo $model->id;
?>
</h1>

<?php 
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array('id', array('label' => 'Scheme', 'type' => 'html', 'value' => $model->scheme->name), array('label' => 'From:', 'value' => $model->froms->designation_type->name . "," . Designation::model()->getLevelObj($model->froms->designation_type->level, $model->froms->level_id)), array('label' => 'Referenced to:', 'value' => $model->tos->designation_type->name . "," . Designation::model()->getLevelObj($model->tos->designation_type->level, $model->tos->level_id)), array('name' => 'description', 'label' => 'Details '), array('label' => 'Attachments :', 'type' => 'html', 'value' => Files::model()->showAttachments($model)))));
echo $this->renderPartial('_replies', array('replies' => $model->replies), true);
echo CHtml::ajaxButton('Mark replies', Ccontroller::createUrl('/replies/create', array('content_type' => 'issues', 'content_type_id' => $model->id)), array('dataType' => 'json', 'success' => "function(data){\n\t\$('#commentdiv').html(data.html);\n\t}"));
?>
<div id="commentdiv"></div>
Example #5
0
?>
	</div>

	
	<div class="row">
	<?php 
echo $form->hiddenField($model, 'from', array('value' => Yii::app()->user->id));
?>
		</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'to');
?>
		<?php 
echo $form->dropDownList($model, 'to', CHtml::listData(Designation::model()->findAll(), 'id', 'name'), array('empty' => 'Select to whom to be sent'));
?>
	<?php 
echo $form->error($model, 'to');
?>
	</div>
<div class="row">
<?php 
echo "Subject:";
echo $form->dropDownList($model, 'tagid', CHtml::listData(Tags::model()->findAllByAttributes(array('schemeid' => 1)), 'id', 'tag'), array('0' => 'Others'));
?>
	<?php 
echo $form->error($model, 'tagid');
?>
	
Example #6
0
 public function actionGetLevelDetails()
 {
     $designation_type_id = $_POST['designation_type'];
     //echo $designation_type_id;
     //exit;
     $designations = Designation::model()->findAllByAttributes(array('designation_type_id' => $designation_type_id));
     $designation_type = new Designation_types($designation_type_id);
     $level = $designation_type->level;
     foreach ($designations as $designation) {
         $name = $level::model()->findByPk($designation->level_id)->name;
         echo CHtml::tag('option', array('value' => $designation->id), CHtml::encode($name), true);
     }
     /*
         foreach($data as $value=>$name)
         {
             echo CHtml::tag('option',
                        array('value'=>$value),CHtml::encode($name),true);
         }
     */
 }
Example #7
0
	</div>
<div class="row">
	<?php 
echo CHtml::hiddenField('attachments', "");
?>
		</div>
		<div class="row">
		<?php 
echo CHtml::label('Assigned to:', false);
?>
		
	
		
		
		<?php 
foreach (Designation::model()->findAll() as $designation) {
    $designation_name = $designation->designation_type->name;
    $designation_level = $designation->designation_type->level;
    $designation_level_name = $designation_level::model()->findByPk($designation->level_id)->name;
    $data[$designation->id] = $designation_name . "," . $designation_level_name;
}
echo CHtml::dropDownList('assigned[]', array(), $data, array('multiple' => 'multiple', 'key' => 'trainings', 'class' => 'multiselect'));
?>
		</div>

	<div class="row buttons">
		<?php 
echo CHtml::ajaxSubmitButton("Save", "", array('dataType' => 'json', 'success' => "function(data)\n                {\n\t\t\t\tif (!data.redirect){\n                    // Update the status\n                    \$('.form').html(data.html);\n\t\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\talert(data.redirect);\n\t\t\t\t   window.location.replace(data.redirect);\n\t\t\t\t   }\n                    \n \n                } "), array("style" => "visibility:hidden", "id" => "st1"));
?>
	</div>
Example #8
0
File: view.php Project: ranvirp/rdp
<?php 
$this->breadcrumbs = array('Issues' => array('index'), $model->id);
$this->menu = array(array('label' => 'समस्या सूची ', 'url' => array('index')), array('label' => 'समस्या दर्ज करें', 'url' => array('create')), array('label' => 'समस्या अद्यतन करें ', 'url' => array('update', 'id' => $model->id)), array('label' => 'समस्या मिटा दें', 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => 'क्या आप इस प्रविष्टि को मिटाना चाहते हैं ??')), array('label' => 'समस्या प्रबंधन', 'url' => array('admin')));
?>

<h1>समस्या # <?php 
echo $model->id;
?>
</h1>

<?php 
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array('id', array('label' => 'योजना', 'type' => 'html', 'value' => $model->scheme->name), array('label' => 'प्रेषक:', 'value' => $model->froms->designation_type->name . "," . Designation::model()->getLevelObj($model->froms->designation_type->level, $model->froms->level_id)), array('label' => 'किसको संदर्भित है', 'value' => $model->tos->designation_type->name . "," . Designation::model()->getLevelObj($model->tos->designation_type->level, $model->tos->level_id)), array('name' => 'description', 'label' => 'विवरण '), array('label' => 'संग्लग्नक :', 'type' => 'html', 'value' => Files::model()->showAttachments($model)))));
echo $this->renderPartial('_replies', array('replies' => $model->replies), true);
echo CHtml::ajaxButton('उत्तर दर्ज करें', Ccontroller::createUrl('/replies/create', array('content_type' => 'issues', 'content_type_id' => $model->id)), array('dataType' => 'json', 'success' => "function(data){\n\t\$('#commentdiv').html(data.html);\n\t}"));
?>
<div id="commentdiv"></div>