Merge branch 'fronkdev' into 'master'
Added RTR C10 reporting See merge request fronk/thetool!817
This commit is contained in:
@@ -32,25 +32,30 @@
|
||||
<div class="card-body">
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="object_type">Objekttyp *</label>
|
||||
<label class="col-lg-2 col-form-label" for="constructionconsentproject_id">Projekt *</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="form-control" name="object_type" id="object_type">
|
||||
<option value="building" <?=($item->object_type == "building" ? "selected='selected'" : "")?>>Gebäude</option>
|
||||
<option value="street" <?=($item->object_type == "street" ? "selected='selected'" : "")?>>Straße</option>
|
||||
<select class="form-control" name="constructionconsentproject_id" id="constructionconsentproject_id">
|
||||
<?php foreach(ConstructionConsentProject::getAll() as $project): ?>
|
||||
<option value="street" <?=($item->constructionconsentproject_id == $project->id ? "selected='selected'" : "")?>><?=$project->name?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="building-search">
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="adb_hausnummer_id">Adresse/GST *</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="form-control" name="adb_hausnummer_id" id="adb_hausnummer_id">
|
||||
<?php if($item->adb_hausnummer_id): ?>
|
||||
<option value="<?=$item->adb_hausnummer_id?>" selected="selected"><?=$item->adb_hausnummer->plz->plz?> <?=$item->adb_hausnummer->strasse->ortschaft->name?>, <?=$item->adb_hausnummer->strasse->name?> <?=$item->adb_hausnummer->hausnummer?></option>
|
||||
<?php endif; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="object_type">Objekttyp *</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="form-control" name="object_type" id="object_type">
|
||||
<option value="building" <?=($item->object_type == "building" ? "selected='selected'" : "")?>>Gebäude</option>
|
||||
<option value="street" <?=($item->object_type == "street" ? "selected='selected'" : "")?>>Straße/Grunstück</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="name">Name</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="name" id="name" value="<?=$item->name?>" placeholder="z.B. Straße oder Adresse" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -68,14 +73,29 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="ez">Grundbuch Einlagezahl</label>
|
||||
<label class="col-lg-2 col-form-label" for="ez">Grundbuch Einlagezahl EZ</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="ez" id="ez" value="<?=$item->ez?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group row mt-3">
|
||||
<label class="col-lg-2 col-form-label" for="note">Interne Notiz</label>
|
||||
<div class="col-lg-10">
|
||||
<textarea id="note" class="form-control" name="note" rows="5"><?=$project->note?></textarea>
|
||||
</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">Speichern</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -85,7 +105,7 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$('#adb_hausnummer_id').select2({
|
||||
/*$('#adb_hausnummer_id').select2({
|
||||
ajax: {
|
||||
url: '<?=self::getUrl("AddressDB", "api", ["do" => "findAddress", "include_gst" => 1])?>',
|
||||
delay: 250,
|
||||
@@ -102,6 +122,22 @@
|
||||
}
|
||||
|
||||
});
|
||||
*/
|
||||
$('#adb_strasse_id').select2({
|
||||
ajax: {
|
||||
url: '<?=self::getUrl("ConstructionConsent", "api", ["do" => "findStreet", "project_id" => $project->id])?>',
|
||||
delay: 250,
|
||||
dataType: 'json'
|
||||
},
|
||||
minimumInputLength: 2,
|
||||
placeholder: "Suche nach Straße",
|
||||
allowClear: true
|
||||
});
|
||||
$('#adb_strasse_id').on('select2:close', function(e) {
|
||||
if(!$('#adb_strasse_id').val()) {
|
||||
$('#new-address-toggle').show();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>
|
||||
@@ -31,6 +31,17 @@ $pagination_entity_name = "Zustimmungserklärungen";
|
||||
|
||||
<form method="get" action="<?=self::getUrl("ConstructionConsent")?>">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_project_id">Projekt</label>
|
||||
<select name="filter[project_id]" id="filter_project_id" class="form-control">
|
||||
<option></option>
|
||||
<?php foreach(ConstructionConsentNetwork::getAll() as $ccn): ?>
|
||||
<option value="<?=$ccn->id?>" <?=(is_array($filter) && array_key_exists("project_id", $filter) && $ccn->id == $filter["project_id"]) ? "selected='selected'" : ""?>><?=$ccn->adb_netzgebiet->name?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_object_type">Objektart</label>
|
||||
<select name="filter[object_type]" id="filter_object_type" class="form-control">
|
||||
@@ -59,9 +70,21 @@ $pagination_entity_name = "Zustimmungserklärungen";
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if($me->is("Admin")): ?>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<a href="<?=self::getUrl("ConstructionConsentProject")?>" class="btn btn-success">Projekte bearbeiten</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="float-left">
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
|
||||
<?php //var_dump($project);exit; ?>
|
||||
<!-- 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"><a href="<?= self::getUrl("ConstructionConsentProject") ?>">Zustimmungserklärungsprojekte</a></li>
|
||||
<li class="breadcrumb-item active"><?= ($Action == "add") ? "neu" : "bearbeiten" ?></li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Zustimmungserklärung</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
|
||||
<div class="card bg-light">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title mb-2">
|
||||
<?= ($Action == "add") ? "Neues " : "" ?>Zustimmungserklärungsprojekt <?= ($Action == "edit") ? "bearbeiten " : "" ?>
|
||||
</h4>
|
||||
|
||||
<form class="form-horizontal" method="post" action="<?= self::getUrl("ConstructionConsentProject", "save") ?>">
|
||||
<input type="hidden" name="id" value="<?=isset($project) ? $project->id : ""?>"/>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<h4>Projekt</h4>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="name">Projektname *</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="name" id="name" value="<?=$project->name?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="email">Emailadresse *</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="email" id="email" value="<?=$project->email?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="phone">Telefonnummer *</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="phone" id="phone" value="<?=$project->phone?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="adb_network_id">Netzgebiete *</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="form-control select2" name="adb_netzgebiet_id[]" id="adb_netzgebiet_id" multiple="multiple">
|
||||
<?php foreach(ADBNetzgebietModel::getAll() as $net): ?>
|
||||
<option value="<?=$net->id?>" <?=(is_array($project->adb_networks) && array_key_exists($net->id, $project->adb_networks)) ? "selected='selected'" : ""?> ><?=$net->name?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<h4 class="mt-3">Emailversand</h4>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="sender_name">Absendername *</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="sender_name" id="sender_name" value="<?=$project->sender_name?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="sender_email">Absender Emailadresse *</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="sender_email" id="sender_email" value="<?=$project->sender_email?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="sender_reply_to">Antworten an (Reply To)</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="sender_reply_to" id="sender_reply_toender_email" value="<?=$project->sender_reply_to?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="mt-3 mb-3" />
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="note">Interne Notiz</label>
|
||||
<div class="col-lg-10">
|
||||
<textarea id="note" class="form-control" name="note" rows="5"><?=$project->note?></textarea>
|
||||
</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">Speichern</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(".select2").select2({
|
||||
allowClear: true,
|
||||
placeholder: "",
|
||||
closeOnSelect: false
|
||||
});
|
||||
|
||||
$('#adb_hausnummer_id').on('select2:close', function(e) {
|
||||
if(!$('#adb_hausnummer_id').val()) {
|
||||
$('#new-address-toggle').show();
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>
|
||||
@@ -0,0 +1,121 @@
|
||||
<?php
|
||||
$pagination_baseurl = $this->getUrl($Mod,"Index");
|
||||
$pagination_baseurl_params = ["filter" => $filter];
|
||||
$pagination_entity_name = "Zustimmungserklärungsprojekte";
|
||||
?>
|
||||
<?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"><a href="<?=self::getUrl("ConstructionConsent")?>">Zustimmmungserklärungen</a></li>
|
||||
<li class="breadcrumb-item active">Projekte</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Zustimmmungserklärungen</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
<a href="<?=self::getUrl("ConstructionConsent")?>" class="btn btn-outline-secondary"><i class="fas fa-fw fa-arrow-left"></i> Zurück zu Zustimmungserklärungen</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
<h4 class="header-title mb-3"><i class="fad fa-filter fa-fw"></i> Filter</h4>
|
||||
|
||||
<form method="get" action="<?=self::getUrl("ConstructionConsent")?>">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_name">Name</label>
|
||||
<input type="text" class="form-control" name="filter[name]" id="filter_name" value="<?=(is_array($filter) && array_key_exists('name', $filter)) ? $filter['name'] : ""?>" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row mt-2">
|
||||
<div class="col">
|
||||
<button type="submit" class="btn btn-primary"><i class="far fa-search fa-fw"></i> Filter anwenden</button>
|
||||
<a class="btn btn-secondary" href="<?=self::getUrl("ConstructionConsent", "", ["resetFilter" => 1])?>"><i class="far fa-xmark fa-fw"></i> Filter zurücksetzen</a>
|
||||
</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">Liste aller Zustimmmungserklärungsprojekte</h4>
|
||||
</div>
|
||||
<div class="float-right">
|
||||
<a class="btn btn-primary" href="<?=self::getUrl("ConstructionConsentProject", "add")?>"><i class="fas fa-plus"></i> Neue Zustimmungserklärungsprojekt erstellen</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>Projektname</th>
|
||||
<th>Netzgebiete</th>
|
||||
<th>Kontakt</th>
|
||||
<th>Email Absender</th>
|
||||
<th>Antwort an</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php foreach($projects as $project): ?>
|
||||
<tr>
|
||||
<td><?=$project->name?></td>
|
||||
<td>
|
||||
<?php if(is_array($project->networks) && count($project->networks)): ?>
|
||||
<ul>
|
||||
<?php foreach($project->networks as $network): ?>
|
||||
<li><?=$network->adb_netzgebiet->name?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
<?=$project->email?><br />
|
||||
<?=$project->phone?>
|
||||
</td>
|
||||
<td><?=$project->sender_name?> <<?=$project->sender_email?>></td>
|
||||
<td><?=$project->sender_reply_to?></td>
|
||||
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||
<a href="<?=self::getUrl("ConstructionConsentProject", "edit", ["id" => $project->id])?>"><i class="far fa-edit" title="Bearbeiten"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/tpl/pagination.php"); ?>
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/tpl/pagination-summary.php"); ?>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/footer.php"); ?>
|
||||
Reference in New Issue
Block a user