mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 16:44:28 +00:00
- Added new includes to FHC-Header.php
- Now FilterWidget is not rendering an entire page but only a div - Added view infocenterData to show the filter itself - FilterWidget now is using the new FHC-Header
This commit is contained in:
@@ -36,60 +36,4 @@ class InfoCenter extends VileSci_Controller
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function filter($filterId = null)
|
||||
{
|
||||
$filterWidgetArray = array(
|
||||
'query' => '
|
||||
SELECT p.person_id AS "PersonId",
|
||||
p.nachname AS "Nachname",
|
||||
p.vorname AS "Vorname",
|
||||
k.kontakt AS "Email",
|
||||
p.aktiv AS "Aktiv",
|
||||
k.updateamum AS "UpdateDate"
|
||||
FROM public.tbl_person p INNER JOIN public.tbl_kontakt k USING(person_id)
|
||||
WHERE p.aktiv = TRUE
|
||||
AND p.person_id = k.person_id
|
||||
AND k.kontakttyp = \'email\'
|
||||
AND p.person_id < 1000
|
||||
',
|
||||
'hideHeader' => false,
|
||||
'hideSave' => false,
|
||||
'checkboxes' => array('PersonId'),
|
||||
'additionalColumns' => array('Delete', 'Edit'),
|
||||
'formatRaw' => function($fieldName, $fieldValue, $datasetRaw) {
|
||||
|
||||
if ($fieldName == 'PersonId')
|
||||
{
|
||||
$datasetRaw->{$fieldName} = '<a href="view/'.$datasetRaw->PersonId.'">'.$fieldValue.'</a>';
|
||||
}
|
||||
elseif ($fieldName == 'Delete')
|
||||
{
|
||||
$datasetRaw->{$fieldName} = '<a href="delete/'.$datasetRaw->PersonId.'">Delete</a>';
|
||||
}
|
||||
elseif ($fieldName == 'Edit')
|
||||
{
|
||||
$datasetRaw->{$fieldName} = '<a href="edit/'.$datasetRaw->PersonId.'">Edit</a>';
|
||||
}
|
||||
|
||||
return $datasetRaw;
|
||||
}
|
||||
);
|
||||
|
||||
if ($filterId == null)
|
||||
{
|
||||
$filterWidgetArray['app'] = 'core';
|
||||
$filterWidgetArray['datasetName'] = 'kontakts';
|
||||
$filterWidgetArray['filterKurzbz'] = 'This filter filters';
|
||||
}
|
||||
else
|
||||
{
|
||||
$filterWidgetArray['filterId'] = $filterId;
|
||||
}
|
||||
|
||||
echo $this->widgetlib->widget('FilterWidget', $filterWidgetArray);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user