- Added public/css/FilterWidget.css and public/css/NavigationWidget.css to define CSS for Filter and Navigation widgets

- Added public/js/FilterWidget.js and public/js/NavigationWidget.js to collect all the JS for Filter and Navigation widgets
- Added filterwidget and navigationwidget paramaters to FHC-Header to include the new CSS and JS for Filter and Navigation widgets
- Removed all CSS and JS from the views used from Filter and Navigation widgets
- Added method _getFilterUniqueId to controller Filters to generate a unique id for a filter based on fhc_controller_id and the current page
- Adapted the code in controller Filters to use _getFilterUniqueId
- Added method _getFilterUniqueId to widget FilterWidget to generate a unique id for a filter based on fhc_controller_id and the current page
- Adapted the code in widget FilterWidget to use _getFilterUniqueId
- Removed fhc_controller_id from menu generation in InfoCenter controller
- InfoCenter controller now gives as parameter fhc_controller_id to view infocenterDetails
- InfoCenter controller now gives as parameter fhc_controller_id to various redirect
- Views infocenter, infocenterData, infocenterDetails and infocenterFreigegeben:
	- including new JS and CSS to work with Navigation and Filter widgets
	- including AjaxLib (required by FilterWidget.js and NavigationWidget.js)
	- using fhc_controller_id in Details and unlockPerson links
- fhc_controller_id in not anymore a parameter for FilterWidget, adapted the code where FilterWidget is called
- AjaxLib: renamed method _getUrlParameter to getUrlParameter
- Removed function getUrlParameter from public/js/infocenter/infocenterDetails.js, now uses the method from AjaxLib
- Added fhc_controller_id where needed into public/js/infocenter/infocenterDetails.js
- public/js/infocenter/infocenterPersonDataset.js now uses getUrlParameter from AjaxLib
- Added paramater filter_page in infocenterPersonDataset.js when calling Filters/rowNumber
This commit is contained in:
Paolo
2018-05-18 12:10:14 +02:00
parent 6a67183738
commit 13beae23cc
23 changed files with 1239 additions and 1225 deletions
@@ -9,6 +9,9 @@
'fontawesome' => true,
'sbadmintemplate' => true,
'tablesorter' => true,
'ajaxlib' => true,
'filterwidget' => true,
'navigationwidget' => true,
'customCSSs' => 'public/css/sbadmin2/tablesort_bootstrap.css',
'customJSs' => array('public/js/bootstrapper.js', 'public/js/infocenter/infocenterPersonDataset.js')
)
@@ -2,6 +2,7 @@
$APP = 'infocenter';
$NOTBEFORE = '2018-03-01 18:00:00';
$filterWidgetArray = array(
'query' => '
SELECT
@@ -160,7 +161,7 @@
FROM system.tbl_log
WHERE logdata->>\'name\' = \'Parked\'
AND zeitpunkt > now()
) pd USING(person_id)
) pd USING(person_id)
WHERE
EXISTS(
SELECT 1
@@ -193,33 +194,33 @@
)
ORDER BY "LastAction" ASC
',
'fhc_controller_id' => $fhc_controller_id,
'checkboxes' => 'PersonId',
'additionalColumns' => array('Details'),
'columnsAliases' => array(
'PersonID',
ucfirst($this->p->t('person','vorname')) ,
ucfirst($this->p->t('person','nachname')),
ucfirst($this->p->t('person','geburtsdatum')),
ucfirst($this->p->t('person','nation')),
ucfirst($this->p->t('global','letzteAktion')),
ucfirst($this->p->t('global','letzterBearbeiter')),
ucfirst($this->p->t('lehre','studiensemester')),
ucfirst($this->p->t('global','gesendetAm')),
ucfirst($this->p->t('global','abgeschickt')) . ' (' . $this->p->t('global','anzahl') . ')',
ucfirst($this->p->t('lehre','studiengang')) . ' (' . $this->p->t('global','gesendet') . ')',
ucfirst($this->p->t('lehre','studiengang')) . ' (' . $this->p->t('global','nichtGesendet') . ')',
ucfirst($this->p->t('lehre','studiengang')) . ' (' . $this->p->t('global','aktiv') . ')',
ucfirst($this->p->t('global','sperrdatum')),
ucfirst($this->p->t('global','gesperrtVon')),
"ParkedDate"
'PersonID',
ucfirst($this->p->t('person', 'vorname')) ,
ucfirst($this->p->t('person', 'nachname')),
ucfirst($this->p->t('person', 'geburtsdatum')),
ucfirst($this->p->t('person', 'nation')),
ucfirst($this->p->t('global', 'letzteAktion')),
ucfirst($this->p->t('global', 'letzterBearbeiter')),
ucfirst($this->p->t('lehre', 'studiensemester')),
ucfirst($this->p->t('global', 'gesendetAm')),
ucfirst($this->p->t('global', 'abgeschickt')).' ('.$this->p->t('global', 'anzahl').')',
ucfirst($this->p->t('lehre', 'studiengang')).' ('.$this->p->t('global', 'gesendet').')',
ucfirst($this->p->t('lehre', 'studiengang')).' ('.$this->p->t('global', 'nichtGesendet').')',
ucfirst($this->p->t('lehre', 'studiengang')).' ('.$this->p->t('global', 'aktiv').')',
ucfirst($this->p->t('global', 'sperrdatum')),
ucfirst($this->p->t('global', 'gesperrtVon')),
'ParkedDate'
),
'formatRaw' => function($datasetRaw) {
$datasetRaw->{'Details'} = sprintf(
'<a href="%s%s">Details</a>',
site_url('system/infocenter/InfoCenter/showDetails/'),
$datasetRaw->{'PersonId'}
'<a href="%s/%s?fhc_controller_id=%s">Details</a>',
site_url('system/infocenter/InfoCenter/showDetails'),
$datasetRaw->{'PersonId'},
$this->input->get('fhc_controller_id')
);
if ($datasetRaw->{'SendDate'} == null)
@@ -228,7 +229,7 @@
}
else
{
$datasetRaw->{'SendDate'} = date_format(date_create($datasetRaw->{'SendDate'}),'Y-m-d H:i');
$datasetRaw->{'SendDate'} = date_format(date_create($datasetRaw->{'SendDate'}), 'Y-m-d H:i');
}
if ($datasetRaw->{'LastAction'} == null)
@@ -237,7 +238,7 @@
}
else
{
$datasetRaw->{'LastAction'} = date_format(date_create($datasetRaw->{'LastAction'}),'Y-m-d H:i');
$datasetRaw->{'LastAction'} = date_format(date_create($datasetRaw->{'LastAction'}), 'Y-m-d H:i');
}
if ($datasetRaw->{'User/Operator'} == '')
@@ -285,14 +286,14 @@
if ($datasetRaw->ParkDate != null)
{
//parking has prio over locking
// Parking has priority over locking
$mark = "text-info";
}
return $mark;
}
);
$filterId = isset($_GET[InfoCenter::FILTER_ID]) ? $_GET[InfoCenter::FILTER_ID] : null;
if (isset($filterId) && is_numeric($filterId))
@@ -11,6 +11,8 @@
'tinymce' => true,
'sbadmintemplate' => true,
'addons' => true,
'ajaxlib' => true,
'navigationwidget' => true,
'customCSSs' =>
array(
'public/css/sbadmin2/admintemplate.css',
@@ -46,7 +48,7 @@
echo $lockedby;
?>
&nbsp;&nbsp;
<a href="../unlockPerson/<?php echo $stammdaten->person_id; ?>"><i
<a href="../unlockPerson/<?php echo $stammdaten->person_id; ?>?fhc_controller_id=<?php echo $fhc_controller_id; ?>"><i
class="fa fa-sign-out"></i>&nbsp;<?= ucfirst($this->p->t('ui', 'freigeben')) ?></a>
<?php endif; ?>
</div>
@@ -9,6 +9,9 @@
'fontawesome' => true,
'sbadmintemplate' => true,
'tablesorter' => true,
'ajaxlib' => true,
'filterwidget' => true,
'navigationwidget' => true,
'customCSSs' => 'public/css/sbadmin2/tablesort_bootstrap.css',
'customJSs' => array('public/js/bootstrapper.js', 'public/js/infocenter/infocenterPersonDataset.js')
)
@@ -170,7 +173,6 @@
)
ORDER BY "LastAction" ASC
',
'fhc_controller_id' => $fhc_controller_id,
'checkboxes' => 'PersonId',
'additionalColumns' => array('Details'),
'columnsAliases' => array('PersonID','Vorname','Nachname','GebDatum','Nation','Letzte Aktion','Letzter Bearbeiter',
@@ -178,9 +180,10 @@
'formatRaw' => function($datasetRaw) {
$datasetRaw->{'Details'} = sprintf(
'<a href="%s%s">Details</a>',
base_url('index.ci.php/system/infocenter/InfoCenter/showDetails/'),
$datasetRaw->{'PersonId'}
'<a href="%s/%s?fhc_controller_id=%s">Details</a>',
site_url('system/infocenter/InfoCenter/showDetails'),
$datasetRaw->{'PersonId'},
$this->input->get('fhc_controller_id')
);
if ($datasetRaw->{'SendDate'} == null)