Merge branch 'master' into permissions

- Added new core controller called Auth_Controller that extends FHC_Controller and manage the authentication
- All the controllers that were extending the CI_Controller now they extend the FHC_Controller
- All the controllers that were extending the FHC_Controller now they extend the Auth_Controller
- Added the method isAllowed to the FiltersLib to check if the authenticated user has the required permissions
- FilterWidget and controller Filters are using the method isAllowed from the FiltersLib
This commit is contained in:
Paolo
2018-06-08 17:53:12 +02:00
109 changed files with 9580 additions and 4707 deletions
+3 -1
View File
@@ -5,7 +5,9 @@ $this->load->view('templates/FHC-Header',
'jquery' => true,
'bootstrap' => true,
'fontawesome' => true,
'sbadmintemplate' => true
'sbadmintemplate' => true,
'ajaxlib' => true,
'navigationwidget' => true
)
);
?>
@@ -2,11 +2,11 @@
<input type="hidden" name="hiddenNotizId" value="">
<div class="form-group">
<div class="text-center">
<label>Notiz hinzuf&uuml;gen</label>
<label><?php echo $this->p->t('infocenter', 'notizHinzufuegen') ?></label>
</div>
<div>
<div class="form-group">
<label>Titel: </label>
<label><?php echo ucfirst($this->p->t('global', 'titel')) . ': ' ?></label>
<div class="input-group">
<input id="inputNotizTitel" type="text" class="form-control" name="notiztitel"/>
<div class="input-group-addon" onclick="document.getElementById('inputNotizTitel').value='Anmerkung zur Bewerbung'">
@@ -21,8 +21,9 @@
</div>
<div class="text-right">
<!--abbrechen-button only shown when notice is clicked to be changed-->
<button type="reset" class="btn btn-default" style="display: none">Abbrechen</button>
<button type="submit" class="btn btn-default">Speichern</button>
<span class="text-danger" id="notizmsg"></span>
<button type="reset" class="btn btn-default" style="display: none"><?php echo $this->p->t('ui', 'abbrechen') ?></button>
<button type="submit" class="btn btn-default"><?php echo $this->p->t('ui', 'speichern') ?></button>
</div>
</div>
</form>
</form>
@@ -5,7 +5,7 @@
<table class="table-bordered" align="center" width="100%">
<thead>
<tr>
<th colspan="2" class="text-center">Anmerkungen zur Bewerbung</th>
<th colspan="2" class="text-center"><?php echo ucfirst($this->p->t('infocenter','anmerkungenZurBewerbung')) ?></th>
</tr>
</thead>
<tbody>
@@ -2,11 +2,11 @@
<table id="doctable" class="table table-bordered">
<thead>
<tr>
<th>Name</th>
<th>Typ</th>
<th>Uploaddatum</th>
<th>Ausstellungsnation</th>
<th>Formal gepr&uuml;ft</th>
<th><?php echo ucfirst($this->p->t('global','name')) ?></th>
<th><?php echo ucfirst($this->p->t('global','typ')) ?></th>
<th><?php echo ucfirst($this->p->t('global','uploaddatum')) ?></th>
<th><?php echo ucfirst($this->p->t('infocenter','ausstellungsnation')) ?></th>
<th><?php echo ucfirst($this->p->t('infocenter','formalGeprueft')) ?></th>
</tr>
</thead>
<tbody>
@@ -35,14 +35,14 @@
</div>
<?php if (count($dokumente_nachgereicht) > 0): ?>
<br/>
<p>Nachzureichende Dokumente:</p>
<p><?php echo ucfirst($this->p->t('infocenter','nachzureichendeDokumente')) ?></p>
<table id="nachgdoctable" class="table table-bordered">
<thead>
<tr>
<th>Typ</th>
<th>Nachzureichen am</th>
<th>Ausstellungsnation</th>
<th>Anmerkung</th>
<th><?php echo ucfirst($this->p->t('global','typ')) ?></th>
<th><?php echo ucfirst($this->p->t('infocenter','nachzureichenAm')) ?></th>
<th><?php echo ucfirst($this->p->t('infocenter','ausstellungsnation')) ?></th>
<th><?php echo ucfirst($this->p->t('global','anmerkung')) ?></th>
</tr>
</thead>
<tbody>
@@ -5,10 +5,18 @@
'title' => 'Info Center',
'jquery' => true,
'jqueryui' => true,
'ajaxlib' => true,
'bootstrap' => true,
'fontawesome' => true,
'sbadmintemplate' => true,
'tablesorter' => true,
'filterwidget' => 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')
)
@@ -24,12 +32,17 @@
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<h3 class="page-header">Infocenter &Uuml;bersicht</h3>
<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));
$this->load->view(
'system/infocenter/infocenterData.php',
array('fhc_controller_id' => $fhc_controller_id)
);
?>
</div>
</div>
@@ -82,7 +82,7 @@
FROM public.tbl_studiensemester
WHERE ende >= NOW()
)
AND not exists (select 1 from tbl_prestudentstatus psss where psss.prestudent_id = pss.prestudent_id and psss.status_kurzbz = \'Abgewiesener\')
AND not exists (select 1 from tbl_prestudentstatus psss where psss.prestudent_id = pss.prestudent_id and psss.status_kurzbz = \'Abgewiesener\' and psss.studiensemester_kurzbz = \'WS2018\')
LIMIT 1
) AS "AnzahlAbgeschickt",
array_to_string(
@@ -103,7 +103,7 @@
FROM public.tbl_studiensemester
WHERE ende >= NOW()
)
AND not exists (select 1 from tbl_prestudentstatus psss where psss.prestudent_id = pss.prestudent_id and psss.status_kurzbz = \'Abgewiesener\')
AND not exists (select 1 from tbl_prestudentstatus psss where psss.prestudent_id = pss.prestudent_id and psss.status_kurzbz = \'Abgewiesener\' and psss.studiensemester_kurzbz = \'WS2018\')
LIMIT 1
),\', \'
) AS "StgAbgeschickt",
@@ -125,7 +125,7 @@
FROM public.tbl_studiensemester
WHERE ende >= NOW()
)
AND not exists (select 1 from tbl_prestudentstatus psss where psss.prestudent_id = pss.prestudent_id and psss.status_kurzbz = \'Abgewiesener\')
AND not exists (select 1 from tbl_prestudentstatus psss where psss.prestudent_id = pss.prestudent_id and psss.status_kurzbz = \'Abgewiesener\' and psss.studiensemester_kurzbz = \'WS2018\')
LIMIT 1
),\', \'
) AS "StgNichtAbgeschickt",
@@ -146,14 +146,22 @@
FROM public.tbl_studiensemester
WHERE start >= NOW()
)
AND not exists (select 1 from tbl_prestudentstatus psss where psss.prestudent_id = pss.prestudent_id and psss.status_kurzbz = \'Abgewiesener\')
AND not exists (select 1 from tbl_prestudentstatus psss where psss.prestudent_id = pss.prestudent_id and psss.status_kurzbz = \'Abgewiesener\' and psss.studiensemester_kurzbz = \'WS2018\')
LIMIT 1
),\', \'
) AS "StgAktiv",
pl.zeitpunkt AS "LockDate",
pl.lockuser as "LockUser"
pl.lockuser AS "LockUser",
pd.parkdate AS "ParkDate"
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)
LEFT JOIN (
SELECT person_id, zeitpunkt as parkdate
FROM system.tbl_log
WHERE logtype_kurzbz = \'Processstate\'
AND logdata->>\'name\' = \'Parked\'
AND zeitpunkt >= now()
) pd USING(person_id)
WHERE
EXISTS(
SELECT 1
@@ -187,22 +195,33 @@
ORDER BY "LastAction" ASC
',
'requiredPermissions' => 'infocenter',
'fhc_controller_id' => $fhc_controller_id,
'checkboxes' => 'PersonId',
'additionalColumns' => array('Details'),
'columnsAliases' => array(
'PersonID', 'Vorname', 'Nachname',
'GebDatum', 'Nation', 'Letzte Aktion',
'Letzter Bearbeiter', 'StSem', 'GesendetAm',
'NumAbgeschickt', 'StgSent', 'StgNotSent',
'StgAktiv', 'Sperrdatum', 'GesperrtVon'
'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')),
ucfirst($this->p->t('global', 'parkdatum'))
),
'formatRaw' => function($datasetRaw) {
'formatRow' => 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'},
(isset($_GET['fhc_controller_id'])?$_GET['fhc_controller_id']:'')
);
if ($datasetRaw->{'SendDate'} == null)
@@ -211,7 +230,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)
@@ -220,7 +239,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'} == '')
@@ -238,6 +257,11 @@
$datasetRaw->{'LockUser'} = '-';
}
if ($datasetRaw->{'ParkDate'} == null)
{
$datasetRaw->{'ParkDate'} = '-';
}
if ($datasetRaw->{'StgAbgeschickt'} == null)
{
$datasetRaw->{'StgAbgeschickt'} = '-';
@@ -259,25 +283,26 @@
},
'markRow' => function($datasetRaw) {
$mark = '';
if ($datasetRaw->LockDate != null)
{
return FilterWidget::DEFAULT_MARK_ROW_CLASS;
$mark = FilterWidget::DEFAULT_MARK_ROW_CLASS;
}
if ($datasetRaw->ParkDate != null)
{
// 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))
{
$filterWidgetArray[InfoCenter::FILTER_ID] = $filterId;
}
else
{
$filterWidgetArray['app'] = $APP;
$filterWidgetArray['datasetName'] = 'PersonActions';
$filterWidgetArray['filterKurzbz'] = 'InfoCenterNotSentApplicationAll';
}
$filterWidgetArray[InfoCenter::FILTER_ID] = $this->input->get(InfoCenter::FILTER_ID);
$filterWidgetArray['app'] = $APP;
$filterWidgetArray['datasetName'] = 'PersonActions';
echo $this->widgetlib->widget('FilterWidget', $filterWidgetArray);
?>
@@ -7,10 +7,12 @@
'bootstrap' => true,
'fontawesome' => true,
'jqueryui' => true,
'ajaxlib' => true,
'tablesorter' => true,
'tinymce' => true,
'sbadmintemplate' => true,
'addons' => true,
'navigationwidget' => true,
'customCSSs' =>
array(
'public/css/sbadmin2/admintemplate.css',
@@ -20,8 +22,33 @@
array(
'public/js/bootstrapper.js',
'public/js/tablesort/tablesort.js',
'public/js/infocenter/infocenterDetails.js')
'public/js/infocenter/infocenterDetails.js'
),
'phrases' =>
array(
'infocenter' =>
array(
'notizHinzufuegen',
'notizAendern',
'bewerberParken',
'bewerberAusparken',
'nichtsZumAusparken',
'fehlerBeimAusparken',
'fehlerBeimParken',
'bewerberGeparktBis'
),
'ui' =>
array(
'gespeichert',
'fehlerBeimSpeichern'
),
'global' =>
array(
'bis',
'zeilen'
)
)
)
);
?>
<body>
@@ -40,14 +67,16 @@
</div>
<div class="col-lg-4">
<div class="headerright text-right">
wird bearbeitet von:
<?php
if (isset($lockedby)):
echo $this->p->t('global', 'wirdBearbeitetVon') . ': ';
echo $lockedby;
?>
&nbsp;&nbsp;
<a href="../unlockPerson/<?php echo $stammdaten->person_id; ?>"><i
class="fa fa-sign-out"></i>&nbsp;Freigeben</a>
if (!isset($show_lock_link) || $show_lock_link === true): ?>
&nbsp;&nbsp;
<a href="../unlockPerson/<?php echo $stammdaten->person_id; ?>?fhc_controller_id=<?php echo $fhc_controller_id; ?>">
<i class="fa fa-sign-out"></i>&nbsp;<?php echo ucfirst($this->p->t('ui', 'freigeben')) ?>
</a>
<?php endif; ?>
<?php endif; ?>
</div>
</div>
@@ -57,7 +86,9 @@
<div class="row">
<div class="col-lg-12">
<div class="panel panel-primary">
<div class="panel-heading text-center"><h4>Stammdaten</h4></div>
<div class="panel-heading text-center">
<h4><?php echo ucfirst($this->p->t('global', 'stammdaten')) ?></h4>
</div>
<div class="panel-body">
<?php $this->load->view('system/infocenter/stammdaten.php'); ?>
<?php $this->load->view('system/infocenter/anmerkungenZurBewerbung.php'); ?>
@@ -71,7 +102,9 @@
<div class="col-lg-12">
<div class="panel panel-primary">
<a name="DokPruef"></a><!-- anchor for jumping to the section -->
<div class="panel-heading text-center"><h4>Dokumentenpr&uuml;fung</h4></div>
<div class="panel-heading text-center">
<h4><?php echo ucfirst($this->p->t('infocenter', 'dokumentenpruefung')) ?></h4>
</div>
<div class="panel-body">
<?php $this->load->view('system/infocenter/dokpruefung.php'); ?>
</div> <!-- ./panel-body -->
@@ -85,7 +118,8 @@
<div class="panel panel-primary">
<div class="panel-heading text-center">
<a name="ZgvPruef"></a>
<h4>ZGV-Pr&uuml;fung</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 -->
@@ -100,7 +134,7 @@
<div class="panel panel-primary">
<div class="panel-heading text-center">
<a name="Nachrichten"></a>
<h4 class="text-center">Nachrichten</h4>
<h4 class="text-center"><?php echo ucfirst($this->p->t('global', 'nachrichten')) ?></h4>
</div>
<div class="panel-body">
<div class="row">
@@ -119,7 +153,8 @@
<div class="panel panel-primary">
<div class="panel-heading text-center">
<a name="NotizAkt"></a>
<h4 class="text-center">Notizen &amp; Aktivit&auml;ten</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">
@@ -131,8 +166,11 @@
<?php $this->load->view('system/infocenter/notizen.php'); ?>
</div>
</div>
<div class="col-lg-6" id="logs">
<div class="col-lg-6">
<div id="parking"></div>
<div id="logs">
<?php $this->load->view('system/infocenter/logs.php'); ?>
</div>
</div> <!-- ./column -->
</div> <!-- ./row -->
</div> <!-- ./panel-body -->
+30 -31
View File
@@ -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')
)
@@ -66,7 +69,6 @@
INNER JOIN public.tbl_prestudent ps USING(prestudent_id)
JOIN public.tbl_studiengang USING(studiengang_kz)
WHERE pss.status_kurzbz = \'Interessent\'
AND pss.bestaetigtam IS NULL
AND ps.person_id = p.person_id
AND tbl_studiengang.typ in(\'b\')
AND studiensemester_kurzbz IN (
@@ -85,7 +87,6 @@
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 pss.bestaetigtam IS NULL
AND ps.person_id = p.person_id
AND tbl_studiengang.typ in(\'b\')
AND studiensemester_kurzbz IN (
@@ -104,7 +105,6 @@
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 pss.bestaetigtam IS NULL
AND ps.person_id = p.person_id
AND tbl_studiengang.typ in(\'b\')
AND studiensemester_kurzbz IN (
@@ -123,7 +123,6 @@
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 pss.bestaetigtam IS NULL
AND ps.person_id = p.person_id
AND tbl_studiengang.typ in(\'b\')
AND studiensemester_kurzbz IN (
@@ -147,11 +146,7 @@
WHERE
person_id=p.person_id
AND tbl_studiengang.typ in(\'b\')
AND \'Interessent\' = (SELECT status_kurzbz FROM public.tbl_prestudentstatus
WHERE prestudent_id=tbl_prestudent.prestudent_id
ORDER BY datum DESC, insertamum DESC, ext_id DESC
LIMIT 1
)
AND EXISTS (
SELECT
1
@@ -160,7 +155,7 @@
WHERE
prestudent_id = tbl_prestudent.prestudent_id
AND status_kurzbz = \'Interessent\'
AND (bestaetigtam IS NOT NULL AND (bewerbung_abgeschicktamum is null OR bewerbung_abgeschicktamum>=\''.$NOTBEFORE.'\'))
AND (bestaetigtam IS NOT NULL AND bewerbung_abgeschicktamum >= \''.$NOTBEFORE.'\')
AND studiensemester_kurzbz IN (
SELECT studiensemester_kurzbz
FROM public.tbl_studiensemester
@@ -168,19 +163,33 @@
)
)
)
ORDER BY "LastAction" ASC
ORDER BY "LastAction" DESC
',
'fhc_controller_id' => $fhc_controller_id,
'requiredPermissions' => 'infocenter',
'checkboxes' => 'PersonId',
'additionalColumns' => array('Details'),
'columnsAliases' => array('PersonID','Vorname','Nachname','GebDatum','Nation','Letzte Aktion','Letzter Bearbeiter',
'StSem','GesendetAm','NumAbgeschickt','Studiengänge','Sperrdatum','GesperrtVon'),
'formatRaw' => function($datasetRaw) {
'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">Details</a>',
base_url('index.ci.php/system/infocenter/InfoCenter/showDetails/'),
$datasetRaw->{'PersonId'}
'<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)
@@ -237,19 +246,9 @@
}
);
$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';
}
$filterWidgetArray[InfoCenter::FILTER_ID] = $this->input->get(InfoCenter::FILTER_ID);
$filterWidgetArray['app'] = $APP;
$filterWidgetArray['datasetName'] = 'PersonActions';
echo $this->widgetlib->widget('FilterWidget', $filterWidgetArray);
?>
+18 -18
View File
@@ -1,19 +1,19 @@
<table id="logtable" class="table table-bordered table-hover">
<thead>
<tr>
<th>Datum</th>
<th>Aktivit&auml;t</th>
<th>User</th>
</tr>
</thead>
<tbody>
<?php foreach ($logs as $log): ?>
<tr data-toggle="tooltip"
title="<?php echo isset($log->logdata->message) ? $log->logdata->message : '' ?>">
<td><?php echo date_format(date_create($log->zeitpunkt), 'd.m.Y H:i:s') ?></td>
<td><?php echo isset($log->logdata->name) ? $log->logdata->name : '' ?></td>
<td><?php echo $log->insertvon ?></td>
</tr>
<?php endforeach ?>
</tbody>
<table id="logtable" class="table table-bordered table-hover">
<thead>
<tr>
<th><?php echo ucfirst($this->p->t('global', 'datum')) ?></th>
<th><?php echo ucfirst($this->p->t('global', 'aktivitaet')) ?></th>
<th>User</th>
</tr>
</thead>
<tbody>
<?php foreach ($logs as $log): ?>
<tr data-toggle="tooltip"
title="<?php echo isset($log->logdata->message) ? $log->logdata->message : '' ?>">
<td><?php echo date_format(date_create($log->zeitpunkt), 'd.m.Y H:i:s') ?></td>
<td><?php echo isset($log->logdata->name) ? $log->logdata->name : '' ?></td>
<td><?php echo $log->insertvon ?></td>
</tr>
<?php endforeach ?>
</tbody>
</table>
@@ -1,8 +1,8 @@
<table id="notiztable" class="table table-bordered table-hover">
<thead>
<tr>
<th>Datum</th>
<th>Notiz</th>
<th><?php echo ucfirst($this->p->t('global', 'datum')) ?></th>
<th><?php echo ucfirst($this->p->t('global', 'notiz')) ?></th>
<th>User</th>
</tr>
</thead>
@@ -2,41 +2,41 @@
<div class="col-lg-6 table-responsive">
<table class="table">
<tr>
<td><strong>Vorname</strong></td>
<td><strong><?php echo ucfirst($this->p->t('person','vorname')) ?></strong></td>
<td><?php echo $stammdaten->vorname ?></td>
</tr>
<tr>
<td><strong>Nachname</strong></td>
<td><strong><?php echo ucfirst($this->p->t('person','nachname')) ?></strong></td>
<td>
<?php echo $stammdaten->nachname ?></td>
</tr>
<tr>
<td><strong>Geburtsdatum</strong></td>
<td><strong><?php echo ucfirst($this->p->t('person','geburtsdatum')) ?></strong></td>
<td>
<?php echo date_format(date_create($stammdaten->gebdatum), 'd.m.Y') ?></td>
</tr>
<tr>
<td><strong>Sozialversicherungsnr</strong></td>
<td><strong><?php echo ucfirst($this->p->t('person','svnr')) ?></strong></td>
<td>
<?php echo $stammdaten->svnr ?></td>
</tr>
<tr>
<td><strong>Staatsb&uuml;rgerschaft</strong></td>
<td><strong><?php echo ucfirst($this->p->t('person','staatsbuergerschaft')) ?></strong></td>
<td>
<?php echo $stammdaten->staatsbuergerschaft ?></td>
</tr>
<tr>
<td><strong>Geschlecht</strong></td>
<td><strong><?php echo ucfirst($this->p->t('person','geschlecht')) ?></strong></td>
<td>
<?php echo $stammdaten->geschlecht ?></td>
</tr>
<tr>
<td><strong>Geburtsnation</strong></td>
<td><strong><?php echo ucfirst($this->p->t('person','geburtsnation')) ?></strong></td>
<td>
<?php echo $stammdaten->geburtsnation ?></td>
</tr>
<tr>
<td><strong>Geburtsort</strong></td>
<td><strong><?php echo ucfirst($this->p->t('person','geburtsort')) ?></strong></td>
<td><?php echo $stammdaten->gebort ?></td>
</tr>
</table>
@@ -45,18 +45,22 @@
<table class="table table-bordered">
<thead>
<tr>
<th colspan="4" class="text-center">Kontakte</th>
<th colspan="4" class="text-center"><?php echo ucfirst($this->p->t('global','kontakt')) ?></th>
</tr>
<tr>
<th class="text-center">Typ</th>
<th class="text-center">Kontakt</th>
<th class="text-center">Anmerkung</th>
<th class="text-center"><?php echo ucfirst($this->p->t('global','typ')) ?></th>
<th class="text-center"><?php echo ucfirst($this->p->t('global','kontakt')) ?></th>
<th class="text-center"><?php echo ucfirst($this->p->t('global','anmerkung')) ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($stammdaten->kontakte as $kontakt): ?>
<tr>
<td><?php echo ucfirst($kontakt->kontakttyp); ?></td>
<?php if ($kontakt->kontakttyp === 'email'): ?>
<td><?php echo ucfirst($this->p->t('person','email')) ?></td>
<?php elseif ($kontakt->kontakttyp === 'telefon'): ?>
<td><?php echo ucfirst($this->p->t('person','telefon')) ?></td>
<?php endif; ?>
<td>
<?php echo '<span class="'.$kontakt->kontakttyp.'">';?>
<?php if ($kontakt->kontakttyp === 'email'): ?>
@@ -76,7 +80,7 @@
<?php foreach ($stammdaten->adressen as $adresse): ?>
<tr>
<td>
Adresse
<?php echo ucfirst($this->p->t('person','adresse')) ?>
</td>
<td>
<?php echo isset($adresse) ? $adresse->strasse.', '.$adresse->plz.' '.$adresse->ort : '' ?>
@@ -97,13 +101,13 @@
<input type="hidden" name="person_id"
value="<?php echo $stammdaten->person_id ?>">
<a id="sendmsglink" href="javascript:void(0);"><i
class="fa fa-envelope"></i>&nbsp;Nachricht senden</a>
class="fa fa-envelope"></i>&nbsp;<?php echo $this->p->t('ui','nachrichtSenden') ?></a>
</form>
</div>
<?php if (isset($stammdaten->zugangscode)): ?>
<div class="col-xs-6 text-right">
<a href="<?php echo CIS_ROOT.'addons/bewerbung/cis/registration.php?code='.html_escape($stammdaten->zugangscode) ?>"
target='_blank'><i class="glyphicon glyphicon-new-window"></i>&nbsp;Zugang Bewerbung</a>
target='_blank'><i class="glyphicon glyphicon-new-window"></i>&nbsp;<?php echo $this->p->t('infocenter','zugangBewerbung') ?></a>
</div>
<?php endif; ?>
</div>
@@ -17,13 +17,13 @@ $this->load->view(
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<h3 class="page-header">Zugangsvoraussetzungen <?php echo $studiengang_kurzbz; ?> - <?php echo $studiengang_bezeichnung; ?></h3>
<h3 class="page-header"><?php echo $this->p->t('infocenter', 'zugangsvoraussetzungen'); ?> <?php echo $studiengang_kurzbz; ?> - <?php echo $studiengang_bezeichnung; ?></h3>
</div>
</div>
<div id="data">
<?php if (empty($data)): ?>
Keine Zugangsvoraussetzungen für den Studiengang definiert
<?php
<?php echo $this->p->t('infocenter', 'keineZugangsvoraussetzungenTxt'); ?>
<?php
else:
echo json_decode($data);
endif;
@@ -27,14 +27,14 @@
<?php if (isset($zgvpruefung->prestudentstatus->bestaetigtam)): ?>
<div class="col-xs-<?php echo $headercolumns[1]; ?> text-right">
<i class="fa fa-check" style="color: green"></i>
An Studiengang freigegeben
<?php echo $this->p->t('global', 'anStudiengangFreigegeben') ?>
</div>
<?php endif; ?>
<?php else: ?>
<div class="col-xs-<?php echo $headercolumns[1]; ?> text-right">
<?php echo 'Bewerbung abgeschickt: '.(isset($zgvpruefung->prestudentstatus->bewerbung_abgeschicktamum) ? '<i class="fa fa-check" style="color:green"></i>' : '<i class="fa fa-times" style="color:red"></i>'); ?>
<?php echo (isset($zgvpruefung->prestudentstatus->bewerbungsnachfrist) ? ' | Nachfrist: '. date_format(date_create($zgvpruefung->prestudentstatus->bewerbungsnachfrist), 'd.m.Y') : ''); ?>
<?php echo (isset($zgvpruefung->prestudentstatus->bewerbungstermin) ? ' | Bewerbungsfrist: '. date_format(date_create($zgvpruefung->prestudentstatus->bewerbungstermin), 'd.m.Y') : ''); ?>
<?php echo ucfirst($this->p->t('infocenter','bewerbung')) . ' ' . $this->p->t('global','abgeschickt') . ': '.(isset($zgvpruefung->prestudentstatus->bewerbung_abgeschicktamum) ? '<i class="fa fa-check" style="color:green"></i>' : '<i class="fa fa-times" style="color:red"></i>'); ?>
<?php echo (isset($zgvpruefung->prestudentstatus->bewerbungsnachfrist) ? ' | ' . $this->p->t('infocenter', 'nachfrist') . ': ' . date_format(date_create($zgvpruefung->prestudentstatus->bewerbungsnachfrist), 'd.m.Y') : ''); ?>
<?php echo (isset($zgvpruefung->prestudentstatus->bewerbungstermin) ? ' | ' . $this->p->t('infocenter', 'bewerbungsfrist') . ': ' . date_format(date_create($zgvpruefung->prestudentstatus->bewerbungstermin), 'd.m.Y') : ''); ?>
</div>
<?php endif; ?>
<?php endif; ?>
@@ -49,7 +49,7 @@
<div class="row">
<div class="col-lg-<?php echo $columns[0] ?>">
<div class="form-group">
<label>Letzter Status: </label>
<label><?php echo ucfirst($this->p->t('global','letzterStatus')) . ':' ?></label>
<?php
if (isset($zgvpruefung->prestudentstatus->status_kurzbz))
{
@@ -60,7 +60,7 @@
</div>
<div class="col-lg-<?php echo $columns[1] ?>">
<div class="form-group">
<label>Studiensemester: </label>
<label><?php echo ucfirst($this->p->t('lehre','studiensemester')) . ':' ?></label>
<?php echo isset($zgvpruefung->prestudentstatus->studiensemester_kurzbz) ? $zgvpruefung->prestudentstatus->studiensemester_kurzbz : '' ?>
</div>
</div>
@@ -73,7 +73,7 @@
</div>
<div class="col-lg-<?php echo $columns[3] ?>">
<div class="form-group">
<label>Orgform: </label>
<label><?php echo ucfirst($this->p->t('lehre','organisationsform')) . ':' ?></label>
<span style="display: inline-block">
<?php
$separator = (isset($zgvpruefung->prestudentstatus->orgform)) ? ', ' : '';
@@ -90,18 +90,18 @@
<div class="row">
<?php if ($infoonly): ?>
<div class="col-xs-8">
<label>ZGV:</label>
<label><?php echo $this->p->t('infocenter', 'zgv') . ':' ?></label>
<?php echo $zgvpruefung->zgv_bez; ?>
</div>
<?php else: ?>
<div class="col-xs-3">
<label>ZGV:</label>
<label><?php echo $this->p->t('infocenter', 'zgv') . ':' ?></label>
</div>
<?php endif;
$zgvinfocolumns = $infoonly ? 4 : 9;
?>
<div class="col-xs-<?php echo $zgvinfocolumns; ?> text-right zgvinfo" id="zgvinfo_<?php echo $zgvpruefung->prestudent_id ?>">
<a href="javascript:void(0)"><i class="fa fa-info-circle"></i> ZGV <?php echo $zgvpruefung->studiengang; ?></a>
<a href="javascript:void(0)"><i class="fa fa-info-circle"></i> <?php echo $this->p->t('infocenter', 'zgv') ?> <?php echo $zgvpruefung->studiengang; ?></a>
</div>
</div>
<?php if (!$infoonly)
@@ -114,7 +114,7 @@
</div>
<div class="col-lg-<?php echo $columns[1] ?>">
<div class="form-group">
<label>ZGV Ort: </label>
<label><?php echo $this->p->t('infocenter', 'zgv') . ' ' . $this->p->t('person','ort') . ':'?></label>
<?php if ($infoonly):
echo html_escape($zgvpruefung->zgvort);
else:
@@ -127,7 +127,7 @@
</div>
<div class="col-lg-<?php echo $columns[2] ?>">
<div class="form-group">
<label>ZGV Datum: </label>
<label><?php echo $this->p->t('infocenter', 'zgv') . ' ' . $this->p->t('global','datum') . ':'?></label>
<?php
$zgvdatum = empty($zgvpruefung->zgvdatum) ? "" : date_format(date_create($zgvpruefung->zgvdatum), 'd.m.Y');
if ($infoonly):
@@ -143,7 +143,7 @@
</div>
<div class="col-lg-<?php echo $columns[3] ?>">
<div class="form-group">
<label>ZGV Nation: </label>
<label><?php echo $this->p->t('infocenter', 'zgv') . ' ' . $this->p->t('person','nation') . ':'?></label>
<?php if ($infoonly)
echo $zgvpruefung->zgvnation_bez;
else
@@ -159,7 +159,7 @@
<?php if ($zgvpruefung->studiengangtyp === 'm') : ?>
<div class="row">
<div class="col-lg-<?php echo $columns[0] ?>">
<div class="form-group"><label>ZGV Master: </label>
<div class="form-group"><label><?php echo $this->p->t('infocenter', 'zgv') . ' ' . $this->p->t('lehre','master') . ':'?></label>
<?php
if ($infoonly)
echo $zgvpruefung->zgvmas_bez;
@@ -173,7 +173,7 @@
</div>
<div class="col-lg-<?php echo $columns[1] ?>">
<div class="form-group">
<label>ZGV Master Ort: </label>
<label><?php echo $this->p->t('infocenter', 'zgv') . ' ' . $this->p->t('lehre','master') . ' ' . $this->p->t('person','ort') . ':'?></label>
<?php if ($infoonly):
echo $zgvpruefung->zgvmaort;
else:
@@ -186,7 +186,7 @@
</div>
<div class="col-lg-<?php echo $columns[2] ?>">
<div class="form-group">
<label>ZGV Master Datum: </label>
<label><?php echo $this->p->t('infocenter', 'zgv') . ' ' . $this->p->t('lehre','master') . ' ' . $this->p->t('global','datum') . ':'?></label>
<?php
$zgvmadatum = empty($zgvpruefung->zgvmadatum) ? "" : date_format(date_create($zgvpruefung->zgvmadatum), 'd.m.Y');
if ($infoonly):
@@ -201,8 +201,7 @@
</div>
</div>
<div class="col-lg-<?php echo $columns[3] ?>">
<div class="form-group"><label>ZGV Master
Nation: </label>
<div class="form-group"><label><?php echo $this->p->t('infocenter', 'zgv') . ' ' . $this->p->t('lehre','master') . ' ' . $this->p->t('person', 'nation') . ':'?></label>
<?php
if ($infoonly)
echo $zgvpruefung->zgvmanation_bez;
@@ -221,12 +220,12 @@
<div class="row">
<div class="col-xs-6 text-left">
<button type="button" class="btn btn-default zgvUebernehmen" id="zgvUebernehmen_<?php echo $zgvpruefung->prestudent_id ?>">
Letzte ZGV &uuml;bernehmen
<?php echo $this->p->t('infocenter', 'letzteZgvUebernehmen') ?>
</button>
</div>
<div class="col-xs-6 text-right">
<button type="submit" class="btn btn-default saveZgv" id="zgvSpeichern_<?php echo $zgvpruefung->prestudent_id ?>">
Speichern
<?php echo $this->p->t('ui', 'speichern') ?>
</button>
</div>
</div>
@@ -244,13 +243,13 @@
<div class="form-inline">
<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"
class="d-inline float-right"
required>
<option value="null"
selected="selected">Absagegrund
w&auml;hlen...
selected="selected"><?php echo ucfirst($this->p->t('infocenter', 'absagegrund')) . '...' ?>
</option>
<?php foreach ($statusgruende as $statusgrund): ?>
<option value="<?php echo $statusgrund->statusgrund_id ?>"><?php echo $statusgrund->bezeichnung_mehrsprachig[0] ?></option>
@@ -261,7 +260,7 @@
class="btn btn-default"
data-toggle="modal"
data-target="#absageModal_<?php echo $zgvpruefung->prestudent_id ?>">
Absage
<?php echo $this->p->t('ui', 'absagen') ?>
</button>
</span>
</div>
@@ -280,33 +279,20 @@
&times;
</button>
<h4 class="modal-title"
id="absageModalLabel">Absage
best&auml;tigen</h4>
id="absageModalLabel"><?php echo $this->p->t('infocenter', 'absageBestaetigen') ?></h4>
</div>
<div class="modal-body">
Bei Absage von InteressentInnen
erhalten
diese den Status "Abgewiesener"
und<br/>deren
Zgvdaten können
im Infocenter nicht mehr
bearbeitet
oder
freigegeben werden.
<br/>Alle nicht gespeicherten
Zgvdaten
gehen
verloren. Fortfahren?
<?php echo $this->p->t('infocenter', 'absageBestaetigenTxt') ?>
</div>
<div class="modal-footer">
<button type="button"
class="btn btn-default"
data-dismiss="modal">
Abbrechen
<?php echo $this->p->t('ui', 'abbrechen') ?>
</button>
<button type="submit"
class="btn btn-primary">
InteressentIn abweisen
<?php echo $this->p->t('infocenter', 'interessentAbweisen') ?>
</button>
</div>
</div>
@@ -337,7 +323,7 @@
data-toggle="modal"
data-target="#freigabeModal_<?php echo $zgvpruefung->prestudent_id ?>"
data-toggle="tooltip" title="<?php echo $disabledTxt ?>">
Freigabe an Studiengang
<?php echo $this->p->t('ui', 'freigabeAnStudiengang') ?>
</button>
</div>
</div>
@@ -354,29 +340,20 @@
</button>
<h4 class="modal-title"
id="freigabeModalLabel">
Freigabe
best&auml;tigen</h4>
<?php echo $this->p->t('infocenter', 'freigabeBestaetigen') ?></h4>
</div>
<div class="modal-body">
Bei Freigabe von InteressentInnen wird deren
Interessentenstatus bestätigt und<br/>deren
Zgvdaten
können im
Infocenter nicht mehr bearbeitet
werden.
<br/>Alle nicht gespeicherten Zgvdaten gehen
verloren.
Fortfahren?
<?php echo $this->p->t('infocenter', 'interessentFreigebenTxt') ?>
</div>
<div class="modal-footer">
<button type="button"
class="btn btn-default"
data-dismiss="modal">Abbrechen
data-dismiss="modal"><?php echo $this->p->t('ui', 'abbrechen') ?>
</button>
<a href="../saveFreigabe/<?php echo $zgvpruefung->prestudent_id ?>">
<a href="../saveFreigabe/<?php echo $zgvpruefung->prestudent_id ?>?fhc_controller_id=<?php echo $fhc_controller_id; ?>">
<button type="button"
class="btn btn-primary">
InteressentIn freigeben
<?php echo $this->p->t('infocenter', 'interessentFreigeben') ?>
</button>
</a>
</div>
@@ -390,7 +367,7 @@
<div class="row">
<div class="col-lg-12 text-left">
<?php echo isset($zgvpruefung->prestudentstatus->bestaetigtam) ? '<i class="fa fa-check" style="color: green"></i>' : '<i class="fa fa-check" style="color: red"></i>' ?>
<label>An Studiengang freigegeben</label>
<label><?php echo $this->p->t('global', 'anStudiengangFreigegeben') ?></label>
</div>
</div><!-- /.row -->
</div><!-- /.panel-footer -->
+99 -96
View File
@@ -1,97 +1,100 @@
<?php
$msgExists = count($messages) > 0;
$widthColumn = $msgExists === true ? 8 : 12;
?>
<div class="col-lg-<?php echo $widthColumn ?>">
<table id="msgtable" class="table table-bordered table-condensed tablesort-hover tablesort-active">
<thead>
<tr>
<th>Gesendet am</th>
<th>Sender</th>
<th>Empf&auml;nger</th>
<th>Betreff</th>
<th>Gelesen am</th>
</tr>
</thead>
<tbody>
<?php foreach ($messages as $message): ?>
<tr id="<?php echo $message->message_id.'_'.$message->repersonid ?>" style="cursor: pointer">
<td><?php echo isset($message->insertamum) ? date_format(date_create($message->insertamum), 'd.m.Y H:i:s') : '' ?></td>
<td><?php echo $message->sevorname.' '.$message->senachname ?></td>
<td><?php echo $message->revorname.' '.$message->renachname ?></td>
<td><?php echo $message->subject ?></td>
<td><?php echo isset($message->statusamum) ? date_format(date_create($message->statusamum), 'd.m.Y H:i:s') : '' ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php if ($msgExists === true): ?>
<div class="col-lg-4">
<br>
<div class="text-center"><label for="msgbody" id="msgsubject"></label></div>
<div>
<textarea id="msgbody"></textarea>
</div>
</div>
<?php endif; ?>
<script>
tinymce.init({
menubar: false,
toolbar: false,
readonly: 1,
selector: "#msgbody",
statusbar: false,
plugins: "autoresize",
//callback to avoid conflict with ajax (for getting body of first message)
init_instance_callback: "initMsgBody"
});
function initMsgBody()
{
var tblrows = $("#msgtable tbody tr");
if (tblrows.length > 0)
{
//in the begging last sent message is shown
var firstelement = tblrows.first();
var id = firstelement.attr('id');
getMsgBody(id);
firstelement.find("td").addClass("tablesort-active");
//add click event on message table for message preview
tblrows.click(
function ()
{
$("#msgtable").find("td").removeClass("tablesort-active");
$(this).find("td").addClass("tablesort-active");
getMsgBody(this.id);
}
);
}
}
//retrieve message data from message and reiver id via AJAX
function getMsgBody(id)
{
var msgid = id.substr(0, id.indexOf('_'));
var recid = id.substr(id.indexOf('_') + 1);
$.ajax(
{
dataType: "json",
url: "<?php echo base_url("/index.ci.php/system/Messages/getMessageFromIds/") ?>" + msgid + "/" + recid,
success: function (data, textStatus, jqXHR)
{
$("#msgsubject").text(data[0].subject);
tinyMCE.get("msgbody").setContent(data[0].body);
},
error: function (jqXHR, textStatus, errorThrown)
{
alert(textStatus + " - " + errorThrown + " - " + jqXHR.responseText);
}
}
)
}
<?php
$msgExists = count($messages) > 0;
$widthColumn = $msgExists === true ? 8 : 12;
?>
<div class="col-lg-<?php echo $widthColumn ?>">
<table id="msgtable" class="table table-bordered table-condensed tablesort-hover tablesort-active">
<thead>
<tr>
<th><?php echo ucfirst($this->p->t('global','gesendetAm')) ?></th>
<th><?php echo ucfirst($this->p->t('global','sender')) ?></th>
<th><?php echo ucfirst($this->p->t('global','empfaenger')) ?></th>
<th><?php echo ucfirst($this->p->t('global','betreff')) ?></th>
<th><?php echo ucfirst($this->p->t('global','gelesenAm')) ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($messages as $message): ?>
<tr id="<?php echo $message->message_id.'_'.$message->repersonid ?>" style="cursor: pointer">
<td><?php echo isset($message->insertamum) ? date_format(date_create($message->insertamum), 'd.m.Y H:i:s') : '' ?></td>
<td><?php echo $message->sevorname.' '.$message->senachname ?></td>
<td><?php echo $message->revorname.' '.$message->renachname ?></td>
<td><?php echo $message->subject ?></td>
<td><?php echo isset($message->statusamum) ? date_format(date_create($message->statusamum), 'd.m.Y H:i:s') : '' ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php if ($msgExists === true): ?>
<div class="col-lg-4">
<br>
<div class="text-center"><label for="msgbody" id="msgsubject"></label></div>
<div>
<textarea id="msgbody"></textarea>
</div>
</div>
<?php endif; ?>
<script>
tinymce.init({
menubar: false,
toolbar: false,
readonly: 1,
selector: "#msgbody",
statusbar: false,
plugins: "autoresize",
autoresize_bottom_margin: 10,
autoresize_min_height: 140,
autoresize_max_height: 495,
//callback to avoid conflict with ajax (for getting body of first message)
init_instance_callback: "initMsgBody"
});
function initMsgBody()
{
var tblrows = $("#msgtable tbody tr");
if (tblrows.length > 0)
{
//in the begging last sent message is shown
var firstelement = tblrows.first();
var id = firstelement.attr('id');
getMsgBody(id);
firstelement.find("td").addClass("tablesort-active");
//add click event on message table for message preview
tblrows.click(
function ()
{
$("#msgtable").find("td").removeClass("tablesort-active");
$(this).find("td").addClass("tablesort-active");
getMsgBody(this.id);
}
);
}
}
//retrieve message data from message and reiver id via AJAX
function getMsgBody(id)
{
var msgid = id.substr(0, id.indexOf('_'));
var recid = id.substr(id.indexOf('_') + 1);
$.ajax(
{
dataType: "json",
url: "<?php echo base_url("/index.ci.php/system/Messages/getMessageFromIds/") ?>" + msgid + "/" + recid,
success: function (data, textStatus, jqXHR)
{
$("#msgsubject").text(data[0].subject);
tinyMCE.get("msgbody").setContent(data[0].body);
},
error: function (jqXHR, textStatus, errorThrown)
{
alert(textStatus + " - " + errorThrown + " - " + jqXHR.responseText);
}
}
)
}
</script>
+79 -5
View File
@@ -22,11 +22,82 @@ $href = site_url().'/system/Messages/send/';
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<h3 class="page-header">Send Message</h3>
<h3 class="page-header"><?php echo ucfirst($this->p->t('ui', 'nachrichtSenden')) ?></h3>
</div>
</div>
<form id="sendForm" method="post" action="<?php echo $href; ?>">
<?php $this->load->view('system/messageForm.php'); ?>
<div class="row">
<div class="form-group">
<div class="col-lg-1">
<label><?php echo ucfirst($this->p->t('global', 'empfaenger')) . ':'?></label>
</div>
<div class="col-lg-11">
<?php
for ($i = 0; $i < count($receivers); $i++)
{
$receiver = $receivers[$i];
// Every 10 recipients a new line
if ($i > 1 && $i % 10 == 0)
{
echo '<br>';
}
echo $receiver->Vorname." ".$receiver->Nachname."; ";
}
?>
</div>
</div>
</div>
<div class="row">
<div class="form-group form-inline">
<div class="col-lg-1 msgfield">
<label><?php echo ucfirst($this->p->t('global', 'betreff')) . ':'?></label>
</div>&nbsp;
<?php
$subject = '';
if (isset($message))
{
$subject = 'Re: '.$message->subject;
}
?>
<div class="col-lg-10">
<input id="subject" class="form-control" type="text" value="<?php echo $subject; ?>"
name="subject" size="70">
</div>
</div>
</div>
<br>
<div class="row">
<div class="col-lg-10">
<label><?php echo ucfirst($this->p->t('global', 'nachricht')) . ':'?></label>
<?php
$body = '';
if (isset($message))
{
$body = $message->body;
}
?>
<textarea id="bodyTextArea" name="body"><?php echo $body; ?></textarea>
</div>
<?php
if (isset($variables)):
?>
<div class="col-lg-2">
<div class="form-group">
<label><?php echo ucfirst($this->p->t('ui', 'felder')) . ':'?></label>
<select id="variables" class="form-control" size="14" multiple="multiple">
<?php
foreach ($variables as $key => $val)
{
?>
<option value="<?php echo $key; ?>"><?php echo $val; ?></option>
<?php
}
?>
</select>
</div>
</div>
<?php endif; ?>
</div>
<br>
<div class="row">
<div class="col-lg-3 text-right">
@@ -38,21 +109,24 @@ $href = site_url().'/system/Messages/send/';
);
?>
</div>
<div class="col-lg-offset-6 col-lg-1 text-right">
<button id="sendButton" class="btn btn-default" type="button"><?php echo $this->p->t('ui', 'senden')?></button>
</div>
</div>
<?php if (isset($receivers) && count($receivers) > 0): ?>
<hr>
<div class="row">
<div class="col-lg-12">
<label>Preview:</label>
<label><?php echo ucfirst($this->p->t('global', 'vorschau')) . ':'?></label>
</div>
</div>
<div class="well">
<div class="row">
<div class="col-lg-5">
<div class="form-grop form-inline">
<label>Recipient:</label>
<label><?php echo ucfirst($this->p->t('global', 'empfaenger')) . ': ' ?></label>
<select id="recipients">
<?php
<?php
if (count($receivers) > 1)
echo '<option value="-1">Select...</option>';
+59 -10
View File
@@ -2,7 +2,7 @@
if (! defined('BASEPATH')) exit('No direct script access allowed');
// Retrives the URL path of the called controller + controller method
// Retrives the URL path of the called controller + called controller method
// NOTE: placed here because it doesn't work inside functions
$calledPath = $this->router->directory.$this->router->class;
$calledMethod = $this->router->method;
@@ -11,16 +11,20 @@ $calledMethod = $this->router->method;
$title = isset($title) ? $title : null;
$customCSSs = isset($customCSSs) ? $customCSSs : null;
$customJSs = isset($customJSs) ? $customJSs : null;
$phrases = isset($phrases) ? $phrases : null;
// By default set the parameters to false
$jquery = isset($jquery) ? $jquery : false;
$jqueryui = isset($jqueryui) ? $jqueryui : false;
$ajaxlib = isset($ajaxlib) ? $ajaxlib : false;
$bootstrap = isset($bootstrap) ? $bootstrap : false;
$fontawesome = isset($fontawesome) ? $fontawesome : false;
$tablesorter = isset($tablesorter) ? $tablesorter : false;
$tinymce = isset($tinymce) ? $tinymce : false;
$sbadmintemplate = isset($sbadmintemplate) ? $sbadmintemplate : false;
$addons = isset($addons) ? $addons : false;
$filterwidget = isset($filterwidget) ? $filterwidget : false;
$navigationwidget = isset($navigationwidget) ? $navigationwidget : false;
/**
* Print the given title of the page
@@ -81,6 +85,25 @@ function _generateJSDataStorageObject($calledPath, $calledMethod)
echo $toPrint;
}
/**
* Generates global JS-Object to pass phrases to other javascripts
*/
function _generateJSPhrasesStorageObject($phrases)
{
$ci =& get_instance();
$ci->load->library('PhrasesLib', array($phrases), 'pj');
$toPrint = "\n";
$toPrint .= '<script type="text/javascript">';
$toPrint .= "\n";
$toPrint .= ' var FHC_JS_PHRASES_STORAGE_OBJECT = '.$ci->pj->getJSON().';';
$toPrint .= "\n";
$toPrint .= '</script>';
$toPrint .= "\n\n";
echo $toPrint;
}
/**
* Generates tags for the javascripts you want to include, the parameter could by a string or an array of strings
*/
@@ -141,12 +164,15 @@ function _generateAddonsJSsInclude($calledFrom)
// jQuery UI CSS
if ($jqueryui === true) _generateCSSsInclude('vendor/components/jqueryui/themes/base/jquery-ui.min.css');
// bootstrap CSS
// Bootstrap CSS
if ($bootstrap === true) _generateCSSsInclude('vendor/twbs/bootstrap/dist/css/bootstrap.min.css');
// font awesome CSS
// Font Awesome CSS
if ($fontawesome === true) _generateCSSsInclude('vendor/components/font-awesome/css/font-awesome.min.css');
// AjaxLib CSS
if ($ajaxlib === true) _generateCSSsInclude('public/css/AjaxLib.css');
// Table sorter CSS
if ($tablesorter === true)
{
@@ -154,23 +180,34 @@ function _generateAddonsJSsInclude($calledFrom)
_generateCSSsInclude('vendor/mottie/tablesorter/dist/css/jquery.tablesorter.pager.min.css');
}
// sb admin template CSS
// SB Admin 2 template CSS
if ($sbadmintemplate === true)
{
_generateCSSsInclude('vendor/BlackrockDigital/startbootstrap-sb-admin-2/vendor/metisMenu/metisMenu.min.css');
_generateCSSsInclude('vendor/BlackrockDigital/startbootstrap-sb-admin-2/dist/css/sb-admin-2.min.css');
}
// FilterWidget CSS
if ($filterwidget === true) _generateCSSsInclude('public/css/FilterWidget.css');
// NavigationWidget CSS
if ($navigationwidget === true) _generateCSSsInclude('public/css/NavigationWidget.css');
// Eventually required CSS
_generateCSSsInclude($customCSSs); // Eventually required CSS
// --------------------------------------------------------------------------------------------------------
// Javascripts
// Generates the global object to pass useful parms to the other javascripts
// Generates the global object to pass useful parameters to other javascripts
// NOTE: must be called before any other JS include
_generateJSDataStorageObject($calledPath, $calledMethod);
// Generates the global object to pass phrases to javascripts
// NOTE: must be called before including the PhrasesLib.js
_generateJSPhrasesStorageObject($phrases);
// JQuery V3
if ($jquery === true) _generateJSsInclude('vendor/components/jquery/jquery.min.js');
@@ -178,11 +215,10 @@ function _generateAddonsJSsInclude($calledFrom)
if ($jqueryui === true)
{
_generateJSsInclude('vendor/components/jqueryui/jquery-ui.min.js');
//datepicker german language file
_generateJSsInclude('vendor/components/jqueryui/ui/i18n/datepicker-de.js');
_generateJSsInclude('vendor/components/jqueryui/ui/i18n/datepicker-de.js'); // datepicker german language file
}
// bootstrap JS
// Bootstrap JS
if ($bootstrap === true) _generateJSsInclude('vendor/twbs/bootstrap/dist/js/bootstrap.min.js');
// Table sorter JS
@@ -193,16 +229,29 @@ function _generateAddonsJSsInclude($calledFrom)
_generateJSsInclude('vendor/mottie/tablesorter/dist/js/extras/jquery.tablesorter.pager.min.js');
}
//tinymce JS
// Tinymce JS
if($tinymce === true) _generateJSsInclude('vendor/tinymce/tinymce/tinymce.min.js') ;
// sb admin template JS
// SB Admin 2 template JS
if ($sbadmintemplate === true)
{
_generateJSsInclude('vendor/BlackrockDigital/startbootstrap-sb-admin-2/vendor/metisMenu/metisMenu.min.js');
_generateJSsInclude('vendor/BlackrockDigital/startbootstrap-sb-admin-2/dist/js/sb-admin-2.min.js');
}
// AjaxLib JS
// NOTE: must be called before including others JS libraries that use it
if ($ajaxlib === true) _generateJSsInclude('public/js/AjaxLib.js');
// PhrasesLib JS
if ($phrases != null) _generateJSsInclude('public/js/PhrasesLib.js');
// FilterWidget JS
if($filterwidget === true) _generateJSsInclude('public/js/FilterWidget.js') ;
// NavigationWidget JS
if($navigationwidget === true) _generateJSsInclude('public/js/NavigationWidget.js') ;
// Load addon hooks JS
if ($addons === true) _generateAddonsJSsInclude($calledPath.'/'.$calledMethod);
+12 -163
View File
@@ -1,190 +1,36 @@
<style>
.filter-options-span {
display: inline-block;
width: 130px;
font-weight: bold;
}
.filter-name-title {
font-family: inherit;
font-size: 16px;
/*font-weight: bold;*/
line-height: 1.1;
color: black;
}
.filters-hidden-panel {
margin: 0 10px 10px 10px;
}
.hidden-control {
display: none !important;
}
.filter-select-fields-dnd-div {
height: 50px;
}
.filter-select-field-dnd-span {
border: 1px solid black;
border-radius: 7px;
margin-left: 3px;
margin-right: 3px;
padding: 10px;
top: 10px;
}
.filter-select-field-dnd-span:hover {
cursor: move;
}
.filter-select-field-dnd-span a {
cursor: pointer;
}
.selection-before::before {
content: "";
position: absolute;
top: 0;
right: 100%;
height: 100%;
margin-right: 3px;
border-left: 2px solid #428bca;
}
.selection-after::after {
content: "";
position: absolute;
top: 0;
left: 100%;
height: 100%;
margin-left: 3px;
border-right: 2px solid #428bca;
}
.select-filter-operation {
display: inline;
width: 130px;
}
.select-filter-operation-value {
display: inline;
width: 400px;
}
.select-filter-option {
display: inline;
width: 100px;
}
#addField, #customFilterDescription, #addFilter {
display: inline;
width: 535px;
}
#selectedFilters {
margin-bottom: 20px;
}
#applyFilter, #saveCustomFilterButton, .remove-selected-filter {
font-weight: bold;
}
#applyFilter, #saveCustomFilterButton {
width: 100px;
}
.remove-selected-filter {
padding-bottom: 3px;
}
.panel-title {
font-weight: bold;
padding-top: 3px;
}
.remove-field {
font-weight: bold;
}
</style>
<script language="Javascript" type="text/javascript">
function sideMenuHook()
{
$(".remove-filter").click(function() {
$.ajax({
url: "<?php echo site_url('system/Filters/deleteCustomFilter'); ?>",
method: "POST",
data: {
filter_id: $(this).attr('value'),
fhc_controller_id: getUrlParameter("fhc_controller_id")
}
})
.done(function(data, textStatus, jqXHR) {
refreshSideMenu();
}).fail(function(jqXHR, textStatus, errorThrown) {
alert(textStatus);
});
});
}
$(document).ready(function() {
$("[data-toggle='collapse']").click(function() {
var filterOptionsStatus = sessionStorage.getItem('filter-options-status');
if (filterOptionsStatus != null && filterOptionsStatus == 'closed')
{
sessionStorage.setItem('filter-options-status', 'open');
}
else
{
sessionStorage.setItem('filter-options-status', 'closed');
}
});
var filterOptionsStatus = sessionStorage.getItem('filter-options-status');
if (filterOptionsStatus != null && filterOptionsStatus == 'open')
{
$('.collapse').collapse("show");
}
});
</script>
<div class="row">
<div class="col-lg-12">
<?php FilterWidget::displayFilterName(); ?>
<!-- Filter name -->
<div class="filter-name-title"></div>
<br>
<!-- Filter options -->
<div class="panel-group">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" href="#collapseFilterHeader">Filter options</a>
<a data-toggle="collapse" href="#collapseFilterHeader"><?php echo ucfirst($this->p->t('filter', 'filterEinstellungen')) ?></a>
</h4>
</div>
<div id="collapseFilterHeader" class="panel-collapse collapse">
<div class="filters-hidden-panel">
<!-- Filter fields options -->
<div>
<?php FilterWidget::loadViewSelectFields(); ?>
</div>
<br>
<!-- Filter filters options -->
<div>
<?php FilterWidget::loadViewSelectFilters(); ?>
</div>
<br>
<!-- Filter save options -->
<div>
<?php FilterWidget::loadViewSaveFilter(); ?>
</div>
@@ -195,12 +41,15 @@
<br>
<!-- Filter info top -->
<div id="datasetActionsTop"></div>
<!-- Filter table -->
<div>
<?php FilterWidget::loadViewTableDataset(); ?>
</div>
<!-- Filter info bottom -->
<div id="datasetActionsBottom"></div>
</div>
@@ -1,48 +1,15 @@
<script language="Javascript" type="text/javascript">
$(document).ready(function() {
$("#saveCustomFilterButton").click(function() {
if ($("#customFilterDescription").val() != '')
{
$.ajax({
url: "<?php echo site_url('system/Filters/saveFilter'); ?>",
method: "POST",
data: {
customFilterDescription: $("#customFilterDescription").val(),
fhc_controller_id: getUrlParameter("fhc_controller_id")
}
})
.done(function(data, textStatus, jqXHR) {
refreshSideMenu()
}).fail(function(jqXHR, textStatus, errorThrown) {
alert(textStatus);
});
}
else
{
alert("Please fill te description of this filter");
}
});
});
</script>
<br>
<div>
<span class="filter-options-span">
Filter description:
<span class="filter-span-label">
<?php echo ucfirst($this->p->t('global', 'beschreibung')); ?>:
</span>
<span>
<input type="text" id="customFilterDescription" value="">
<input type="text" id="customFilterDescription" class="input-text-custom-filter" value="">
</span>
<span>
<input type="button" id="saveCustomFilterButton" value="Save filter">
<input type="button" id="saveCustomFilterButton" value="<?php echo ucfirst($this->p->t('ui', 'speichern')); ?>">
</span>
</div>
@@ -1,247 +1,11 @@
<script language="Javascript" type="text/javascript">
<div id="dragAndDropFieldsArea" class="drag-and-drop-fields-area"></div>
function dndSF()
{
$(".filter-select-field-dnd-span").draggable({
containment: "parent",
cursor: "move",
opacity: 0.4,
revert: "invalid",
revertDuration: 200,
drag: function(event, ui) {
<div>
<span class="filter-span-label">
<?php echo ucfirst($this->p->t('filter', 'feldHinzufuegen')); ?>:
</span>
var padding = 20;
var draggedElement = $(this);
$(".filter-select-field-dnd-span").each(function(i, e) {
if ($(this).attr('id') != draggedElement.attr('id'))
{
$(this).removeClass("selection-after");
$(this).removeClass("selection-before");
var elementCenter = $(this).offset().left + ((padding + $(this).width()) / 2);
if (event.pageX > ($(this).offset().left - (padding / 2))
&& event.pageX < ($(this).offset().left + $(this).width() + (padding / 2)))
{
if (event.pageX > elementCenter)
{
$(this).addClass("selection-after");
$(this).removeClass("selection-before");
}
else if (event.pageX < elementCenter)
{
$(this).addClass("selection-before");
$(this).removeClass("selection-after");
}
}
}
});
}
});
$(".filter-select-field-dnd-span").droppable({
accept: ".filter-select-field-dnd-span",
drop: function(event, ui) {
var padding = 20;
var elementCenter = $(this).offset().left + ((padding + $(this).width()) / 2);
var draggedElement = ui.helper;
if (event.pageX > elementCenter)
{
draggedElement.insertAfter($(this));
}
else if (event.pageX < elementCenter)
{
draggedElement.insertBefore($(this));
}
$(this).removeClass("selection-before");
$(this).removeClass("selection-after");
draggedElement.css({left: '0px', top: '10px'});
var arrayDndId = [];
$(".filter-select-field-dnd-span").each(function(i, e) {
arrayDndId[i] = $(this).attr('id').replace('dnd', '');
});
$.ajax({
url: "<?php echo site_url('system/Filters/sortSelectedFields'); ?>",
method: "POST",
data: {
selectedFieldsLst: arrayDndId,
fhc_controller_id: getUrlParameter("fhc_controller_id")
}
})
.done(function(data, textStatus, jqXHR) {
resetSelectedFields();
renderSelectedFields();
renderTableDataset();
}).fail(function(jqXHR, textStatus, errorThrown) {
alert(textStatus);
});
}
});
}
function resetEventsSF()
{
$("#addField").off('change');
$(".remove-field").off('click');
}
function addEventsSF()
{
$("#addField").change(function(event) {
$.ajax({
url: "<?php echo site_url('system/Filters/addSelectedFields'); ?>",
method: "POST",
data: {
fieldName: $(this).val(),
fhc_controller_id: getUrlParameter("fhc_controller_id")
}
})
.done(function(data, textStatus, jqXHR) {
resetSelectedFields();
renderSelectedFields();
renderTableDataset();
}).fail(function(jqXHR, textStatus, errorThrown) {
alert(textStatus);
});
});
$(".remove-field").click(function(event) {
$.ajax({
url: "<?php echo site_url('system/Filters/removeSelectedFields'); ?>",
method: "POST",
data: {
fieldName: $(this).attr('fieldToRemove'),
fhc_controller_id: getUrlParameter("fhc_controller_id")
}
})
.done(function(data, textStatus, jqXHR) {
resetSelectedFields();
renderSelectedFields();
renderTableDataset();
}).fail(function(jqXHR, textStatus, errorThrown) {
alert(textStatus);
});
});
}
function renderSelectedFields()
{
$.ajax({
url: "<?php echo site_url('system/Filters/selectFields'); ?>",
method: "GET",
data: {
fhc_controller_id: getUrlParameter("fhc_controller_id")
},
dataType: "json"
})
.done(function(data, textStatus, jqXHR) {
resetEventsSF();
if (data != null)
{
var arrayFieldsToDisplay = [];
if (data.columnsAliases != null && $.isArray(data.columnsAliases))
{
arrayFieldsToDisplay = data.columnsAliases;
}
else if (data.selectedFields != null && $.isArray(data.selectedFields))
{
arrayFieldsToDisplay = data.selectedFields;
}
for (var i = 0; i < arrayFieldsToDisplay.length; i++)
{
var fieldToDisplay = arrayFieldsToDisplay[i];
var fieldName = data.selectedFields[i];
var strHtml = '<span id="dnd' + fieldName + '" class="filter-select-field-dnd-span">';
strHtml += '<span>';
strHtml += fieldToDisplay;
strHtml += '</span>';
strHtml += '<span><a class="remove-field" fieldToRemove="' + fieldName + '"> X </a></span>';
strHtml += '</span>';
$("#filterSelectFieldsDnd").append(strHtml);
}
var strDropDown = '<option value="">Select a field to add...</option>';
$("#addField").append(strDropDown);
for (var i = 0; i < data.allSelectedFields.length; i++)
{
var fieldName = data.allSelectedFields[i];
var fieldToDisplay = data.allSelectedFields[i];
if (data.selectedFields.indexOf(fieldName) < 0)
{
if (data.allColumnsAliases != null && $.isArray(data.allColumnsAliases))
{
fieldToDisplay = data.allColumnsAliases[i];
}
strDropDown = '<option value="' + fieldName + '">' + fieldToDisplay + '</option>';
$("#addField").append(strDropDown);
}
}
}
dndSF();
addEventsSF();
})
.fail(function(jqXHR, textStatus, errorThrown) {
alert(textStatus);
});
}
function resetSelectedFields()
{
$("#filterSelectFieldsDnd").html("");
$("#addField").html("");
}
$(document).ready(function() {
renderSelectedFields();
});
</script>
<div id="filterSelectFieldsDnd" class="filter-select-fields-dnd-div"></div>
<div>
<span class="filter-options-span">
Add field:
</span>
<span>
<select id="addField"></select>
</span>
</div>
<span>
<select id="addField" class="drop-down-fields"></select>
</span>
</div>
@@ -1,296 +1,17 @@
<script language="Javascript" type="text/javascript">
function resetEventsSFilters()
{
$("#addFilter").off('change');
}
function addEventsSFilters()
{
$("#addFilter").change(function(event) {
$.ajax({
url: "<?php echo site_url('system/Filters/addSelectedFilters'); ?>",
method: "POST",
data: {
fieldName: $(this).val(),
fhc_controller_id: getUrlParameter("fhc_controller_id")
}
})
.done(function(data, textStatus, jqXHR) {
resetSelectedFilters();
renderSelectedFilters();
renderTableDataset();
}).fail(function(jqXHR, textStatus, errorThrown) {
alert(textStatus);
});
});
$(".select-filter-operation").change(function() {
if ($(this).val() == "set" || $(this).val() == "nset")
{
$(this).parent().parent().find(".select-filter-operation-value").addClass("hidden-control");
$(this).parent().parent().find(".select-filter-option").addClass("hidden-control");
$(this).parent().parent().find(".select-filter-operation-value").prop('disabled', true);
$(this).parent().parent().find(".select-filter-option").prop('disabled', true);
}
else
{
$(this).parent().parent().find(".select-filter-operation-value").removeClass("hidden-control");
$(this).parent().parent().find(".select-filter-option").removeClass("hidden-control");
$(this).parent().parent().find(".select-filter-operation-value").prop('disabled', false);
$(this).parent().parent().find(".select-filter-option").prop('disabled', false);
}
});
$("#applyFilter").click(function() {
var selectFilterName = [];
var selectFilterOperation = [];
var selectFilterOperationValue = [];
var selectFilterOption = [];
$("#selectedFilters > div").each(function(i, e) {
var tmpSelectFilterName = $(this).find('.hidden-field-name').val();
var tmpSelectFilterOperation = $(this).find('.select-filter-operation').val();
var tmpSelectFilterOperationValue = $(this).find('.select-filter-operation-value:enabled').val();
var tmpSelectFilterOption = $(this).find('.select-filter-option:enabled').val();
selectFilterName.push(tmpSelectFilterName);
selectFilterOperation.push(tmpSelectFilterOperation);
selectFilterOperationValue.push(tmpSelectFilterOperationValue != null ? tmpSelectFilterOperationValue : "");
selectFilterOption.push(tmpSelectFilterOption != null ? tmpSelectFilterOption : "");
});
$.ajax({
url: "<?php echo site_url('system/Filters/applyFilter'); ?>",
method: "POST",
data: {
filterNames: selectFilterName,
filterOperations: selectFilterOperation,
filterOperationValues: selectFilterOperationValue,
filterOptions: selectFilterOption,
fhc_controller_id: getUrlParameter("fhc_controller_id")
}
})
.done(function(data, textStatus, jqXHR) {
// Success
}).fail(function(jqXHR, textStatus, errorThrown) {
// Error
}).always(function() {
location.reload();
});
});
$(".remove-selected-filter").click(function(event) {
$.ajax({
url: "<?php echo site_url('system/Filters/removeSelectedFilters'); ?>",
method: "POST",
data: {
fieldName: $(this).attr('filterToRemove'),
fhc_controller_id: getUrlParameter("fhc_controller_id")
}
})
.done(function(data, textStatus, jqXHR) {
resetSelectedFilters();
renderSelectedFilters();
}).fail(function(jqXHR, textStatus, errorThrown) {
alert(textStatus);
});
});
}
function renderSelectedFilterFields(metaData, activeFilters, activeFiltersOperation, activeFiltersOption)
{
var html = '';
if (metaData.type.toLowerCase().indexOf("int") >= 0)
{
html = '<span>';
html += ' <select class="form-control select-filter-operation">';
html += ' <option value="equal" ' + (activeFiltersOperation == "equal" ? "selected" : "") + '>equal</option>';
html += ' <option value="nequal" ' + (activeFiltersOperation == "nqual" ? "selected" : "") + '>not equal</option>';
html += ' <option value="gt" ' + (activeFiltersOperation == "gt" ? "selected" : "") + '>greater than</option>';
html += ' <option value="lt" ' + (activeFiltersOperation == "lt" ? "selected" : "") + '>less than</option>';
html += ' </select>';
html += '</span>';
html += '<span>';
html += ' <input type="number" value="' + activeFilters + '" class="form-control select-filter-operation-value">';
html += '</span>';
}
if (metaData.type.toLowerCase().indexOf('varchar') >= 0 || metaData.type.toLowerCase() == 'text')
{
html = '<span>';
html += ' <select class="form-control select-filter-operation">';
html += ' <option value="contains" ' + (activeFiltersOperation == "contains" ? "selected" : "") + '>contains</option>';
html += ' <option value="ncontains" ' + (activeFiltersOperation == "ncontains" ? "selected" : "") + '>does not contain</option>';
html += ' </select>';
html += '</span>';
html += '<span>';
html += ' <input type="text" value="' + activeFilters + '" class="form-control select-filter-operation-value">';
html += '</span>';
}
if (metaData.type.toLowerCase().indexOf('bool') >= 0)
{
html = '<span>';
html += ' <select class="form-control select-filter-operation">';
html += ' <option value="true" ' + (activeFiltersOperation == "true" ? "selected" : "") + '>is true</option>';
html += ' <option value="false" ' + (activeFiltersOperation == "false" ? "selected" : "") + '>is false</option>';
html += ' </select>';
html += '</span>';
html += '<span>';
html += ' <input type="hidden" value="' + activeFilters + '" class="form-control select-filter-operation-value">';
html += '</span>';
}
if (metaData.type.toLowerCase().indexOf('timestamp') >= 0 || metaData.type.toLowerCase().indexOf('date') >= 0)
{
var classOperation = 'form-control select-filter-operation-value';
var classOption = 'form-control select-filter-option';
var disabled = "";
if (activeFiltersOperation == "set" || activeFiltersOperation == "nset")
{
classOperation += ' hidden-control';
classOption += ' hidden-control';
disabled = "disabled";
}
html = '<span>';
html += ' <select class="form-control select-filter-operation">';
html += ' <option value="lt" ' + (activeFiltersOperation == "lt" ? "selected" : "") + '>less than</option>';
html += ' <option value="gt" ' + (activeFiltersOperation == "gt" ? "selected" : "") + '>greater than</option>';
html += ' <option value="set" ' + (activeFiltersOperation == "set" ? "selected" : "") + '>is set</option>';
html += ' <option value="nset" ' + (activeFiltersOperation == "nset" ? "selected" : "") + '>is not set</option>';
html += ' </select>';
html += '</span>';
html += '<span>';
html += ' <input type="text" value="' + activeFilters + '" class="' + classOperation + '" ' + disabled + '>';
html += '</span>';
html += '<span>';
html += ' <select class="' + classOption + '" ' + disabled + '>';
html += ' <option value="days" ' + (activeFiltersOption == "days" ? "selected" : "") + '>Days</option>';
html += ' <option value="months" ' + (activeFiltersOption == "months" ? "selected" : "") + '>Months</option>';
html += ' </select>';
html += '</span>';
}
html += '<span>';
html += ' <input type="hidden" value="' + metaData.name + '" class="hidden-field-name">';
html += '</span>';
return html;
}
function renderSelectedFilters()
{
$.ajax({
url: "<?php echo site_url('system/Filters/selectFilters'); ?>",
method: "GET",
data: {
fhc_controller_id: getUrlParameter("fhc_controller_id")
},
dataType: "json"
})
.done(function(data, textStatus, jqXHR) {
resetEventsSFilters();
if (data != null)
{
var strDropDown = '<option value="">Select a filter to add...</option>';
$("#addFilter").append(strDropDown);
for (var i = 0; i < data.selectedFilters.length; i++)
{
var selectedFilters = '<div>';
selectedFilters += '<span class="filter-options-span">';
selectedFilters += data.selectedFiltersAliases[i];
selectedFilters += '</span>';
selectedFilters += renderSelectedFilterFields(
data.selectedFiltersMetaData[i],
data.selectedFiltersActiveFilters[i],
data.selectedFiltersActiveFiltersOperation[i],
data.selectedFiltersActiveFiltersOption[i]
);
selectedFilters += '<span>';
selectedFilters += '<input type="button" value="X" class="remove-selected-filter btn btn-default" filterToRemove="' + data.selectedFilters[i] + '">';
selectedFilters += '</span>';
selectedFilters += '</div>';
$("#selectedFilters").append(selectedFilters);
}
for (var i = 0; i < data.allSelectedFields.length; i++)
{
var fieldName = data.allSelectedFields[i];
var fieldToDisplay = data.allSelectedFields[i];
if (data.selectedFilters.indexOf(fieldName) < 0)
{
if (data.allColumnsAliases != null && $.isArray(data.allColumnsAliases))
{
fieldToDisplay = data.allColumnsAliases[i];
}
strDropDown = '<option value="' + fieldName + '">' + fieldToDisplay + '</option>';
$("#addFilter").append(strDropDown);
}
}
}
addEventsSFilters();
})
.fail(function(jqXHR, textStatus, errorThrown) {
alert(textStatus);
});
}
function resetSelectedFilters()
{
$("#addFilter").html("");
$("#selectedFilters").html("");
}
$(document).ready(function() {
renderSelectedFilters();
});
</script>
<br>
<div id="selectedFilters"></div>
<div id="appliedFilters"></div>
<div>
<span class="filter-options-span">
Add filter:
<span class="filter-span-label">
<?php echo ucfirst($this->p->t('filter', 'filterHinzufuegen')); ?>:
</span>
<span>
<select id="addFilter"></select>
<select id="addFilter" class="drop-down-filters"></select>
</span>
<span>
<input id="applyFilter" type="button" value="Apply filter">
<input id="applyFilter" type="button" value="<?php echo ucfirst($this->p->t('global', 'hinzufuegen')); ?>">
</span>
</div>
@@ -1,153 +1,3 @@
<script language="Javascript" type="text/javascript">
function callTableSorter()
{
// Checks if the table contains data (rows)
if ($('#filterTableDataset').find('tbody:empty').length == 0
&& $('#filterTableDataset').find('tr:empty').length == 0
&& $('#filterTableDataset').hasClass('table-condensed'))
{
$("#filterTableDataset").tablesorter({
widgets: ["zebra", "filter"]
});
var config = $('#filterTableDataset')[0].config;
$.tablesorter.updateAll(config, true, null);
}
}
function renderTableDataset()
{
$.ajax({
url: "<?php echo site_url('system/Filters/tableDataset'); ?>",
method: "GET",
data: {
fhc_controller_id: getUrlParameter("fhc_controller_id")
},
dataType: "json"
})
.done(function(data, textStatus, jqXHR) {
resetTableDataset();
if (data != null)
{
if (data.checkboxes != null)
{
$("#filterTableDataset > thead > tr").append("<th title=\"Select\">Select</th>");
}
var arrayFieldsToDisplay = [];
if (data.columnsAliases != null && $.isArray(data.columnsAliases) && data.columnsAliases.length > 0)
{
arrayFieldsToDisplay = data.columnsAliases;
}
else if (data.selectedFields != null && $.isArray(data.selectedFields))
{
arrayFieldsToDisplay = data.selectedFields;
}
/* ------------------------------------------------------------------------------------------------ */
if (data.checkboxes != null && data.checkboxes != "")
{
$("#filterTableDataset > thead > tr").html("<th title=\"Select\">Select</th>");
}
for (var i = 0; i < arrayFieldsToDisplay.length; i++)
{
var th = arrayFieldsToDisplay[i];
$("#filterTableDataset > thead > tr").append("<th title=\"" + th + "\">" + th + "</th>");
}
if (data.additionalColumns != null && $.isArray(data.additionalColumns))
{
for (var i = 0; i < data.additionalColumns.length; i++)
{
var th = data.additionalColumns[i];
$("#filterTableDataset > thead > tr").append("<th title=\"" + th + "\">" + th + "</th>");
}
}
/* ------------------------------------------------------------------------------------------------ */
if (arrayFieldsToDisplay.length > 0)
{
if (data.dataset != null && $.isArray(data.dataset))
{
for (var i = 0; i < data.dataset.length; i++)
{
var record = data.dataset[i];
var strHtml = '<tr class="' + record.FILTER_CLASS_MARK_ROW + '">';
if (data.checkboxes != null && data.checkboxes != "")
{
strHtml += '<td>';
strHtml += '<input type="checkbox" name="' + data.checkboxes + '[]" value="' + record[data.checkboxes] + '">';
strHtml += '</td>';
}
$.each(arrayFieldsToDisplay, function(i, fieldToDisplay) {
if (record.hasOwnProperty(data.selectedFields[i]))
{
strHtml += '<td>' + record[data.selectedFields[i]] + '</td>';
}
});
if (data.additionalColumns != null && $.isArray(data.additionalColumns))
{
$.each(data.additionalColumns, function(i, additionalColumn) {
if (record.hasOwnProperty(additionalColumn))
{
strHtml += '<td>' + record[additionalColumn] + '</td>';
}
});
}
strHtml += '</tr>';
$("#filterTableDataset > tbody").append(strHtml);
}
}
else
{
// console.log("No dataset!!!");
}
}
else
{
console.log("No fields to display!!!");
}
}
else
{
console.log("No data!!!");
}
callTableSorter();
})
.fail(function(jqXHR, textStatus, errorThrown) {
alert(textStatus);
});
}
function resetTableDataset()
{
$("#filterTableDataset > thead > tr").html("");
$("#filterTableDataset > tbody").html("");
}
$(document).ready(function() {
renderTableDataset();
});
</script>
<div>
<table class="tablesorter table-bordered table-responsive" id="filterTableDataset">
<thead>
+8 -8
View File
@@ -1,9 +1,9 @@
<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
<?php
// Header
echo $this->widgetlib->widget('NavigationHeaderWidget');
<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
<?php
// Header
echo $this->widgetlib->widget('NavigationHeaderWidget');
// Left menu
echo $this->widgetlib->widget('NavigationMenuWidget');
?>
</nav>
// Left menu
echo $this->widgetlib->widget('NavigationMenuWidget');
?>
</nav>
+11 -39
View File
@@ -1,39 +1,11 @@
<script language="Javascript" type="text/javascript">
$(document).ready(function() {
$.ajax({
url: "<?php echo site_url('system/Navigation/header'); ?>",
method: "GET",
data: {
navigation_widget_called: "<?php echo $this->router->directory.$this->router->class.'/'.$this->router->method; ?>"
}
})
.done(function(data, textStatus, jqXHR) {
if (data != null)
{
jQuery.each(data, function(i, e) {
$(".menu-header-items").append('<a class="navbar-brand" href="' + e + '">' + i + '</a>');
});
}
}).fail(function(jqXHR, textStatus, errorThrown) {
alert(textStatus);
});
});
</script>
<div class="navbar-header">
<span>
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Men&uuml; umschalten </span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</span>
<span class="menu-header-items"></span>
</div>
<div class="navbar-header">
<span>
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Men&uuml; umschalten </span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</span>
<span class="menu-header-items"></span>
</div>
@@ -1,169 +1,3 @@
<style>
#collapseinicon {
display: none;
cursor: pointer;
color: #337ab7;
border-bottom: 1px solid #e7e7e7;
border-right: 1px solid #e7e7e7;
border-left: 1px solid #e7e7e7;
position: absolute;
width: 45px;
height: 20px;
background-color: #F8F8F8;
}
.nav > li > span > a:focus, .nav > li > span > a:hover {
text-decoration: none;
}
.nav > li > span {
position: relative;
display: inline-block;
padding-top: 15px;
padding-bottom: 15px;
}
.menuSubscriptLink {
font-size: 10px;
padding-left: 0px !important;
padding-right: 0px !important;
}
.sidebar ul li span a.active {
background-color: transparent;
font-weight: bold;
text-decoration: underline;
}
</style>
<script language="Javascript" type="text/javascript">
function printNavItem(item, depth = 1)
{
strMenu = "";
var expanded = typeof item['expand'] != 'undefined' && item['expand'] === true ? ' active' : '';
strMenu += '<li class="' + expanded + '">';
if (typeof item['subscriptLinkClass'] != 'undefined' && typeof item['subscriptDescription'] != 'undefined')
{
strMenu += '<span>';
}
strMenu += '<a href="' + item['link'] + '"' + expanded + '>';
if (item['icon'] != 'undefined')
{
strMenu += '<i class="fa fa-' + item['icon'] + ' fa-fw"></i> ';
}
strMenu += item['description'];
if (typeof item['children'] != 'undefined' && Object.keys(item['children']).length > 0)
{
strMenu += '<span class="fa arrow"></span>';
}
strMenu += '</a>';
if (typeof item['subscriptLinkClass'] != 'undefined' && typeof item['subscriptDescription'] != 'undefined')
{
strMenu += '<a class="' + item['subscriptLinkClass'] + ' menuSubscriptLink" value="' + item['subscriptLinkValue'] + '" href="#"> (' + item['subscriptDescription'] + ')</a>';
strMenu += '</span>';
}
if (typeof item['children'] != 'undefined' && Object.keys(item['children']).length > 0)
{
var level = '';
if (depth === 1)
{
level = 'second';
}
else if (depth > 1)
{
level = 'third';
}
strMenu += '<ul class="nav nav-' + level + '-level" ' + expanded + '>';
jQuery.each(item['children'], function(i, e) {
strMenu += printNavItem(e, ++depth);
});
strMenu += '</ul>';
}
strMenu += '</li>';
return strMenu;
}
function renderSideMenu()
{
$.ajax({
url: "<?php echo site_url('system/Navigation/menu'); ?>",
method: "GET",
data: {
navigation_widget_called: "<?php echo $this->router->directory.$this->router->class.'/'.$this->router->method; ?>"
}
})
.done(function(data, textStatus, jqXHR) {
if (data != null)
{
var strMenu = '';
printCollapseIcon();
jQuery.each(data, function(i, e) {
strMenu += printNavItem(e);
});
$("#side-menu").html(strMenu);
$("#side-menu").metisMenu();
}
if (typeof sideMenuHook == 'function')
{
sideMenuHook();
}
}).fail(function(jqXHR, textStatus, errorThrown) {
alert(textStatus);
});
}
function printCollapseIcon()
{
// Hiding/showing navigation menu - works only with sb admin 2 template!!
if(!$("#collapseicon").length)
$("#side-menu").parent().append('<div id="collapseicon" title="hide Menu" class="text-right" style="cursor: pointer; color: #337ab7"><i class="fa fa-angle-double-left fa-fw"></i></div>');
$("#collapseicon").click(function() {
$("#page-wrapper").css('margin-left', '0px');
$("#side-menu").hide();
$("#collapseicon").hide();
$("#collapseinicon").show();
});
$("#collapseinicon").click(function() {
$("#page-wrapper").css('margin-left', '250px');
$("#side-menu").show();
$("#collapseicon").show();
$("#collapseinicon").hide();
});
}
$(document).ready(function() {
renderSideMenu();
});
</script>
<div class="navbar-default sidebar" role="navigation">
<div class="sidebar-nav navbar-collapse">
<ul class="nav" id="side-menu"></ul>