/** * Displays a particular model. * @param integer $id the ID of the model to be displayed */ public function actionView($id) { /*Retrieve ticket Details */ $ticket = Ticket::model()->findByPk($id); /*Retrieve the names for each ticket */ $userCreator = User::model()->findBySql("SELECT * from user WHERE id=:id", array(":id" => $ticket->creator_user_id)); $userAssign = User::model()->findBySql("SELECT * from user WHERE id=:id", array(":id" => $ticket->assign_user_id)); $domainName = Domain::model()->findBySql("SELECT * from domain WHERE id=:id", array(":id" => $ticket->domain_id)); $priority = Priority::model()->findBySql("SELECT * from priority WHERE id=:id", array(":id" => $ticket->priority_id)); $tier = UserDomain::model()->findBySql("SELECT * from user_domain WHERE user_id =:id and domain_id =:id2", array(":id" => $ticket->assign_user_id, ":id2" => $ticket->domain_id)); $subdomainName = null; if ($ticket->subdomain_id != null) { $subdomainName = Subdomain::model()->findBySql("SELECT * from subdomain WHERE id=:id", array(":id" => $ticket->subdomain_id)); $tier = UserDomain::model()->findBySql("SELECT * from user_domain WHERE user_id =:id and domain_id =:id2 and subdomain_id =:id3", array(":id" => $ticket->assign_user_id, ":id2" => $ticket->domain_id, ":id3" => $ticket->subdomain_id)); } $this->render('view', array('model' => $this->loadModel($id), 'userCreator' => $userCreator, 'userAssign' => $userAssign, 'domainName' => $domainName, 'subdomainName' => $subdomainName, 'priority' => $priority, 'tier' => $tier)); if (!Yii::app()->request->isPostRequest && !Yii::app()->request->isAjaxRequest) { $curentUserID = User::getCurrentUserId(); if ($ticket->creator_user_id == $curentUserID) { TicketEvents::recordEvent(EventType::Event_Opened_By_Owner, $ticket->id, NULL, NULL, NULL); } else { TicketEvents::recordEvent(EventType::Event_Opened_By_Mentor, $ticket->id, NULL, NULL, NULL); } } }
public function actionAdd() { global $arr_response; $model = new Subject(); $model->scenario = 'add'; $_REQUEST['content_type_id'] = ContentType::model()->find('name=:name', array(':name' => $_REQUEST['content_type']))->id; $_REQUEST['country_id'] = Country::model()->find('code=:code', array(':code' => $_REQUEST['country_code']))->id; $_REQUEST['priority_id'] = Priority::model()->find('name=:name', array(':name' => $_REQUEST['priority']))->id; if ($_REQUEST['time']) { if (date("l", $_REQUEST['time'])) { //if its a valid timestamp $_REQUEST['user_position_ymd'] = date("Y", $_REQUEST['time']) . "/" . date("m", $_REQUEST['time']) . "/" . date("d", $_REQUEST['time']); $_REQUEST['user_position_hour'] = date("H", $_REQUEST['time']); $_REQUEST['user_position_minute'] = date("i", $_REQUEST['time']); } } else { $_REQUEST['user_position_anydatetime'] = 1; } $model->attributes = $_REQUEST; //NOTICE that we are creating a new record, so model its not loaded, ($model->content_type its juest the received $_REQUEST parameter) //print_r($model); //$model->content_type_id = $content_type->id; if ($model->save()) { $arr_response['response_message'] = Yii::t('subject', 'Subject successfully saved.'); } else { $arr_response['response_code'] = 409; $arr_response['response_message'] = Yii::t('subject', 'Subject could not be saved.'); $arr_response['response_details'] = $model->getErrors(); } }
/** * 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 $id the ID of the model to be loaded * @return Priority the loaded model * @throws CHttpException */ public function loadModel($id) { $model = Priority::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }
?> %</option> <?php $a = $a + 10; } ?> </select> </div> </div> </td> <td > <select class="combo-p" style="display:inline"> <?php $priority = Project::model()->findByPk($de[id])->priority; foreach (Priority::model()->findAll() as $d) { ?> <option <?php if ($priority == $d[id]) { echo "selected"; } ?> value="<?php echo $d[id]; ?> "><?php echo $d[name]; ?> </option> <?php }
/** * Function to return a list of the fields that we are expecting an assignment form to contain for this queue. * * @return array(array('id' => string, 'required' => boolean, 'choices' => array(), 'label' => string, 'type' => string)) */ public function getFormFields() { $flds = array(); // priority and notes are reserved fields and so get additional _ prefix for the field name if ($this->is_initial) { $flds[] = array('id' => '_priority', 'form_name' => self::$FIELD_PREFIX . '_priority', 'required' => $this->getQueueSet()->allow_null_priority ? false : true, 'choices' => \CHtml::listData(Priority::model()->findAll(), 'id', 'name'), 'label' => 'Priority'); } $flds[] = array('id' => '_notes', 'form_name' => self::$FIELD_PREFIX . '_notes', 'required' => false, 'type' => 'textarea', 'label' => 'Notes'); return array_merge($flds, $this->getAssignmentFieldDefinitions()); }
} ///function bind_click_positions(){ $(".set_position").live('click', function(){ var id = $(this).html(); $.fn.yiiGridView.update("subject-grid", {url:"",data:{"id":id, "day":$("#Subject_Position_day_"+id).val() ,"hour":$("#Subject_Position_hour_"+id).val(), "minute":$("#Subject_Position_minute_"+id).val() } }); }); //} //Auto update the grid timeboard every subject change interval function refresh_timeboard() { $.fn.yiiGridView.update("subject-grid", {url:""}); //self.setInterval("refresh_timeboard()",<?php echo Yii::app()->params['subject_interval'] * 60; ?> 000); } </script> <p>Legend: <span class="row_red">RED</span> => Live NOW</p> <?php $dataProvider = $model->search('t.position ASC'); $dataProvider->pagination->pageSize = 30; $this->widget('zii.widgets.grid.CGridView', array('id' => 'subject-grid', 'dataProvider' => $dataProvider, 'filter' => $model, 'rowCssClass' => 'something', 'columns' => array(array('name' => 'id', 'id' => $live_subject["subject_id"] . '_' . $live_subject["subject_id_2"], 'type' => 'html', 'value' => '"<div class=\\"set_position\\" onClick=\\"\\">".$data->id."</div>"', 'headerHtmlOptions' => array('width' => '25px'), 'cssClassExpression' => '($data->id == substr($this->id, 0, strpos($this->id, "_"))) ? row_red : something', 'sortable' => true), array('name' => 'position', 'header' => 'Position Da/Ho/Mi', 'filter' => '', 'type' => 'raw', 'value' => 'CHtml::DropDownList("Subject_Position_day_".$data->id, date("j",$data->position), SiteLibrary::get_time_intervals("day")) . CHtml::DropDownList("Subject_Position_hour_".$data->id, date("G",$data->position), SiteLibrary::get_time_intervals("hour")). CHtml::DropDownList("Subject_Position_minute_".$data->id, date("i",$data->position), SiteLibrary::get_time_intervals("minute"))', 'headerHtmlOptions' => array('width' => '175px'), 'sortable' => true), array('name' => 'user_position', 'header' => 'User Position', 'type' => 'raw', 'value' => '($data->user_position) ? date("d",$data->user_position) . " " . date("H",$data->user_position) ." ". date("i",$data->user_position) : "-- -- --"'), array('name' => 'manager_position', 'header' => 'Manager Position', 'type' => 'raw', 'value' => '($data->manager_position) ? date("d",$data->manager_position) . " " . date("H",$data->manager_position) ." ". date("i",$data->manager_position) : "-- -- --"'), array('name' => 'user_id', 'type' => 'html', 'value' => 'CHtml::link(User::model()->findByPk($data->user_id)->username,Yii::app()->getRequest()->getBaseUrl(true)."/mysub/".User::model()->findByPk($data->user_id)->username)', 'filter' => '', 'headerHtmlOptions' => array('width' => '25px'), 'sortable' => true), array('name' => 'country_id', 'value' => '$data->country->name', 'filter' => CHtml::listData(Country::model()->findAll(), 'id', 'name'), 'sortable' => true), array('name' => 'category', 'filter' => CHtml::listData(Yii::app()->db->createCommand()->select('name')->from('subject_category')->queryAll(), 'name', 'name'), 'sortable' => true), array('name' => 'title', 'headerHtmlOptions' => array('width' => '200px'), 'type' => 'html', 'value' => 'CHtml::link($data->title,Yii::app()->getRequest()->getBaseUrl(true)."/sub/".$data->urn)'), array('name' => 'priority_id', 'value' => '$data->priority_type->name', 'headerHtmlOptions' => array('width' => '50px'), 'filter' => CHtml::listData(Priority::model()->findAll(), 'id', 'name'), 'sortable' => true), array('name' => 'content_type_id', 'value' => '$data->content_type->fullname', 'headerHtmlOptions' => array('width' => '50px'), 'filter' => CHtml::listData(ContentType::model()->findAll(), 'id', 'name'), 'sortable' => true), array('name' => 'time_submitted', 'value' => 'date("Y/m/d H:i", $data->time_submitted)', 'headerHtmlOptions' => array('width' => '100px'), 'sortable' => true)), 'enablePagination' => true));
?> value="<?php echo $d[id]; ?> "><?php echo $d[name]; ?> </option> <?php } ?> <?php } else { ?> <?php echo Priority::model()->findByPk($de[priority])->name; ?> <?php } ?> </select> </td> <td align="center" > <?php if ($level == 1) { ?> <select class="combo-s" > <?php $status = Project::model()->findByPk($de[id])->status; foreach (Status::model()->findAll() as $d) {
<div class="txt-box"><?php echo $form->dropDownList($model, 'enquiry_source', CHtml::listData(Source::model()->findAll(), 's_tite', 's_tite'), array('empty' => '--Select Source--')); ?> <?php //echo $form->error($model,'enquiry_source'); ?> </div> </div> <div class="proper-rgt"> <div class="txt-log"><?php echo $form->labelEx($model, 'priority_source'); ?> </div> <div class="txt-box"><?php echo $form->dropDownList($model, 'priority_source', CHtml::listData(Priority::model()->findAll(), 'p_title', 'p_title'), array('empty' => '--Select Priority--')); ?> </div> <?php //echo $form->error($model,'priority_source'); ?> </div> <div class="proper-lft"> <div class="txt-log"><?php echo $form->label($model, 'retail_broker'); ?> </div> <div class="txt-box"><?php echo $form->dropDownList($model, 'retail_broker', array('' => 'Choose One', 'retailer' => 'Retailer', 'broker' => 'Broker'));
public static function sendTicketAssignedEmailNotification($creator_id, $assign_id, $ticket_domain, $ticket_id) { $ticket = Ticket::model()->findByPk($ticket_id); $subject = $ticket->subject; $description = $ticket->description; $priority = Priority::model()->findByPk($ticket->priority_id); $creator = User::model()->find("id=:id", array(':id' => $creator_id)); $domMentor = User::model()->find("id=:id", array(':id' => $assign_id)); $domain = Domain::model()->find("id=:id", array(':id' => $ticket_domain)); $link = CHtml::link("Click Here", 'http://' . Yii::app()->request->getServerName() . '/coplat/index.php/ticket/view/' . $ticket_id); $linkReject = CHtml::link("REJECT TICKET", 'http://' . Yii::app()->request->getServerName() . '/coplat/index.php/ticket/reject/' . $ticket_id); $message = "The user, " . $creator->fname . " " . $creator->lname . ", has created a ticket that has being assigned to you. </h2><br/><b>Subject:</b> " . $subject . ".<br/><b>Description:</b><br>" . $description . "<br/><br/>The ticket creator stated that this ticket is of " . $priority->description . " priority if no comments or scheduled meetings are made within " . $priority->reassignHours . " hours the ticket will be reassigned <br/><br/> Please make a comment on the ticket before the ticket is reassigned.\n" . $link . " To view the ticket\n Thank You<br/><br/>If you are unable to work on this ticket click here:<br/>" . $linkReject; $name = $domMentor->fname . ' ' . $domMentor->lname; $html = User::replaceMessage($name, $message); $email = Yii::app()->email; $email->to = $domMentor->email; $email->from = 'Collaborative Platform <*****@*****.**>'; $email->replyTo = '*****@*****.**'; $email->returnPath = "*****@*****.**"; $email->subject = 'New Ticket related to ' . $domain->name; $email->message = $html; $email->send(); }
public function getPriorityString() { $prio = Priority::model()->findByPk($this->priority_id); return $prio->description; }
<?php $this->breadcrumbs = array('Subjects' => array('index'), 'Manage'); $this->menu = array(array('label' => 'List Subject', 'url' => array('index')), array('label' => 'Create Subject', 'url' => array('add'))); 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('subject-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n"); ?> <h1>Manage Subjects</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 --> <p>Legend: <span class="row_red">RED</span> => Live NOW</p> <?php $dataProvider = $model->search(); $dataProvider->pagination->pageSize = 50; $this->widget('zii.widgets.grid.CGridView', array('id' => 'subject-grid', 'dataProvider' => $dataProvider, 'filter' => $model, 'rowCssClass' => 'something', 'columns' => array(array('name' => 'id', 'id' => $live_subject["subject_id"] . '_' . $live_subject["subject_id_2"], 'value' => '$data->id', 'headerHtmlOptions' => array('width' => '25px'), 'cssClassExpression' => '($data->id == substr($this->id, 0, strpos($this->id, "_"))) ? row_red : something', 'sortable' => true), array('name' => 'user_id', 'type' => 'html', 'value' => 'CHtml::link($data->user->username,Yii::app()->getRequest()->getBaseUrl(true)."/mysub/".$data->user->username)', 'filter' => '', 'headerHtmlOptions' => array('width' => '25px'), 'sortable' => true), array('name' => 'country_id', 'value' => '$data->country->name', 'filter' => CHtml::listData(Country::model()->findAll(), 'id', 'name'), 'sortable' => true), array('name' => 'category', 'filter' => CHtml::listData(Yii::app()->db->createCommand()->select('name')->from('subject_category')->queryAll(), 'name', 'name'), 'sortable' => true), array('name' => 'title', 'headerHtmlOptions' => array('width' => '410px')), array('name' => 'priority_id', 'value' => '$data->priority_type->name', 'headerHtmlOptions' => array('width' => '50px'), 'filter' => CHtml::listData(Priority::model()->findAll(), 'id', 'name'), 'sortable' => true), array('name' => 'content_type_id', 'value' => '$data->content_type->fullname', 'headerHtmlOptions' => array('width' => '50px'), 'filter' => CHtml::listData(ContentType::model()->findAll(), 'id', 'name'), 'sortable' => true), array('name' => 'time_submitted', 'value' => 'date("Y/m/d H:i", $data->time_submitted)', 'headerHtmlOptions' => array('width' => '100px'), 'sortable' => true), array('name' => 'approved', 'type' => 'html', 'value' => 'CHtml::link(SiteHelper::yesno($data->approved),"moderate/".$data->id)', 'headerHtmlOptions' => array('width' => '20px'), 'filter' => array('0' => 'No', '1' => 'Yes'), 'sortable' => true), array('name' => 'authorized', 'type' => 'html', 'value' => 'CHtml::link(SiteHelper::yesno($data->authorized),"authorize/".$data->id)', 'headerHtmlOptions' => array('width' => '20px'), 'filter' => array('0' => 'No', '1' => 'Yes'), 'sortable' => true), array('name' => 'disabled', 'value' => 'SiteHelper::yesno($data->disabled)', 'headerHtmlOptions' => array('width' => '20px'), 'filter' => array('0' => 'No', '1' => 'Yes'), 'sortable' => true), array('name' => 'deleted', 'value' => 'SiteHelper::yesno($data->deleted)', 'headerHtmlOptions' => array('width' => '20px'), 'filter' => array('0' => 'No', '1' => 'Yes'), 'sortable' => true)), 'enablePagination' => true));
<?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('subject-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n"); ?> <h1><?php echo Yii::t('subject', 'Subjects History'); ?> </h1> <p> <?php echo Yii::t('subject', 'The following list shows all the subjects that has been placed in the live stream(homepage). Note that the time is in UTC.'); ?> </p> <?php $dataProvider = $model->search('show_time DESC'); $dataProvider->pagination->pageSize = 50; $this->widget('zii.widgets.grid.CGridView', array('id' => 'subject-grid', 'dataProvider' => $dataProvider, 'filter' => $model, 'rowCssClass' => 'something', 'columns' => array(array('name' => 'show_time', 'value' => 'date("Y/m/d H:i", $data->show_time)." UTC"', 'headerHtmlOptions' => array('width' => '120px'), 'filter' => '', 'sortable' => true), array('name' => 'user_id', 'type' => 'html', 'value' => 'CHtml::link($data->user->username,Yii::app()->getRequest()->getBaseUrl(true)."/mysub/".$data->user->username)', 'filter' => CHtml::textField('Subject[username]', $model->username), 'headerHtmlOptions' => array('width' => '90px'), 'sortable' => true), array('name' => 'priority_id', 'value' => '$data->priority_type->name', 'headerHtmlOptions' => array('width' => '50px'), 'filter' => CHtml::listData(Priority::model()->findAll(), 'id', 'name'), 'sortable' => true), array('name' => 'content_type_id', 'value' => '$data->content_type->fullname', 'headerHtmlOptions' => array('width' => '50px'), 'filter' => CHtml::listData(ContentType::model()->findAll(), 'id', 'name'), 'sortable' => true), array('name' => 'country_id', 'value' => '$data->country->name', 'headerHtmlOptions' => array('width' => '100px'), 'filter' => CHtml::listData(Country::model()->findAll(), 'id', 'name'), 'sortable' => true), array('name' => 'category', 'filter' => CHtml::listData(Yii::app()->db->createCommand()->select('name')->from('subject_category')->queryAll(), 'name', 'name'), 'sortable' => true), array('header' => Yii::t('subject', 'Search'), 'name' => 'title', 'type' => 'html', 'value' => 'CHtml::link($data->title,Yii::app()->getRequest()->getBaseUrl(true)."/sub/".$data->urn)')), 'enablePagination' => true));
echo date("d M Y", strtotime($data->due_date)); ?> </td> </tr> <tr> <td class="name"> Task</td> <td class="value"><?php echo Status::model()->findByPk($data->status)->name; ?> </td> </tr> <tr> <td class="name"> Priority</td> <td class="value"><?php echo Priority::model()->findByPk($data->priority)->name; ?> </td> </tr> </table> <h1> PROJECT 3D ARTISTS </h1> <?php $data = Project::model()->findByPk($_REQUEST['id']); ?> <table> <tr> <td class="name"> No</td> <td class="value">Name</td> </tr>
function getTicketColumns($model) { //get or initialize the current column order $columnArrayOrder = getColumnArrayOrder(); //only if make a cache of the columns if needed if (isset($_GET['sourceColumn']) && isset($_GET['destinationColumn'])) { $source = $_GET['sourceColumn']; $destination = $_GET['destinationColumn']; $sourceIndex = $source[0]; $destIndex = $destination[0]; ReportUtils::moveColumnsByIndex($sourceIndex, $destIndex, $columnArrayOrder); Yii::app()->session['TicketColumnOrder'] = $columnArrayOrder; } $columns = array(); for ($i = 0; $i < count($columnArrayOrder); $i++) { switch ($columnArrayOrder[$i]) { case TicketReportColumns::ticketID: $columns[] = array('name' => 'ticketID', 'header' => 'Ticket #', 'filter' => CHtml::activeNumberField($model, 'ticketID'), 'headerHtmlOptions' => array('width' => '75')); break; case TicketReportColumns::creatorName: $columns[] = array('name' => 'creatorName', 'header' => 'Creator Name', 'filter' => CHtml::activeTextField($model, 'creatorName'), 'headerHtmlOptions' => array('width' => '200')); break; case TicketReportColumns::creatorID: $columns[] = array('name' => 'creatorID', 'header' => 'Creator ID', 'filter' => CHtml::activeNumberField($model, 'creatorID'), 'headerHtmlOptions' => array('width' => '75')); break; case TicketReportColumns::creatorDisabled: $columns[] = array('name' => 'creatorDisabled', 'header' => 'Creator Disabled', 'value' => 'ReportUtils::getZeroOneToYesNo($data->creatorDisabled)', 'filter' => array('1' => 'Yes', '0' => 'No'), 'headerHtmlOptions' => array('width' => '80')); break; case TicketReportColumns::creatorEmail: $columns[] = array('name' => 'creatorEmail', 'header' => 'Creator Email', 'filter' => CHtml::activeEmailField($model, 'creatorEmail'), 'headerHtmlOptions' => array('width' => '150')); break; case TicketReportColumns::ticketStatus: $columns[] = array('name' => 'ticketStatus', 'header' => 'Ticket Status', 'filter' => array('Close' => 'Close', 'Pending' => 'Pending'), 'headerHtmlOptions' => array('width' => '105')); break; case TicketReportColumns::ticketCreatedDate: $columns[] = array('name' => 'ticketCreatedDate', 'header' => 'Created Date', 'value' => 'ReportUtils::dateformat($data->ticketCreatedDate)', 'filter' => CHtml::activeDateField($model, 'ticketCreatedDate'), 'headerHtmlOptions' => array('width' => '160')); break; case TicketReportColumns::assignedUserName: $columns[] = array('name' => 'assignedUserName', 'header' => 'Assigned To (Name)', 'filter' => CHtml::activeTextField($model, 'assignedUserName'), 'headerHtmlOptions' => array('width' => '150')); break; case TicketReportColumns::ticketAssignUserID: $columns[] = array('name' => 'ticketAssignUserID', 'header' => 'Assigned To (Id)', 'filter' => CHtml::activeNumberField($model, 'ticketAssignUserID'), 'headerHtmlOptions' => array('width' => '100')); break; case TicketReportColumns::assignedUserDisabled: $columns[] = array('name' => 'assignedUserDisabled', 'header' => 'Assigned To (Disabled)', 'value' => 'ReportUtils::getZeroOneToYesNo($data->assignedUserDisabled)', 'filter' => array('1' => 'Yes', '0' => 'No'), 'headerHtmlOptions' => array('width' => '100')); break; case TicketReportColumns::assignedUserEmail: $columns[] = array('name' => 'assignedUserEmail', 'header' => 'Assigned To (Email)', 'filter' => CHtml::activeEmailField($model, 'assignedUserEmail'), 'headerHtmlOptions' => array('width' => '150')); break; case TicketReportColumns::ticketDomainName: $columns[] = array('name' => 'ticketDomainName', 'header' => 'Ticket Domain', 'filter' => CHtml::activeDropDownList($model, 'ticketDomainID', CHtml::listData(Domain::model()->findAll(), 'id', 'name'), array('empty' => ' ')), 'headerHtmlOptions' => array('width' => '200')); break; case TicketReportColumns::ticketSubDomainName: $columns[] = array('name' => 'ticketSubDomainName', 'header' => 'Ticket Sub Domain', 'filter' => CHtml::activeDropDownList($model, 'ticketSubDomainID', CHtml::listData(Subdomain::model()->findAll(), 'id', 'name'), array('empty' => ' ')), 'headerHtmlOptions' => array('width' => '170')); break; case TicketReportColumns::ticketPriorityDescription: $columns[] = array('name' => 'ticketPriorityDescription', 'header' => 'Ticket Priority', 'filter' => CHtml::activeDropDownList($model, 'ticketPriorityID', CHtml::listData(Priority::model()->findAll(), 'id', 'description'), array('empty' => ' ')), 'headerHtmlOptions' => array('width' => '110')); break; case TicketReportColumns::ticketAssignedDate: $columns[] = array('name' => 'ticketAssignedDate', 'header' => 'Ticket Assigned Date', 'value' => 'ReportUtils::dateformat($data->ticketAssignedDate)', 'filter' => CHtml::activeDateField($model, 'ticketAssignedDate'), 'headerHtmlOptions' => array('width' => '160')); break; case TicketReportColumns::ticketClosedDate: $columns[] = array('name' => 'ticketClosedDate', 'header' => 'Ticket Closed Date', 'value' => 'ReportUtils::dateformat($data->ticketClosedDate)', 'filter' => CHtml::activeDateField($model, 'ticketClosedDate'), 'headerHtmlOptions' => array('width' => '160')); break; case TicketReportColumns::ticketIsEscalated: $columns[] = array('name' => 'ticketIsEscalated', 'header' => 'Escalated', 'value' => 'ReportUtils::getZeroOneToYesNo($data->ticketIsEscalated)', 'filter' => array('1' => 'Yes', '0' => 'No'), 'headerHtmlOptions' => array('width' => '80')); break; case TicketReportColumns::ticketSubject: $columns[] = array('name' => 'ticketSubject', 'header' => 'Subject', 'filter' => CHtml::activeTextField($model, 'ticketSubject'), 'headerHtmlOptions' => array('width' => '300')); break; case TicketReportColumns::ticketDescription: $columns[] = array('name' => 'ticketDescription', 'header' => 'Description', 'filter' => CHtml::activeTextField($model, 'ticketDescription'), 'headerHtmlOptions' => array('width' => '400')); break; } } return $columns; }
<?php echo $form->error($model, 'subject'); ?> <?php echo $form->labelEx($model, 'description'); ?> <?php echo $form->textArea($model, 'description', array('id' => 'description', 'style' => 'width:500px', 'cols' => 110, 'rows' => 5, 'width' => '300px')); ?> <?php echo $form->error($model, 'description'); ?> <?php $priority = Priority::model()->findAll(); $data = array(); foreach ($priority as $prio) { $data[$prio->id] = $prio->description; } ?> <?php echo $form->labelEx($model, 'priority_id'); ?> <?php echo $form->dropDownList($model, 'priority_id', $data, array('prompt' => 'Select')); ?> <?php echo $form->error($model, 'priority_id'); ?>
?> <?php //echo $form->error($model,'enquiry_source'); ?> </div> </div> <div class="proper-lft"> <div class="txt-log"><?php echo $form->labelEx($model, 'priority_source'); ?> </div> <div class="txt-box"><?php echo $form->dropDownList($model, 'priority_source', CHtml::listData(Priority::model()->findAllByattributes(array('p_parent' => 0, 'p_status' => 1)), 'p_id', 'p_title'), array('empty' => '--Select Priority--')); ?> </div> <?php //echo $form->error($model,'priority_source'); ?> </div> <div class="proper-rgt"> <div class="txt-log"><?php echo $form->labelEx($model, 'priority_sub_source'); ?> </div> <div class="txt-box"><?php echo $form->dropDownList($model, 'priority_sub_source', array("Retailer" => "Retailer", "Broker" => "Broker"), array('empty' => '--Select Priority--'));