Added OAID management
This commit is contained in:
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
$pagination_baseurl = $this->getUrl($Mod,"Index");
|
||||
$pagination_baseurl_params = ["filter" => $filter];
|
||||
$pagination_entity_name = "Open Access IDs";
|
||||
?>
|
||||
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/header.php"); ?>
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box">
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class="breadcrumb-item"><a href="<?=self::getUrl("Dashboard")?>"><?=MFAPPNAME_SLUG?></a></li>
|
||||
<li class="breadcrumb-item active">Open Access IDs</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Open Access IDs</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title mb-2">Open Access IDs importieren</h4>
|
||||
|
||||
<form class="form-horizontal" method="post" action="<?=self::getUrl("OpenAccessId", "import")?>" enctype="multipart/form-data">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="origin">Herkunft *</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="select2 form-control " name="origin" id="origin_id">
|
||||
<option value="ofaa">OFAA</option>
|
||||
<option value="thetool">thetool</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="owner_id">Besitzer *</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="select2 form-control " name="owner_id" id="owner_id">
|
||||
<option></option>
|
||||
<?php foreach($netowners as $netowner): ?>
|
||||
<option value="<?=$netowner->id?>" <?=(isset($netowner_id) && $netowner->id == $netowner_id) ? "selected='selected'" : ""?>><?=$netowner->getCompanyOrName()?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="active">Aktiviert *</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="select2 form-control " name="active" id="active">
|
||||
<option value="1">Aktiviert</option>
|
||||
<option value="0">Deaktiviert</option>
|
||||
</select>
|
||||
<small>Aktiv = Werden für neue Zuweisungen verwendet</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="origin_id">OAID-Set Name</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="origin_id" id="origin_id" value="" />
|
||||
<small>Identifiziert das OAID-Set. Kann leer sein.</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="oaidcsv">CSV-Datei *</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="file" class="form-control" name="oaidcsv" id="oaidcsv" accept="text/csv" />
|
||||
<small>Semikolon-getrennt; OAID in erster Spalte</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for=""></label>
|
||||
<div class="col-lg-10 form-check pl-4">
|
||||
<label><input type="checkbox" class="form-check-input" name="csv_header" value="1" /> Erste Zeile enthält Überschrift</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2"></label>
|
||||
<div class="col-lg-10">
|
||||
<button type="submit" class="btn btn-primary">Importieren</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/footer.php"); ?>
|
||||
@@ -0,0 +1,172 @@
|
||||
<?php
|
||||
$pagination_baseurl = $this->getUrl($Mod,"Index");
|
||||
$pagination_baseurl_params = ["filter" => $filter];
|
||||
$pagination_entity_name = "Open Access IDs";
|
||||
?>
|
||||
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/header.php"); ?>
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box">
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class="breadcrumb-item"><a href="<?=self::getUrl("Dashboard")?>"><?=MFAPPNAME_SLUG?></a></li>
|
||||
<li class="breadcrumb-item active">Open Access IDs</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Open Access IDs</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
<h4 class="header-title mb-3">Filter</h4>
|
||||
|
||||
<form method="get" action="<?=self::getUrl("OpenAccessId")?>">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_origin">Herkunft</label>
|
||||
<select name="filter[origin]" id="filter_origin" class="form-control">
|
||||
<option value=""></option>
|
||||
<option value="ofaa" <?=($filter['origin'] == "ofaa") ? "selected='selected'" : ""?>>OFAA</option>
|
||||
<option value="thetool" <?=($filter['origin'] == "thetool") ? "selected='selected'" : ""?>>thetool</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_owner_id">Besitzer</label>
|
||||
<select name="filter[owner_id]" id="filter_owner_id" class="form-control">
|
||||
<option value=""></option>
|
||||
<?php foreach($netowners as $netowner): ?>
|
||||
<option value="<?=$netowner->id?>" <?=(is_array($filter) && array_key_exists("owner_id", $filter) && $filter['owner_id'] && $netowner->id == $filter['owner_id']) ? "selected='selected'" : ""?>><?=$netowner->getCompanyOrName()?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_oaid">OAID</label>
|
||||
<input type="text" class="form-control" name="filter[oaid]" id="filter_oaid" value="<?=$filter['oaid']?>" />
|
||||
</div>
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_origin_id">OAID Set</label>
|
||||
<input type="text" class="form-control" name="filter[origin_id]" id="filter_origin_id" value="<?=$filter['origin_id']?>" />
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_assigned">Zugewiesen</label>
|
||||
<select name="filter[assigned]" id="filter_assigned" class="form-control">
|
||||
<option value=""></option>
|
||||
<option value="yes" <?=($filter['assigned'] == "yes") ? "selected='selected'" : ""?>>Zugewiesen</option>
|
||||
<option value="no" <?=($filter['assigned'] == "no") ? "selected='selected'" : ""?>>Nicht zugewiesen</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_exported_to">Exportiert an</label>
|
||||
<select name="filter[exported_to]" id="filter_exported_to" class="form-control">
|
||||
<option value=""></option>
|
||||
<option value="rimo" <?=($filter['exported_to'] == "rimo") ? "selected='selected'" : ""?>>RIMO</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row mt-2">
|
||||
<div class="col">
|
||||
<button type="submit" class="btn btn-primary">Filter anwenden</button>
|
||||
<a class="btn btn-secondary" href="<?=self::getUrl("OpenAccessId")?>">Filter zurücksetzen</a>
|
||||
</div>
|
||||
<!--<div class="col">
|
||||
<button class="btn btn-info" type="button" onclick="refreshMap()"><i class="far fa-map"></i> Auf Karte anzeigen</button>
|
||||
</div>-->
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="float-left">
|
||||
<h4 class="header-title">Open Access IDs</h4>
|
||||
</div>
|
||||
<div class="float-right">
|
||||
<a class="btn btn-outline-primary mb-2" href="<?=self::getUrl("OpenAccessId", "importer")?>"><i class="fas fa-plus"></i> Open Access IDs importieren</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/tpl/pagination.php"); ?>
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/tpl/pagination-summary.php"); ?>
|
||||
|
||||
<table class="table table-striped table-hover">
|
||||
<tr>
|
||||
<th>id</th>
|
||||
<th>Aktiv</th>
|
||||
<th>OAID</th>
|
||||
<th>OAID Set</th>
|
||||
<th>Herkunft</th>
|
||||
<th>Besitzer</th>
|
||||
<th>Zugewiesen</th>
|
||||
<th></th>
|
||||
<th>Exportiert</th>
|
||||
<th></th>
|
||||
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php foreach($oaids as $oaid): ?>
|
||||
<tr>
|
||||
<td><?=$oaid->id?></td>
|
||||
<td><?=($oaid->active) ? "<i class='fas fa-check text-success'></i>" : "<i class='fas fa-xmark text-danger'></i>"?></td>
|
||||
<td><?=$oaid->oaid?></td>
|
||||
<td><?=$oaid->origin_id?></td>
|
||||
<td><?=$oaid->origin?></td>
|
||||
<td><?=$oaid->owner->getCompanyOrName()?></td>
|
||||
<td>
|
||||
<?php if($oaid->termination_id): ?>
|
||||
<?=(is_object($oaid->termination) && $oaid->termination->building_id) ? $oaid->termination->building->getAddress() : ""?>
|
||||
<?=($oaid->termination->name) ? " - ".$oaid->termination->name : ""?>
|
||||
<?php elseif($oaid->adb_wohneinheit_id && is_object($oaid->adb_wohneinheit)): ?>
|
||||
[<?=$oaid->adb_wohneinheit->hausnummer->strasse->gemeinde->name?>]
|
||||
<?=$oaid->adb_wohneinheit->hausnummer->plz->plz?>
|
||||
<?=$oaid->adb_wohneinheit->hausnummer->ortschaft->name?>,
|
||||
<?=$oaid->adb_wohneinheit->hausnummer->strasse->name?>
|
||||
<?=$oaid->adb_wohneinheit->hausnummer->hausnummer?>
|
||||
<?=((string)$oaid->adb_wohneinheit) ? " - ".(string)$oaid->adb_wohneinheit : ""?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?=($oaid->assigned) ? date("d.m.Y H:i",$oaid->assigned) : ""?></td>
|
||||
<td><?=($oaid->exported_to) ? $oaid->exported_to : ""?></td>
|
||||
<td><?=($oaid->exported) ? date("d.m.Y H:i", $oaid->exported) : ""?></td>
|
||||
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||
<!--a href="<?=self::getUrl("OpenAccessId", "edit", ["id" => $oaid->id])?>"><i class="far fa-edit" title="OAID Bearbeiten"></i></a-->
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/tpl/pagination-summary.php"); ?>
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/tpl/pagination.php"); ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/footer.php"); ?>
|
||||
Reference in New Issue
Block a user