mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-22 09:22:22 +00:00
- Moved view system/messages/messageList.php -> system/infocenter/messageList.php
- Moved js public/js/messaging/messageList.js -> public/js/infocenter/messageList.js - Updated includes in controller system/infocenter/InfoCenter.php and view system/infocenter/infocenterDetails.php
This commit is contained in:
@@ -96,36 +96,7 @@ class Messages extends Auth_Controller
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Public methods - JSON output
|
||||
|
||||
/**
|
||||
* Send a new message
|
||||
* - The recipients are prestudents
|
||||
* - An email template with message var may be provided
|
||||
* - A global organisation unit may be provided, otherwise is used the prestudent one
|
||||
*/
|
||||
public function sendJson()
|
||||
{
|
||||
$prestudents = $this->input->post('prestudents');
|
||||
$vorlage_kurzbz = $this->input->post('vorlage_kurzbz');
|
||||
$oe_kurzbz = $this->input->post('oe_kurzbz');
|
||||
$msgVars = $this->input->post('msgvars');
|
||||
|
||||
$msgVarsData = $this->MessageModel->getMsgVarsDataByPrestudentId($prestudents);
|
||||
|
||||
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
|
||||
$prestudentsData = $this->PrestudentModel->getOrganisationunits($prestudents);
|
||||
|
||||
// Adds the organisation unit to each prestudent
|
||||
if (isEmptyString($oe_kurzbz) && hasData($msgVarsData) && hasData($prestudentsData))
|
||||
{
|
||||
$this->CLMessagesModel->addOeToPrestudents($msgVarsData, $prestudentsData);
|
||||
}
|
||||
|
||||
$send = $this->CLMessagesModel->send($msgVarsData, null, $oe_kurzbz, $vorlage_kurzbz, $msgVars);
|
||||
|
||||
$this->outputJson(getData($send));
|
||||
}
|
||||
// Public methods - JSON output - called by this controller and FASMessages (view system/messages/messageWrite)
|
||||
|
||||
/**
|
||||
* Returns an object that represent a template store in database
|
||||
@@ -185,6 +156,9 @@ class Messages extends Auth_Controller
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Public methods - JSON output - called by infocenter
|
||||
|
||||
/**
|
||||
* Outputs message data for a message (identified my msg id and receiver id) in JSON format
|
||||
*/
|
||||
@@ -204,4 +178,33 @@ class Messages extends Auth_Controller
|
||||
$this->outputJson(array(getData($msg)[0]));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a new message
|
||||
* - The recipients are prestudents
|
||||
* - An email template with message var may be provided
|
||||
* - A global organisation unit may be provided, otherwise is used the prestudent one
|
||||
*/
|
||||
public function sendJson()
|
||||
{
|
||||
$prestudents = $this->input->post('prestudents');
|
||||
$vorlage_kurzbz = $this->input->post('vorlage_kurzbz');
|
||||
$oe_kurzbz = $this->input->post('oe_kurzbz');
|
||||
$msgVars = $this->input->post('msgvars');
|
||||
|
||||
$msgVarsData = $this->MessageModel->getMsgVarsDataByPrestudentId($prestudents);
|
||||
|
||||
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
|
||||
$prestudentsData = $this->PrestudentModel->getOrganisationunits($prestudents);
|
||||
|
||||
// Adds the organisation unit to each prestudent
|
||||
if (isEmptyString($oe_kurzbz) && hasData($msgVarsData) && hasData($prestudentsData))
|
||||
{
|
||||
$this->CLMessagesModel->addOeToPrestudents($msgVarsData, $prestudentsData);
|
||||
}
|
||||
|
||||
$send = $this->CLMessagesModel->send($msgVarsData, null, $oe_kurzbz, $vorlage_kurzbz, $msgVars);
|
||||
|
||||
$this->outputJson(getData($send));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -646,7 +646,7 @@ class InfoCenter extends Auth_Controller
|
||||
public function reloadMessages($person_id)
|
||||
{
|
||||
$messages = $this->MessageModel->getMessagesOfPerson($person_id, 1);
|
||||
$this->load->view('system/messages/messageList.php', array('messages' => $messages->retval));
|
||||
$this->load->view('system/infocenter/messageList.php', array('messages' => $messages->retval));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
'customJSs' => array(
|
||||
'public/js/bootstrapper.js',
|
||||
'public/js/tablesort/tablesort.js',
|
||||
'public/js/messaging/messageList.js',
|
||||
'public/js/infocenter/messageList.js',
|
||||
'public/js/infocenter/infocenterDetails.js'
|
||||
),
|
||||
'phrases' => array(
|
||||
@@ -147,7 +147,7 @@
|
||||
<div class="panel-body">
|
||||
<div class="row" id="messagelist">
|
||||
<?php
|
||||
$this->load->view('system/messages/messageList.php', $messages);
|
||||
$this->load->view('system/infocenter/messageList.php', $messages);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user