Infocenter notizen update

- removed html specialchars in quickinfo
- notizen are retrieved by ajax when click on tablerow
This commit is contained in:
alex
2019-01-09 18:10:55 +01:00
parent 17ba5c15d8
commit 1bdf8bd435
4 changed files with 94 additions and 25 deletions
@@ -84,6 +84,7 @@ class InfoCenter extends Auth_Controller
'saveZgvPruefung' => 'infocenter:rw',
'saveAbsage' => 'infocenter:rw',
'saveFreigabe' => 'infocenter:rw',
'getNotiz' => 'infocenter:r',
'saveNotiz' => 'infocenter:rw',
'updateNotiz' => 'infocenter:rw',
'reloadZgvPruefungen' => 'infocenter:r',
@@ -533,6 +534,20 @@ class InfoCenter extends Auth_Controller
$this->output->set_content_type('application/json')->set_output(json_encode($json));
}
/**
* Gets a Notiz
*/
public function getNotiz()
{
$notiz_id = $this->input->get('notiz_id');
$result = $this->NotizModel->load(
$notiz_id
);
$this->output->set_content_type('application/json')->set_output(json_encode($result));
}
/**
* Saves a new Notiz for a person
* @param $person_id
@@ -557,10 +572,10 @@ class InfoCenter extends Auth_Controller
* Updates a new Notiz for a person
* @param int $notiz_id
* @param int $person_id
* @return bool true if success
*/
public function updateNotiz($notiz_id, $person_id)
public function updateNotiz($notiz_id)
{
$person_id = $this->input->post('person_id');
$titel = $this->input->post('notiztitel');
$text = $this->input->post('notiz');
@@ -9,11 +9,11 @@
<tbody>
<?php foreach ($notizen as $notiz): ?>
<tr data-toggle="tooltip"
title="<?php echo isset($notiz->text) ? strip_tags($notiz->text) : '' ?>" style="cursor: pointer">
title="<?php echo isset($notiz->text) ? html_escape($notiz->text) : '' ?>" style="cursor: pointer">
<td><?php echo date_format(date_create($notiz->insertamum), 'd.m.Y H:i:s') ?></td>
<td><?php echo html_escape($notiz->titel) ?></td>
<td><?php echo $notiz->verfasser_uid ?></td>
<td style="display: none"><?php echo $notiz->notiz_id ?></td>
<td style="display: none" class="hiddennotizid"><?php echo $notiz->notiz_id ?></td>
</tr>
<?php endforeach ?>
</tbody>