Merge branch 'feature-6963/Messaging_system_hide_button_to_write'

This commit is contained in:
Andreas Österreicher
2020-04-21 15:16:38 +02:00
6 changed files with 60 additions and 4 deletions
@@ -34,7 +34,7 @@ class MessageClient extends FHC_Controller
public function read()
{
// Loads the view to read messages
$this->load->view('system/messages/ajaxRead');
$this->load->view('system/messages/ajaxRead', $this->CLMessagesModel->prepareAjaxRead());
}
/**
+17
View File
@@ -91,6 +91,23 @@ class Messages_model extends CI_Model
}
}
/**
* Prepares data for the view system/messages/ajaxRead
*/
public function prepareAjaxRead()
{
$psResult = $this->PrestudentModel->loadWhere(array('person_id' => getAuthPersonId()));
if (isError($psResult)) show_error('An error occurred while loading this page, please contact the site administrator');
if (hasData($psResult))
{
return array('writeButton' => '<input id="writeMessage" type="button" value="'.$this->p->t('ui', 'nachrichtSenden').'">');
}
return array('writeButton' => '');
}
/**
* Prepares data for the view system/messages/ajaxWrite
*/
@@ -44,7 +44,7 @@
<span class="buttonsSpacer"></span>
<span>
<input id="writeMessage" type="button" value="<?php echo $this->p->t('ui', 'nachrichtSenden'); ?>">
<?php echo $writeButton; ?>
<input id="replyMessage" type="button" value="<?php echo $this->p->t('global', 'reply'); ?>">
</span>
@@ -85,6 +85,12 @@
<br>
<div class="row">
<div class="col-lg-12 text-right">
<button id="backButton" class="btn btn-default" type="button">
<?php echo $this->p->t('ui', 'backToReadWriteMessage'); ?>
</button>
<button id="sendButton" class="btn btn-default" type="button">
<?php echo $this->p->t('ui', 'senden'); ?>
+12
View File
@@ -44,6 +44,16 @@ function sendMessageToOU()
}
}
/**
*
*/
function backToInOut()
{
window.location = FHC_JS_DATA_STORAGE_OBJECT.app_root +
FHC_JS_DATA_STORAGE_OBJECT.ci_router + "/" +
FHC_JS_DATA_STORAGE_OBJECT.called_path + "/read";
}
/**
*
*/
@@ -60,4 +70,6 @@ $(document).ready(function () {
$('#sendButton').click(sendMessageToOU);
$('#backButton').click(backToInOut);
});
+23 -2
View File
@@ -3618,8 +3618,8 @@ When on hold, the date is only a reminder.',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Es existierte bereits ein Bewerberstatus und eine Reihungstestteilnahme.
Deshalb wurde bei der Freigabe der Bewerberstatus automatisch hinzugefügt und der Bewerber als Reihungstestabsolvent markiert.
'text' => 'Es existierte bereits ein Bewerberstatus und eine Reihungstestteilnahme.
Deshalb wurde bei der Freigabe der Bewerberstatus automatisch hinzugefügt und der Bewerber als Reihungstestabsolvent markiert.
Die Reihungstestpunkte müssen aber noch manuell eingetragen werden!',
'description' => '',
'insertvon' => 'system'
@@ -4453,7 +4453,28 @@ When on hold, the date is only a reminder.',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'ui',
'phrase' => 'backToReadWriteMessage',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Zurück zur Inbox/Outbox',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Back to Inbox/Outbox',
'description' => '',
'insertvon' => 'system'
)
)
)
);