mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-22 17:32:18 +00:00
- Renamed public/js/messaging/messageClient.js to public/js/messaging/read.js
- Added new JS public/js/messaging/write.js used in view application/views/system/messages/ajaxWrite.php - Added new public method write, listReceivedMessages, listSentMessages and sendMessageToOU to controller system/messages/MessageClient.php - Removed private method _getReceiversByOekurzbz from MessageLib - Fixed method sendMessageOU of MessageLib - Added new public method prepareAjaxWrite to model CL/Messages_model - Fixed method prepareAjaxReadReceived of model CL/Messages_model - Added new public method prepareAjaxReadSent to model CL/Messages_model - Changed method CL/Messages_model->_personLog interface - Added new public method getOrganisationunitsByPersonId to crm/Prestudent_model - Added new public method getReceivedMessages to model system/Recipient_model - Changed getReceivedMessages method of model system/Recipient_model - Changed view system/messages/ajaxRead.php - Added new view system/messages/ajaxWrite.php
This commit is contained in:
@@ -8,8 +8,11 @@ class MessageClient extends Auth_Controller
|
||||
{
|
||||
parent::__construct(
|
||||
array(
|
||||
'read' => array('basis/message:r'),
|
||||
'listMessages' => array('basis/message:r')
|
||||
'read' => array('basis/person:r'),
|
||||
'write' => array('basis/person:r'),
|
||||
'listReceivedMessages' => array('basis/person:r'),
|
||||
'listSentMessages' => array('basis/person:r'),
|
||||
'sendMessageToOU' => array('basis/person:r')
|
||||
)
|
||||
);
|
||||
|
||||
@@ -27,13 +30,39 @@ class MessageClient extends Auth_Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns JSON that that contains all the received messages by the currently logged user
|
||||
* This JSON structure is nested data used by tabulator
|
||||
* Starts the GUI used to write a personal message to an organisation unit
|
||||
*/
|
||||
public function listMessages()
|
||||
public function write()
|
||||
{
|
||||
$jsonNestedData = $this->CLMessagesModel->prepareAjaxRead();
|
||||
// Loads the view to write a message
|
||||
$this->load->view('system/messages/ajaxWrite', $this->CLMessagesModel->prepareAjaxWrite());
|
||||
}
|
||||
|
||||
$this->outputJson($jsonNestedData);
|
||||
/**
|
||||
* Returns JSON that that contains all the received messages by the currently logged user
|
||||
*/
|
||||
public function listReceivedMessages()
|
||||
{
|
||||
$this->outputJson($this->CLMessagesModel->prepareAjaxReadReceived());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns JSON that that contains all the sent messages by the currently logged user
|
||||
*/
|
||||
public function listSentMessages()
|
||||
{
|
||||
$this->outputJson($this->CLMessagesModel->prepareAjaxReadSent());
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function sendMessageToOU()
|
||||
{
|
||||
$receiverOU = $this->input->post('receiverOU');
|
||||
$subject = $this->input->post('subject');
|
||||
$body = $this->input->post('body');
|
||||
|
||||
$this->outputJson($this->CLMessagesModel->sendToOrganisationUnit($receiverOU, $subject, $body));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user