- details bei abgewiesenen

This commit is contained in:
ma0048
2023-05-17 08:41:04 +02:00
parent da5494ad35
commit 08c594148b
3 changed files with 22 additions and 3 deletions
@@ -314,7 +314,7 @@ class InfoCenter extends Auth_Controller
show_error('Person does not exist!');
$origin_page = $this->input->get(self::ORIGIN_PAGE);
if ($origin_page == self::INDEX_PAGE)
if (in_array($origin_page, array(self::INDEX_PAGE, self::ABGEWIESEN_PAGE)))
{
// mark person as locked for editing
$result = $this->PersonLockModel->lockPerson($person_id, $this->_uid, self::APP);
@@ -359,7 +359,14 @@ class InfoCenter extends Auth_Controller
if (isError($result)) show_error(getError($result));
$redirectLink = '/'.self::INFOCENTER_URI.'?'.self::FHC_CONTROLLER_ID.'='.$this->getControllerId();
$origin_page = $this->input->get(self::ORIGIN_PAGE);
if ($origin_page === self::ABGEWIESEN_PAGE)
$redirectLink = self::INFOCENTER_URI. '/' .self::ABGEWIESEN_PAGE;
else
$redirectLink = '/'.self::INFOCENTER_URI;
$redirectLink .= '?'.self::FHC_CONTROLLER_ID.'='.$this->getControllerId();
// Force reload of Dataset after Unlock
$redirectLink .= '&'.self::KEEP_TABLESORTER_FILTER.'=true';
@@ -70,6 +70,7 @@ $query = '
'requiredPermissions' => 'infocenter',
'datasetRepresentation' => 'tablesorter',
'checkboxes' => 'PersonId',
'additionalColumns' => array('Details'),
'columnsAliases' => array(
'PersonId',
'PreStudentID',
@@ -82,6 +83,16 @@ $query = '
),
'formatRow' => function($datasetRaw) {
/* NOTE: Dont use $this here for PHP Version compatibility */
$datasetRaw->{'Details'} = sprintf(
'<a href="%s?person_id=%s&origin_page=%s&fhc_controller_id=%s&prev_filter_id=%s">Details</a>',
site_url('system/infocenter/InfoCenter/showDetails'),
$datasetRaw->{'PersonId'},
'abgewiesen',
(isset($_GET['fhc_controller_id']) ? $_GET['fhc_controller_id'] : ''),
(isset($_GET['filter_id']) ? $_GET['filter_id'] : '')
);
if ($datasetRaw->{'Nachricht'} === null)
{
$datasetRaw->{'Nachricht'} = 'Nein';
@@ -57,10 +57,11 @@
if (isset($lockedby)):
echo $this->p->t('global', 'wirdBearbeitetVon').': ';
echo $lockedby;
if ($origin_page == 'index'):
if (in_array($origin_page, array('index', 'abgewiesen'))):
$unlockpath = 'unlockPerson/'.$stammdaten->person_id;
$unlockpath .= '?fhc_controller_id='.$fhc_controller_id;
$unlockpath .= '&filter_id='.$prev_filter_id;
$unlockpath .= '&origin_page='.$origin_page;
?>
&nbsp;&nbsp;
<a href="<?php echo $unlockpath; ?>">