mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
Infocenter changes
- new button for Freigabe zum Reihungstest, sending message to bewerber when freigabe - button Freigabe for Studiengang with Statusgrund - Ausbildungssemester can be saved - Using Vorlagen for Freigabe Mail to assistance and message to bewerber - Added Nation of address at details page - Scroll to top button on details page - moved messageList js to own file
This commit is contained in:
@@ -15,6 +15,7 @@ class Messages extends Auth_Controller
|
||||
array(
|
||||
'write' => array('basis/message:rw', 'infocenter:rw'),
|
||||
'send' => array('basis/message:rw', 'infocenter:rw'),
|
||||
'sendJson' => array('basis/message:rw', 'infocenter:rw'),
|
||||
'getVorlage' => array('basis/message:r', 'infocenter:r'),
|
||||
'parseMessageText' => array('basis/message:r', 'infocenter:r'),
|
||||
'getMessageFromIds' => array('basis/message:r', 'infocenter:r')
|
||||
@@ -190,6 +191,38 @@ class Messages extends Auth_Controller
|
||||
* send
|
||||
*/
|
||||
public function send($sender_id = null)
|
||||
{
|
||||
$result = $this->_execSend($sender_id);
|
||||
|
||||
if (isSuccess($result))
|
||||
{
|
||||
echo "Messages sent successfully";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Error when sending message";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Send message, response is in JSON format
|
||||
* @param $sender_id
|
||||
*/
|
||||
public function sendJson($sender_id = null)
|
||||
{
|
||||
$result = $this->_execSend($sender_id);
|
||||
|
||||
$this->output
|
||||
->set_content_type('application/json')
|
||||
->set_output(json_encode($result));
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes message sending
|
||||
* @param $sender_id
|
||||
* @return array wether execution was successfull - error or success
|
||||
*/
|
||||
private function _execSend($sender_id)
|
||||
{
|
||||
if ($sender_id === null)
|
||||
{
|
||||
@@ -197,18 +230,19 @@ class Messages extends Auth_Controller
|
||||
|
||||
if (!hasData($user_person))
|
||||
{
|
||||
show_error('no sender');
|
||||
return error('no sender');
|
||||
}
|
||||
$sender_id = $user_person->retval[0]->person_id;
|
||||
}
|
||||
|
||||
$error = false;
|
||||
|
||||
$subject = $this->input->post('subject');
|
||||
$body = $this->input->post('body');
|
||||
$prestudents = $this->input->post('prestudents');
|
||||
$persons = $this->input->post('persons');
|
||||
$relationmessage_id = $this->input->post('relationmessage_id');
|
||||
$vorlage_kurzbz = $this->input->post('vorlage_kurzbz');
|
||||
$oe_kurzbz = $this->input->post('oe_kurzbz');
|
||||
$msgvars = $this->input->post('msgvars');
|
||||
|
||||
if (!isset($relationmessage_id) || $relationmessage_id == '')
|
||||
{
|
||||
@@ -240,10 +274,8 @@ class Messages extends Auth_Controller
|
||||
$dataArray[$newKey] = $dataArray[$key];
|
||||
}
|
||||
|
||||
$parsedText = $this->messagelib->parseMessageText($body, $dataArray);
|
||||
|
||||
$oe_kurzbz = null;
|
||||
if (hasData($prestudentsData))
|
||||
// if oe not given, get from prestudent
|
||||
if (isEmptyString($oe_kurzbz) && hasData($prestudentsData))
|
||||
{
|
||||
for ($p = 0; $p < count($prestudentsData->retval); $p++)
|
||||
{
|
||||
@@ -254,12 +286,29 @@ class Messages extends Auth_Controller
|
||||
}
|
||||
}
|
||||
|
||||
$msg = $this->messagelib->sendMessage($sender_id, $dataArray['person_id'], $subject, $parsedText, PRIORITY_NORMAL, $relationmessage_id, $oe_kurzbz);
|
||||
// send without vorlage
|
||||
if (isEmptyString($vorlage_kurzbz))
|
||||
{
|
||||
$parsedText = $this->messagelib->parseMessageText($body, $dataArray);
|
||||
$msg = $this->messagelib->sendMessage($sender_id, $dataArray['person_id'], $subject, $parsedText, PRIORITY_NORMAL, $relationmessage_id, $oe_kurzbz);
|
||||
}
|
||||
// send with vorlage
|
||||
else
|
||||
{
|
||||
if (isset($msgvars) && is_array($msgvars))
|
||||
{
|
||||
//additional message variables
|
||||
foreach ($msgvars as $key => $msgvar)
|
||||
{
|
||||
$dataArray[$key] = $msgvar;
|
||||
}
|
||||
}
|
||||
$msg = $this->messagelib->sendMessageVorlage($sender_id, $dataArray['person_id'], $vorlage_kurzbz, $oe_kurzbz, $dataArray);
|
||||
}
|
||||
|
||||
if ($msg->error)
|
||||
{
|
||||
show_error($msg->retval);
|
||||
$error = true;
|
||||
break;
|
||||
return error($msg->msg);
|
||||
}
|
||||
|
||||
// Loads the person log library
|
||||
@@ -279,12 +328,9 @@ class Messages extends Auth_Controller
|
||||
null,
|
||||
$this->uid
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
echo "Messages sent successfully";
|
||||
return success($msg->retval);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -383,8 +429,10 @@ class Messages extends Auth_Controller
|
||||
* @param $msg_id
|
||||
* @param $receiver_id
|
||||
*/
|
||||
public function getMessageFromIds($msg_id, $receiver_id)
|
||||
public function getMessageFromIds()
|
||||
{
|
||||
$msg_id = $this->input->get('msg_id');
|
||||
$receiver_id = $this->input->get('receiver_id');
|
||||
$msg = $this->messagelib->getMessage($msg_id, $receiver_id);
|
||||
|
||||
$this->output
|
||||
|
||||
@@ -11,6 +11,7 @@ class InfoCenter extends Auth_Controller
|
||||
// App and Verarbeitungstaetigkeit name for logging
|
||||
const APP = 'infocenter';
|
||||
const TAETIGKEIT = 'bewerbung';
|
||||
const FREIGABE_MAIL_VORLAGE = 'InfocenterMailFreigabeAssistenz';
|
||||
|
||||
const INFOCENTER_URI = 'system/infocenter/InfoCenter'; // URL prefix for this controller
|
||||
const INDEX_PAGE = 'index';
|
||||
@@ -83,9 +84,10 @@ class InfoCenter extends Auth_Controller
|
||||
'saveFreigabe' => 'infocenter:rw',
|
||||
'saveNotiz' => 'infocenter:rw',
|
||||
'updateNotiz' => 'infocenter:rw',
|
||||
'reloadZgvPruefungen' => 'infocenter:r',
|
||||
'reloadMessages' => 'infocenter:r',
|
||||
'reloadNotizen' => 'infocenter:r',
|
||||
'reloadLogs' => 'infocenter:r',
|
||||
'reloadZgvPruefungen' => 'infocenter:r',
|
||||
'outputAkteContent' => 'infocenter:r',
|
||||
'getParkedDate' => 'infocenter:r',
|
||||
'park' => 'infocenter:rw',
|
||||
@@ -307,12 +309,16 @@ class InfoCenter extends Auth_Controller
|
||||
*/
|
||||
public function saveZgvPruefung()
|
||||
{
|
||||
$json = null;
|
||||
|
||||
$prestudent_id = $this->input->post('prestudentid');
|
||||
|
||||
if (isEmptyString($prestudent_id))
|
||||
$result = error('Prestudentid missing');
|
||||
$json = error('Prestudentid missing');
|
||||
else
|
||||
{
|
||||
$ausbildungssemester = $this->input->post('ausbildungssemester');
|
||||
|
||||
// zgvdata
|
||||
// Check for string null, in case dropdown changed to default value
|
||||
$zgv_code = $this->input->post('zgv') === 'null' ? null : $this->input->post('zgv');
|
||||
@@ -321,14 +327,28 @@ class InfoCenter extends Auth_Controller
|
||||
$zgvdatum = isEmptyString($zgvdatum) ? null : date_format(date_create($zgvdatum), 'Y-m-d');
|
||||
$zgvnation_code = $this->input->post('zgvnation') === 'null' ? null : $this->input->post('zgvnation');
|
||||
|
||||
//zgvmasterdata
|
||||
// zgvmasterdata
|
||||
$zgvmas_code = $this->input->post('zgvmas') === 'null' ? null : $this->input->post('zgvmas');
|
||||
$zgvmaort = $this->input->post('zgvmaort');
|
||||
$zgvmadatum = $this->input->post('zgvmadatum');
|
||||
$zgvmadatum = isEmptyString($zgvmadatum) ? null : date_format(date_create($zgvmadatum), 'Y-m-d');
|
||||
$zgvmanation_code = $this->input->post('zgvmanation') === 'null' ? null : $this->input->post('zgvmanation');
|
||||
|
||||
$result = $this->PrestudentModel->update(
|
||||
$lastStatus = $this->PrestudentstatusModel->getLastStatus($prestudent_id, '', 'Interessent');
|
||||
|
||||
$semresult = null;
|
||||
|
||||
if (hasData($lastStatus))
|
||||
{
|
||||
$semresult = $this->PrestudentstatusModel->update(
|
||||
array('prestudent_id' => $lastStatus->retval[0]->prestudent_id,
|
||||
'status_kurzbz' => $lastStatus->retval[0]->status_kurzbz,
|
||||
'studiensemester_kurzbz' => $lastStatus->retval[0]->studiensemester_kurzbz),
|
||||
array('ausbildungssemester' => $ausbildungssemester)
|
||||
);
|
||||
}
|
||||
|
||||
$prestresult = $this->PrestudentModel->update(
|
||||
$prestudent_id,
|
||||
array(
|
||||
'zgv_code' => $zgv_code,
|
||||
@@ -343,7 +363,14 @@ class InfoCenter extends Auth_Controller
|
||||
)
|
||||
);
|
||||
|
||||
if (isSuccess($result))
|
||||
if (isError($prestresult))
|
||||
$json = error('Error when updating Prestudent!');
|
||||
elseif (isError($semresult))
|
||||
$json = error('Error when updating Ausbildungssemester!');
|
||||
else
|
||||
$json = success('Zgv saved successfully!');
|
||||
|
||||
if (isSuccess($semresult) || isSuccess($prestresult))
|
||||
{
|
||||
//get extended Prestudent data for logging
|
||||
$logdata = $this->_getPersonAndStudiengangFromPrestudent($prestudent_id);
|
||||
@@ -351,7 +378,7 @@ class InfoCenter extends Auth_Controller
|
||||
$this->_log($logdata['person_id'], 'savezgv', array($logdata['studiengang_kurzbz'], $prestudent_id));
|
||||
}
|
||||
}
|
||||
$this->output->set_content_type('application/json')->set_output(json_encode($result));
|
||||
$this->output->set_content_type('application/json')->set_output(json_encode($json));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -414,6 +441,7 @@ class InfoCenter extends Auth_Controller
|
||||
{
|
||||
$json = null;
|
||||
$prestudent_id = $this->input->post('prestudent_id');
|
||||
$statusgrund_id = $this->input->post('statusgrund_id');
|
||||
|
||||
$lastStatus = $this->PrestudentstatusModel->getLastStatus($prestudent_id);
|
||||
|
||||
@@ -428,6 +456,18 @@ class InfoCenter extends Auth_Controller
|
||||
//check if still Interessent and not freigegeben yet
|
||||
if ($lastStatus->status_kurzbz === 'Interessent' && !isset($lastStatus->bestaetigtam))
|
||||
{
|
||||
$statusdata = array(
|
||||
'bestaetigtvon' => $this->_uid,
|
||||
'bestaetigtam' => date('Y-m-d'),
|
||||
'updatevon' => $this->_uid,
|
||||
'updateamum' => date('Y-m-d H:i:s')
|
||||
);
|
||||
|
||||
if (isset($statusgrund_id) && is_numeric($statusgrund_id))
|
||||
{
|
||||
$statusdata['statusgrund_id'] = $statusgrund_id;
|
||||
}
|
||||
|
||||
$result = $this->PrestudentstatusModel->update(
|
||||
array(
|
||||
'prestudent_id' => $prestudent_id,
|
||||
@@ -435,12 +475,7 @@ class InfoCenter extends Auth_Controller
|
||||
'studiensemester_kurzbz' => $lastStatus->studiensemester_kurzbz,
|
||||
'ausbildungssemester' => $lastStatus->ausbildungssemester
|
||||
),
|
||||
array(
|
||||
'bestaetigtvon' => $this->_uid,
|
||||
'bestaetigtam' => date('Y-m-d'),
|
||||
'updatevon' => $this->_uid,
|
||||
'updateamum' => date('Y-m-d H:i:s')
|
||||
)
|
||||
$statusdata
|
||||
);
|
||||
|
||||
$json = $result;
|
||||
@@ -459,7 +494,7 @@ class InfoCenter extends Auth_Controller
|
||||
|
||||
$acceptresult = $this->DokumentprestudentModel->setAcceptedDocuments($prestudent_id, $dokument_kurzbzs);
|
||||
|
||||
//returns null if no documents to accept
|
||||
// acceptresult returns null if no documents to accept
|
||||
if ($acceptresult !== null && isError($acceptresult))
|
||||
{
|
||||
$json->error = 2;
|
||||
@@ -526,6 +561,29 @@ class InfoCenter extends Auth_Controller
|
||||
$this->output->set_content_type('application/json')->set_output(json_encode($result));
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads Zgv Prüfung view for a person, helper for reloading after ajax request
|
||||
* @param $person_id
|
||||
*/
|
||||
public function reloadZgvPruefungen($person_id)
|
||||
{
|
||||
$prestudentdata = $this->_loadPrestudentData($person_id);
|
||||
|
||||
$prestudentdata[self::FHC_CONTROLLER_ID] = $this->getControllerId();
|
||||
|
||||
$this->load->view('system/infocenter/zgvpruefungen.php', $prestudentdata);
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads Messages view for a person, helper for reloading after ajax request
|
||||
* @param $person_id
|
||||
*/
|
||||
public function reloadMessages($person_id)
|
||||
{
|
||||
$messages = $this->MessageModel->getMessagesOfPerson($person_id, 1);
|
||||
$this->load->view('system/messageList.php', array('messages' => $messages->retval));
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads Notizen view for a person, helper for reloading after ajax request
|
||||
* @param $person_id
|
||||
@@ -552,19 +610,6 @@ class InfoCenter extends Auth_Controller
|
||||
$this->load->view('system/infocenter/logs.php', array('logs' => $logs));
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads Zgv Prüfung view for a person, helper for reloading after ajax request
|
||||
* @param $person_id
|
||||
*/
|
||||
public function reloadZgvPruefungen($person_id)
|
||||
{
|
||||
$prestudentdata = $this->_loadPrestudentData($person_id);
|
||||
|
||||
$prestudentdata[self::FHC_CONTROLLER_ID] = $this->getControllerId();
|
||||
|
||||
$this->load->view('system/infocenter/zgvpruefungen.php', $prestudentdata);
|
||||
}
|
||||
|
||||
/**
|
||||
* Outputs content of an Akte, sends appropriate headers (so the document can be downloaded)
|
||||
* @param $akte_id
|
||||
@@ -1087,7 +1132,7 @@ class InfoCenter extends Auth_Controller
|
||||
//if prestudent is not interessent or is already bestaetigt, then show only as information, non-editable
|
||||
$zgvpruefung->infoonly = !isset($zgvpruefung->prestudentstatus) || isset($zgvpruefung->prestudentstatus->bestaetigtam) || $zgvpruefung->prestudentstatus->status_kurzbz != 'Interessent';
|
||||
|
||||
//numeric application priority and arrows for changing
|
||||
//numeric application priority
|
||||
$zgvpruefung->changeup = false;
|
||||
$zgvpruefung->changedown = false;
|
||||
|
||||
@@ -1108,16 +1153,16 @@ class InfoCenter extends Auth_Controller
|
||||
$zgvpruefungen[] = $zgvpruefung;
|
||||
}
|
||||
|
||||
$this->load->model('organisation/studiensemester_model', 'StudiensemesterModel');
|
||||
|
||||
$this->_sortPrestudents($zgvpruefungen);
|
||||
|
||||
$statusgruende = $this->StatusgrundModel->loadWhere(array('status_kurzbz' => 'Abgewiesener'))->retval;
|
||||
$abwstatusgruende = $this->StatusgrundModel->loadWhere(array('status_kurzbz' => 'Abgewiesener'))->retval;
|
||||
$intstatusgruende = $this->StatusgrundModel->loadWhere(array('status_kurzbz' => 'Interessent'))->retval;
|
||||
|
||||
$data = array (
|
||||
'zgvpruefungen' => $zgvpruefungen,
|
||||
'numberinteressenten' => $interessentenCount,
|
||||
'statusgruende' => $statusgruende
|
||||
'abwstatusgruende' => $abwstatusgruende,
|
||||
'intstatusgruende' => $intstatusgruende
|
||||
);
|
||||
|
||||
return $data;
|
||||
@@ -1129,6 +1174,8 @@ class InfoCenter extends Auth_Controller
|
||||
*/
|
||||
private function _sortPrestudents(&$zgvpruefungen)
|
||||
{
|
||||
$this->load->model('organisation/studiensemester_model', 'StudiensemesterModel');
|
||||
|
||||
@usort($zgvpruefungen, function ($a, $b) {
|
||||
//sort:
|
||||
// 1: Studiensemester
|
||||
@@ -1209,30 +1256,6 @@ class InfoCenter extends Auth_Controller
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function for redirecting to initial page for person from a prestudent-specific page
|
||||
* @param $prestudent_id
|
||||
* @param $section optional section of the page to go to
|
||||
*/
|
||||
private function _redirectToStart($prestudent_id, $section = '')
|
||||
{
|
||||
$this->PrestudentModel->addSelect('person_id');
|
||||
$person_id = $this->PrestudentModel->load($prestudent_id)->retval[0]->person_id;
|
||||
|
||||
redirect(
|
||||
sprintf(
|
||||
'/%s/%s?%s=%s&%s=%s#%s',
|
||||
self::INFOCENTER_URI,
|
||||
self::SHOW_DETAILS_PAGE,
|
||||
'person_id',
|
||||
$person_id,
|
||||
self::FHC_CONTROLLER_ID,
|
||||
$this->getControllerId(),
|
||||
$section
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function retrieves personid and studiengang kurzbz from a prestudent id
|
||||
* @param $prestudent_id
|
||||
@@ -1371,12 +1394,8 @@ class InfoCenter extends Auth_Controller
|
||||
'dokumente_nachgereicht' => $dokumenteNachzureichenMail
|
||||
);
|
||||
|
||||
$this->load->library('parser');
|
||||
$this->load->library('MailLib');
|
||||
$this->load->library('LogLib');
|
||||
|
||||
//parse freigabe html email template, wordwrap wraps text so no display errors
|
||||
$email = wordwrap($this->parser->parse('templates/mailtemplates/interessentFreigabe', $data, true), 70);
|
||||
$this->load->helper('hlp_sancho');
|
||||
|
||||
$subject = ($person->geschlecht == 'm' ? 'Interessent ' : 'Interessentin ').$person->vorname.' '.$person->nachname.' für '.$prestudent->studiengangbezeichnung.$orgform.' freigegeben';
|
||||
|
||||
@@ -1385,10 +1404,12 @@ class InfoCenter extends Auth_Controller
|
||||
if (!isEmptyString($receiver))
|
||||
{
|
||||
//Freigabeinformationmail sent from default system mail to studiengang mail(s)
|
||||
$sent = $this->maillib->send('', $receiver, $subject, $email, '', null, null, 'Bitte sehen Sie sich die Nachricht in HTML Sicht an, um den Inhalt vollständig darzustellen.');
|
||||
|
||||
if (!$sent)
|
||||
$this->loglib->logError('Error when sending Freigabe mail');
|
||||
sendSanchoMail(
|
||||
self::FREIGABE_MAIL_VORLAGE,
|
||||
$data,
|
||||
$receiver,
|
||||
$subject
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -315,7 +315,8 @@ class MessageLib
|
||||
{
|
||||
// Parses template text
|
||||
$parsedText = $this->ci->vorlagelib->parseVorlagetext($result->retval[0]->text, $data);
|
||||
$subject = $result->retval[0]->subject;
|
||||
// Parses subject
|
||||
$subject = $this->ci->vorlagelib->parseVorlagetext($result->retval[0]->subject, $data);
|
||||
|
||||
// Save message
|
||||
$result = $this->_saveMessage($sender_id, $receiver_id, $subject, $parsedText, $relationmessage_id, $oe_kurzbz);
|
||||
|
||||
@@ -228,8 +228,10 @@ class Prestudent_model extends DB_Model
|
||||
$lastStatus->retval[0]->studiengangkurzbzlang = $studienordnung->retval[0]->studiengangkurzbzlang;
|
||||
$lastStatus->retval[0]->studiengangbezeichnung = $studienordnung->retval[0]->studiengangbezeichnung;
|
||||
$lastStatus->retval[0]->studiengangbezeichnung_englisch = $studienordnung->retval[0]->studiengangbezeichnung_englisch;
|
||||
$lastStatus->retval[0]->regelstudiendauer = $studienordnung->retval[0]->regelstudiendauer;
|
||||
}
|
||||
|
||||
//get Sprache
|
||||
$this->load->model('system/sprache_model', 'SpracheModel');
|
||||
$language = $this->SpracheModel->load($lastStatus->retval[0]->sprache);
|
||||
|
||||
|
||||
@@ -173,6 +173,8 @@ class Person_model extends DB_Model
|
||||
if($kontakte->error)
|
||||
return error($kontakte->retval);
|
||||
$where = $zustellung_only === true ? array('person_id' => $person_id, 'zustelladresse' => true) : array('person_id' => $person_id);
|
||||
$this->AdresseModel->addSelect('public.tbl_adresse.*, bis.tbl_nation.kurztext AS nationkurztext');
|
||||
$this->AdresseModel->addJoin('bis.tbl_nation', 'tbl_adresse.nation = tbl_nation.nation_code', 'LEFT');
|
||||
$adressen = $this->AdresseModel->loadWhere($where);
|
||||
if($adressen->error)
|
||||
return error($adressen->retval);
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
'customJSs' => array(
|
||||
'public/js/bootstrapper.js',
|
||||
'public/js/tablesort/tablesort.js',
|
||||
'public/js/messaging/messageList.js',
|
||||
'public/js/infocenter/infocenterDetails.js'
|
||||
),
|
||||
'phrases' => array(
|
||||
@@ -139,7 +140,7 @@
|
||||
</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="row" id="messagelist">
|
||||
<?php
|
||||
$this->load->view('system/messageList.php', $messages);
|
||||
?>
|
||||
@@ -184,6 +185,7 @@
|
||||
</div> <!-- ./container-fluid-->
|
||||
</div> <!-- ./page-wrapper-->
|
||||
</div> <!-- ./wrapper -->
|
||||
<button id="scrollToTop" title="Go to top"><i class="fa fa-chevron-up"></i></button>
|
||||
</body>
|
||||
|
||||
<?php $this->load->view('templates/FHC-Footer'); ?>
|
||||
|
||||
@@ -98,6 +98,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<?php echo isset($adresse) ? $adresse->strasse.', '.$adresse->plz.' '.$adresse->ort : '' ?>
|
||||
<?php echo isset($adresse->nationkurztext) ? '<br />'.$adresse->nationkurztext : '' ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo ($adresse->heimatadresse === true ? 'Heimatadresse' : '').
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
$studiengangbezeichnung = empty($zgvpruefung->prestudentstatus->studiengangbezeichnung) ? $zgvpruefung->studiengangbezeichnung : $zgvpruefung->prestudentstatus->studiengangbezeichnung;
|
||||
|
||||
//set bootstrap columns for zgv form
|
||||
$columns = array(4, 3, 2, 3);
|
||||
$columns = array(3, 3, 3, 3);
|
||||
|
||||
$headercolumns = array(7, 5);
|
||||
if (!$infoonly && isset($zgvpruefung->prestudentstatus->bewerbungsnachfrist) && isset($zgvpruefung->prestudentstatus->bewerbungstermin))
|
||||
{
|
||||
@@ -54,7 +55,11 @@
|
||||
<?php if ($infoonly): ?>
|
||||
<?php if (isset($zgvpruefung->prestudentstatus->bestaetigtam)): ?>
|
||||
<i class="fa fa-check" style="color: green"></i>
|
||||
<?php echo $this->p->t('global', 'anStudiengangFreigegeben') ?>
|
||||
<?php if (isset($zgvpruefung->prestudentstatus->statusgrund_id))
|
||||
echo $this->p->t('global', 'anStudiengangFreigegeben').(isset($zgvpruefung->prestudentstatus->bezeichnung_statusgrund[0]) ? ' ('.$zgvpruefung->prestudentstatus->bezeichnung_statusgrund[0].')' : '');
|
||||
else
|
||||
echo $this->p->t('global', 'zumReihungstestFreigegeben');
|
||||
?>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php echo ucfirst($this->p->t('infocenter', 'bewerbung')) . ' ' . $this->p->t('global', 'abgeschickt') . ': '.(isset($zgvpruefung->prestudentstatus->bewerbung_abgeschicktamum) ? '<i class="fa fa-check" style="color:green"></i>' : '<i class="fa fa-times" style="color:red"></i>'); ?>
|
||||
@@ -112,10 +117,22 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-<?php echo $columns[2] ?>">
|
||||
<div class="form-group">
|
||||
<label><span style="display: inline-block">Ausbildungs</span><span
|
||||
style="display: inline-block">semester: </span></label>
|
||||
<?php echo isset($zgvpruefung->prestudentstatus->ausbildungssemester) ? $zgvpruefung->prestudentstatus->ausbildungssemester : '' ?>
|
||||
<div class="form-group form-inline">
|
||||
<label style="float: left"><span style="display: inline-block">Ausbildungs</span><span
|
||||
style="display: inline-block">semester: </span></label>
|
||||
<?php if (isset($zgvpruefung->prestudentstatus->ausbildungssemester)): ?>
|
||||
<?php if ($infoonly): ?>
|
||||
<input id="ausbildungssem_<?php echo $zgvpruefung->prestudent_id ?>" value="<?php echo $zgvpruefung->prestudentstatus->ausbildungssemester?>" type="hidden">
|
||||
<?php echo $zgvpruefung->prestudentstatus->ausbildungssemester?>
|
||||
<?php else:?>
|
||||
<select class="ausbildungssemselect" name="ausbildungssemester" id="ausbildungssem_<?php echo $zgvpruefung->prestudent_id ?>">
|
||||
<?php $maxsemester = isset($zgvpruefung->prestudentstatus->regelstudiendauer) ? intval($zgvpruefung->prestudentstatus->regelstudiendauer) : 10 ?>
|
||||
<?php for ($i = 1; $i <= $maxsemester; $i++): ?>
|
||||
<option value="<?php echo $i ?>"<?php echo $i === intval($zgvpruefung->prestudentstatus->ausbildungssemester) ? ' selected' : '' ?>><?php echo $i ?></option>
|
||||
<?php endfor; ?>
|
||||
</select>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-<?php echo $columns[3] ?>">
|
||||
@@ -286,24 +303,22 @@
|
||||
?>
|
||||
<div class="panel-footer solidtop">
|
||||
<div class="row">
|
||||
<div class="col-lg-6 text-left">
|
||||
<div class="col-lg-3 text-left">
|
||||
<div class="form-inline">
|
||||
<div class="input-group" id="statusgrselect_<?php echo $zgvpruefung->prestudent_id ?>">
|
||||
<select name="statusgrund"
|
||||
<div class="input-group" id="absgstatusgrselect_<?php echo $zgvpruefung->prestudent_id ?>">
|
||||
<select name="absgstatusgrund"
|
||||
class="d-inline float-right"
|
||||
required>
|
||||
<option value="null"
|
||||
selected="selected"><?php echo ucfirst($this->p->t('infocenter', 'absagegrund')) . '...' ?>
|
||||
</option>
|
||||
<?php foreach ($statusgruende as $statusgrund): ?>
|
||||
<?php foreach ($abwstatusgruende as $statusgrund): ?>
|
||||
<option value="<?php echo $statusgrund->statusgrund_id ?>"><?php echo $statusgrund->bezeichnung_mehrsprachig[0] ?></option>
|
||||
<?php endforeach ?>
|
||||
</select>
|
||||
<span class="input-group-btn">
|
||||
<button id="absageBtn" type="button"
|
||||
class="btn btn-default"
|
||||
data-toggle="modal"
|
||||
data-target="#absageModal_<?php echo $zgvpruefung->prestudent_id ?>">
|
||||
<button type="button"
|
||||
class="btn btn-default absageBtn" id="absagebtn_<?php echo $zgvpruefung->prestudent_id ?>">
|
||||
<?php echo $this->p->t('ui', 'absagen') ?>
|
||||
</button>
|
||||
</span>
|
||||
@@ -345,7 +360,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.column-absage -->
|
||||
<div class="col-lg-6 text-right">
|
||||
<?php
|
||||
$disabled = $disabledTxt = '';
|
||||
if (isEmptyString($zgvpruefung->prestudentstatus->bewerbung_abgeschicktamum))
|
||||
@@ -360,15 +374,35 @@
|
||||
$disabledTxt = 'Nur Bachelorstudiengänge können freigegeben werden.';;
|
||||
}
|
||||
?>
|
||||
<div>
|
||||
<button type="button" class="btn btn-default" <?php echo $disabled ?>
|
||||
data-toggle="modal"
|
||||
data-target="#freigabeModal_<?php echo $zgvpruefung->prestudent_id ?>"
|
||||
data-toggle="tooltip" title="<?php echo $disabledTxt ?>">
|
||||
<div class="col-lg-3">
|
||||
<div class="form-inline">
|
||||
<div class="input-group frgstatusgrselect" id="frgstatusgrselect_<?php echo $zgvpruefung->prestudent_id ?>">
|
||||
<select name="frgstatusgrund"
|
||||
class="d-inline float-right input-sm"
|
||||
<?php echo $disabled ?>
|
||||
required>
|
||||
<option value="null"
|
||||
selected="selected"><?php echo ucfirst($this->p->t('ui', 'freigabeart')) . '...' ?>
|
||||
</option>
|
||||
<?php foreach ($intstatusgruende as $statusgrund): ?>
|
||||
<option value="<?php echo $statusgrund->statusgrund_id ?>"><?php echo $statusgrund->bezeichnung_mehrsprachig[0] ?></option>
|
||||
<?php endforeach ?>
|
||||
</select>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-sm freigabebtnstg" <?php echo $disabled ?> id="freigabebtnstg_<?php echo $zgvpruefung->prestudent_id ?>"
|
||||
data-toggle="tooltip" title="<?php echo $disabledTxt ?>">
|
||||
<?php echo $this->p->t('ui', 'freigabeAnStudiengang') ?>
|
||||
</button>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 text-right">
|
||||
<button type="button" id="freigabebtn_<?php echo $zgvpruefung->prestudent_id ?>" class="btn btn-default freigabebtn" <?php echo $disabled ?>
|
||||
data-toggle="tooltip" title="<?php echo $disabledTxt ?>">
|
||||
<?php echo $this->p->t('ui', 'freigabeZumReihungstest') ?>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal fade freigabeModal" id="freigabeModal_<?php echo $zgvpruefung->prestudent_id ?>" tabindex="-1"
|
||||
role="dialog"
|
||||
aria-labelledby="freigabeModalLabel"
|
||||
@@ -382,7 +416,9 @@
|
||||
</button>
|
||||
<h4 class="modal-title"
|
||||
id="freigabeModalLabel">
|
||||
<?php echo $this->p->t('infocenter', 'freigabeBestaetigen') ?></h4>
|
||||
<?php echo $this->p->t('infocenter', 'freigabeBestaetigen') ?>
|
||||
<span id="freigabeModalStgr_<?php echo $zgvpruefung->prestudent_id ?>"></span>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $this->p->t('infocenter', 'interessentFreigebenTxt') ?>
|
||||
@@ -396,6 +432,10 @@
|
||||
class="btn btn-primary saveFreigabe" id="saveFreigabe_<?php echo $zgvpruefung->prestudent_id ?>">
|
||||
<?php echo $this->p->t('infocenter', 'interessentFreigeben') ?>
|
||||
</button>
|
||||
<button type="button"
|
||||
class="btn btn-primary saveStgFreigabe" id="saveStgFreigabe_<?php echo $zgvpruefung->prestudent_id ?>">
|
||||
<?php echo $this->p->t('infocenter', 'interessentFreigeben') ?>
|
||||
</button>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
@@ -407,7 +447,13 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-12 text-left">
|
||||
<?php echo isset($zgvpruefung->prestudentstatus->bestaetigtam) ? '<i class="fa fa-check" style="color: green"></i>' : '<i class="fa fa-check" style="color: red"></i>' ?>
|
||||
<label><?php echo $this->p->t('global', 'anStudiengangFreigegeben') ?></label>
|
||||
<label>
|
||||
<?php if (isset($zgvpruefung->prestudentstatus->statusgrund_id))
|
||||
echo $this->p->t('global', 'anStudiengangFreigegeben').(isset($zgvpruefung->prestudentstatus->bezeichnung_statusgrund[0]) ? ' ('.$zgvpruefung->prestudentstatus->bezeichnung_statusgrund[0].')' : '');
|
||||
else
|
||||
echo $this->p->t('global', 'zumReihungstestFreigegeben');
|
||||
?>
|
||||
</label>
|
||||
</div>
|
||||
</div><!-- /.row -->
|
||||
</div><!-- /.panel-footer -->
|
||||
|
||||
@@ -35,67 +35,3 @@ $widthColumn = $msgExists === true ? 8 : 12;
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<script>
|
||||
tinymce.init({
|
||||
menubar: false,
|
||||
toolbar: false,
|
||||
readonly: 1,
|
||||
selector: "#msgbody",
|
||||
statusbar: false,
|
||||
plugins: "autoresize",
|
||||
autoresize_bottom_margin: 10,
|
||||
autoresize_min_height: 140,
|
||||
autoresize_max_height: 495,
|
||||
//callback to avoid conflict with ajax (for getting body of first message)
|
||||
init_instance_callback: "initMsgBody",
|
||||
responsive: true
|
||||
});
|
||||
|
||||
function initMsgBody()
|
||||
{
|
||||
var tblrows = $("#msgtable tbody tr");
|
||||
|
||||
if (tblrows.length > 0)
|
||||
{
|
||||
//in the begging last sent message is shown
|
||||
var firstelement = tblrows.first();
|
||||
var id = firstelement.attr('id');
|
||||
|
||||
getMsgBody(id);
|
||||
firstelement.find("td").addClass("tablesort-active");
|
||||
|
||||
//add click event on message table for message preview
|
||||
tblrows.click(
|
||||
function ()
|
||||
{
|
||||
$("#msgtable").find("td").removeClass("tablesort-active");
|
||||
$(this).find("td").addClass("tablesort-active");
|
||||
getMsgBody(this.id);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
//retrieve message data from message and reiver id via AJAX
|
||||
function getMsgBody(id)
|
||||
{
|
||||
var msgid = id.substr(0, id.indexOf('_'));
|
||||
var recid = id.substr(id.indexOf('_') + 1);
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
dataType: "json",
|
||||
url: "<?php echo site_url("system/Messages/getMessageFromIds/") ?>" + msgid + "/" + recid,
|
||||
success: function (data, textStatus, jqXHR)
|
||||
{
|
||||
$("#msgsubject").text(data[0].subject);
|
||||
tinyMCE.get("msgbody").setContent(data[0].body);
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown)
|
||||
{
|
||||
alert(textStatus + " - " + errorThrown + " - " + jqXHR.responseText);
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -35,4 +35,34 @@
|
||||
top: -4px;
|
||||
right: 2px;
|
||||
left: 2px;
|
||||
}
|
||||
|
||||
.ausbildungssemselect{
|
||||
width: 40px !important;
|
||||
margin-top: -5px;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.frgstatusgrselect{
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
#scrollToTop{
|
||||
display: none;
|
||||
position: fixed;
|
||||
bottom: 1%;
|
||||
right: 0.3%;
|
||||
z-index: 99;
|
||||
border: none;
|
||||
outline: none;
|
||||
background-color: #dfdfdf;
|
||||
color: black;
|
||||
cursor: pointer;
|
||||
padding: 10px;
|
||||
border-radius: 10px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
#scrollToTop:hover{
|
||||
background-color: lightgrey;
|
||||
}
|
||||
@@ -1,6 +1,9 @@
|
||||
|
||||
const CONTROLLER_URL = FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router + "/"+FHC_JS_DATA_STORAGE_OBJECT.called_path;
|
||||
const BASE_URL = FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router;
|
||||
const CALLED_PATH = FHC_JS_DATA_STORAGE_OBJECT.called_path;
|
||||
const CONTROLLER_URL = BASE_URL + "/"+CALLED_PATH;
|
||||
const FREIGABE_MESSAGE_VORLAGE = "InfocenterRTfreigegeben";
|
||||
const FREIGABE_MESSAGE_VORLAGE_QUER = "InfocenterRTfreigegQuer";
|
||||
|
||||
/**
|
||||
* javascript file for infocenterDetails page
|
||||
@@ -10,9 +13,8 @@ $(document).ready(function ()
|
||||
//initialise table sorter
|
||||
Tablesort.addTablesorter("doctable", [[2, 1], [1, 0]], ["zebra"]);
|
||||
Tablesort.addTablesorter("nachgdoctable", [[2, 0], [1, 1]], ["zebra"]);
|
||||
Tablesort.addTablesorter("msgtable", [[0, 1], [2, 0]], ["zebra", "filter"], 2);
|
||||
Tablesort.tablesortAddPager("msgtable", "msgpager", 14);
|
||||
|
||||
InfocenterDetails._formatMessageTable();
|
||||
InfocenterDetails._formatNotizTable();
|
||||
InfocenterDetails._formatLogTable();
|
||||
|
||||
@@ -36,6 +38,8 @@ $(document).ready(function ()
|
||||
//add click events to zgv Prüfung section
|
||||
InfocenterDetails._addZgvPruefungEvents(personid);
|
||||
|
||||
MessageList.initMessageList();
|
||||
|
||||
//save notiz
|
||||
$("#notizform").on("submit", function (e)
|
||||
{
|
||||
@@ -90,6 +94,25 @@ $(document).ready(function ()
|
||||
//check if person is parked and display it
|
||||
InfocenterDetails.getParkedDate(personid);
|
||||
|
||||
if ($(document).scrollTop() > 20)
|
||||
$("#scrollToTop").show();
|
||||
|
||||
//scroll to top button
|
||||
$(window).scroll(function()
|
||||
{
|
||||
if ($(document).scrollTop() > 20)
|
||||
$("#scrollToTop").show();
|
||||
else
|
||||
$("#scrollToTop").hide();
|
||||
}
|
||||
);
|
||||
|
||||
$("#scrollToTop").click(function()
|
||||
{
|
||||
$('html,body').animate({scrollTop:0},250,'linear');
|
||||
}
|
||||
)
|
||||
|
||||
});
|
||||
|
||||
var InfocenterDetails = {
|
||||
@@ -213,16 +236,15 @@ var InfocenterDetails = {
|
||||
|
||||
if (FHC_AjaxClient.hasData(data))
|
||||
{
|
||||
InfocenterDetails._refreshLog();
|
||||
$("#zgvSpeichern_" + prestudentid).before("<span id='zgvSpeichernNotice' class='text-success'>" + FHC_PhrasesLib.t('ui', 'gespeichert') + "</span> ");
|
||||
InfocenterDetails._refreshLog();
|
||||
}
|
||||
else
|
||||
{
|
||||
zgvError();
|
||||
}
|
||||
},
|
||||
errorCallback: zgvError,
|
||||
veilTimeout: 0
|
||||
errorCallback: zgvError
|
||||
}
|
||||
);
|
||||
},
|
||||
@@ -247,19 +269,40 @@ var InfocenterDetails = {
|
||||
}
|
||||
);
|
||||
},
|
||||
saveFreigabe: function(data)
|
||||
saveFreigabe: function(data, rtfreigabe)
|
||||
{
|
||||
var callback = null;
|
||||
|
||||
FHC_AjaxClient.ajaxCallPost(
|
||||
CALLED_PATH + '/saveFreigabe',
|
||||
data,
|
||||
{
|
||||
successCallback: function(data, textStatus, jqXHR) {
|
||||
|
||||
console.log(data.error);
|
||||
if (FHC_AjaxClient.hasData(data))
|
||||
{
|
||||
InfocenterDetails._refreshZgv();
|
||||
InfocenterDetails._refreshLog();
|
||||
if (rtfreigabe)
|
||||
{
|
||||
FHC_AjaxClient.showVeil();
|
||||
callback = function ()
|
||||
{
|
||||
InfocenterDetails.sendFreigabeMessage(data.retval.prestudent_id);
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
callback = function ()
|
||||
{
|
||||
InfocenterDetails._refreshLog();
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
InfocenterDetails._refreshZgv(
|
||||
false,
|
||||
//send message only after refresh to have current Ausbildungssemester
|
||||
callback
|
||||
);
|
||||
}
|
||||
else if (data.error === 2 && parseInt(data.retval.prestudent_id, 10))
|
||||
{
|
||||
@@ -404,6 +447,30 @@ var InfocenterDetails = {
|
||||
}
|
||||
);
|
||||
},
|
||||
sendFreigabeMessage: function(prestudentid)
|
||||
{
|
||||
var ausbildungssem = $("#ausbildungssem_"+prestudentid).val();
|
||||
var vorlage_kurzbz = isNaN(ausbildungssem) || parseInt(ausbildungssem) === 1 ? FREIGABE_MESSAGE_VORLAGE : FREIGABE_MESSAGE_VORLAGE_QUER;
|
||||
|
||||
FHC_AjaxClient.ajaxCallPost(
|
||||
'system/Messages/sendJson',
|
||||
{
|
||||
"prestudents": prestudentid,
|
||||
"vorlage_kurzbz": vorlage_kurzbz,
|
||||
"oe_kurzbz": 'infocenter',
|
||||
"msgvars": {
|
||||
'rtlink': FHC_JS_DATA_STORAGE_OBJECT.app_root + 'addons/bewerbung/cis/registration.php?active=aufnahme',
|
||||
'ausbildungssemester': ausbildungssem
|
||||
}
|
||||
},
|
||||
{
|
||||
successCallback: function(data, textStatus, jqXHR) {
|
||||
InfocenterDetails._refreshMessages();
|
||||
InfocenterDetails._refreshLog();
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// (private) methods executed after ajax (refreshers)
|
||||
@@ -424,12 +491,20 @@ var InfocenterDetails = {
|
||||
$(".prioup").click(function ()
|
||||
{
|
||||
var prestudentid = this.id.substr(this.id.indexOf("_") + 1);
|
||||
InfocenterDetails._savePrio(prestudentid, -1);
|
||||
var data = {
|
||||
"prestudentid": prestudentid,
|
||||
"change": -1
|
||||
};
|
||||
InfocenterDetails.saveBewPriorisierung(data);
|
||||
});
|
||||
$(".priodown").click(function ()
|
||||
{
|
||||
var prestudentid = this.id.substr(this.id.indexOf("_") + 1);
|
||||
InfocenterDetails._savePrio(prestudentid, 1);
|
||||
var data = {
|
||||
"prestudentid": prestudentid,
|
||||
"change": 1
|
||||
};
|
||||
InfocenterDetails.saveBewPriorisierung(data);
|
||||
});
|
||||
|
||||
//zgv übernehmen
|
||||
@@ -466,21 +541,45 @@ var InfocenterDetails = {
|
||||
}
|
||||
);
|
||||
|
||||
//prevent opening modal when Statusgrund not chosen
|
||||
$(".absageModal").on('show.bs.modal', function (e)
|
||||
$(".freigabebtn").click(function()
|
||||
{
|
||||
var id = this.id.substr(this.id.indexOf("_") + 1);
|
||||
var statusgrvalue = $("#statusgrselect_" + id + " select[name=statusgrund]").val();
|
||||
if (statusgrvalue === "null")
|
||||
var prestudentid = this.id.substr(this.id.indexOf("_") + 1);
|
||||
InfocenterDetails._toggleFreigabeDialog(prestudentid, true);//true - Reihungstestfreigabe
|
||||
}
|
||||
);
|
||||
|
||||
$(".freigabebtnstg").click(function()
|
||||
{
|
||||
var prestudentid = this.id.substr(this.id.indexOf("_") + 1);
|
||||
var statusgrel = $("#frgstatusgrselect_"+prestudentid+" select[name=frgstatusgrund]");
|
||||
var statusgrund_id = statusgrel.val();
|
||||
var statusgrund = statusgrel.find("option:selected").text();
|
||||
|
||||
if (statusgrund_id === 'null')
|
||||
{
|
||||
$("#statusgrselect_" + id).addClass("has-error");
|
||||
return e.preventDefault();
|
||||
$("#frgstatusgrselect_" + prestudentid).addClass("has-error");
|
||||
}
|
||||
else
|
||||
{
|
||||
var rtfreigabe = false;//no Reihungstestfreigabe
|
||||
InfocenterDetails._toggleFreigabeDialog(prestudentid, rtfreigabe, statusgrund);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
$(".absageBtn").click(function()
|
||||
{
|
||||
var prestudentid = this.id.substr(this.id.indexOf("_") + 1);
|
||||
var statusgrund = $("#absgstatusgrselect_" + prestudentid + " select[name=absgstatusgrund]").val();
|
||||
if (statusgrund === "null")
|
||||
$("#absgstatusgrselect_" + prestudentid).addClass("has-error");
|
||||
else
|
||||
$("#absageModal_"+prestudentid).modal("show");
|
||||
}
|
||||
);
|
||||
|
||||
//remove red mark when statusgrund is selected again
|
||||
$("select[name=statusgrund]").change(
|
||||
$("select[name=absgstatusgrund],select[name=frgstatusgrund]").change(
|
||||
function ()
|
||||
{
|
||||
$(this).parent().removeClass("has-error");
|
||||
@@ -491,7 +590,7 @@ var InfocenterDetails = {
|
||||
{
|
||||
$(".absageModal").modal("hide");
|
||||
var prestudent_id = this.id.substr(this.id.indexOf("_") + 1);
|
||||
var statusgrund_id = $("#statusgrselect_" + prestudent_id + " select[name=statusgrund]").val();
|
||||
var statusgrund_id = $("#absgstatusgrselect_" + prestudent_id + " select[name=absgstatusgrund]").val();
|
||||
var data = {"prestudent_id": prestudent_id , "statusgrund": statusgrund_id};
|
||||
InfocenterDetails.saveAbsage(data);
|
||||
}
|
||||
@@ -502,12 +601,21 @@ var InfocenterDetails = {
|
||||
$(".freigabeModal").modal("hide");
|
||||
var prestudent_id = this.id.substr(this.id.indexOf("_") + 1);
|
||||
var data = {"prestudent_id": prestudent_id};
|
||||
InfocenterDetails.saveFreigabe(data, true);
|
||||
}
|
||||
);
|
||||
|
||||
$(".saveStgFreigabe").click(function()
|
||||
{
|
||||
$(".freigabeModal").modal("hide");
|
||||
var prestudent_id = this.id.substr(this.id.indexOf("_") + 1);
|
||||
var statusgrund_id = $("#frgstatusgrselect_" + prestudent_id + " select[name=frgstatusgrund]").val();
|
||||
var data = {"prestudent_id": prestudent_id, "statusgrund_id": statusgrund_id};
|
||||
InfocenterDetails.saveFreigabe(data);
|
||||
}
|
||||
)
|
||||
|
||||
},
|
||||
_refreshZgv: function(preserveCollapseState)
|
||||
_refreshZgv: function(preserveCollapseState, callback)
|
||||
{
|
||||
var personid = $("#hiddenpersonid").val();
|
||||
|
||||
@@ -525,8 +633,6 @@ var InfocenterDetails = {
|
||||
);
|
||||
}
|
||||
|
||||
//show veil until refresh finished?
|
||||
//FHC_AjaxClient.showVeil();
|
||||
$("#zgvpruefungen").load(
|
||||
CONTROLLER_URL + '/reloadZgvPruefungen/' + personid + '?fhc_controller_id=' + FHC_AjaxClient.getUrlParameter('fhc_controller_id'),
|
||||
function()
|
||||
@@ -542,7 +648,21 @@ var InfocenterDetails = {
|
||||
$("#"+i).addClass("in");
|
||||
}
|
||||
}
|
||||
//FHC_AjaxClient.hideVeil();
|
||||
|
||||
// variable callback executed after refresh
|
||||
if (callback)
|
||||
callback();
|
||||
}
|
||||
);
|
||||
},
|
||||
_refreshMessages: function()
|
||||
{
|
||||
var personid = $("#hiddenpersonid").val();
|
||||
$("#messagelist").load(
|
||||
CONTROLLER_URL + '/reloadMessages/' + personid + '?fhc_controller_id=' + FHC_AjaxClient.getUrlParameter('fhc_controller_id'),
|
||||
function () {
|
||||
MessageList.initMessageList();
|
||||
InfocenterDetails._formatMessageTable();
|
||||
}
|
||||
);
|
||||
},
|
||||
@@ -557,12 +677,6 @@ var InfocenterDetails = {
|
||||
}
|
||||
);
|
||||
},
|
||||
_formatLogTable: function()
|
||||
{
|
||||
Tablesort.addTablesorter("logtable", [[0, 1]], ["filter"], 2);
|
||||
Tablesort.tablesortAddPager("logtable", "logpager", 22);
|
||||
$("#logtable").addClass("table-condensed");
|
||||
},
|
||||
_refreshNotizen: function()
|
||||
{
|
||||
$("#notizform").find("input[type=text], textarea").val("");
|
||||
@@ -622,12 +736,45 @@ var InfocenterDetails = {
|
||||
);
|
||||
}
|
||||
},
|
||||
_formatMessageTable: function()
|
||||
{
|
||||
Tablesort.addTablesorter("msgtable", [[0, 1], [2, 0]], ["zebra", "filter"], 2);
|
||||
Tablesort.tablesortAddPager("msgtable", "msgpager", 14);
|
||||
},
|
||||
_formatNotizTable: function()
|
||||
{
|
||||
Tablesort.addTablesorter("notiztable", [[0, 1]], ["filter"], 2);
|
||||
Tablesort.tablesortAddPager("notiztable", "notizpager", 11);
|
||||
$("#notiztable").addClass("table-condensed");
|
||||
},
|
||||
_formatLogTable: function()
|
||||
{
|
||||
Tablesort.addTablesorter("logtable", [[0, 1]], ["filter"], 2);
|
||||
Tablesort.tablesortAddPager("logtable", "logpager", 22);
|
||||
$("#logtable").addClass("table-condensed");
|
||||
},
|
||||
_toggleFreigabeDialog: function(prestudentid, rtfreigabe, statusgrund)
|
||||
{
|
||||
var statusgrundspan = $("#freigabeModalStgr_"+prestudentid);
|
||||
var freigabebtn = $("#saveFreigabe_"+prestudentid);
|
||||
var stgfreigabebtn = $("#saveStgFreigabe_"+prestudentid);
|
||||
|
||||
if (rtfreigabe)
|
||||
{
|
||||
statusgrundspan.text(" - Reihungstest");
|
||||
freigabebtn.show();
|
||||
stgfreigabebtn.hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (statusgrund !== "undefined" && statusgrund !== null)
|
||||
statusgrundspan.text(" - "+statusgrund);
|
||||
freigabebtn.hide();
|
||||
stgfreigabebtn.show();
|
||||
}
|
||||
|
||||
$("#freigabeModal_"+prestudentid).modal("show");
|
||||
},
|
||||
_resetNotizFields: function()
|
||||
{
|
||||
$("#notizmsg").empty();
|
||||
@@ -638,13 +785,5 @@ var InfocenterDetails = {
|
||||
_errorSaveNotiz: function()
|
||||
{
|
||||
$("#notizmsg").text(FHC_PhrasesLib.t('ui', 'fehlerBeimSpeichern'));
|
||||
},
|
||||
_savePrio: function(prestudentid, change)
|
||||
{
|
||||
var data = {
|
||||
"prestudentid": prestudentid,
|
||||
"change": change
|
||||
};
|
||||
InfocenterDetails.saveBewPriorisierung(data);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
/**
|
||||
* javascript file for displaying MessageList
|
||||
*/
|
||||
|
||||
var MessageList = {
|
||||
|
||||
initMessageList: function()
|
||||
{
|
||||
tinymce.remove();
|
||||
tinymce.init({
|
||||
menubar: false,
|
||||
toolbar: false,
|
||||
readonly: 1,
|
||||
selector: "#msgbody",
|
||||
statusbar: false,
|
||||
plugins: "autoresize",
|
||||
autoresize_bottom_margin: 10,
|
||||
autoresize_min_height: 140,
|
||||
autoresize_max_height: 495,
|
||||
//callback to avoid conflict with ajax (for getting body of first message)
|
||||
init_instance_callback: "MessageList._initMsgBody",
|
||||
responsive: true
|
||||
|
||||
});
|
||||
},
|
||||
_initMsgBody: function()
|
||||
{
|
||||
var tblrows = $("#msgtable tbody tr");
|
||||
|
||||
if (tblrows.length > 0)
|
||||
{
|
||||
//in the begging last sent message is shown
|
||||
var firstelement = tblrows.first();
|
||||
var id = firstelement.attr('id');
|
||||
|
||||
MessageList._getMsgBody(id);
|
||||
firstelement.find("td").addClass("tablesort-active");
|
||||
|
||||
//add click event on message table for message preview
|
||||
tblrows.click(
|
||||
function ()
|
||||
{
|
||||
$("#msgtable").find("td").removeClass("tablesort-active");
|
||||
$(this).find("td").addClass("tablesort-active");
|
||||
MessageList._getMsgBody(this.id);
|
||||
}
|
||||
);
|
||||
}
|
||||
},
|
||||
//retrieve message data from message and receiver id via AJAX
|
||||
_getMsgBody: function(id)
|
||||
{
|
||||
var msgid = id.substr(0, id.indexOf('_'));
|
||||
var recid = id.substr(id.indexOf('_') + 1);
|
||||
|
||||
FHC_AjaxClient.ajaxCallGet(
|
||||
'system/Messages/getMessageFromIds',
|
||||
{
|
||||
"msg_id": msgid,
|
||||
"receiver_id": recid
|
||||
},
|
||||
{
|
||||
successCallback: function(data, textStatus, jqXHR) {
|
||||
$("#msgsubject").text(data[0].subject);
|
||||
tinyMCE.get("msgbody").setContent(data[0].body);
|
||||
},
|
||||
veilTimeout: 0
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
};
|
||||
@@ -848,6 +848,26 @@ $phrases = array(
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'global',
|
||||
'phrase' => 'zumReihungstestFreigegeben',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'zum Reihungstest freigegeben',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'approved for placement test',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'global',
|
||||
@@ -1114,6 +1134,26 @@ $phrases = array(
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'freigabeart',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Freigabeart',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Approval type',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
@@ -1128,7 +1168,27 @@ $phrases = array(
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => '',
|
||||
'text' => 'Approve for study program',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'freigabeZumReihungstest',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Freigabe zum Reihungstest',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Approve for placement test',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
@@ -2727,7 +2787,7 @@ $phrases = array(
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => '',
|
||||
'text' => 'reject applicant',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user