mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 01:42:17 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -7,8 +7,8 @@ $config['send_immediately'] = false;
|
||||
|
||||
$config['msg_delivery'] = true; // Default true
|
||||
$config['system_person_id'] = 1; // Dummy sender, used for sending messages from the system
|
||||
$config['redirect_view_message_url'] = 'index.ci.php/Redirect/redirectByToken/'; //
|
||||
$config['message_html_view_url'] = 'index.ci.php/ViewMessage/toHTML/';
|
||||
$config['redirect_view_message_url'] = site_url('Redirect/redirectByToken/'); //
|
||||
$config['message_html_view_url'] = site_url('ViewMessage/toHTML/');
|
||||
$config['message_server'] = 'http://www.fhcomplete.org/';
|
||||
$config['assistent_function'] = 'ass';
|
||||
|
||||
@@ -65,4 +65,4 @@ define('MSG_ERR_INVALID_RECIPIENTS', 105);
|
||||
define('MSG_ERR_INVALID_RECEIVER_ID', 106);
|
||||
define('MSG_ERR_INVALID_OU', 107);
|
||||
define('MSG_ERR_INVALID_TEMPLATE', 108);
|
||||
define('MSG_ERR_INVALID_TOKEN', 109);
|
||||
define('MSG_ERR_INVALID_TOKEN', 109);
|
||||
|
||||
@@ -1,81 +1,103 @@
|
||||
<?php
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// Header menu
|
||||
|
||||
$config['navigation_header'] = array(
|
||||
'*' => array(
|
||||
'FH-Complete' => site_url(''),
|
||||
'Vilesci' => base_url('/vilesci'),
|
||||
'CIS' => CIS_ROOT
|
||||
'fhcomplete' => array(
|
||||
'link' => site_url(''),
|
||||
'icon' => '',
|
||||
'description' => 'FH-Complete',
|
||||
'sort' => 1
|
||||
),
|
||||
'vilesci' => array(
|
||||
'link' => base_url('vilesci'),
|
||||
'icon' => '',
|
||||
'description' => 'Vilesci',
|
||||
'sort' => 2
|
||||
),
|
||||
'cis' => array(
|
||||
'link' => CIS_ROOT,
|
||||
'icon' => '',
|
||||
'description' => 'CIS',
|
||||
'sort' => 3
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------------------
|
||||
// Left side menu
|
||||
|
||||
$config['navigation_menu'] = array();
|
||||
|
||||
$config['navigation_menu']['Vilesci/index'] = array(
|
||||
'Dashboard' => array(
|
||||
'dashboard' => array(
|
||||
'link' => '#',
|
||||
'description' => 'Dashboard',
|
||||
'icon' => 'dashboard'
|
||||
'icon' => 'dashboard',
|
||||
'sort' => 1
|
||||
),
|
||||
'Lehre' => array(
|
||||
'lehre' => array(
|
||||
'link' => '#',
|
||||
'icon' => 'graduation-cap',
|
||||
'description' => 'Lehre',
|
||||
'expand' => true,
|
||||
'sort' => 2,
|
||||
'children'=> array(
|
||||
'CIS' => array(
|
||||
'cis' => array(
|
||||
'link' => CIS_ROOT,
|
||||
'icon' => '',
|
||||
'description' => 'CIS',
|
||||
'expand' => true
|
||||
'expand' => true,
|
||||
'sort' => 1
|
||||
),
|
||||
'Infocenter' => array(
|
||||
'link' => site_url('/system/infocenter/InfoCenter'),
|
||||
'infocenter' => array(
|
||||
'link' => site_url('system/infocenter/InfoCenter'),
|
||||
'icon' => 'info',
|
||||
'description' => 'Infocenter',
|
||||
'expand' => true
|
||||
'expand' => true,
|
||||
'sort' => 2
|
||||
),
|
||||
)
|
||||
),
|
||||
'Administration' => array(
|
||||
'administration' => array(
|
||||
'link' => '#',
|
||||
'icon' => 'gear',
|
||||
'description' => 'Administration',
|
||||
'expand' => false,
|
||||
'sort' => 3,
|
||||
'children'=> array(
|
||||
'Vilesci' => array(
|
||||
'link' => base_url('vilesci/'),
|
||||
'vilesci' => array(
|
||||
'link' => base_url('vilesci'),
|
||||
'icon' => '',
|
||||
'description' => 'Vilesci',
|
||||
'expand' => true
|
||||
'expand' => true,
|
||||
'sort' => 1
|
||||
),
|
||||
'Extensions' => array(
|
||||
'link' => site_url('/system/extensions/Manager'),
|
||||
'extensions' => array(
|
||||
'link' => site_url('system/extensions/Manager'),
|
||||
'icon' => 'cubes',
|
||||
'description' => 'Extensions Manager',
|
||||
'expand' => true
|
||||
'expand' => true,
|
||||
'sort' => 2
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
$config['navigation_menu']['system/infocenter/InfoCenter/index'] = array(
|
||||
'Freigegeben' => array(
|
||||
'link' => base_url('index.ci.php/system/infocenter/InfoCenter/infocenterFreigegeben'),
|
||||
'freigegeben' => array(
|
||||
'link' => site_url('system/infocenter/InfoCenter/freigegeben'),
|
||||
'description' => 'Freigegeben',
|
||||
'icon' => 'thumbs-up'
|
||||
));
|
||||
)
|
||||
);
|
||||
|
||||
$config['navigation_menu']['system/infocenter/InfoCenter/showDetails'] = array(
|
||||
'Freigegeben' => array(
|
||||
'link' => base_url('index.ci.php/system/infocenter/InfoCenter/infocenterFreigegeben'),
|
||||
'description' => 'Freigegeben',
|
||||
'icon' => 'thumbs-up'
|
||||
));
|
||||
|
||||
$config['navigation_menu']['system/infocenter/InfoCenter/infocenterFreigegeben'] = array(
|
||||
'Zurück' => array(
|
||||
'link' => base_url('index.ci.php/system/infocenter/InfoCenter/index'),
|
||||
'description' => 'Zurück',
|
||||
$config['navigation_menu']['system/infocenter/InfoCenter/freigegeben'] = array(
|
||||
'back' => array(
|
||||
'link' => site_url('system/infocenter/InfoCenter/index'),
|
||||
'description' => 'Home',
|
||||
'icon' => 'angle-left'
|
||||
));
|
||||
)
|
||||
);
|
||||
|
||||
@@ -0,0 +1,214 @@
|
||||
<?php
|
||||
/**
|
||||
* FH-Complete
|
||||
*
|
||||
* @package FHC-API
|
||||
* @author FHC-Team
|
||||
* @copyright Copyright (c) 2016, fhcomplete.org
|
||||
* @license GPLv3
|
||||
* @link http://fhcomplete.org
|
||||
* @since Version 1.0
|
||||
* @filesource
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH'))
|
||||
exit('No direct script access allowed');
|
||||
|
||||
class AmpelMail extends FHC_Controller
|
||||
{
|
||||
const CIS_AMPELVERWALTUNG_URL =
|
||||
CIS_ROOT. "cis/index.php?menu=".
|
||||
CIS_ROOT. "cis/menu.php?content_id=&content=".
|
||||
CIS_ROOT. "cis/private/tools/ampelverwaltung.php";
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
// Allow script execution only from CLI
|
||||
if ($this->input->is_cli_request())
|
||||
{
|
||||
$cli = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->output->set_status_header(403, 'Jobs must be run from the CLI');
|
||||
echo "Jobs must be run from the CLI";
|
||||
exit;
|
||||
}
|
||||
|
||||
// Load models
|
||||
$this->load->model('content/Ampel_model', 'AmpelModel');
|
||||
$this->load->model('person/Person_model', 'PersonModel');
|
||||
|
||||
// Load helpers
|
||||
$this->load->helper('sancho');
|
||||
}
|
||||
|
||||
/**
|
||||
* Main function index as help
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$result = "The following are the available command line interface commands\n\n";
|
||||
$result .= "php index.ci.php jobs/AmpelMail generateAmpelMail";
|
||||
|
||||
echo $result. PHP_EOL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates mail content for new and overdue Ampeln, which
|
||||
* 1. are not confirmed by the user yet and
|
||||
* 2. are marked to be sent by email
|
||||
* Ampel is new when inserted within the last 7 days before the cronjob runs (as cronjob runs weekly)
|
||||
* Ampel is overdue when the cronjob runs after the deadline date.
|
||||
* @return void
|
||||
*/
|
||||
public function generateAmpelMail()
|
||||
{
|
||||
// Get all notifications, that are not expired, not before vorlaufzeit AND email is true
|
||||
$result_active_ampeln = $this->AmpelModel->active(true);
|
||||
|
||||
// Stores users, description, deadline and system-link of notifications
|
||||
$new_ampel_data_arr = array(); // data of new notifications that are not confirmed
|
||||
$overdue_ampel_data_arr = array(); // data of overdue notifications that are not confirmed
|
||||
|
||||
if (hasData($result_active_ampeln))
|
||||
{
|
||||
$ampel_arr = $result_active_ampeln->retval;
|
||||
|
||||
// Loop through ampeln
|
||||
foreach ($ampel_arr as $ampel)
|
||||
{
|
||||
$ampel_id = $ampel->ampel_id;
|
||||
$now = date_create(date('Y-m-d'));
|
||||
$deadline = date_create($ampel->deadline);
|
||||
$insert_date = date_create($ampel->insertamum);
|
||||
$qry_all_ampel_user = $ampel->benutzer_select; // sql select to get all user who get this ampel
|
||||
$new = false;
|
||||
$overdue = false;
|
||||
|
||||
// get all user, who get this ampel
|
||||
$result_ampel_user = $this->AmpelModel->execBenutzerSelect($qry_all_ampel_user);
|
||||
|
||||
if (hasData($result_ampel_user))
|
||||
{
|
||||
$ampel_user_arr = $result_ampel_user->retval;
|
||||
|
||||
// loop through all user, who get this ampel
|
||||
foreach ($ampel_user_arr as $ampel_user)
|
||||
{
|
||||
$uid = $ampel_user->uid;
|
||||
|
||||
// break if ampel was almost confirmed by the user
|
||||
if($this->AmpelModel->isConfirmed($ampel_id, $uid)) break;
|
||||
|
||||
// check if ampel is new (inserted within last week, as cronjob will run every week)
|
||||
if ($now->diff($insert_date)->days <= 7) $new = true;
|
||||
|
||||
//check if ampel is overdue
|
||||
if ($now > $deadline) $overdue = true;
|
||||
|
||||
// if ampel is new
|
||||
if ($new)
|
||||
{
|
||||
$html_text = '<p><strong>'. strtoupper($ampel->kurzbz). '</strong></p><br>';
|
||||
|
||||
// create template-specific data array of new notifications
|
||||
// if uid already exists in the array, only the html text will be added to the existing html text
|
||||
$new_ampel_data_arr =
|
||||
$this->_getAmpelContentData($uid, $html_text, $new_ampel_data_arr);
|
||||
}
|
||||
|
||||
// if ampel is overdue
|
||||
if ($overdue)
|
||||
{
|
||||
$html_text = '
|
||||
<p><strong>'. strtoupper($ampel->kurzbz). '</strong><br>
|
||||
<small>
|
||||
<i style="color: #65696E;">Die Deadline für die Bestätigung war am
|
||||
<span style="color: #FF0000;">'. date_format($deadline, 'Y-m-d'). '</span>
|
||||
</i>
|
||||
</small></p><br>';
|
||||
|
||||
// create template-specific data array of overdue notifications
|
||||
// if uid already exists in the array, only the html text will be added to the existing html text
|
||||
$overdue_ampel_data_arr =
|
||||
$this->_getAmpelContentData($uid, $html_text, $overdue_ampel_data_arr);
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif (isError($result_ampel_user))
|
||||
{
|
||||
show_error($result_ampel_user->error);
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif (isError($result_active_ampeln))
|
||||
{
|
||||
show_error($result_active_ampeln->error);
|
||||
}
|
||||
|
||||
// Send mails for new ampeln merged by user
|
||||
foreach ($new_ampel_data_arr as $new_ampel_data)
|
||||
{
|
||||
sendMail(
|
||||
'Sancho_Content_AmpelNeu',
|
||||
$new_ampel_data,
|
||||
$new_ampel_data['uid']. '@'. DOMAIN,
|
||||
'Du hast eine neue Ampel!',
|
||||
'sancho_header_neue_nachrichten_in_ampelsystem.jpg'
|
||||
);
|
||||
};
|
||||
// Send mails for overdue ampeln merged by user
|
||||
foreach ($overdue_ampel_data_arr as $overdue_ampel_data)
|
||||
{
|
||||
sendMail(
|
||||
'Sancho_Content_AmpelUeberfaellig',
|
||||
$overdue_ampel_data,
|
||||
$overdue_ampel_data['uid']. '@'. DOMAIN,
|
||||
'Bestätige bitte Deine Ampel!',
|
||||
'sancho_header_ampel_overdue.jpg'
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Private methods
|
||||
/**
|
||||
* Returns associative array with data as needed in the ampel content templates.
|
||||
* @param string $uid UID, needed to merge user.
|
||||
* @param string $html_text Specific HTML Content to be set initially for a user or to add if user exists.
|
||||
* @param array $ampel_data_arr Array with ampeln.
|
||||
* @return array
|
||||
*/
|
||||
private function _getAmpelContentData($uid, $html_text, $ampel_data_arr)
|
||||
{
|
||||
$firstName = $this->PersonModel->getByUid($uid)->retval[0]->vorname;
|
||||
|
||||
// check if user already exists in the array
|
||||
$key_position = array_search($uid, array_column($ampel_data_arr, 'uid'));
|
||||
|
||||
// If user already exists in the array, add only new ampel data to users ampel list
|
||||
if ($key_position !== false)
|
||||
{
|
||||
$ampel_data_arr[$key_position]['ampel_list'] .= $html_text;
|
||||
}
|
||||
// If user does not exist, create new user and push all data needed
|
||||
else
|
||||
{
|
||||
$ampel_data_arr[] = array(
|
||||
'uid' => $uid,
|
||||
'firstName' => $firstName,
|
||||
'ampel_list' => $html_text,
|
||||
'link' => self::CIS_AMPELVERWALTUNG_URL
|
||||
);
|
||||
}
|
||||
return $ampel_data_arr;
|
||||
}
|
||||
}
|
||||
@@ -39,7 +39,7 @@ class Prestudentstatus extends FHC_Controller
|
||||
public function index()
|
||||
{
|
||||
$result = "The following are the available command line interface commands\n\n";
|
||||
$result .= "php index.ci.php jobs/Prestudentstatus CorrectStudienplan";
|
||||
$result .= "php ".$this->config->item('index_page')." jobs/Prestudentstatus CorrectStudienplan";
|
||||
|
||||
echo $result.PHP_EOL;
|
||||
}
|
||||
|
||||
@@ -3,178 +3,82 @@
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
*
|
||||
* This controller operates between (interface) the JS (GUI) and the NavigationLib (back-end)
|
||||
* Provides data to the ajax get calls about the filter
|
||||
* This controller works with JSON calls on the HTTP GET or POST and the output is always JSON
|
||||
*/
|
||||
class Navigation extends VileSci_Controller
|
||||
class Navigation extends FHC_Controller
|
||||
{
|
||||
const SESSION_NAME = 'NAVIGATION_MENU';
|
||||
const NAVIGATION_PAGE_PARAM = 'navigation_page'; // Navigation page parameter name
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* Loads the NavigationLib where the used logic lies
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
parent::__construct(); // parents constructor
|
||||
|
||||
$this->config->load('navigation');
|
||||
|
||||
// Load session library
|
||||
$this->load->library('session');
|
||||
$this->load->library('ExtensionsLib');
|
||||
$this->_loadNavigationLib(); // Loads the NavigationLib with parameters
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* This function creates the left Menu for each Page
|
||||
* @param navigation_widget_called GET Parameter witch holds the currently called Page
|
||||
* @param NAVIGATION_PAGE_PARAM GET Parameter witch holds the currently called Page
|
||||
* @return JSON object with the Menu Entries
|
||||
*/
|
||||
public function menu()
|
||||
{
|
||||
$navigation_widget_called = $this->input->get('navigation_widget_called');
|
||||
$json = array();
|
||||
$menuArray = $this->navigationlib->getMenuArray($this->input->get(self::NAVIGATION_PAGE_PARAM));
|
||||
|
||||
if (isset($navigation_widget_called))
|
||||
{
|
||||
// Get Menu Entries of the Core
|
||||
$navigationMenuArray = $this->config->item('navigation_menu');
|
||||
$json = $this->wildcardsearch($navigationMenuArray, $navigation_widget_called);
|
||||
|
||||
// Load Menu Entries of Extensions
|
||||
$extensions = $this->extensionslib->getInstalledExtensions();
|
||||
if(hasData($extensions))
|
||||
{
|
||||
$json_extension = array();
|
||||
foreach($extensions->retval as $ext)
|
||||
{
|
||||
$filename = APPPATH.'config/'.ExtensionsLib::EXTENSIONS_DIR_NAME.'/'.$ext->name.'/navigation.php';
|
||||
if (file_exists($filename))
|
||||
{
|
||||
unset($config);
|
||||
include($filename);
|
||||
if(isset($config['navigation_menu']) && is_array($config['navigation_menu']))
|
||||
{
|
||||
$json_extension = array_merge_recursive($json_extension, $this->wildcardsearch($config['navigation_menu'], $navigation_widget_called));
|
||||
}
|
||||
}
|
||||
}
|
||||
// Merge Extension Menuentries with the Core Entries
|
||||
$json = array_merge_recursive($json, $json_extension);
|
||||
}
|
||||
|
||||
// Load dynamic Menu Entries from Session
|
||||
if (isset($_SESSION['navigation_menu']))
|
||||
{
|
||||
$navigationMenuSessionArray = $_SESSION['navigation_menu'];
|
||||
|
||||
if (isset($navigationMenuSessionArray) && is_array($navigationMenuSessionArray))
|
||||
{
|
||||
if (isset($navigationMenuSessionArray[$navigation_widget_called]))
|
||||
{
|
||||
$json = array_merge_recursive($json, $navigationMenuSessionArray[$navigation_widget_called]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->output->set_content_type('application/json')->set_output(json_encode($json));
|
||||
$this->outputJsonSuccess($menuArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* This function creates the Top Menu for each Page
|
||||
* @param navigation_widget_called GET Parameter witch holds the currently called Page
|
||||
* @param NAVIGATION_PAGE_PARAM GET Parameter witch holds the currently called Page
|
||||
* @return JSON object with the Menu Entries
|
||||
*/
|
||||
public function header()
|
||||
{
|
||||
$navigation_widget_called = $this->input->get('navigation_widget_called');
|
||||
$json = array();
|
||||
$headerArray = $this->navigationlib->getHeaderArray($this->input->get(self::NAVIGATION_PAGE_PARAM));
|
||||
|
||||
if (isset($navigation_widget_called))
|
||||
{
|
||||
// Load Header Entries of Core
|
||||
$navigationHeaderArray = $this->config->item('navigation_header');
|
||||
$json = $this->wildcardsearch($navigationHeaderArray, $navigation_widget_called);
|
||||
|
||||
// Load Header Entries of Extensions
|
||||
$extensions = $this->extensionslib->getInstalledExtensions();
|
||||
if(hasData($extensions))
|
||||
{
|
||||
$json_extension = array();
|
||||
foreach($extensions->retval as $ext)
|
||||
{
|
||||
$filename = APPPATH.'config/'.ExtensionsLib::EXTENSIONS_DIR_NAME.'/'.$ext->name.'/navigation.php';
|
||||
if (file_exists($filename))
|
||||
{
|
||||
unset($config);
|
||||
include($filename);
|
||||
if(isset($config['navigation_header']) && is_array($config['navigation_header']))
|
||||
{
|
||||
$json_extension = array_merge_recursive($json_extension, $this->wildcardsearch($config['navigation_header'], $navigation_widget_called));
|
||||
}
|
||||
}
|
||||
}
|
||||
$json = array_merge_recursive($json, $json_extension);
|
||||
}
|
||||
|
||||
// Load dynamic Header Entries from Session
|
||||
if (isset($_SESSION['navigation_header']))
|
||||
{
|
||||
$navigationHeaderSessionArray = $_SESSION['navigation_header'];
|
||||
|
||||
if (isset($navigationHeaderSessionArray) && is_array($navigationHeaderSessionArray))
|
||||
{
|
||||
if (isset($navigationHeaderSessionArray[$navigation_widget_called]))
|
||||
{
|
||||
$jsontmp = $this->wildcardsearch($navigationHeaderSessionArray, $navigation_widget_called);
|
||||
$json = array_merge_recursive($json, $jsontmp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->output->set_content_type('application/json')->set_output(json_encode($json));
|
||||
$this->outputJsonSuccess($headerArray);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Private methods
|
||||
|
||||
/**
|
||||
* Searches a Menuentry. If there is no exact entry it searches for Wildcard Entries with a Star
|
||||
* Example:
|
||||
* Searching for /system/foo/index will Match the following Menuentries:
|
||||
* /system/foo/index
|
||||
* /system/foo/*
|
||||
* /system/*
|
||||
* *
|
||||
*
|
||||
* @param $navigationArray Array to Search in.
|
||||
* @param $navigation_widget_called Navigation to search for.
|
||||
* @return Navigation Array if found, empty array otherwise
|
||||
* Loads the FiltersLib with the NAVIGATION_PAGE_PARAM parameter
|
||||
* If the parameter NAVIGATION_PAGE_PARAM is not given then the execution of the controller is terminated and
|
||||
* an error message is printed
|
||||
*/
|
||||
private function wildcardsearch($navigationArray, $navigation_widget_called)
|
||||
private function _loadNavigationLib()
|
||||
{
|
||||
// Sort Navigation to have them in correct order
|
||||
krsort($navigationArray);
|
||||
|
||||
// 100% match found
|
||||
if(isset($navigationArray[$navigation_widget_called]))
|
||||
// If the parameter NAVIGATION_PAGE_PARAM is present in the HTTP GET or POST
|
||||
if (isset($_GET[self::NAVIGATION_PAGE_PARAM]) || isset($_POST[self::NAVIGATION_PAGE_PARAM]))
|
||||
{
|
||||
return $navigationArray[$navigation_widget_called];
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach($navigationArray as $key=>$row)
|
||||
// If it is present in the HTTP GET
|
||||
if (isset($_GET[self::NAVIGATION_PAGE_PARAM]))
|
||||
{
|
||||
// Search for * Entries
|
||||
if(mb_strpos($key, '*') === 0 || mb_strpos($key, '*') === mb_strlen($key) - 1)
|
||||
{
|
||||
// Take * Entry if Matches
|
||||
$search = mb_substr($key, 0, -1);
|
||||
if($search == '' || mb_strpos($navigation_widget_called, $search) === 0)
|
||||
{
|
||||
return $row;
|
||||
}
|
||||
}
|
||||
$navigationPage = $this->input->get(self::NAVIGATION_PAGE_PARAM); // is retrived from the HTTP GET
|
||||
}
|
||||
elseif (isset($_POST[self::NAVIGATION_PAGE_PARAM])) // Else if it is present in the HTTP POST
|
||||
{
|
||||
$navigationPage = $this->input->post(self::NAVIGATION_PAGE_PARAM); // is retrived from the HTTP POST
|
||||
}
|
||||
}
|
||||
|
||||
return array();
|
||||
// Loads the FiltersLib that contains all the used logic
|
||||
$this->load->library('NavigationLib', array(self::NAVIGATION_PAGE_PARAM => $navigationPage));
|
||||
}
|
||||
else // Otherwise an error will be written in the output
|
||||
{
|
||||
// NOTE: Used echo to speed up the output before the exit otherwise it's not shown
|
||||
echo 'Parameter "'.self::NAVIGATION_PAGE_PARAM.'" not provided!';
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Also shows infocenter-related data for a person and its prestudents, enables document and zgv checks,
|
||||
* Shows infocenter-related data for a person and its prestudents, enables document and zgv checks,
|
||||
* displays and saves Notizen for a person, logs infocenter-related actions for a person
|
||||
*/
|
||||
class InfoCenter extends FHC_Controller
|
||||
@@ -11,13 +11,19 @@ class InfoCenter extends FHC_Controller
|
||||
// App and Verarbeitungstaetigkeit name for logging
|
||||
const APP = 'infocenter';
|
||||
const TAETIGKEIT = 'bewerbung';
|
||||
const FILTER_ID = 'filter_id';
|
||||
|
||||
// URL prefix for this controller
|
||||
const URL_PREFIX = '/system/infocenter/InfoCenter';
|
||||
const INFOCENTER_URI = 'system/infocenter/InfoCenter'; // URL prefix for this controller
|
||||
const INDEX_PAGE = 'index';
|
||||
const FREIGEGEBEN_PAGE = 'freigegeben';
|
||||
const SHOW_DETAILS_PAGE = 'showDetails';
|
||||
|
||||
const NAVIGATION_PAGE = 'navigation_page';
|
||||
const ORIGIN_PAGE = 'origin_page';
|
||||
|
||||
private $_uid; // contains the UID of the logged user
|
||||
|
||||
// Used to log with PersonLogLib
|
||||
private $logparams = array(
|
||||
private $_logparams = array(
|
||||
'saveformalgep' => array(
|
||||
'logtype' => 'Action',
|
||||
'name' => 'Document formally checked',
|
||||
@@ -53,7 +59,6 @@ class InfoCenter extends FHC_Controller
|
||||
'success' => null
|
||||
)
|
||||
);
|
||||
private $uid; // contains the UID of the logged user
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@@ -74,7 +79,6 @@ class InfoCenter extends FHC_Controller
|
||||
$this->load->model('system/personLock_model', 'PersonLockModel');
|
||||
|
||||
// Loads libraries
|
||||
$this->load->library('DmsLib');
|
||||
$this->load->library('PersonLogLib');
|
||||
$this->load->library('WidgetLib');
|
||||
|
||||
@@ -96,34 +100,42 @@ class InfoCenter extends FHC_Controller
|
||||
show_error('You have no Permission! You need Infocenter Role');
|
||||
|
||||
$this->setControllerId(); // sets the controller id
|
||||
|
||||
$this->fhc_controller_id = $this->getControllerId();
|
||||
|
||||
$this->setNavigationMenuArray(); // sets property navigationMenuArray
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* Default
|
||||
* Main page of the InfoCenter tool
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->load->view('system/infocenter/infocenter.php', array('fhc_controller_id' => $this->fhc_controller_id));
|
||||
}
|
||||
$this->_setNavigationMenuIndex(); // define the navigation menu for this page
|
||||
|
||||
public function infocenterFreigegeben()
|
||||
{
|
||||
$this->load->view('system/infocenter/infocenterFreigegeben.php', array('fhc_controller_id' => $this->fhc_controller_id));
|
||||
$this->load->view('system/infocenter/infocenter.php');
|
||||
}
|
||||
|
||||
/**
|
||||
* Freigegeben page of the InfoCenter tool
|
||||
*/
|
||||
public function freigegeben()
|
||||
{
|
||||
$this->_setNavigationMenuFreigegeben(); // define the navigation menu for this page
|
||||
|
||||
$this->load->view('system/infocenter/infocenterFreigegeben.php');
|
||||
}
|
||||
|
||||
/**
|
||||
* Personal details page of the InfoCenter tool
|
||||
* Initialization function, gets person and prestudent data and loads the view with the data
|
||||
* @param $person_id
|
||||
*/
|
||||
public function showDetails($person_id)
|
||||
public function showDetails()
|
||||
{
|
||||
$this->_setNavigationMenuShowDetails();
|
||||
|
||||
$person_id = $this->input->get('person_id');
|
||||
|
||||
if (!is_numeric($person_id))
|
||||
show_error('person id is not numeric!');
|
||||
|
||||
@@ -135,13 +147,11 @@ class InfoCenter extends FHC_Controller
|
||||
if (empty($personexists->retval))
|
||||
show_error('person does not exist!');
|
||||
|
||||
$show_lock_link_get = $this->input->get('show_lock_link');
|
||||
$show_lock_link = !isset($show_lock_link_get) || $show_lock_link_get === '1';
|
||||
|
||||
if ($show_lock_link)
|
||||
$origin_page = $this->input->get(self::ORIGIN_PAGE);
|
||||
if ($origin_page == self::INDEX_PAGE)
|
||||
{
|
||||
//mark person as locked for editing
|
||||
$result = $this->PersonLockModel->lockPerson($person_id, $this->uid, self::APP);
|
||||
// mark person as locked for editing
|
||||
$result = $this->PersonLockModel->lockPerson($person_id, $this->_uid, self::APP);
|
||||
|
||||
if (isError($result))
|
||||
show_error($result->retval);
|
||||
@@ -152,11 +162,11 @@ class InfoCenter extends FHC_Controller
|
||||
|
||||
$data = array_merge(
|
||||
$persondata,
|
||||
$prestudentdata,
|
||||
array('show_lock_link' => $show_lock_link)
|
||||
$prestudentdata
|
||||
);
|
||||
|
||||
$data['fhc_controller_id'] = $this->fhc_controller_id;
|
||||
$data[self::FHC_CONTROLLER_ID] = $this->getControllerId();
|
||||
$data[self::ORIGIN_PAGE] = $origin_page;
|
||||
|
||||
$this->load->view('system/infocenter/infocenterDetails.php', $data);
|
||||
}
|
||||
@@ -172,7 +182,7 @@ class InfoCenter extends FHC_Controller
|
||||
if (isError($result))
|
||||
show_error($result->retval);
|
||||
|
||||
redirect(self::URL_PREFIX.'?fhc_controller_id='.$this->fhc_controller_id);
|
||||
redirect('/'.self::INFOCENTER_URI.'?'.self::FHC_CONTROLLER_ID.'='.$this->getControllerId());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -211,9 +221,7 @@ class InfoCenter extends FHC_Controller
|
||||
}
|
||||
}
|
||||
|
||||
$this->output
|
||||
->set_content_type('application/json')
|
||||
->set_output(json_encode($json));
|
||||
$this->output->set_content_type('application/json')->set_output(json_encode($json));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -224,9 +232,7 @@ class InfoCenter extends FHC_Controller
|
||||
{
|
||||
$prestudent = $this->PrestudentModel->getLastPrestudent($person_id, true);
|
||||
|
||||
$this->output
|
||||
->set_content_type('application/json')
|
||||
->set_output(json_encode($prestudent));
|
||||
$this->output->set_content_type('application/json')->set_output(json_encode($prestudent));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -305,9 +311,7 @@ class InfoCenter extends FHC_Controller
|
||||
$this->_log($logdata['person_id'], 'savezgv', array($logdata['studiengang_kurzbz'], $prestudent_id));
|
||||
}
|
||||
}
|
||||
$this->output
|
||||
->set_content_type('application/json')
|
||||
->set_output(json_encode($result));
|
||||
$this->output->set_content_type('application/json')->set_output(json_encode($result));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -318,7 +322,6 @@ class InfoCenter extends FHC_Controller
|
||||
public function saveAbsage($prestudent_id)
|
||||
{
|
||||
$statusgrund = $this->input->post('statusgrund');
|
||||
$this->fhc_controller_id = $this->input->post('fhc_controller_id');
|
||||
|
||||
$lastStatus = $this->PrestudentstatusModel->getLastStatus($prestudent_id);
|
||||
|
||||
@@ -340,7 +343,7 @@ class InfoCenter extends FHC_Controller
|
||||
'studienplan_id' => $lastStatus->retval[0]->studienplan_id,
|
||||
'status_kurzbz' => 'Abgewiesener',
|
||||
'statusgrund_id' => $statusgrund,
|
||||
'insertvon' => $this->uid,
|
||||
'insertvon' => $this->_uid,
|
||||
'insertamum' => date('Y-m-d H:i:s')
|
||||
)
|
||||
);
|
||||
@@ -396,9 +399,9 @@ class InfoCenter extends FHC_Controller
|
||||
'ausbildungssemester' => $lastStatus->ausbildungssemester
|
||||
),
|
||||
array(
|
||||
'bestaetigtvon' => $this->uid,
|
||||
'bestaetigtvon' => $this->_uid,
|
||||
'bestaetigtam' => date('Y-m-d'),
|
||||
'updatevon' => $this->uid,
|
||||
'updatevon' => $this->_uid,
|
||||
'updateamum' => date('Y-m-d H:i:s')
|
||||
)
|
||||
);
|
||||
@@ -454,16 +457,14 @@ class InfoCenter extends FHC_Controller
|
||||
$text = $this->input->post('notiz');
|
||||
$erledigt = false;
|
||||
|
||||
$result = $this->NotizModel->addNotizForPerson($person_id, $titel, $text, $erledigt, $this->uid);
|
||||
$result = $this->NotizModel->addNotizForPerson($person_id, $titel, $text, $erledigt, $this->_uid);
|
||||
|
||||
if (isSuccess($result))
|
||||
{
|
||||
$this->_log($person_id, 'savenotiz', array($titel));
|
||||
}
|
||||
|
||||
$this->output
|
||||
->set_content_type('application/json')
|
||||
->set_output(json_encode($result));
|
||||
$this->output->set_content_type('application/json')->set_output(json_encode($result));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -482,9 +483,9 @@ class InfoCenter extends FHC_Controller
|
||||
array(
|
||||
'titel' => $titel,
|
||||
'text' => $text,
|
||||
'verfasser_uid' => $this->uid,
|
||||
'verfasser_uid' => $this->_uid,
|
||||
"updateamum" => 'NOW()',
|
||||
"updatevon" => $this->uid
|
||||
"updatevon" => $this->_uid
|
||||
)
|
||||
);
|
||||
|
||||
@@ -494,9 +495,7 @@ class InfoCenter extends FHC_Controller
|
||||
$this->_log($person_id, 'updatenotiz', array($titel));
|
||||
}
|
||||
|
||||
$this->output
|
||||
->set_content_type('application/json')
|
||||
->set_output(json_encode($result));
|
||||
$this->output->set_content_type('application/json')->set_output(json_encode($result));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -531,6 +530,8 @@ class InfoCenter extends FHC_Controller
|
||||
*/
|
||||
public function outputAkteContent($akte_id)
|
||||
{
|
||||
$this->load->library('DmsLib');
|
||||
|
||||
$akte = $this->AkteModel->load($akte_id);
|
||||
|
||||
if (isError($akte))
|
||||
@@ -561,9 +562,7 @@ class InfoCenter extends FHC_Controller
|
||||
{
|
||||
$result = $this->personloglib->getParkedDate($person_id);
|
||||
|
||||
$this->output
|
||||
->set_content_type('application/json')
|
||||
->set_output(json_encode($result));
|
||||
$this->output->set_content_type('application/json')->set_output(json_encode($result));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -574,11 +573,9 @@ class InfoCenter extends FHC_Controller
|
||||
$person_id = $this->input->post('person_id');
|
||||
$date = $this->input->post('parkdate');
|
||||
|
||||
$result = $this->personloglib->park($person_id, date_format(date_create($date), 'Y-m-d'), self::TAETIGKEIT, self::APP, null, $this->uid);
|
||||
$result = $this->personloglib->park($person_id, date_format(date_create($date), 'Y-m-d'), self::TAETIGKEIT, self::APP, null, $this->_uid);
|
||||
|
||||
$this->output
|
||||
->set_content_type('application/json')
|
||||
->set_output(json_encode($result));
|
||||
$this->output->set_content_type('application/json')->set_output(json_encode($result));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -590,9 +587,7 @@ class InfoCenter extends FHC_Controller
|
||||
|
||||
$result = $this->personloglib->unPark($person_id);
|
||||
|
||||
$this->output
|
||||
->set_content_type('application/json')
|
||||
->set_output(json_encode($result));
|
||||
$this->output->set_content_type('application/json')->set_output(json_encode($result));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -611,9 +606,26 @@ class InfoCenter extends FHC_Controller
|
||||
$json = $result->retval[0]->ende;
|
||||
}
|
||||
|
||||
$this->output
|
||||
->set_content_type('application/json')
|
||||
->set_output(json_encode($json));
|
||||
$this->output->set_content_type('application/json')->set_output(json_encode($json));
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper for setNavigationMenu, returns JSON message
|
||||
*/
|
||||
public function setNavigationMenuArrayJson()
|
||||
{
|
||||
$navigation_page = $this->input->get(self::NAVIGATION_PAGE);
|
||||
|
||||
if (strpos($navigation_page, self::INDEX_PAGE) !== false)
|
||||
{
|
||||
$this->_setNavigationMenuIndex();
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->_setNavigationMenuFreigegeben();
|
||||
}
|
||||
|
||||
$this->outputJsonSuccess('success');
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
@@ -624,18 +636,21 @@ class InfoCenter extends FHC_Controller
|
||||
*/
|
||||
private function _setAuthUID()
|
||||
{
|
||||
$this->uid = getAuthUID();
|
||||
$this->_uid = getAuthUID();
|
||||
|
||||
if (!$this->uid) show_error('User authentification failed');
|
||||
if (!$this->_uid) show_error('User authentification failed');
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Define the navigation menu for the index page
|
||||
*/
|
||||
public function setNavigationMenuArray()
|
||||
private function _setNavigationMenuIndex()
|
||||
{
|
||||
$this->load->library('NavigationLib', array(self::NAVIGATION_PAGE => self::INFOCENTER_URI.'/'.self::INDEX_PAGE));
|
||||
|
||||
$listFiltersSent = array();
|
||||
$listFiltersNotSent = array();
|
||||
$listCustomFilters = array();
|
||||
|
||||
$filtersSent = $this->FiltersModel->getFilterList('infocenter', 'PersonActions', '%InfoCenterSentApplication%');
|
||||
if (hasData($filtersSent))
|
||||
@@ -659,7 +674,7 @@ class InfoCenter extends FHC_Controller
|
||||
}
|
||||
}
|
||||
|
||||
$customFilters = $this->FiltersModel->getCustomFiltersList('infocenter', 'PersonActions', $this->uid);
|
||||
$customFilters = $this->FiltersModel->getCustomFiltersList('infocenter', 'PersonActions', $this->_uid);
|
||||
if (hasData($customFilters))
|
||||
{
|
||||
for ($filtersCounter = 0; $filtersCounter < count($customFilters->retval); $filtersCounter++)
|
||||
@@ -670,95 +685,203 @@ class InfoCenter extends FHC_Controller
|
||||
}
|
||||
}
|
||||
|
||||
$filtersarray = array(
|
||||
'abgeschickt' => array(
|
||||
'link' => '#',
|
||||
'description' => ucfirst($this->p->t('global', 'abgeschickt')),
|
||||
'expand' => true,
|
||||
'children' => array()
|
||||
),
|
||||
'nichtabgeschickt' => array(
|
||||
'link' => '#',
|
||||
'description' => ucfirst($this->p->t('global', 'nichtAbgeschickt')),
|
||||
'expand' => true,
|
||||
'children' => array()
|
||||
)
|
||||
$filtersArray = array();
|
||||
|
||||
$filtersArray['abgeschickt'] = $this->navigationlib->oneLevel(
|
||||
ucfirst($this->p->t('global', 'abgeschickt')), // description
|
||||
'#', // link
|
||||
array(), // children
|
||||
'', // icon
|
||||
true // expand
|
||||
);
|
||||
|
||||
$this->_fillFilters($listFiltersSent, $filtersarray['abgeschickt']);
|
||||
$this->_fillFilters($listFiltersNotSent, $filtersarray['nichtabgeschickt']);
|
||||
$filtersArray['nichtabgeschickt'] = $this->navigationlib->oneLevel(
|
||||
ucfirst($this->p->t('global', 'nichtAbgeschickt')), // description
|
||||
'#', // link
|
||||
array(), // children
|
||||
'', // icon
|
||||
true // expand
|
||||
);
|
||||
|
||||
if (isset($listCustomFilters) && is_array($listCustomFilters) && count($listCustomFilters) > 0)
|
||||
$this->_fillFilters($listFiltersSent, $filtersArray['abgeschickt']);
|
||||
$this->_fillFilters($listFiltersNotSent, $filtersArray['nichtabgeschickt']);
|
||||
|
||||
if (count($listCustomFilters) > 0)
|
||||
{
|
||||
$filtersarray['personal'] = array(
|
||||
'link' => '#',
|
||||
'description' => 'Personal filters',
|
||||
'expand' => true,
|
||||
'children' => array()
|
||||
$filtersArray['personal'] = $this->navigationlib->oneLevel(
|
||||
'Personal filters', // description
|
||||
'#', // link
|
||||
array(), // children
|
||||
'', // icon
|
||||
true // expand
|
||||
);
|
||||
|
||||
$this->_fillCustomFilters($listCustomFilters, $filtersarray['personal']);
|
||||
$this->_fillCustomFilters($listCustomFilters, $filtersArray['personal']);
|
||||
}
|
||||
|
||||
if (!isset($_SESSION['navigation_menu']))
|
||||
{
|
||||
$_SESSION['navigation_menu'] = array();
|
||||
}
|
||||
|
||||
$_SESSION['navigation_menu']['system/infocenter/InfoCenter/index'] = array(
|
||||
'filters' => array(
|
||||
'link' => '#',
|
||||
'description' => 'Filter',
|
||||
'icon' => 'filter',
|
||||
'expand' => true,
|
||||
'children' => $filtersarray
|
||||
)
|
||||
);
|
||||
|
||||
$_SESSION['navigation_menu']['system/infocenter/InfoCenter/showDetails'] = array(
|
||||
'filters' => array(
|
||||
'link' => '#',
|
||||
'description' => 'Filter',
|
||||
'icon' => 'filter',
|
||||
'expand' => true,
|
||||
'children' => $filtersarray
|
||||
$this->navigationlib->setSessionMenu(
|
||||
array(
|
||||
'filters' => $this->navigationlib->oneLevel(
|
||||
'Filter', // description
|
||||
'#', // link
|
||||
$filtersArray, // children
|
||||
'', // icon
|
||||
true // expand
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper for setNavigationMenu, returns JSON message
|
||||
* Define the navigation menu for the showDetails page
|
||||
*/
|
||||
public function setNavigationMenuArrayJson()
|
||||
private function _setNavigationMenuShowDetails()
|
||||
{
|
||||
$this->setNavigationMenuArray();
|
||||
$this->load->library('NavigationLib', array(self::NAVIGATION_PAGE => self::INFOCENTER_URI.'/'.self::SHOW_DETAILS_PAGE));
|
||||
|
||||
$this->output
|
||||
->set_content_type('application/json')
|
||||
->set_output(json_encode(success('success')));
|
||||
$origin_page = $this->input->get(self::ORIGIN_PAGE);
|
||||
|
||||
$link = site_url(self::INFOCENTER_URI.'/'.self::INDEX_PAGE);
|
||||
if ($origin_page == self::FREIGEGEBEN_PAGE)
|
||||
{
|
||||
$link = site_url(self::INFOCENTER_URI.'/'.self::FREIGEGEBEN_PAGE);
|
||||
}
|
||||
|
||||
$this->navigationlib->setSessionMenu(
|
||||
array(
|
||||
'back' => $this->navigationlib->oneLevel(
|
||||
'<< Züruck', // description
|
||||
$link, // link
|
||||
array(), // children
|
||||
'', // icon
|
||||
true // expand
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the navigation menu for the freigegeben page
|
||||
*/
|
||||
private function _setNavigationMenuFreigegeben()
|
||||
{
|
||||
$this->load->library('NavigationLib', array(self::NAVIGATION_PAGE => self::INFOCENTER_URI.'/'.self::FREIGEGEBEN_PAGE));
|
||||
|
||||
$listFilters = array();
|
||||
$listCustomFilters = array();
|
||||
|
||||
$filters = $this->FiltersModel->getFilterList('infocenter', 'PersonActions', '%InfoCenterFreigegeben%');
|
||||
if (hasData($filters))
|
||||
{
|
||||
for ($filtersCounter = 0; $filtersCounter < count($filters->retval); $filtersCounter++)
|
||||
{
|
||||
$filter = $filters->retval[$filtersCounter];
|
||||
|
||||
$listFilters[$filter->filter_id] = $filter->description[0];
|
||||
}
|
||||
}
|
||||
|
||||
$customFilters = $this->FiltersModel->getCustomFiltersList('infocenter', 'PersonActions', $this->_uid);
|
||||
if (hasData($customFilters))
|
||||
{
|
||||
for ($filtersCounter = 0; $filtersCounter < count($customFilters->retval); $filtersCounter++)
|
||||
{
|
||||
$filter = $customFilters->retval[$filtersCounter];
|
||||
|
||||
$listCustomFilters[$filter->filter_id] = $filter->description[0];
|
||||
}
|
||||
}
|
||||
|
||||
$filtersArray = array();
|
||||
$filtersArray['children'] = array();
|
||||
|
||||
$this->_fillFiltersFreigegeben($listFilters, $filtersArray);
|
||||
|
||||
if (count($listCustomFilters) > 0)
|
||||
{
|
||||
$filtersArray['children']['personal'] = $this->navigationlib->oneLevel(
|
||||
'Personal filters', // description
|
||||
'#', // link
|
||||
array(), // children
|
||||
'', // icon
|
||||
true // expand
|
||||
);
|
||||
|
||||
$this->_fillCustomFilters($listCustomFilters, $filtersArray['children']['personal']);
|
||||
}
|
||||
|
||||
$this->navigationlib->setSessionMenu(
|
||||
array(
|
||||
'filters' => $this->navigationlib->oneLevel(
|
||||
'Filter', // description
|
||||
'#', // link
|
||||
$filtersArray['children'], // children
|
||||
'', // icon
|
||||
true // expand
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility method used to fill elements of the InfoCenter left menu of the main InfoCenter page
|
||||
*/
|
||||
private function _fillFilters($filters, &$tofill)
|
||||
{
|
||||
$toPrint = "%s?%s=%s&%s=%s";
|
||||
|
||||
foreach ($filters as $filterId => $description)
|
||||
{
|
||||
$toPrint = "%s?%s=%s";
|
||||
|
||||
$tofill['children'][] = array(
|
||||
'link' => sprintf($toPrint, site_url('system/infocenter/InfoCenter'), 'filter_id', $filterId),
|
||||
'link' => sprintf(
|
||||
$toPrint,
|
||||
site_url(self::INFOCENTER_URI), 'filter_id', $filterId,
|
||||
FHC_Controller::FHC_CONTROLLER_ID,
|
||||
$this->getControllerId()
|
||||
),
|
||||
'description' => $description
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
private function _fillCustomFilters($filters, &$tofill)
|
||||
/**
|
||||
* Utility method used to fill elements of the InfoCenter left menu of the freigegeben InfoCenter page
|
||||
*/
|
||||
private function _fillFiltersFreigegeben($filters, &$tofill)
|
||||
{
|
||||
$toPrint = "%s?%s=%s&%s=%s";
|
||||
|
||||
foreach ($filters as $filterId => $description)
|
||||
{
|
||||
$toPrint = "%s?%s=%s";
|
||||
|
||||
$tofill['children'][] = array(
|
||||
'link' => sprintf($toPrint, site_url('system/infocenter/InfoCenter'), 'filter_id', $filterId),
|
||||
'link' => sprintf(
|
||||
$toPrint,
|
||||
site_url(self::INFOCENTER_URI.'/'.self::FREIGEGEBEN_PAGE), 'filter_id', $filterId,
|
||||
FHC_Controller::FHC_CONTROLLER_ID,
|
||||
$this->getControllerId()
|
||||
),
|
||||
'description' => $description
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility method used to fill elements of the InfoCenter left menu
|
||||
* with the list of the custom filter of the authenticated user
|
||||
*/
|
||||
private function _fillCustomFilters($filters, &$tofill)
|
||||
{
|
||||
$toPrint = "%s?%s=%s&%s=%s";
|
||||
|
||||
foreach ($filters as $filterId => $description)
|
||||
{
|
||||
$tofill['children'][] = array(
|
||||
'link' => sprintf(
|
||||
$toPrint,
|
||||
site_url(self::INFOCENTER_URI), 'filter_id', $filterId,
|
||||
FHC_Controller::FHC_CONTROLLER_ID,
|
||||
$this->getControllerId()
|
||||
),
|
||||
'description' => $description,
|
||||
'subscriptDescription' => 'Remove',
|
||||
'subscriptLinkClass' => 'remove-custom-filter',
|
||||
@@ -789,7 +912,7 @@ class InfoCenter extends FHC_Controller
|
||||
if (isset($locked->retval[0]->uid))
|
||||
{
|
||||
$lockedby = $locked->retval[0]->uid;
|
||||
if ($lockedby !== $this->uid)
|
||||
if ($lockedby !== $this->_uid)
|
||||
$lockedbyother = true;
|
||||
}
|
||||
|
||||
@@ -840,7 +963,7 @@ class InfoCenter extends FHC_Controller
|
||||
show_error($notizen_bewerbung->retval);
|
||||
}
|
||||
|
||||
$user_person = $this->PersonModel->getByUid($this->uid);
|
||||
$user_person = $this->PersonModel->getByUid($this->_uid);
|
||||
|
||||
if (isError($user_person))
|
||||
{
|
||||
@@ -949,7 +1072,18 @@ class InfoCenter extends FHC_Controller
|
||||
$this->PrestudentModel->addSelect('person_id');
|
||||
$person_id = $this->PrestudentModel->load($prestudent_id)->retval[0]->person_id;
|
||||
|
||||
redirect(self::URL_PREFIX.'/showDetails/'.$person_id.'?fhc_controller_id='.$this->fhc_controller_id.'#'.$section);
|
||||
redirect(
|
||||
sprintf(
|
||||
'/%s/%s?%s=%s&%s=%s#%s',
|
||||
self::INFOCENTER_URI,
|
||||
self::SHOW_DETAILS_PAGE,
|
||||
'person_id',
|
||||
$person_id,
|
||||
self::FHC_CONTROLLER_ID,
|
||||
$this->getControllerId(),
|
||||
$section
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -981,7 +1115,7 @@ class InfoCenter extends FHC_Controller
|
||||
*/
|
||||
private function _log($person_id, $logname, $messageparams)
|
||||
{
|
||||
$logdata = $this->logparams[$logname];
|
||||
$logdata = $this->_logparams[$logname];
|
||||
|
||||
$datatolog = array(
|
||||
'name' => $logdata['name']
|
||||
@@ -1000,7 +1134,7 @@ class InfoCenter extends FHC_Controller
|
||||
self::TAETIGKEIT,
|
||||
self::APP,
|
||||
null,
|
||||
$this->uid
|
||||
$this->_uid
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* @license GPLv3
|
||||
* @since Version 1.0.0
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Message Helper
|
||||
*
|
||||
@@ -35,7 +35,7 @@ function success($retval, $code = null, $msg_indx_prefix = 'fhc_')
|
||||
$success->fhcCode = $code;
|
||||
if (!is_null($code)) $success->msg = lang($msg_indx_prefix . $code);
|
||||
$success->retval = $retval;
|
||||
|
||||
|
||||
return $success;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ function error($retval = '', $code = null, $msg_indx_prefix = 'fhc_')
|
||||
$error->fhcCode = $code;
|
||||
if (!is_null($code)) $error->msg = lang($msg_indx_prefix . $code);
|
||||
$error->retval = $retval;
|
||||
|
||||
|
||||
return $error;
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ function isSuccess($result)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -78,15 +78,16 @@ function hasData($result)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the result represents an error
|
||||
* Wrapper function of isSuccess, more readable code
|
||||
* Bob Dylan: ...there's no success like failure. And that failure's no success at all.
|
||||
*/
|
||||
function isError($result)
|
||||
{
|
||||
return !isSuccess($result);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
/**
|
||||
* FH-Complete
|
||||
*
|
||||
* @package FHC-Helper
|
||||
* @author FHC-Team
|
||||
* @copyright Copyright (c) 2016 fhcomplete.org
|
||||
* @license GPLv3
|
||||
* @since Version 1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* FHC Helper
|
||||
*
|
||||
* @subpackage Helpers
|
||||
* @category Helpers
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
const DEFAULT_SANCHO_HEADER_IMG = 'sancho_header_du_hast_neue_nachrichten.jpg';
|
||||
|
||||
/**
|
||||
* Send single Mail with Sancho Design and Layout.
|
||||
* @param string $vorlage_kurzbz Name of the template for specific mail content.
|
||||
* @param array $vorlage_data Associative array with specific mail content varibales
|
||||
* to be replaced in the content template.
|
||||
* @param string $to Email-adress.
|
||||
* @param string $subject Subject of mail.
|
||||
* @param string $headerImg Filename of the specific Sancho header image.
|
||||
* @return void
|
||||
*/
|
||||
function sendMail($vorlage_kurzbz, $vorlage_data, $to, $subject, $headerImg = DEFAULT_SANCHO_HEADER_IMG)
|
||||
{
|
||||
$ci =& get_instance();
|
||||
$ci->load->library('email');
|
||||
$ci->load->library('MailLib');
|
||||
|
||||
$sanchoHeader_img = 'skin/images/sancho/'. $headerImg;
|
||||
$sanchoFooter_img = 'skin/images/sancho/sancho_footer.jpg';
|
||||
|
||||
// Embed sancho header and footer image
|
||||
// reset important to ensure embedding of images when called in a loop
|
||||
$ci->email->clear(true); // clear vars and attachments
|
||||
$ci->email->attach($sanchoHeader_img);
|
||||
$ci->email->attach($sanchoFooter_img);
|
||||
$cid_header = $ci->email->attachment_cid($sanchoHeader_img); // sets unique content id for embedding
|
||||
$cid_footer = $ci->email->attachment_cid($sanchoFooter_img); // sets unique content id for embedding
|
||||
|
||||
// Set specific mail content into specific content template
|
||||
$content = _parseMailContent($vorlage_kurzbz, $vorlage_data);
|
||||
|
||||
// overall main content data array
|
||||
$layout = array(
|
||||
'CID_header' => $cid_header,
|
||||
'CID_footer' => $cid_footer,
|
||||
'content' => $content
|
||||
);
|
||||
|
||||
// Set overall main content into the sancho mail template
|
||||
$body = _parseMailContent('Sancho_Mail_Template', $layout);
|
||||
|
||||
// Send mail
|
||||
$ci->maillib->send('sancho@'. DOMAIN, $to, $subject, $body);
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace variables in the mail content template with specific mail content data.
|
||||
* @param string $vorlage_kurzbz Name of the template for specific mail content.
|
||||
* @param array $vorlage_data Associative array with specific mail content varibales
|
||||
* to be replaced in the content template.
|
||||
* @return string
|
||||
*/
|
||||
function _parseMailContent($vorlage_kurzbz, $vorlage_data)
|
||||
{
|
||||
$ci =& get_instance();
|
||||
$ci->load->library('VorlageLib');
|
||||
|
||||
$result = $ci->vorlagelib->getVorlagetextByVorlage($vorlage_kurzbz);
|
||||
|
||||
if (isSuccess($result))
|
||||
{
|
||||
// If the text and the subject of the template are not empty
|
||||
if (is_array($result->retval) && count($result->retval) > 0 &&
|
||||
!empty($result->retval[0]->text))
|
||||
{
|
||||
// Parses template text
|
||||
$parsedText = $ci->vorlagelib->parseVorlagetext($result->retval[0]->text, $vorlage_data);
|
||||
|
||||
return $parsedText;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* FH-Complete
|
||||
*
|
||||
* @package FHC-Helper
|
||||
* @author FHC-Team
|
||||
* @copyright Copyright (c) 2016 fhcomplete.org
|
||||
* @license GPLv3
|
||||
* @since Version 1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Message Helper
|
||||
*
|
||||
* @subpackage Helpers
|
||||
* @category Helpers
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------
|
||||
// Collection of functions to handle comfortably the php session.
|
||||
// It works keeping a different session name for each functionality (ex. FilterWidget and NavigationWidget)
|
||||
// -------------------------------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Returns the whole session by its name given as parameter
|
||||
* If it's not present the a null value is returned
|
||||
*/
|
||||
function getSession($sessionName)
|
||||
{
|
||||
$session = null;
|
||||
|
||||
// If it is present a session for this filter
|
||||
if (isset($_SESSION[$sessionName]))
|
||||
{
|
||||
$session = $_SESSION[$sessionName];
|
||||
}
|
||||
|
||||
return $session;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns one element specified by the paraemter name, from the session specified by the parameters sessionName
|
||||
* If it's not present the a null value is returned
|
||||
*/
|
||||
function getElementSession($sessionName, $name)
|
||||
{
|
||||
$session = getSession($sessionName); // get the whole session for this filter
|
||||
|
||||
if (isset($session[$name]))
|
||||
{
|
||||
return $session[$name];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the whole session specified by the parameters sessionName
|
||||
*/
|
||||
function setSession($sessionName, $data)
|
||||
{
|
||||
// If is NOT already present into the session
|
||||
if (!isset($_SESSION[$sessionName])
|
||||
|| (isset($_SESSION[$sessionName]) && !is_array($_SESSION[$sessionName])))
|
||||
{
|
||||
$_SESSION[$sessionName] = array(); // then create it
|
||||
}
|
||||
|
||||
$_SESSION[$sessionName] = $data; // stores data
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets one element of the session specified by the parameters sessionName
|
||||
*/
|
||||
function setElementSession($sessionName, $name, $value)
|
||||
{
|
||||
// If is NOT already present into the session
|
||||
if (!isset($_SESSION[$sessionName])
|
||||
|| (isset($_SESSION[$sessionName]) && !is_array($_SESSION[$sessionName])))
|
||||
{
|
||||
$_SESSION[$sessionName] = array(); // then create it
|
||||
}
|
||||
|
||||
$_SESSION[$sessionName][$name] = $value; // stores the single value
|
||||
}
|
||||
@@ -68,7 +68,7 @@ class FiltersLib
|
||||
|
||||
const FILTER_PHRASES_CATEGORY = 'FilterWidget'; // The category used to store phrases for the FilterWidget
|
||||
|
||||
const FILTER_PAGE_PARAM = 'filter_page'; // Filter page parameter used to overwrite the page URI
|
||||
const FILTER_PAGE_PARAM = 'filter_page'; // Filter page parameter name
|
||||
|
||||
private $_ci; // Code igniter instance
|
||||
private $_filterUniqueId; // unique id for this filter widget
|
||||
@@ -78,10 +78,12 @@ class FiltersLib
|
||||
*/
|
||||
public function __construct($params = null)
|
||||
{
|
||||
$this->_ci =& get_instance();
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
// Loads helper message to manage returning messages
|
||||
$this->_ci->load->helper('message');
|
||||
// Loads helper session to manage the php session
|
||||
$this->_ci->load->helper('session');
|
||||
|
||||
$this->_filterUniqueId = $this->_getFilterUniqueId($params); // sets the id for the related filter widget
|
||||
}
|
||||
@@ -90,27 +92,19 @@ class FiltersLib
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* Returns the whole session for this filter widget if found, otherwise null
|
||||
* Wrapper method to the session helper funtions to retrive the whole session for this filter
|
||||
*/
|
||||
public function getSession()
|
||||
{
|
||||
$session = null;
|
||||
|
||||
// If it is present a session for this filter
|
||||
if (isset($_SESSION[self::SESSION_NAME]) && isset($_SESSION[self::SESSION_NAME][$this->_filterUniqueId]))
|
||||
{
|
||||
$session = $_SESSION[self::SESSION_NAME][$this->_filterUniqueId];
|
||||
}
|
||||
|
||||
return $session;
|
||||
return getElementSession(self::SESSION_NAME, $this->_filterUniqueId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns one element from the session of this filter widget, otherwise null
|
||||
* Wrapper method to the session helper funtions to retrive one element from the session of this filter
|
||||
*/
|
||||
public function getElementSession($name)
|
||||
{
|
||||
$session = $this->getSession(); // get the whole session for this filter
|
||||
$session = getElementSession(self::SESSION_NAME, $this->_filterUniqueId);
|
||||
|
||||
if (isset($session[$name]))
|
||||
{
|
||||
@@ -121,41 +115,23 @@ class FiltersLib
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the whole session for this filter widget
|
||||
* Wrapper method to the session helper funtions to set the whole session for this filter
|
||||
*/
|
||||
public function setSession($data)
|
||||
{
|
||||
// If is NOT already present into the session
|
||||
if (!isset($_SESSION[self::SESSION_NAME])
|
||||
|| (isset($_SESSION[self::SESSION_NAME]) && !is_array($_SESSION[self::SESSION_NAME])))
|
||||
{
|
||||
$_SESSION[self::SESSION_NAME] = array(); // then create it
|
||||
}
|
||||
|
||||
$_SESSION[self::SESSION_NAME][$this->_filterUniqueId] = $data; // stores data
|
||||
setElementSession(self::SESSION_NAME, $this->_filterUniqueId, $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets one element of the session of this filter widget
|
||||
* Wrapper method to the session helper funtions to set one element in the session for this filter
|
||||
*/
|
||||
public function setElementSession($name, $value)
|
||||
{
|
||||
// If is NOT already present into the session
|
||||
if (!isset($_SESSION[self::SESSION_NAME])
|
||||
|| (isset($_SESSION[self::SESSION_NAME]) && !is_array($_SESSION[self::SESSION_NAME])))
|
||||
{
|
||||
$_SESSION[self::SESSION_NAME] = array(); // then create it
|
||||
}
|
||||
$session = getElementSession(self::SESSION_NAME, $this->_filterUniqueId);
|
||||
|
||||
// If the session for this filter is NOT already present into the session
|
||||
if (!isset($_SESSION[self::SESSION_NAME][$this->_filterUniqueId])
|
||||
|| (isset($_SESSION[self::SESSION_NAME][$this->_filterUniqueId])
|
||||
&& !is_array($_SESSION[self::SESSION_NAME][$this->_filterUniqueId])))
|
||||
{
|
||||
$_SESSION[self::SESSION_NAME][$this->_filterUniqueId] = array(); // then create it
|
||||
}
|
||||
$session[$name] = $value;
|
||||
|
||||
$_SESSION[self::SESSION_NAME][$this->_filterUniqueId][$name] = $value; // stores the single value
|
||||
setElementSession(self::SESSION_NAME, $this->_filterUniqueId, $session); // stores the single value
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -264,7 +240,7 @@ class FiltersLib
|
||||
*/
|
||||
public function generateDatasetQuery($query, $filters)
|
||||
{
|
||||
$datasetQuery = null;
|
||||
$datasetQuery = 'SELECT * FROM ('.$query.') '.self::DATASET_TABLE_ALIAS;
|
||||
|
||||
// If the given query is valid and the parameter filters is an array
|
||||
if (!empty(trim($query)) && $filters != null && is_array($filters))
|
||||
@@ -287,7 +263,7 @@ class FiltersLib
|
||||
|
||||
if ($where != '') // if the SQL where clause was built
|
||||
{
|
||||
$datasetQuery = 'SELECT * FROM ('.$query.') '.self::DATASET_TABLE_ALIAS.' WHERE '.$where;
|
||||
$datasetQuery .= ' WHERE '.$where;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,390 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* NavigationWidget logic
|
||||
*/
|
||||
class NavigationLib
|
||||
{
|
||||
// Session parameters names
|
||||
const SESSION_NAME = 'FHC_NAVIGATION_WIDGET'; // Navigation session name
|
||||
const SESSION_MENU_NAME = 'navigation_menu';
|
||||
const SESSION_HEADER_NAME = 'navigation_header';
|
||||
|
||||
// Configuration names
|
||||
const CONFIG_MENU_NAME = 'navigation_menu';
|
||||
const CONFIG_HEADER_NAME = 'navigation_header';
|
||||
const CONFIG_NAVIGATION_FILENAME = 'navigation.php';
|
||||
|
||||
const NAVIGATION_PAGE_PARAM = 'navigation_page'; // Navigation page parameter name
|
||||
|
||||
private $_ci; // Code igniter instance
|
||||
private $_navigationPage; // unique id for this navigation widget
|
||||
|
||||
/**
|
||||
* Gets the CI instance and loads message helper
|
||||
*/
|
||||
public function __construct($params = null)
|
||||
{
|
||||
$this->_ci =& get_instance(); // get code igniter instance
|
||||
|
||||
// Loads navigation configs
|
||||
$this->_ci->config->load('navigation');
|
||||
|
||||
// Loads helper message to manage returning messages
|
||||
$this->_ci->load->helper('message');
|
||||
// Loads helper session to manage the php session
|
||||
$this->_ci->load->helper('session');
|
||||
|
||||
// Loads library ExtensionsLib
|
||||
$this->_ci->load->library('ExtensionsLib');
|
||||
|
||||
$this->_navigationPage = $this->_getNavigationtPage($params); // sets the id for the related navigation widget
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* Creates the left Menu for each Page
|
||||
* @param navigation_widget_called GET Parameter witch holds the currently called Page
|
||||
* @return array with the Menu Entries
|
||||
*/
|
||||
public function getMenuArray($navigationPage)
|
||||
{
|
||||
$menuArray = array();
|
||||
|
||||
if (isset($navigationPage))
|
||||
{
|
||||
// Get Menu Entries of the Core
|
||||
$navigationMenuArray = $this->_ci->config->item(self::CONFIG_MENU_NAME);
|
||||
$menuArray = $this->_wildcardsearch($navigationMenuArray, $navigationPage);
|
||||
|
||||
// Load Menu Entries of Extensions
|
||||
$extensions = $this->_ci->extensionslib->getInstalledExtensions();
|
||||
if(hasData($extensions))
|
||||
{
|
||||
$json_extension = array();
|
||||
foreach($extensions->retval as $ext)
|
||||
{
|
||||
$filename = APPPATH.'config/'.ExtensionsLib::EXTENSIONS_DIR_NAME.'/'.$ext->name.'/'.self::CONFIG_NAVIGATION_FILENAME;
|
||||
if (file_exists($filename))
|
||||
{
|
||||
unset($config);
|
||||
include($filename);
|
||||
if(isset($config[self::CONFIG_MENU_NAME]) && is_array($config[self::CONFIG_MENU_NAME]))
|
||||
{
|
||||
$json_extension = array_merge_recursive(
|
||||
$json_extension,
|
||||
$this->_wildcardsearch($config[self::CONFIG_MENU_NAME],
|
||||
$navigationPage)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Merge Extension Menuentries with the Core Entries
|
||||
$menuArray = array_merge_recursive($menuArray, $json_extension);
|
||||
}
|
||||
|
||||
// Load dynamic Menu Entries from Session
|
||||
if (($navigationMenuSessionArray = $this->getSessionMenu()) != null)
|
||||
{
|
||||
if (isset($navigationMenuSessionArray) && is_array($navigationMenuSessionArray))
|
||||
{
|
||||
$menuArray = array_merge_recursive($menuArray, $navigationMenuSessionArray);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->_sortArray($menuArray);
|
||||
|
||||
return $menuArray;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the Top Menu for each Page
|
||||
* @param navigation_widget_called GET Parameter witch holds the currently called Page
|
||||
* @return array with the Menu Entries
|
||||
*/
|
||||
public function getHeaderArray($navigationPage)
|
||||
{
|
||||
$headerArray = array();
|
||||
|
||||
if (isset($navigationPage))
|
||||
{
|
||||
// Load Header Entries of Core
|
||||
$navigationHeaderArray = $this->_ci->config->item(self::CONFIG_HEADER_NAME);
|
||||
$headerArray = $this->_wildcardsearch($navigationHeaderArray, $navigationPage);
|
||||
|
||||
// Load Header Entries of Extensions
|
||||
$extensions = $this->_ci->extensionslib->getInstalledExtensions();
|
||||
if(hasData($extensions))
|
||||
{
|
||||
$headerArray_extension = array();
|
||||
foreach($extensions->retval as $ext)
|
||||
{
|
||||
$filename = APPPATH.'config/'.ExtensionsLib::EXTENSIONS_DIR_NAME.'/'.$ext->name.'/'.self::CONFIG_NAVIGATION_FILENAME;
|
||||
if (file_exists($filename))
|
||||
{
|
||||
unset($config);
|
||||
include($filename);
|
||||
if(isset($config[self::CONFIG_HEADER_NAME]) && is_array($config[self::CONFIG_HEADER_NAME]))
|
||||
{
|
||||
$headerArray_extension = array_merge_recursive(
|
||||
$json_extension,
|
||||
$this->_wildcardsearch($config[self::CONFIG_HEADER_NAME],
|
||||
$navigationPage)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
$headerArray = array_merge_recursive($headerArray, $headerArray_extension);
|
||||
}
|
||||
|
||||
// Load dynamic Header Entries from Session
|
||||
if (($navigationHeaderSessionArray = $this->getSessionHeader()) != null)
|
||||
{
|
||||
if (isset($navigationHeaderSessionArray) && is_array($navigationHeaderSessionArray))
|
||||
{
|
||||
$headerArray = array_merge_recursive($headerArray, $navigationHeaderSessionArray);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->_sortArray($headerArray);
|
||||
|
||||
return $headerArray;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the structure for one level of the menu
|
||||
*/
|
||||
public function oneLevel(
|
||||
$description, $link = '#', $children = null, $icon = '', $expand = false,
|
||||
$subscriptDescription = null, $subscriptLinkClass = null, $subscriptLinkValue = null, $target = '',
|
||||
$sort = null)
|
||||
{
|
||||
return array(
|
||||
'description' => $description,
|
||||
'link' => $link,
|
||||
'target' => $target,
|
||||
'children'=> $children,
|
||||
'icon' => $icon,
|
||||
'expand' => $expand,
|
||||
'subscriptDescription' => $subscriptDescription,
|
||||
'subscriptLinkClass' => $subscriptLinkClass,
|
||||
'subscriptLinkValue' => $subscriptLinkValue,
|
||||
'sort' => $sort
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper method to the session helper funtions to retrive the whole session for this navigation widget
|
||||
*/
|
||||
public function getSessionMenu()
|
||||
{
|
||||
$session = getElementSession(self::SESSION_NAME, self::SESSION_MENU_NAME);
|
||||
|
||||
if (isset($session[$this->_navigationPage]))
|
||||
{
|
||||
return $session[$this->_navigationPage];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper method to the session helper funtions to retrive the whole session for this navigation widget
|
||||
*/
|
||||
public function getSessionHeader()
|
||||
{
|
||||
$session = getElementSession(self::SESSION_NAME, self::SESSION_HEADER_NAME);
|
||||
|
||||
if (isset($session[$this->_navigationPage]))
|
||||
{
|
||||
return $session[$this->_navigationPage];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper method to the session helper funtions to retrive one element from the session of this navigation widget
|
||||
*/
|
||||
public function getElementSessionMenu($name)
|
||||
{
|
||||
$session = $this->getSessionMenu();
|
||||
|
||||
if (isset($session[$name]))
|
||||
{
|
||||
return $session[$name];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper method to the session helper funtions to retrive one element from the session of this navigation widget
|
||||
*/
|
||||
public function getElementSessionHeader($name)
|
||||
{
|
||||
$session = $this->getSessionHeader();
|
||||
|
||||
if (isset($session[$name]))
|
||||
{
|
||||
return $session[$name];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper method to the session helper funtions to set the whole session for this navigation widget
|
||||
*/
|
||||
public function setSessionMenu($data)
|
||||
{
|
||||
setElementSession(self::SESSION_NAME, self::SESSION_MENU_NAME, array($this->_navigationPage => $data));
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper method to the session helper funtions to set the whole session for this navigation widget
|
||||
*/
|
||||
public function setSessionHeader($data)
|
||||
{
|
||||
setElementSession(self::SESSION_NAME, self::SESSION_HEADER_NAME, array($this->_navigationPage => $data));
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper method to the session helper funtions to set one element in the session for this navigation widget
|
||||
*/
|
||||
public function setElementSessionMenu($name, $value)
|
||||
{
|
||||
$session = $this->getSessionMenu();
|
||||
|
||||
if (!isset($session[$this->_navigationPage]))
|
||||
{
|
||||
$session[$this->_navigationPage] = array();
|
||||
}
|
||||
|
||||
$session[$this->_navigationPage][$name] = $value;
|
||||
|
||||
setElementSession(self::SESSION_NAME, self::SESSION_MENU_NAME, $session); // stores the single value
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper method to the session helper funtions to set one element in the session for this navigation widget
|
||||
*/
|
||||
public function setElementSessionHeader($name, $value)
|
||||
{
|
||||
$session = $this->getSessionHeader();
|
||||
|
||||
if (!isset($session[$this->_navigationPage]))
|
||||
{
|
||||
$session[$this->_navigationPage] = array();
|
||||
}
|
||||
|
||||
$session[$this->_navigationPage][$name] = $value;
|
||||
|
||||
setElementSession(self::SESSION_NAME, self::SESSION_HEADER_NAME, $session); // stores the single value
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
// Private methods
|
||||
|
||||
/**
|
||||
* Searches a Menuentry. If there is no exact entry it searches for Wildcard Entries with a Star
|
||||
* Example:
|
||||
* Searching for /system/foo/index will Match the following Menuentries:
|
||||
* /system/foo/index
|
||||
* /system/foo/*
|
||||
* /system/*
|
||||
* *
|
||||
*
|
||||
* @param $navigationArray Array to Search in.
|
||||
* @param $navigationPage Navigation to search for.
|
||||
* @return Navigation Array if found, empty array otherwise
|
||||
*/
|
||||
private function _wildcardsearch($navigationArray, $navigationPage)
|
||||
{
|
||||
// Sort Navigation to have them in correct order
|
||||
krsort($navigationArray);
|
||||
|
||||
// 100% match found
|
||||
if(isset($navigationArray[$navigationPage]))
|
||||
{
|
||||
return $navigationArray[$navigationPage];
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach($navigationArray as $key=>$row)
|
||||
{
|
||||
// Search for * Entries
|
||||
if(mb_strpos($key, '*') === 0 || mb_strpos($key, '*') === mb_strlen($key) - 1)
|
||||
{
|
||||
// Take * Entry if Matches
|
||||
$search = mb_substr($key, 0, -1);
|
||||
if($search == '' || mb_strpos($navigationPage, $search) === 0)
|
||||
{
|
||||
return $row;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return an unique string that identify this navigation widget
|
||||
* NOTE: The default value is the URI where the NavigationWidget is called
|
||||
*/
|
||||
private function _getNavigationtPage($params)
|
||||
{
|
||||
//
|
||||
if ($params != null
|
||||
&& is_array($params)
|
||||
&& isset($params[self::NAVIGATION_PAGE_PARAM])
|
||||
&& !empty(trim($params[self::NAVIGATION_PAGE_PARAM])))
|
||||
{
|
||||
$navigationPage = $params[self::NAVIGATION_PAGE_PARAM];
|
||||
}
|
||||
else
|
||||
{
|
||||
// Gets the current page URI
|
||||
$navigationPage = $this->_ci->router->directory.$this->_ci->router->class.'/'.$this->_ci->router->method;
|
||||
}
|
||||
|
||||
return $navigationPage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sorts using the sort element present in the array
|
||||
*/
|
||||
private function _sortArray(&$array)
|
||||
{
|
||||
uasort($array, function($a, $b) {
|
||||
|
||||
// If the element sort is not present then the default value is 999
|
||||
$sortA = 999;
|
||||
if (isset($a['sort'])) $sortA = $a['sort'];
|
||||
|
||||
// If the element sort is not present then the default value is 999
|
||||
$sortB = 999;
|
||||
if (isset($b['sort'])) $sortB = $b['sort'];
|
||||
|
||||
return $sortA - $sortB; // < 0 => lt, == 0 => equal, > 0 => gt
|
||||
});
|
||||
|
||||
// Sort also the children
|
||||
foreach ($array as $key => $value)
|
||||
{
|
||||
if (isset($value['children']) && is_array($value['children']) && count($value['children']) > 0)
|
||||
{
|
||||
// NOTE: keep this way to give the element by reference, $value has a different reference!
|
||||
// otherwise the children will not be sorted
|
||||
$this->_sortArray($array[$key]['children']); // recursive call
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
class Ampel_model extends DB_Model
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
@@ -11,4 +10,84 @@ class Ampel_model extends DB_Model
|
||||
$this->dbTable = 'public.tbl_ampel';
|
||||
$this->pk = 'ampel_id';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all active Ampeln, that are actually:
|
||||
* 1. not after the deadline date
|
||||
* 2. not before the vorlaufszeit
|
||||
* @param bool $email If true, then only ampeln are retrieved that are marked to be sent by mail.
|
||||
* @return array Returns array of objects.
|
||||
*/
|
||||
public function active($email = false)
|
||||
{
|
||||
$parametersArray = null;
|
||||
$query = '
|
||||
SELECT *
|
||||
FROM public.tbl_ampel
|
||||
WHERE';
|
||||
|
||||
if ($email === true)
|
||||
{
|
||||
$parametersArray['email'] = $email;
|
||||
$query .= ' email = ? AND';
|
||||
}
|
||||
|
||||
$query .= '
|
||||
(NOW()<(deadline+(COALESCE(verfallszeit,0) || \' days\')::interval)::date)
|
||||
OR (verfallszeit IS NULL)
|
||||
AND (NOW()>(deadline-(COALESCE(vorlaufzeit,0) || \' days\')::interval)::date)
|
||||
OR (vorlaufzeit IS NULL AND NOW() < deadline)';
|
||||
|
||||
$query .= ' ORDER BY deadline DESC';
|
||||
|
||||
return $this->execQuery($query, $parametersArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all Ampel-receiver of a specific Ampel.
|
||||
* @param string $benutzer_select SQL Statement which defines the Ampel-receiver.
|
||||
* @return array Returns array of objects with property 'uid'.
|
||||
*/
|
||||
public function execBenutzerSelect($benutzer_select)
|
||||
{
|
||||
if (isset($benutzer_select) && !empty(trim($benutzer_select)))
|
||||
{
|
||||
return $this->execQuery($benutzer_select);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if Ampel was confirmed by the user.
|
||||
* @param int $ampel_id Ampel-ID
|
||||
* @param string $uid UID
|
||||
* @return bool
|
||||
*/
|
||||
public function isConfirmed($ampel_id, $uid)
|
||||
{
|
||||
$result = null;
|
||||
$query = '
|
||||
SELECT 1
|
||||
FROM public.tbl_ampel_benutzer_bestaetigt
|
||||
WHERE ampel_id = ?
|
||||
AND uid = ?';
|
||||
|
||||
if (isset($ampel_id, $uid))
|
||||
{
|
||||
$result = $this->execQuery($query, array($ampel_id, $uid));
|
||||
}
|
||||
|
||||
if ($result)
|
||||
{
|
||||
if (count($result->retval) > 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
return $result; //will contain the error-msg from execQuery
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ class Filters_model extends DB_Model
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Loads a filter by its app, dataset_name and filter_kurzbz
|
||||
*/
|
||||
public function getFilterList($app, $dataset_name, $filter_kurzbz)
|
||||
{
|
||||
@@ -24,7 +24,6 @@ class Filters_model extends DB_Model
|
||||
'app' => $app,
|
||||
'dataset_name' => $dataset_name,
|
||||
'person_id' => null,
|
||||
'default_filter' => false,
|
||||
'array_length(description, 1) >' => 0,
|
||||
'filter_kurzbz ILIKE' => $filter_kurzbz
|
||||
);
|
||||
@@ -33,7 +32,7 @@ class Filters_model extends DB_Model
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Loads a custom filter by its app, dataset_name and the uid of the owner
|
||||
*/
|
||||
public function getCustomFiltersList($app, $dataset_name, $uid)
|
||||
{
|
||||
@@ -50,12 +49,4 @@ class Filters_model extends DB_Model
|
||||
|
||||
return $this->loadWhere($filterParametersArray);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function deleteCustomFilter($filter_id)
|
||||
{
|
||||
return $this->delete($filter_id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<h2>Statusgrund: <?php echo $sg->status_kurzbz; ?></h2>
|
||||
<form method="post" action="<?php echo APP_ROOT . "index.ci.php/crm/Statusgrund/saveGrund";?>">
|
||||
<form method="post" action="<?php echo site_url("crm/Statusgrund/saveGrund"); ?>">
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
@@ -104,4 +104,4 @@
|
||||
}
|
||||
?>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<h2>Neuer Statusgrund</h2>
|
||||
<form method="post" action="<?php echo APP_ROOT . "index.ci.php/crm/Statusgrund/insGrund";?>">
|
||||
<form method="post" action="<?php echo site_url("crm/Statusgrund/insGrund"); ?>">
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
|
||||
@@ -7,7 +7,7 @@ $this->load->view('templates/header', array('title' => 'StudienjahrEdit', 'jquer
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<h2>Studienjahr bearbeiten: <?php echo $jahr->studienjahr_kurzbz; ?></h2>
|
||||
<form method="post" action="<?php echo APP_ROOT."index.ci.php/organisation/studienjahr/saveStudienjahr" ?>">
|
||||
<form method="post" action="<?php echo site_url("organisation/studienjahr/saveStudienjahr"); ?>">
|
||||
|
||||
<table>
|
||||
<?php include('studienjahrForm.php'); ?>
|
||||
@@ -17,4 +17,4 @@ $this->load->view('templates/header', array('title' => 'StudienjahrEdit', 'jquer
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -8,7 +8,7 @@ $this->load->view('templates/header', array('title' => 'StudienjahrNew', 'jquery
|
||||
<div class="span4">
|
||||
<h2>Neues Studienjahr anlegen</h2>
|
||||
<form method="post"
|
||||
action="<?php echo APP_ROOT."index.ci.php/organisation/studienjahr/insStudienjahr"; ?>"
|
||||
action="<?php echo site_url("organisation/studienjahr/insStudienjahr"); ?>"
|
||||
id="newStudienjahrForm">
|
||||
<table>
|
||||
<tr>
|
||||
|
||||
@@ -8,7 +8,7 @@ $this->load->view('templates/header', array('title' => 'StudiensemesterEdit', 'd
|
||||
<div class="span4">
|
||||
<h2>Studiensemester bearbeiten: <?php echo $sem->studiensemester_kurzbz; ?></h2>
|
||||
<form method="post"
|
||||
action="<?php echo APP_ROOT."index.ci.php/organisation/studiensemester/saveStudiensemester" ?>">
|
||||
action="<?php echo site_url("organisation/studiensemester/saveStudiensemester") ?>">
|
||||
<table>
|
||||
<?php include('studiensemesterForm.php'); ?>
|
||||
<input type="hidden" name="semkurzbz" value="<?php echo $sem->studiensemester_kurzbz; ?>"/>
|
||||
|
||||
@@ -7,9 +7,7 @@ $this->load->view('templates/header', array('title' => 'StudiensemesterNew', 'jq
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<h2>Neues Studiensemester anlegen</h2>
|
||||
<form method="post"
|
||||
action="<?php echo APP_ROOT."index.ci.php/organisation/studiensemester/insStudiensemester"; ?>"
|
||||
id="newSemesterForm">
|
||||
<form method="post" action="<?php echo site_url("organisation/studiensemester/insStudiensemester"); ?>" id="newSemesterForm">
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="../outputAkteContent/<?php echo $dokument->akte_id ?>"><?php echo empty($dokument->titel) ? $dokument->bezeichnung : $dokument->titel ?></a>
|
||||
<a href="outputAkteContent/<?php echo $dokument->akte_id ?>"><?php echo empty($dokument->titel) ? $dokument->bezeichnung : $dokument->titel ?></a>
|
||||
</td>
|
||||
<td><?php echo $dokument->dokument_bezeichnung ?></td>
|
||||
<td><?php echo date_format(date_create($dokument->erstelltam), 'd.m.Y') ?></td>
|
||||
@@ -64,4 +64,4 @@
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -5,18 +5,18 @@
|
||||
'title' => 'Info Center',
|
||||
'jquery' => true,
|
||||
'jqueryui' => true,
|
||||
'ajaxlib' => true,
|
||||
'bootstrap' => true,
|
||||
'fontawesome' => true,
|
||||
'sbadmintemplate' => true,
|
||||
'tablesorter' => true,
|
||||
'ajaxlib' => true,
|
||||
'filterwidget' => true,
|
||||
'navigationwidget' => true,
|
||||
'phrases' => array(
|
||||
'person' => array('vorname', 'nachname'),
|
||||
'global' => array('mailAnXversandt'),
|
||||
'ui' => array('bitteEintragWaehlen')
|
||||
),
|
||||
'navigationwidget' => true,
|
||||
'customCSSs' => 'public/css/sbadmin2/tablesort_bootstrap.css',
|
||||
'customJSs' => array('public/js/bootstrapper.js', 'public/js/infocenter/infocenterPersonDataset.js')
|
||||
)
|
||||
@@ -32,18 +32,13 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h3 class="page-header">Infocenter
|
||||
<?php echo ucfirst($this->p->t('global', 'uebersicht')); ?>
|
||||
<h3 class="page-header">
|
||||
Infocenter <?php echo ucfirst($this->p->t('global', 'uebersicht')); ?>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<?php
|
||||
$this->load->view(
|
||||
'system/infocenter/infocenterData.php',
|
||||
array('fhc_controller_id' => $fhc_controller_id)
|
||||
);
|
||||
?>
|
||||
<?php $this->load->view('system/infocenter/infocenterData.php'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
$APP = 'infocenter';
|
||||
$NOTBEFORE = '2018-03-01 18:00:00';
|
||||
|
||||
$filterWidgetArray = array(
|
||||
'query' => '
|
||||
SELECT
|
||||
@@ -218,10 +219,11 @@
|
||||
'formatRow' => function($datasetRaw) {
|
||||
|
||||
$datasetRaw->{'Details'} = sprintf(
|
||||
'<a href="%s/%s?fhc_controller_id=%s">Details</a>',
|
||||
'<a href="%s?person_id=%s&origin_page=%s&fhc_controller_id=%s">Details</a>',
|
||||
site_url('system/infocenter/InfoCenter/showDetails'),
|
||||
$datasetRaw->{'PersonId'},
|
||||
(isset($_GET['fhc_controller_id'])?$_GET['fhc_controller_id']:'')
|
||||
$this->router->method,
|
||||
$this->input->get('fhc_controller_id')
|
||||
);
|
||||
|
||||
if ($datasetRaw->{'SendDate'} == null)
|
||||
@@ -266,14 +268,17 @@
|
||||
{
|
||||
$datasetRaw->{'StgAbgeschickt'} = '-';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'StgNichtAbgeschickt'} == null)
|
||||
{
|
||||
$datasetRaw->{'StgNichtAbgeschickt'} = '-';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'StgAktiv'} == null)
|
||||
{
|
||||
$datasetRaw->{'StgAktiv'} = '-';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'Nation'} == null)
|
||||
{
|
||||
$datasetRaw->{'Nation'} = '-';
|
||||
@@ -290,9 +295,9 @@
|
||||
$mark = FilterWidget::DEFAULT_MARK_ROW_CLASS;
|
||||
}
|
||||
|
||||
// Parking has priority over locking
|
||||
if ($datasetRaw->ParkDate != null)
|
||||
{
|
||||
// Parking has priority over locking
|
||||
$mark = "text-info";
|
||||
}
|
||||
|
||||
@@ -300,9 +305,10 @@
|
||||
}
|
||||
);
|
||||
|
||||
$filterWidgetArray[InfoCenter::FILTER_ID] = $this->input->get(InfoCenter::FILTER_ID);
|
||||
$filterWidgetArray['app'] = $APP;
|
||||
$filterWidgetArray['datasetName'] = 'PersonActions';
|
||||
$filterWidgetArray['filterKurzbz'] = 'InfoCenterSentApplicationAll';
|
||||
$filterWidgetArray['filter_id'] = $this->input->get('filter_id');
|
||||
|
||||
echo $this->widgetlib->widget('FilterWidget', $filterWidgetArray);
|
||||
?>
|
||||
|
||||
@@ -13,41 +13,35 @@
|
||||
'sbadmintemplate' => true,
|
||||
'addons' => true,
|
||||
'navigationwidget' => true,
|
||||
'customCSSs' =>
|
||||
array(
|
||||
'public/css/sbadmin2/admintemplate.css',
|
||||
'public/css/sbadmin2/tablesort_bootstrap.css'
|
||||
'customCSSs' => array(
|
||||
'public/css/sbadmin2/admintemplate.css',
|
||||
'public/css/sbadmin2/tablesort_bootstrap.css'
|
||||
),
|
||||
'customJSs' => array(
|
||||
'public/js/bootstrapper.js',
|
||||
'public/js/tablesort/tablesort.js',
|
||||
'public/js/infocenter/infocenterDetails.js'
|
||||
),
|
||||
'phrases' => array(
|
||||
'infocenter' => array(
|
||||
'notizHinzufuegen',
|
||||
'notizAendern',
|
||||
'bewerberParken',
|
||||
'bewerberAusparken',
|
||||
'nichtsZumAusparken',
|
||||
'fehlerBeimAusparken',
|
||||
'fehlerBeimParken',
|
||||
'bewerberGeparktBis'
|
||||
),
|
||||
'customJSs' =>
|
||||
array(
|
||||
'public/js/bootstrapper.js',
|
||||
'public/js/tablesort/tablesort.js',
|
||||
'public/js/infocenter/infocenterDetails.js'
|
||||
'ui' => array(
|
||||
'gespeichert',
|
||||
'fehlerBeimSpeichern'
|
||||
),
|
||||
'phrases' =>
|
||||
array(
|
||||
'infocenter' =>
|
||||
array(
|
||||
'notizHinzufuegen',
|
||||
'notizAendern',
|
||||
'bewerberParken',
|
||||
'bewerberAusparken',
|
||||
'nichtsZumAusparken',
|
||||
'fehlerBeimAusparken',
|
||||
'fehlerBeimParken',
|
||||
'bewerberGeparktBis'
|
||||
),
|
||||
'ui' =>
|
||||
array(
|
||||
'gespeichert',
|
||||
'fehlerBeimSpeichern'
|
||||
),
|
||||
'global' =>
|
||||
array(
|
||||
'bis',
|
||||
'zeilen'
|
||||
)
|
||||
'global' => array(
|
||||
'bis',
|
||||
'zeilen'
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
?>
|
||||
@@ -69,12 +63,12 @@
|
||||
<div class="headerright text-right">
|
||||
<?php
|
||||
if (isset($lockedby)):
|
||||
echo $this->p->t('global', 'wirdBearbeitetVon') . ': ';
|
||||
echo $this->p->t('global', 'wirdBearbeitetVon').': ';
|
||||
echo $lockedby;
|
||||
if (!isset($show_lock_link) || $show_lock_link === true): ?>
|
||||
if ($origin_page == 'index'): ?>
|
||||
|
||||
<a href="../unlockPerson/<?php echo $stammdaten->person_id; ?>?fhc_controller_id=<?php echo $fhc_controller_id; ?>">
|
||||
<i class="fa fa-sign-out"></i> <?php echo ucfirst($this->p->t('ui', 'freigeben')) ?>
|
||||
<a href="unlockPerson/<?php echo $stammdaten->person_id; ?>?fhc_controller_id=<?php echo $fhc_controller_id; ?>">
|
||||
<i class="fa fa-sign-out"></i> <?php echo ucfirst($this->p->t('ui', 'freigeben')) ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
@@ -103,7 +97,9 @@
|
||||
<div class="panel panel-primary">
|
||||
<a name="DokPruef"></a><!-- anchor for jumping to the section -->
|
||||
<div class="panel-heading text-center">
|
||||
<h4><?php echo ucfirst($this->p->t('infocenter', 'dokumentenpruefung')) ?></h4>
|
||||
<h4>
|
||||
<?php echo ucfirst($this->p->t('infocenter', 'dokumentenpruefung')) ?>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php $this->load->view('system/infocenter/dokpruefung.php'); ?>
|
||||
@@ -118,8 +114,9 @@
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading text-center">
|
||||
<a name="ZgvPruef"></a>
|
||||
<h4><?php echo $this->p->t('infocenter', 'zgv'). ' - '.
|
||||
ucfirst($this->p->t('lehre', 'pruefung'))?></h4>
|
||||
<h4>
|
||||
<?php echo $this->p->t('infocenter', 'zgv').' - '.ucfirst($this->p->t('lehre', 'pruefung'))?>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?php $this->load->view('system/infocenter/zgvpruefungen.php'); ?><!-- /.panel-group -->
|
||||
@@ -134,7 +131,9 @@
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading text-center">
|
||||
<a name="Nachrichten"></a>
|
||||
<h4 class="text-center"><?php echo ucfirst($this->p->t('global', 'nachrichten')) ?></h4>
|
||||
<h4 class="text-center">
|
||||
<?php echo ucfirst($this->p->t('global', 'nachrichten')) ?>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
@@ -153,8 +152,9 @@
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading text-center">
|
||||
<a name="NotizAkt"></a>
|
||||
<h4 class="text-center"><?php echo ucfirst($this->p->t('global', 'notizen')). ' & '.
|
||||
ucfirst($this->p->t('global', 'aktivitaeten')) ?></h4>
|
||||
<h4 class="text-center">
|
||||
<?php echo ucfirst($this->p->t('global', 'notizen')).' & '.ucfirst($this->p->t('global', 'aktivitaeten')) ?>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
|
||||
@@ -12,6 +12,11 @@
|
||||
'ajaxlib' => true,
|
||||
'filterwidget' => true,
|
||||
'navigationwidget' => true,
|
||||
'phrases' => array(
|
||||
'person' => array('vorname', 'nachname'),
|
||||
'global' => array('mailAnXversandt'),
|
||||
'ui' => array('bitteEintragWaehlen')
|
||||
),
|
||||
'customCSSs' => 'public/css/sbadmin2/tablesort_bootstrap.css',
|
||||
'customJSs' => array('public/js/bootstrapper.js', 'public/js/infocenter/infocenterPersonDataset.js')
|
||||
)
|
||||
@@ -27,228 +32,13 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h3 class="page-header">Freigegebene Interessenten</h3>
|
||||
<h3 class="page-header">
|
||||
Freigegebene Interessenten
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<?php
|
||||
|
||||
$APP = 'infocenter';
|
||||
$NOTBEFORE = '2018-03-01 18:00:00';
|
||||
$filterWidgetArray = array(
|
||||
'query' => '
|
||||
SELECT
|
||||
p.person_id AS "PersonId",
|
||||
p.vorname AS "Vorname",
|
||||
p.nachname AS "Nachname",
|
||||
p.gebdatum AS "Gebdatum",
|
||||
p.staatsbuergerschaft AS "Nation",
|
||||
(
|
||||
SELECT zeitpunkt
|
||||
FROM system.tbl_log
|
||||
WHERE taetigkeit_kurzbz IN(\'bewerbung\',\'kommunikation\')
|
||||
AND logdata->>\'name\' NOT IN (\'Login with code\', \'New application\')
|
||||
AND person_id = p.person_id
|
||||
ORDER BY zeitpunkt DESC
|
||||
LIMIT 1
|
||||
) AS "LastAction",
|
||||
(
|
||||
SELECT insertvon
|
||||
FROM system.tbl_log
|
||||
WHERE taetigkeit_kurzbz IN(\'bewerbung\',\'kommunikation\')
|
||||
AND logdata->>\'name\' NOT IN (\'Login with code\', \'New application\')
|
||||
AND person_id = p.person_id
|
||||
ORDER BY zeitpunkt DESC
|
||||
LIMIT 1
|
||||
) AS "User/Operator",
|
||||
(
|
||||
SELECT
|
||||
pss.studiensemester_kurzbz
|
||||
FROM
|
||||
public.tbl_prestudentstatus pss
|
||||
INNER JOIN public.tbl_prestudent ps USING(prestudent_id)
|
||||
JOIN public.tbl_studiengang USING(studiengang_kz)
|
||||
WHERE pss.status_kurzbz = \'Interessent\'
|
||||
AND ps.person_id = p.person_id
|
||||
AND tbl_studiengang.typ in(\'b\')
|
||||
AND studiensemester_kurzbz IN (
|
||||
SELECT studiensemester_kurzbz
|
||||
FROM public.tbl_studiensemester
|
||||
WHERE ende >= NOW()
|
||||
)
|
||||
ORDER BY pss.datum DESC, pss.insertamum DESC, pss.ext_id DESC
|
||||
LIMIT 1
|
||||
) AS "Studiensemester",
|
||||
(
|
||||
SELECT pss.bewerbung_abgeschicktamum
|
||||
FROM
|
||||
public.tbl_prestudentstatus pss
|
||||
INNER JOIN public.tbl_prestudent ps USING(prestudent_id)
|
||||
JOIN public.tbl_studiengang USING(studiengang_kz)
|
||||
WHERE pss.status_kurzbz = \'Interessent\'
|
||||
AND (pss.bewerbung_abgeschicktamum IS NOT NULL AND pss.bewerbung_abgeschicktamum>=\''.$NOTBEFORE.'\')
|
||||
AND ps.person_id = p.person_id
|
||||
AND tbl_studiengang.typ in(\'b\')
|
||||
AND studiensemester_kurzbz IN (
|
||||
SELECT studiensemester_kurzbz
|
||||
FROM public.tbl_studiensemester
|
||||
WHERE ende >= NOW()
|
||||
)
|
||||
ORDER BY pss.datum DESC, pss.insertamum DESC, pss.ext_id DESC
|
||||
LIMIT 1
|
||||
) AS "SendDate",
|
||||
(
|
||||
SELECT count(*)
|
||||
FROM
|
||||
public.tbl_prestudentstatus pss
|
||||
INNER JOIN public.tbl_prestudent ps USING(prestudent_id)
|
||||
JOIN public.tbl_studiengang USING(studiengang_kz)
|
||||
WHERE pss.status_kurzbz = \'Interessent\'
|
||||
AND (pss.bewerbung_abgeschicktamum IS NOT NULL AND pss.bewerbung_abgeschicktamum>=\''.$NOTBEFORE.'\')
|
||||
AND ps.person_id = p.person_id
|
||||
AND tbl_studiengang.typ in(\'b\')
|
||||
AND studiensemester_kurzbz IN (
|
||||
SELECT studiensemester_kurzbz
|
||||
FROM public.tbl_studiensemester
|
||||
WHERE ende >= NOW()
|
||||
)
|
||||
LIMIT 1
|
||||
) AS "AnzahlAbgeschickt",
|
||||
array_to_string(
|
||||
(
|
||||
SELECT array_agg(distinct UPPER(tbl_studiengang.typ || tbl_studiengang.kurzbz))
|
||||
FROM
|
||||
public.tbl_prestudentstatus pss
|
||||
INNER JOIN public.tbl_prestudent ps USING(prestudent_id)
|
||||
JOIN public.tbl_studiengang USING(studiengang_kz)
|
||||
WHERE pss.status_kurzbz = \'Interessent\'
|
||||
AND (pss.bewerbung_abgeschicktamum IS NOT NULL AND pss.bewerbung_abgeschicktamum>=\''.$NOTBEFORE.'\')
|
||||
AND ps.person_id = p.person_id
|
||||
AND tbl_studiengang.typ in(\'b\')
|
||||
AND studiensemester_kurzbz IN (
|
||||
SELECT studiensemester_kurzbz
|
||||
FROM public.tbl_studiensemester
|
||||
WHERE ende >= NOW()
|
||||
)
|
||||
LIMIT 1
|
||||
),\', \'
|
||||
) AS "StgAbgeschickt",
|
||||
pl.zeitpunkt AS "LockDate",
|
||||
pl.lockuser as "LockUser"
|
||||
FROM public.tbl_person p
|
||||
LEFT JOIN (SELECT person_id, zeitpunkt, uid as lockuser FROM system.tbl_person_lock WHERE app = \''.$APP.'\') pl USING(person_id)
|
||||
WHERE
|
||||
EXISTS(
|
||||
SELECT 1
|
||||
FROM
|
||||
public.tbl_prestudent
|
||||
JOIN public.tbl_studiengang USING(studiengang_kz)
|
||||
WHERE
|
||||
person_id=p.person_id
|
||||
AND tbl_studiengang.typ in(\'b\')
|
||||
|
||||
AND EXISTS (
|
||||
SELECT
|
||||
1
|
||||
FROM
|
||||
public.tbl_prestudentstatus
|
||||
WHERE
|
||||
prestudent_id = tbl_prestudent.prestudent_id
|
||||
AND status_kurzbz = \'Interessent\'
|
||||
AND (bestaetigtam IS NOT NULL AND bewerbung_abgeschicktamum >= \''.$NOTBEFORE.'\')
|
||||
AND studiensemester_kurzbz IN (
|
||||
SELECT studiensemester_kurzbz
|
||||
FROM public.tbl_studiensemester
|
||||
WHERE ende >= NOW()
|
||||
)
|
||||
)
|
||||
)
|
||||
ORDER BY "LastAction" DESC
|
||||
',
|
||||
'checkboxes' => 'PersonId',
|
||||
'additionalColumns' => array('Details'),
|
||||
'columnsAliases' => array('PersonID','Vorname','Nachname','GebDatum','Nation','Letzte Aktion','Letzter Bearbeiter',
|
||||
'StSem','GesendetAm','NumAbgeschickt','Studiengänge','Sperrdatum','GesperrtVon'),
|
||||
'formatRow' => function($datasetRaw) {
|
||||
|
||||
$datasetRaw->{'Details'} = sprintf(
|
||||
'<a href="%s/%s?show_lock_link=0&fhc_controller_id=%s">Details</a>',
|
||||
site_url('system/infocenter/InfoCenter/showDetails'),
|
||||
$datasetRaw->{'PersonId'},
|
||||
(isset($_GET['fhc_controller_id'])?$_GET['fhc_controller_id']:'')
|
||||
);
|
||||
|
||||
if ($datasetRaw->{'SendDate'} == null)
|
||||
{
|
||||
$datasetRaw->{'SendDate'} = 'Not sent';
|
||||
}
|
||||
else
|
||||
{
|
||||
$datasetRaw->{'SendDate'} = date_format(date_create($datasetRaw->{'SendDate'}),'Y-m-d H:i');
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'LastAction'} == null)
|
||||
{
|
||||
$datasetRaw->{'LastAction'} = '-';
|
||||
}
|
||||
else
|
||||
{
|
||||
$datasetRaw->{'LastAction'} = date_format(date_create($datasetRaw->{'LastAction'}),'Y-m-d H:i');
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'User/Operator'} == '')
|
||||
{
|
||||
$datasetRaw->{'User/Operator'} = 'NA';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'LockDate'} == null)
|
||||
{
|
||||
$datasetRaw->{'LockDate'} = '-';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'LockUser'} == null)
|
||||
{
|
||||
$datasetRaw->{'LockUser'} = '-';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'StgAbgeschickt'} == null)
|
||||
{
|
||||
$datasetRaw->{'StgAbgeschickt'} = 'N/A';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'Nation'} == null)
|
||||
{
|
||||
$datasetRaw->{'Nation'} = '-';
|
||||
}
|
||||
|
||||
return $datasetRaw;
|
||||
},
|
||||
'markRow' => function($datasetRaw) {
|
||||
|
||||
if ($datasetRaw->LockDate != null)
|
||||
{
|
||||
return FilterWidget::DEFAULT_MARK_ROW_CLASS;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
$filterId = isset($_GET[InfoCenter::FILTER_ID]) ? $_GET[InfoCenter::FILTER_ID] : null;
|
||||
|
||||
if (isset($filterId) && is_numeric($filterId))
|
||||
{
|
||||
$filterWidgetArray[InfoCenter::FILTER_ID] = $filterId;
|
||||
}
|
||||
else
|
||||
{
|
||||
$filterWidgetArray['app'] = $APP;
|
||||
$filterWidgetArray['datasetName'] = 'PersonActions';
|
||||
$filterWidgetArray['filterKurzbz'] = 'InfoCenterNotSentApplicationAll';
|
||||
}
|
||||
|
||||
echo $this->widgetlib->widget('FilterWidget', $filterWidgetArray);
|
||||
?>
|
||||
|
||||
<?php $this->load->view('system/infocenter/infocenterFreigegebenData.php'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,223 @@
|
||||
<?php
|
||||
|
||||
$APP = 'infocenter';
|
||||
$NOTBEFORE = '2018-03-01 18:00:00';
|
||||
|
||||
$filterWidgetArray = array(
|
||||
'query' => '
|
||||
SELECT
|
||||
p.person_id AS "PersonId",
|
||||
p.vorname AS "Vorname",
|
||||
p.nachname AS "Nachname",
|
||||
p.gebdatum AS "Gebdatum",
|
||||
p.staatsbuergerschaft AS "Nation",
|
||||
(
|
||||
SELECT zeitpunkt
|
||||
FROM system.tbl_log
|
||||
WHERE taetigkeit_kurzbz IN(\'bewerbung\',\'kommunikation\')
|
||||
AND logdata->>\'name\' NOT IN (\'Login with code\', \'New application\')
|
||||
AND person_id = p.person_id
|
||||
ORDER BY zeitpunkt DESC
|
||||
LIMIT 1
|
||||
) AS "LastAction",
|
||||
(
|
||||
SELECT insertvon
|
||||
FROM system.tbl_log
|
||||
WHERE taetigkeit_kurzbz IN(\'bewerbung\',\'kommunikation\')
|
||||
AND logdata->>\'name\' NOT IN (\'Login with code\', \'New application\')
|
||||
AND person_id = p.person_id
|
||||
ORDER BY zeitpunkt DESC
|
||||
LIMIT 1
|
||||
) AS "User/Operator",
|
||||
(
|
||||
SELECT
|
||||
pss.studiensemester_kurzbz
|
||||
FROM
|
||||
public.tbl_prestudentstatus pss
|
||||
INNER JOIN public.tbl_prestudent ps USING(prestudent_id)
|
||||
JOIN public.tbl_studiengang USING(studiengang_kz)
|
||||
WHERE pss.status_kurzbz = \'Interessent\'
|
||||
AND ps.person_id = p.person_id
|
||||
AND tbl_studiengang.typ in(\'b\')
|
||||
AND studiensemester_kurzbz IN (
|
||||
SELECT studiensemester_kurzbz
|
||||
FROM public.tbl_studiensemester
|
||||
WHERE ende >= NOW()
|
||||
)
|
||||
ORDER BY pss.datum DESC, pss.insertamum DESC, pss.ext_id DESC
|
||||
LIMIT 1
|
||||
) AS "Studiensemester",
|
||||
(
|
||||
SELECT pss.bewerbung_abgeschicktamum
|
||||
FROM
|
||||
public.tbl_prestudentstatus pss
|
||||
INNER JOIN public.tbl_prestudent ps USING(prestudent_id)
|
||||
JOIN public.tbl_studiengang USING(studiengang_kz)
|
||||
WHERE pss.status_kurzbz = \'Interessent\'
|
||||
AND (pss.bewerbung_abgeschicktamum IS NOT NULL AND pss.bewerbung_abgeschicktamum>=\''.$NOTBEFORE.'\')
|
||||
AND ps.person_id = p.person_id
|
||||
AND tbl_studiengang.typ in(\'b\')
|
||||
AND studiensemester_kurzbz IN (
|
||||
SELECT studiensemester_kurzbz
|
||||
FROM public.tbl_studiensemester
|
||||
WHERE ende >= NOW()
|
||||
)
|
||||
ORDER BY pss.datum DESC, pss.insertamum DESC, pss.ext_id DESC
|
||||
LIMIT 1
|
||||
) AS "SendDate",
|
||||
(
|
||||
SELECT count(*)
|
||||
FROM
|
||||
public.tbl_prestudentstatus pss
|
||||
INNER JOIN public.tbl_prestudent ps USING(prestudent_id)
|
||||
JOIN public.tbl_studiengang USING(studiengang_kz)
|
||||
WHERE pss.status_kurzbz = \'Interessent\'
|
||||
AND (pss.bewerbung_abgeschicktamum IS NOT NULL AND pss.bewerbung_abgeschicktamum>=\''.$NOTBEFORE.'\')
|
||||
AND ps.person_id = p.person_id
|
||||
AND tbl_studiengang.typ in(\'b\')
|
||||
AND studiensemester_kurzbz IN (
|
||||
SELECT studiensemester_kurzbz
|
||||
FROM public.tbl_studiensemester
|
||||
WHERE ende >= NOW()
|
||||
)
|
||||
LIMIT 1
|
||||
) AS "AnzahlAbgeschickt",
|
||||
array_to_string(
|
||||
(
|
||||
SELECT array_agg(distinct UPPER(tbl_studiengang.typ || tbl_studiengang.kurzbz))
|
||||
FROM
|
||||
public.tbl_prestudentstatus pss
|
||||
INNER JOIN public.tbl_prestudent ps USING(prestudent_id)
|
||||
JOIN public.tbl_studiengang USING(studiengang_kz)
|
||||
WHERE pss.status_kurzbz = \'Interessent\'
|
||||
AND (pss.bewerbung_abgeschicktamum IS NOT NULL AND pss.bewerbung_abgeschicktamum>=\''.$NOTBEFORE.'\')
|
||||
AND ps.person_id = p.person_id
|
||||
AND tbl_studiengang.typ in(\'b\')
|
||||
AND studiensemester_kurzbz IN (
|
||||
SELECT studiensemester_kurzbz
|
||||
FROM public.tbl_studiensemester
|
||||
WHERE ende >= NOW()
|
||||
)
|
||||
LIMIT 1
|
||||
),\', \'
|
||||
) AS "StgAbgeschickt",
|
||||
pl.zeitpunkt AS "LockDate",
|
||||
pl.lockuser as "LockUser"
|
||||
FROM public.tbl_person p
|
||||
LEFT JOIN (SELECT person_id, zeitpunkt, uid as lockuser FROM system.tbl_person_lock WHERE app = \''.$APP.'\') pl USING(person_id)
|
||||
WHERE
|
||||
EXISTS(
|
||||
SELECT 1
|
||||
FROM
|
||||
public.tbl_prestudent
|
||||
JOIN public.tbl_studiengang USING(studiengang_kz)
|
||||
WHERE
|
||||
person_id=p.person_id
|
||||
AND tbl_studiengang.typ in(\'b\')
|
||||
|
||||
AND EXISTS (
|
||||
SELECT
|
||||
1
|
||||
FROM
|
||||
public.tbl_prestudentstatus
|
||||
WHERE
|
||||
prestudent_id = tbl_prestudent.prestudent_id
|
||||
AND status_kurzbz = \'Interessent\'
|
||||
AND (bestaetigtam IS NOT NULL AND bewerbung_abgeschicktamum >= \''.$NOTBEFORE.'\')
|
||||
AND studiensemester_kurzbz IN (
|
||||
SELECT studiensemester_kurzbz
|
||||
FROM public.tbl_studiensemester
|
||||
WHERE ende >= NOW()
|
||||
)
|
||||
)
|
||||
)
|
||||
ORDER BY "LastAction" DESC
|
||||
',
|
||||
'checkboxes' => 'PersonId',
|
||||
'additionalColumns' => array('Details'),
|
||||
'columnsAliases' => array(
|
||||
'PersonID',
|
||||
'Vorname',
|
||||
'Nachname',
|
||||
'GebDatum',
|
||||
'Nation',
|
||||
'Letzte Aktion',
|
||||
'Letzter Bearbeiter',
|
||||
'StSem',
|
||||
'GesendetAm',
|
||||
'NumAbgeschickt',
|
||||
'Studiengänge',
|
||||
'Sperrdatum',
|
||||
'GesperrtVon'
|
||||
),
|
||||
'formatRow' => function($datasetRaw) {
|
||||
|
||||
$datasetRaw->{'Details'} = sprintf(
|
||||
'<a href="%s?person_id=%s&origin_page=%s&fhc_controller_id=%s">Details</a>',
|
||||
site_url('system/infocenter/InfoCenter/showDetails'),
|
||||
$datasetRaw->{'PersonId'},
|
||||
$this->router->method,
|
||||
$this->input->get('fhc_controller_id')
|
||||
);
|
||||
|
||||
if ($datasetRaw->{'SendDate'} == null)
|
||||
{
|
||||
$datasetRaw->{'SendDate'} = 'Not sent';
|
||||
}
|
||||
else
|
||||
{
|
||||
$datasetRaw->{'SendDate'} = date_format(date_create($datasetRaw->{'SendDate'}),'Y-m-d H:i');
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'LastAction'} == null)
|
||||
{
|
||||
$datasetRaw->{'LastAction'} = '-';
|
||||
}
|
||||
else
|
||||
{
|
||||
$datasetRaw->{'LastAction'} = date_format(date_create($datasetRaw->{'LastAction'}),'Y-m-d H:i');
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'User/Operator'} == '')
|
||||
{
|
||||
$datasetRaw->{'User/Operator'} = 'NA';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'LockDate'} == null)
|
||||
{
|
||||
$datasetRaw->{'LockDate'} = '-';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'LockUser'} == null)
|
||||
{
|
||||
$datasetRaw->{'LockUser'} = '-';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'StgAbgeschickt'} == null)
|
||||
{
|
||||
$datasetRaw->{'StgAbgeschickt'} = 'N/A';
|
||||
}
|
||||
|
||||
if ($datasetRaw->{'Nation'} == null)
|
||||
{
|
||||
$datasetRaw->{'Nation'} = '-';
|
||||
}
|
||||
|
||||
return $datasetRaw;
|
||||
},
|
||||
'markRow' => function($datasetRaw) {
|
||||
|
||||
if ($datasetRaw->LockDate != null)
|
||||
{
|
||||
return FilterWidget::DEFAULT_MARK_ROW_CLASS;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
$filterWidgetArray['app'] = $APP;
|
||||
$filterWidgetArray['datasetName'] = 'PersonActions';
|
||||
$filterWidgetArray['filterKurzbz'] = 'InfoCenterFreigegeben5days';
|
||||
$filterWidgetArray['filter_id'] = $this->input->get('filter_id');
|
||||
|
||||
echo $this->widgetlib->widget('FilterWidget', $filterWidgetArray);
|
||||
?>
|
||||
@@ -241,8 +241,7 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-6 text-left">
|
||||
<div class="form-inline">
|
||||
<form method="post"
|
||||
action="../saveAbsage/<?php echo $zgvpruefung->prestudent_id ?>">
|
||||
<form method="post" action="saveAbsage/<?php echo $zgvpruefung->prestudent_id ?>">
|
||||
<input type="hidden" name="fhc_controller_id" value="<?php echo $fhc_controller_id; ?>">
|
||||
<div class="input-group" id="statusgrselect_<?php echo $zgvpruefung->prestudent_id ?>">
|
||||
<select name="statusgrund"
|
||||
@@ -304,14 +303,14 @@
|
||||
</div>
|
||||
</div><!-- /.column-absage -->
|
||||
<div class="col-lg-6 text-right">
|
||||
<?php
|
||||
<?php
|
||||
$disabled = $disabledTxt = '';
|
||||
if (empty($zgvpruefung->prestudentstatus->bewerbung_abgeschicktamum))
|
||||
{
|
||||
$disabled = 'disabled';
|
||||
$disabledTxt = 'Die Bewerbung muss erst abgeschickt worden sein.';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ($zgvpruefung->studiengangtyp !== 'b')
|
||||
{
|
||||
$disabled = 'disabled';
|
||||
@@ -319,7 +318,7 @@
|
||||
}
|
||||
?>
|
||||
<div>
|
||||
<button type="button" class="btn btn-default" <?php echo $disabled ?>
|
||||
<button type="button" class="btn btn-default" <?php echo $disabled ?>
|
||||
data-toggle="modal"
|
||||
data-target="#freigabeModal_<?php echo $zgvpruefung->prestudent_id ?>"
|
||||
data-toggle="tooltip" title="<?php echo $disabledTxt ?>">
|
||||
@@ -350,7 +349,7 @@
|
||||
class="btn btn-default"
|
||||
data-dismiss="modal"><?php echo $this->p->t('ui', 'abbrechen') ?>
|
||||
</button>
|
||||
<a href="../saveFreigabe/<?php echo $zgvpruefung->prestudent_id ?>?fhc_controller_id=<?php echo $fhc_controller_id; ?>">
|
||||
<a href="saveFreigabe/<?php echo $zgvpruefung->prestudent_id ?>?fhc_controller_id=<?php echo $fhc_controller_id; ?>">
|
||||
<button type="button"
|
||||
class="btn btn-primary">
|
||||
<?php echo $this->p->t('infocenter', 'interessentFreigeben') ?>
|
||||
@@ -376,4 +375,4 @@
|
||||
</div><!-- /.div collapse -->
|
||||
</div><!-- /.panel -->
|
||||
<?php endforeach; // end foreach zgvpruefungen?>
|
||||
</div><!-- /.panel-group -->
|
||||
</div><!-- /.panel-group -->
|
||||
|
||||
@@ -84,7 +84,7 @@ $widthColumn = $msgExists === true ? 8 : 12;
|
||||
$.ajax(
|
||||
{
|
||||
dataType: "json",
|
||||
url: "<?php echo base_url("/index.ci.php/system/Messages/getMessageFromIds/") ?>" + msgid + "/" + recid,
|
||||
url: "<?php echo site_url("system/Messages/getMessageFromIds/") ?>" + msgid + "/" + recid,
|
||||
success: function (data, textStatus, jqXHR)
|
||||
{
|
||||
$("#msgsubject").text(data[0].subject);
|
||||
@@ -97,4 +97,4 @@ $widthColumn = $msgExists === true ? 8 : 12;
|
||||
}
|
||||
)
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
}
|
||||
}
|
||||
?>
|
||||
<form action="<?php echo APP_ROOT; ?>index.ci.php/system/UDF/saveUDF" method="POST">
|
||||
<form action="<?php echo site_url('system/UDF/saveUDF'); ?>" method="POST">
|
||||
|
||||
<div class="div-table">
|
||||
<div class="div-row">
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
// Retrives the URL path of the called controller + called controller method
|
||||
// Retrives the name of the index page, the URL path of the called controller and the called controller
|
||||
// NOTE: placed here because it doesn't work inside functions
|
||||
$indexPage = $this->config->item('index_page');
|
||||
$calledPath = $this->router->directory.$this->router->class;
|
||||
$calledMethod = $this->router->method;
|
||||
|
||||
@@ -67,14 +68,14 @@ function _generateCSSsInclude($CSSs)
|
||||
/**
|
||||
* Generates global JS-Object to pass parms to other javascripts
|
||||
*/
|
||||
function _generateJSDataStorageObject($calledPath, $calledMethod)
|
||||
function _generateJSDataStorageObject($indexPage, $calledPath, $calledMethod)
|
||||
{
|
||||
$toPrint = "\n";
|
||||
$toPrint .= '<script type="text/javascript">';
|
||||
$toPrint .= '
|
||||
var FHC_JS_DATA_STORAGE_OBJECT = {
|
||||
app_root: "'.APP_ROOT.'",
|
||||
ci_router: "index.ci.php",
|
||||
ci_router: "'.$indexPage.'",
|
||||
called_path: "'.$calledPath.'",
|
||||
called_method: "'.$calledMethod.'"
|
||||
};';
|
||||
@@ -202,7 +203,7 @@ function _generateAddonsJSsInclude($calledFrom)
|
||||
|
||||
// Generates the global object to pass useful parameters to other javascripts
|
||||
// NOTE: must be called before any other JS include
|
||||
_generateJSDataStorageObject($calledPath, $calledMethod);
|
||||
_generateJSDataStorageObject($indexPage, $calledPath, $calledMethod);
|
||||
|
||||
// Generates the global object to pass phrases to javascripts
|
||||
// NOTE: must be called before including the PhrasesLib.js
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* Renders the header menu
|
||||
*/
|
||||
class NavigationHeaderWidget extends Widget
|
||||
{
|
||||
/**
|
||||
*
|
||||
* Renders the header menu
|
||||
*/
|
||||
public function display($widgetData)
|
||||
{
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* Renders the left side menu
|
||||
*/
|
||||
class NavigationMenuWidget extends Widget
|
||||
{
|
||||
/**
|
||||
*
|
||||
* Renders the left side menu
|
||||
*/
|
||||
public function display($widgetData)
|
||||
{
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* Renders the navigation widget making use of the NavigationMenuWidget and the NavigationHeaderWidget
|
||||
*/
|
||||
class NavigationWidget extends Widget
|
||||
{
|
||||
/**
|
||||
*
|
||||
* Renders the entire widget
|
||||
*/
|
||||
public function display($widgetData)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user