Made different Layouts more customizable
This commit is contained in:
@@ -1,209 +0,0 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/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="javascript: void(0);">the-tool</a></li>
|
||||
<li class="breadcrumb-item"><a href="javascript: void(0);">Personen & Firmen</a></li>
|
||||
<li class="breadcrumb-item active"><?=($address->id) ? "bearbeiten" : "Neu" ?></li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Personen & Firmen</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"><?=($address->id) ? "Person/Firma bearbeiten" : "Neue Person/Firma"?></h4>
|
||||
|
||||
<form class="form-horizontal" method="post" action="<?=self::getUrl("Address", "save")?>">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<input type="hidden" name="id" value="<?=$address->id?>" />
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="parent_id">Zugeordnet zu</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="select2 form-control " name="parent_id" id="parent_id">
|
||||
<option></option>
|
||||
<?php foreach($parents as $parent): if($parent->id == $address->id) continue; ?>
|
||||
<option value="<?=$parent->id?>" <?=($address->parent_id == $parent->id) ? "selected='selected'" : ""?>><?=($parent->company) ? $parent->company : $parent->getFullName()?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="customer_number">Kundennummer</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="customer_number" id="customer_number" value="<?=$address->customer_number?>" disabled="disabled" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="company">Firmenname</label>
|
||||
<div class="col-lg-10">
|
||||
<textarea name="company" id="company" class="form-control" rows="2"><?=$address->company?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="firstname">Vorname</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="firstname" id="firstname" value="<?=$address->firstname?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="lastname">Nachname</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="lastname" id="lastname" value="<?=$address->lastname?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="street">Strasse</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="street" id="street" value="<?=$address->street?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="zip">PLZ / Ort</label>
|
||||
<div class="col-lg-10">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<input type="text" class="form-control" name="zip" id="zip" placeholder="PLZ" value="<?=$address->zip?>">
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<input type="text" class="form-control" name="city" id="city" placeholder="Ort" value="<?=$address->city?>">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="country">Land</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="country" id="country" value="<?=$address->country?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="phone">Telefon</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="tel" class="form-control" name="phone" id="phone" value="<?=$address->phone?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="mobile">Mobil</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="tel" class="form-control" name="mobile" id="mobile" value="<?=$address->mobile?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="fax">Fax</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="tel" class="form-control" name="fax" id="fax" value="<?=$address->fax?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="email">Email</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="email" class="form-control" name="email" id="email" value="<?=$address->email?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="spin">Service PIN</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="spin" class="form-control" name="spin" id="spin" value="<?=$address->spin?>" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="addresstypes">Rolle</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="select2 form-control select2-multiple" name="addresstypes[]" id="addresstypes" multiple="multiple" data-placeholder="Choose ...">
|
||||
<option value="systemowner" <?=(array_key_exists("systemowner", $address->types)) ? "selected='selected'" : ""?>><?=__("systemowner")?></option>
|
||||
<option value="netowner" <?=(array_key_exists("netowner", $address->types)) ? "selected='selected'" : "netowner"?>><?=__("netowner")?></option>
|
||||
<option value="salespartner" <?=(array_key_exists("salespartner", $address->types)) ? "selected='selected'" : "salespartner"?>><?=__("salespartner")?></option>
|
||||
<option value="pipeworker" <?=(array_key_exists("pipeworker", $address->types)) ? "selected='selected'" : "pipeworker"?>><?=__("pipeworker")?></option>
|
||||
<option value="lineworker" <?=(array_key_exists("lineworker", $address->types)) ? "selected='selected'" : "lineworker"?>><?=__("lineworker")?></option>
|
||||
<option value="pipeplanner" <?=(array_key_exists("pipeplanner", $address->types)) ? "selected='selected'" : "pipeplanner"?>><?=__("pipeplanner")?></option>
|
||||
<option value="lineplanner" <?=(array_key_exists("lineplanner", $address->types)) ? "selected='selected'" : "lineplanner"?>><?=__("lineplanner")?></option>
|
||||
<option value="netoperator" <?=(array_key_exists("netoperator", $address->types)) ? "selected='selected'" : "netoperator"?>><?=__("netoperator")?></option>
|
||||
<option value="support" <?=(array_key_exists("support", $address->types)) ? "selected='selected'" : "support"?>><?=__("support")?></option>
|
||||
<option value="billing" <?=(array_key_exists("billing", $address->types)) ? "selected='selected'" : ""?>><?=__("billing")?></option>
|
||||
<option value="employee" <?=(array_key_exists("employee", $address->types)) ? "selected='selected'" : ""?>><?=__("employee")?></option>
|
||||
<option value="customer" <?=(array_key_exists("customer", $address->types)) ? "selected='selected'" : ""?>><?=__("customer")?></option>
|
||||
<option value="supplier" <?=(array_key_exists("supplier", $address->types)) ? "selected='selected'" : ""?>><?=__("supplier")?></option>
|
||||
<option value="contact" <?=(array_key_exists("contact", $address->types)) ? "selected='selected'" : ""?>><?=__("contact")?></option>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4 class="header-title mb-2">Zusatzdaten</h4>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="rtrcode">RTR Betreiber ID</label>
|
||||
<div class="col-lg-10">
|
||||
<input class="form-control" name="attributes[rtrcode]" id="rtrcode" value="<?=$address->attributes['rtrcode']->value?>">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<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"><?=$address->note?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</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>
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#parent_id").select2({
|
||||
allowClear: true,
|
||||
placeholder: ""
|
||||
});
|
||||
$("#addresstypes").select2();
|
||||
</script>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
||||
@@ -1,270 +0,0 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/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")?>">the-tool</a></li>
|
||||
<?php if(is_array($filter['addresstype']) && count($filter['addresstype'])): ?>
|
||||
<li class="breadcrumb-item"><a href="<?=self::getUrl("Address")?>">Personen & Firmen</a></li>
|
||||
<li class="breadcrumb-item active">
|
||||
<?php foreach($filter['addresstype'] as $type) { $types[] = __($type); } ?>
|
||||
<?=implode(", ", $types)?>
|
||||
</li>
|
||||
<?php else: ?>
|
||||
<li class="breadcrumb-item active">Personen & Firmen</li>
|
||||
<?php endif; ?>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Personen & Firmen</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("Address")?>">
|
||||
<div class="row">
|
||||
<?php if($me->is("Admin")): ?>
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_addresstype">Rolle</label>
|
||||
<select name="filter[addresstype][]" id="filter_addresstype" class="form-control" multiple="multiple">
|
||||
<option value="systemowner" <?=(in_array("systemowner", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("systemowner")?></option>
|
||||
<option value="netowner" <?=(in_array("netowner", $filter["addresstype"])) ? "selected='selected'" : "netowner"?>><?=__("netowner")?></option>
|
||||
<option value="salespartner" <?=(in_array("salespartner", $filter["addresstype"])) ? "selected='selected'" : "salespartner"?>><?=__("salespartner")?></option>
|
||||
<option value="pipeworker" <?=(in_array("pipeworker", $filter["addresstype"])) ? "selected='selected'" : "pipeworker"?>><?=__("pipeworker")?></option>
|
||||
<option value="lineworker" <?=(in_array("lineworker", $filter["addresstype"])) ? "selected='selected'" : "lineworker"?>><?=__("lineworker")?></option>
|
||||
<option value="pipeplanner" <?=(in_array("pipeplanner", $filter["addresstype"])) ? "selected='selected'" : "pipeplanner"?>><?=__("pipeplanner")?></option>
|
||||
<option value="lineplanner" <?=(in_array("lineplanner", $filter["addresstype"])) ? "selected='selected'" : "lineplanner"?>><?=__("lineplanner")?></option>
|
||||
<option value="netoperator" <?=(in_array("netoperator", $filter["addresstype"])) ? "selected='selected'" : "netoperator"?>><?=__("netoperator")?></option>
|
||||
<option value="support" <?=(in_array("support", $filter["addresstype"])) ? "selected='selected'" : "support"?>><?=__("support")?></option>
|
||||
<option value="billing" <?=(in_array("billing", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("billing")?></option>
|
||||
<option value="employee" <?=(in_array("employee", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("employee")?></option>
|
||||
<option value="customer" <?=(in_array("customer", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("customer")?></option>
|
||||
<option value="supplier" <?=(in_array("supplier", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("supplier")?></option>
|
||||
<option value="contact" <?=(in_array("contact", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("contact")?></option>
|
||||
</select>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_customer_number">Kundennummer</label>
|
||||
<input type="text" class="form-control" name="filter[customer_number]" id="filter_customer_number" value="<?=$filter['customer_number']?>" />
|
||||
</div>
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_spin">Service PIN</label>
|
||||
<input type="text" class="form-control" name="filter[spin]" id="filter_spin" value="<?=$filter['spin']?>" />
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_company">Firma</label>
|
||||
<input type="text" class="form-control" name="filter[company]" id="filter_company" value="<?=$filter['company']?>" />
|
||||
</div>
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_firstname">Vorname</label>
|
||||
<input type="text" class="form-control" name="filter[firstname]" id="filter_firstname" value="<?=$filter['firstname']?>" />
|
||||
</div>
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_lastname">Nachname</label>
|
||||
<input type="text" class="form-control" name="filter[lastname]" id="filter_lastname" value="<?=$filter['lastname']?>" />
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_street">Straße</label>
|
||||
<input type="text" class="form-control" name="filter[street]" id="filter_street" value="<?=$filter['street']?>" />
|
||||
</div>
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_zip">PLZ</label>
|
||||
<input type="text" class="form-control" name="filter[zip]" id="filter_zip" value="<?=$filter['zip']?>" />
|
||||
</div>
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_city">Ort</label>
|
||||
<input type="text" class="form-control" name="filter[city]" id="filter_city" value="<?=$filter['city']?>" />
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_country">Land</label>
|
||||
<input type="text" class="form-control" name="filter[country]" id="filter_country" value="<?=$filter['country']?>" />
|
||||
</div>
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_pfm">Telefon/Fax/Mobil</label>
|
||||
<input type="text" class="form-control" name="filter[pfm]" id="filter_pfm" value="<?=$filter['pfm']?>" />
|
||||
</div>
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_email">Email</label>
|
||||
<input type="text" class="form-control" name="filter[email]" id="filter_email" value="<?=$filter['email']?>" />
|
||||
</div>
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_note">Notiz</label>
|
||||
<input type="text" class="form-control" name="filter[note]" id="filter_note" value="<?=$filter['note']?>" />
|
||||
</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("Address")?>">Filter zurücksetzen</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
<div class="float-left">
|
||||
<h4 class="header-title">Liste aller Personen & Firmen</h4>
|
||||
<?php if(is_array($filter) && count($filter)): ?>
|
||||
<p class="sub-header">
|
||||
<?php if(array_key_exists("parents_only", $filter) && $filter['parents_only'] == 0): ?>
|
||||
Zeige alle Personen und Firmen<br />
|
||||
<?php else: ?>
|
||||
Zeige nur Personen und Firmen ohne Zugehörigkeit an. <a href="<?=self::getUrl("Address", "Index", ['filter' => array_merge($filter, ["parents_only" => 0])])?>">Alle anzeigen</a><br />
|
||||
<?php endif; ?>
|
||||
<?php if(is_array($filter['addresstype']) && count($filter['addresstype'])): ?>
|
||||
Gefiltert nach Rolle: <?=implode(", ", $types)?><br />
|
||||
<?php endif; ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="float-right">
|
||||
<a class="btn btn-primary" href="<?=self::getUrl("Address", "add")?>"><i class="fas fa-plus"></i> Neue Person/Firma anlegen</a>
|
||||
</div>
|
||||
|
||||
<?php if($pagination['maxItems'] > $pagination['count']): ?>
|
||||
<nav>
|
||||
<ul class="pagination justify-content-center mb-1">
|
||||
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod, "Index", ["filter" => $filter])?>" tabindex="-1">Erste</a>
|
||||
</li>
|
||||
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $pagination['start'] - $pagination['count'], "filter" => $filter])?>" tabindex="-1">Zurück</a>
|
||||
</li>
|
||||
<?php for($i = 0; $i < ($pagination['maxItems'] / $pagination['count']); $i++): ?>
|
||||
<li class="page-item <?=($pagination['start'] == $i*$pagination['count']) ? "disabled font-weight-bold" : ""?>"><a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $i*$pagination['count'], "filter" => $filter])?>"><?=$i+1?></a></li>
|
||||
<?php endfor; ?>
|
||||
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $pagination['start'] + $pagination['count'], "filter" => $filter])?>">Vor</a>
|
||||
</li>
|
||||
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => ($pagination['maxItems'] - $pagination['maxItems'] % $pagination['count']), "filter" => $filter])?>">Letzte</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
<div class="pagination justify-content-center">
|
||||
<?php if($pagination['maxItems']): ?>
|
||||
Adressen <?=$pagination['start']+1?> bis <?=($pagination['start'] + $pagination['count'] > $pagination['maxItems']) ? $pagination['maxItems'] : $pagination['start'] + $pagination['count']?> von <?=$pagination['maxItems']?>
|
||||
<?php else: ?>
|
||||
Keine Adressen gefunden
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<table class="table table-striped table-hover">
|
||||
<tr>
|
||||
<th>Typ</th>
|
||||
<th>Kundennummer</th>
|
||||
<th>Firma</th>
|
||||
<th>Name</th>
|
||||
<th>Adresse</th>
|
||||
<th>Telefon</th>
|
||||
<th>Email</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php foreach($addresses as $address): ?>
|
||||
<tr>
|
||||
<?php if(is_array($address->types)):?>
|
||||
<?php
|
||||
$types = array_keys($address->types);
|
||||
$l7d_types = [];
|
||||
foreach($types as $type):
|
||||
$l7d_types[] = __($type);
|
||||
endforeach;
|
||||
?>
|
||||
<td title="<?=implode(", ", $l7d_types)?>">
|
||||
<?=$l7d_types[0]?><?=(count($types) > 1) ? ", ..." : ""?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<td>
|
||||
<?=$address->customer_number?>
|
||||
<?=($address->spin) ? "<br /><span class='text-pink'>".$address->spin."</span>" : ""?>
|
||||
</td>
|
||||
<td><?=nl2br($address->company)?></td>
|
||||
<td><?=$address->getFullName()?></td>
|
||||
<td>
|
||||
<?=$address->street?><br />
|
||||
<?=$address->zip?> <?=$address->city?>
|
||||
</td>
|
||||
<td><?=$address->phone?></td>
|
||||
<td><?=$address->email?></td>
|
||||
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||
<a href="<?=self::getUrl("User", "Index", ["filter" => ["address_id" => $address->id]])?>" title="Benutzer anzeigen"><i class="fas fa-users"></i></a>
|
||||
<a href="<?=self::getUrl("Address", "edit", ["id" => $address->id])?>"><i class="far fa-edit" title="Bearbeiten"></i></a>
|
||||
<a href="<?=self::getUrl("Address", "delete", ["id" => $address->id])?>" onclick="if(!confirm('Person/Firma wirklich löschen?')) return false;" class="text-danger" title="Löschen"><i class="fas fa-trash"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
||||
<?php if($pagination['maxItems'] > $pagination['count']): ?>
|
||||
<nav>
|
||||
<ul class="pagination justify-content-center mb-1">
|
||||
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod, "Index", ["filter" => $filter])?>" tabindex="-1">Erste</a>
|
||||
</li>
|
||||
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $pagination['start'] - $pagination['count'], "filter" => $filter])?>" tabindex="-1">Zurück</a>
|
||||
</li>
|
||||
<?php for($i = 0; $i < ($pagination['maxItems'] / $pagination['count']); $i++): ?>
|
||||
<li class="page-item <?=($pagination['start'] == $i*$pagination['count']) ? "disabled font-weight-bold" : ""?>"><a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $i*$pagination['count'], "filter" => $filter])?>"><?=$i+1?></a></li>
|
||||
<?php endfor; ?>
|
||||
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $pagination['start'] + $pagination['count'], "filter" => $filter])?>">Vor</a>
|
||||
</li>
|
||||
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => ($pagination['maxItems'] - $pagination['maxItems'] % $pagination['count']), "filter" => $filter])?>">Letzte</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
<div class="pagination justify-content-center">
|
||||
<?php if($pagination['maxItems']): ?>
|
||||
Adressen <?=$pagination['start']+1?> bis <?=($pagination['start'] + $pagination['count'] > $pagination['maxItems']) ? $pagination['maxItems'] : $pagination['start'] + $pagination['count']?> von <?=$pagination['maxItems']?>
|
||||
<?php else: ?>
|
||||
Keine Adressen gefunden
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#filter_addresstype").select2({closeOnSelect: false});
|
||||
</script>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
||||
@@ -1,463 +0,0 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/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")?>">the-tool</a></li>
|
||||
<li class="breadcrumb-item"><a href="<?=self::getUrl("Building")?>">Objekte</a></li>
|
||||
<li class="breadcrumb-item active"><?=($building->id) ? "bearbeiten" : "Neu" ?></li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Objekte</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"><?=($building->id) ? "Objekt bearbeiten" : "Neues Objekt"?></h4>
|
||||
|
||||
<form class="form-horizontal" method="post" action="<?=self::getUrl("Building", "save")?>">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<input type="hidden" name="id" value="<?=$building->id?>" />
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="network_id">Netzgebiet *</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="select2 form-control " name="network_id" id="network_id">
|
||||
<option></option>
|
||||
<?php foreach($networks as $network): ?>
|
||||
<option value="<?=$network->id?>" <?=($building->network_id == $network->id) ? "selected='selected'" : ""?>><?=($network->name)?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="type_id">Objekttyp *</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="select2 form-control " name="type_id" id="type_id">
|
||||
<option></option>
|
||||
<?php foreach($types as $type): ?>
|
||||
<option value="<?=$type->id?>" <?=($building->type_id == $type->id) ? "selected='selected'" : ""?>><?=($type->name)?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="units">Nutzungseinheiten *</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="number" class="form-control" name="units" id="units" value="<?=$building->units?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="street">Straße *</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="street" id="street" value="<?=$building->street?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="zip">PLZ *</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="zip" id="zip" value="<?=$building->zip?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="city">Ort *</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="city" id="city" value="<?=$building->city?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if($building->id): ?>
|
||||
<div class="form-group row" id="gps-again" style="display:none;">
|
||||
<div class="col-lg-2"></div>
|
||||
<div class="col-lg-10">
|
||||
<label class="text-pink"><input type="checkbox" name="gps_again" value="1" /> GPS-Koordinaten erneut berechnen</label>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="code">Objekt ID</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="code" id="code" value="<?=$building->code?>" readonly="readonly" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="oan_id">OAN ID</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="oan_id" id="oan_id" value="<?=$building->oan_id?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="pop_id">POP</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="select2 form-control " name="pop_id" id="pop_id">
|
||||
<option></option>
|
||||
<?php foreach($networks as $network): ?>
|
||||
<?php foreach($network->pops as $pop): ?>
|
||||
<option value="<?=$pop->id?>" <?=($building->pop_id == $pop->id) ? "selected='selected'" : ""?>><?=$network->name?> - <?=($pop->name)?></option>
|
||||
<?php endforeach; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-4 col-form-label" for="gps_lat">GPS Länge (N)</label>
|
||||
<div class="col-lg-8">
|
||||
<input type="text" class="form-control" name="gps_lat" id="gps_lat" value="<?=$building->gps_lat?>" <?=($building->gps_lat) ? "readonly='readonly'" : ""?> />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-4 col-form-label" for="gps_long">GPS Breite (E)</label>
|
||||
<div class="col-lg-8">
|
||||
<input type="text" class="form-control" name="gps_long" id="gps_long" value="<?=$building->gps_long?>" <?=($building->gps_lat) ? "readonly='readonly'" : ""?> />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if($building->gps_lat && $building->gps_long): ?>
|
||||
<div class="form-group row">
|
||||
<div class="col-lg-4"></div>
|
||||
<div class="col-lg-8">
|
||||
<button type="button" id="edit-gps" class="btn btn-sm btn-outline-pink"><i class="fas fa-edit"></i> GPS-Koordinaten bearbeiten</button>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
<?php if($building->gps_lat && $building->gps_long): ?>
|
||||
<div class="col-lg-6">
|
||||
<div id="building-map" style="height:420px;width:100%"></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if($building->gps_lat && $building->gps_long): ?>
|
||||
<div class="row mb-3">
|
||||
<div class="col-lg-2">
|
||||
</div>
|
||||
<div class="col-lg-10">
|
||||
<a href="https://maps.google.com/maps?t=k&q=loc:<?=$building->gps_lat?>+<?=$building->gps_long?>" target="_blank"><i class="fas fa-external-link-alt"></i> Auf Google Maps öffnen</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="laea">LAEA Koordinaten</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="laea" id="laea" value="<?=$building->laea?>" readonly='readonly' />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="contact">Kontakt</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="contact" id="contact" value="<?=$building->contact?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="phone">Telefon</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="phone" id="phone" value="<?=$building->phone?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="email">Email</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="email" id="email" value="<?=$building->email?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="networksection_id">Bauabschnitt</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="select2 form-control " name="networksection_id" id="networksection_id">
|
||||
<option></option>
|
||||
<?php foreach($networksections as $section): ?>
|
||||
<option value="<?=$section->id?>" <?=($building->networksection_id == $section->id) ? "selected='selected'" : ""?>><?=($section->network->name)?> - <?=($section->name)?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="status_id">Status</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="select2 form-control " name="status_id" id="status_id" <?=($building->id && !$me->is("Admin")) ? "disabled='disabled'" : ""?>>
|
||||
<option></option>
|
||||
<?php foreach($statuses as $status): ?>
|
||||
<option value="<?=$status->id?>" <?=($building->status_id == $status->id) ? "selected='selected'" : ""?>><?=$status->code?> - <?=__($status->name."-b")?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4 class="header-title mb-2">Berechtigungen</h4>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="pipeworker_id">Tiefbau</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="select2 form-control " name="pipeworker_id" id="pipeworker_id" <?=(!$me->is(["Admin", "netowner", "pipeplanner"])) ? "disabled='disabled'" : ""?>>
|
||||
<option></option>
|
||||
<?php foreach($pipeworkers as $pw): ?>
|
||||
<option value="<?=$pw->id?>" <?=($building->pipeworker_id == $pw->id) ? "selected='selected'" : ""?>><?=$pw->getCompanyOrName()?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="lineworker_id">Kabelbau</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="select2 form-control " name="lineworker_id" id="lineworker_id" <?=(!$me->is(["Admin", "netowner", "pipeplanner"])) ? "disabled='disabled'" : ""?>>
|
||||
<option></option>
|
||||
<?php foreach($lineworkers as $lw): ?>
|
||||
<option value="<?=$lw->id?>" <?=($building->lineworker_id == $lw->id) ? "selected='selected'" : ""?>><?=$lw->getCompanyOrName()?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<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"><?=$building->note?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</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>
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#network_id").select2({placeholder: ""});
|
||||
$("#pop_id").select2({placeholder: "", allowClear: true,});
|
||||
$("#type_id").select2({placeholder: ""});
|
||||
$("#networksection_id").select2({placeholder: "", allowClear: true,});
|
||||
|
||||
// disable mousewheel on input number field when in focus
|
||||
$('form').on('focus', 'input[type=number]', function (e) {
|
||||
$(this).on('wheel.disableScroll', function (e) {
|
||||
e.preventDefault();
|
||||
})
|
||||
});
|
||||
$('form').on('blur', 'input[type=number]', function (e) {
|
||||
$(this).off('wheel.disableScroll');
|
||||
});
|
||||
|
||||
function updatePops() {
|
||||
var network_id = $("#network_id").val();
|
||||
if(!network_id) {
|
||||
return true;
|
||||
}
|
||||
// get new pops
|
||||
$.get("<?=self::getUrl("Pop","Api")?>",
|
||||
{
|
||||
"do": "getPops",
|
||||
network_id: network_id
|
||||
},
|
||||
function(success) {
|
||||
if(success.status == "OK") {
|
||||
//console.log(success);
|
||||
var pops = success.result.pops;
|
||||
if(typeof pops !== 'object' || pops === null) {
|
||||
return true;
|
||||
}
|
||||
var selected = $("#pop_id option:selected").val();
|
||||
$("#pop_id option:gt(0)").remove();
|
||||
for(var pop_id in pops) {
|
||||
$("#pop_id").append($("<option></option>").attr("value", pop_id).text(pops[pop_id]));
|
||||
}
|
||||
if(selected) {
|
||||
$("#pop_id").val(selected);
|
||||
}
|
||||
}
|
||||
},
|
||||
'json'
|
||||
);
|
||||
}
|
||||
|
||||
function updateSections() {
|
||||
var network_id = $("#network_id").val();
|
||||
if(!network_id) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$.get("<?=self::getUrl("Networksection","Api")?>",
|
||||
{
|
||||
"do": "getSections",
|
||||
network_id: network_id
|
||||
},
|
||||
function(success) {
|
||||
if(success.status == "OK") {
|
||||
var sections = success.result.sections;
|
||||
if(typeof sections !== 'object' || sections === null) {
|
||||
return true;
|
||||
}
|
||||
var selected = $("#networksection_id option:selected").val();
|
||||
$("#networksection_id option:gt(0)").remove();
|
||||
for(var section_id in sections) {
|
||||
$("#networksection_id").append($("<option></option>").attr("value", section_id).text(sections[section_id]));
|
||||
}
|
||||
console.log("selected: " + selected);
|
||||
if(selected) {
|
||||
$("#networksection_id").val(selected);
|
||||
}
|
||||
}
|
||||
},
|
||||
'json'
|
||||
);
|
||||
}
|
||||
|
||||
function updatePermissions() {
|
||||
var network_id = $("#network_id").val();
|
||||
if(!network_id) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var types = ["lineworker", "pipeworker"];
|
||||
|
||||
$.get("<?=self::getUrl("Network","Api")?>",
|
||||
{
|
||||
"do": "getPermissions",
|
||||
network_id: network_id,
|
||||
types: types.join('|')
|
||||
},
|
||||
function(success) {
|
||||
if(success.status == "OK") {
|
||||
var perms = success.result.permissions;
|
||||
if(typeof perms !== 'object' || perms === null) {
|
||||
return true;
|
||||
}
|
||||
types.forEach(function(type) {
|
||||
var selected = $("#" + type + "_id option:selected").val();
|
||||
$("#" + type + "_id").empty();
|
||||
$("#" + type + "_id").append($("<option></option>"));
|
||||
for(var perm_id in perms[type]) {
|
||||
$("#" + type + "_id").append($("<option></option>").attr("value", perm_id).text(perms[type][perm_id]));
|
||||
}
|
||||
if(selected) {
|
||||
$("#" + type + "_id").val(selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
'json'
|
||||
);
|
||||
}
|
||||
|
||||
function enableGpsInputs() {
|
||||
$("#gps_lat").removeAttr("readonly");
|
||||
$("#gps_long").removeAttr("readonly");
|
||||
$("#edit-gps").remove();
|
||||
}
|
||||
|
||||
function showGpsAgain() {
|
||||
$("#gps-again").show();
|
||||
$("#gps-again input[type=checkbox").prop("checked", true);
|
||||
}
|
||||
|
||||
|
||||
<?php if($building->gps_lat && $building->gps_long): ?>
|
||||
////////////
|
||||
// Map
|
||||
////////////
|
||||
var gpslat = <?=($building->gps_lat) ? $building->gps_lat : 0?>;
|
||||
var gpslong = <?=($building->gps_long) ? $building->gps_long : 0?>;
|
||||
console.log(gpslat + "," + gpslong);
|
||||
|
||||
// Building Map
|
||||
var buildingMap = L.map('building-map').setView([gpslat, gpslong], 18);
|
||||
|
||||
L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}', {
|
||||
//L.tileLayer('<?=self::getResourcePath()?>assets/map/{id}/{z}/{x}/{y}.png', {
|
||||
attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',
|
||||
minZoom: 12,
|
||||
maxZoom: 22,
|
||||
//id: 'OSMPublicTransport',
|
||||
//id: 'mapbox.streets',
|
||||
id: 'mapbox/streets-v11',
|
||||
//id: 'mapbox.pirates',
|
||||
accessToken: '<?=TT_MAPBOX_TILE_API_TOKEN?>'
|
||||
}).addTo(buildingMap);
|
||||
|
||||
var marker = L.marker([gpslat, gpslong]).addTo(buildingMap);
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
$("#street, #zip, #city").change(function() {
|
||||
showGpsAgain();
|
||||
});
|
||||
|
||||
$("#edit-gps").click( function() {
|
||||
enableGpsInputs();
|
||||
});
|
||||
|
||||
$("#network_id").change(function() {
|
||||
updatePops();
|
||||
updatePermissions();
|
||||
updateSections();
|
||||
});
|
||||
|
||||
$( document ).ready(function() {
|
||||
updatePops();
|
||||
updatePermissions();
|
||||
updateSections();
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
||||
@@ -1,397 +0,0 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/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")?>">the-tool</a></li>
|
||||
<li class="breadcrumb-item active">Objekte</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Objekte</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("Building")?>">
|
||||
<div class="row">
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_network_id">Netzgebiet</label>
|
||||
<select name="filter[network_id]" id="filter_network_id" class="form-control">
|
||||
<option></option>
|
||||
<?php foreach($mynetworks as $fnet): ?>
|
||||
<option value="<?=$fnet->id?>" <?=($filter['network_id'] == $fnet->id) ? "selected='selected'" : ""?>><?=$fnet->name?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_networksection_id">Bauabschnitt</label>
|
||||
<select name="filter[networksection_id]" id="filter_networksection_id" class="form-control">
|
||||
<option></option>
|
||||
<?php foreach($mynetworks as $fnet): ?>
|
||||
<?php if(is_array($fnet->sections) && count($fnet->sections)): ?>
|
||||
<optgroup label="<?=$fnet->name?>">
|
||||
<?php foreach($fnet->sections as $section): ?>
|
||||
<option value="<?=$section->id?>" <?=($filter['networksection_id'] == $section->id) ? "selected='selected'" : ""?>><?=$section->name?></option>
|
||||
<?php endforeach; ?>
|
||||
</optgroup>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_status_id">Objektstatus</label>
|
||||
<select name="filter[status_id]" id="filter_status_id" class="form-control">
|
||||
<option></option>
|
||||
<?php foreach(BuildingstatusModel::getAll() as $status): ?>
|
||||
<option
|
||||
value="<?=$status->id?>"
|
||||
<?php if(is_array($filter)): ?>
|
||||
<?=($filter['status_id'] == $status->id) ? "selected='selected'" : ""?>
|
||||
<?php else: ?>
|
||||
<?=(($me->is("pipeworker") && !$me->isAdmin()) && $status->id == 3) ? "selected='selected'" : ""?>
|
||||
<?php endif; ?>
|
||||
>
|
||||
<?=$status->code?> - <?=__($status->name."-b")?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_code">Objekt ID</label>
|
||||
<input type="text" class="form-control" name="filter[code]" id="filter_code" value="<?=$filter['code']?>" />
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_street">Straße</label>
|
||||
<input type="text" class="form-control" name="filter[street]" id="filter_street" value="<?=$filter['street']?>" />
|
||||
</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("Building")?>">Filter zurücksetzen</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
<div class="float-left">
|
||||
<h4 class="header-title">Liste aller Objekte</h4>
|
||||
</div>
|
||||
<div class="float-right">
|
||||
<a class="btn btn-primary mb-2" href="<?=self::getUrl("Building", "add")?>"><i class="fas fa-plus"></i> Neues Objekt anlegen</a>
|
||||
</div>
|
||||
|
||||
<?php if($pagination['maxItems'] > $pagination['count']): ?>
|
||||
<nav>
|
||||
<ul class="pagination justify-content-center mb-1">
|
||||
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod, "Index", ["filter" => $filter])?>" tabindex="-1">Erste</a>
|
||||
</li>
|
||||
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $pagination['start'] - $pagination['count'], "filter" => $filter])?>" tabindex="-1">Zurück</a>
|
||||
</li>
|
||||
<?php for($i = 0; $i < ($pagination['maxItems'] / $pagination['count']); $i++): ?>
|
||||
<li class="page-item <?=($pagination['start'] == $i*$pagination['count']) ? "disabled font-weight-bold" : ""?>"><a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $i*$pagination['count'], "filter" => $filter])?>"><?=$i+1?></a></li>
|
||||
<?php endfor; ?>
|
||||
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $pagination['start'] + $pagination['count'], "filter" => $filter])?>">Vor</a>
|
||||
</li>
|
||||
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => ($pagination['maxItems'] - $pagination['maxItems'] % $pagination['count']), "filter" => $filter])?>">Letzte</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
<div class="pagination justify-content-center">
|
||||
<?php if($pagination['maxItems']): ?>
|
||||
Objekte <?=$pagination['start']+1?> bis <?=($pagination['start'] + $pagination['count'] > $pagination['maxItems']) ? $pagination['maxItems'] : $pagination['start'] + $pagination['count']?> von <?=$pagination['maxItems']?>
|
||||
<?php else: ?>
|
||||
Keine Objekte gefunden
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<table class="table table-striped table-hover">
|
||||
<tr>
|
||||
<th>Netzgebiet</th>
|
||||
<th>POP</th>
|
||||
<th>Typ</th>
|
||||
<th>Objekt ID</th>
|
||||
<th>OAN ID</th>
|
||||
<th>Adresse</th>
|
||||
<th>Einheiten</th>
|
||||
<th>Status</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php foreach($buildings as $building): ?>
|
||||
<tr class="building-list-tr" id="building-<?=$building->id?>">
|
||||
<td onclick="toggleBuilding(<?=$building->id?>)"><?=$building->network->name?></td>
|
||||
<td onclick="toggleBuilding(<?=$building->id?>)"><?=$building->pop->name?></td>
|
||||
<td onclick="toggleBuilding(<?=$building->id?>)"><?=$building->type->name?></td>
|
||||
<td onclick="toggleBuilding(<?=$building->id?>)"><?=$building->code?></td>
|
||||
<td onclick="toggleBuilding(<?=$building->id?>)"><?=$building->oan_id?></td>
|
||||
<td onclick="toggleBuilding(<?=$building->id?>)">
|
||||
<?=$building->street?><br />
|
||||
<?=$building->zip?> <?=$building->city?>
|
||||
</td>
|
||||
<td onclick="toggleBuilding(<?=$building->id?>)"><?=$building->units?></td>
|
||||
<td onclick="toggleBuilding(<?=$building->id?>)" class="text-monospace"><?=__($building->status->name."-b")?></td>
|
||||
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||
<a href="<?=self::getUrl("Building", "edit", ["id" => $building->id])?>"><i class="far fa-edit" title="Objekt Bearbeiten"></i></a>
|
||||
<a href="<?=self::getUrl("Building", "delete", ["id" => $building->id])?>" class="text-danger" onclick="if(!confirm('Objekt wirklich löschen?')) return false;" title="Objekt Löschen"><i class="fas fa-trash"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="building-detail-<?=$building->id?>" style="display:none; background-color:#fff">
|
||||
<td colspan="8">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title">Anschlüsse im Objekt <strong><?=$building->code?></strong></h4>
|
||||
<p>
|
||||
<?=$building->street?><br />
|
||||
<?=$building->zip?> <?=$building->city?>
|
||||
</p>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<?php if(is_array($building->terminations) && count($building->terminations)): ?>
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th>Anschluss ID</th>
|
||||
<th>Bezeichung</th>
|
||||
<th>Kontakt</th>
|
||||
<th>Telefon</th>
|
||||
<th>Email</th>
|
||||
<th>Status</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php foreach($building->terminations as $term): ?>
|
||||
|
||||
<tr>
|
||||
<td><?=$term->code?></td>
|
||||
<td>
|
||||
|
||||
<span id="term-name-<?=$term->id?>-text"><?=$term->name?></span>
|
||||
<div class="input-group" id="term-name-<?=$term->id?>-input" style="display:none">
|
||||
<input type="text" class="form-control" id="term-name-<?=$term->id?>-input" value="<?=$term->name?>" />
|
||||
<div class="input-group-append">
|
||||
<button type="button" class="btn btn-primary" title="Speichern" onclick="saveTerminationControl(<?=$term->id?>, 'name')"><i class="fas fa-check"></i></button>
|
||||
<button type="button" class="btn btn-secondary" title="Abbrechen" onclick="toggleTerminationControl(<?=$term->id?>, 'name')"><i class="fas fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="float-right" id="term-name-<?=$term->id?>-edit">
|
||||
<i class="far fa-edit text-pink" style="cursor:pointer" title="Bezeichnung Bearbeiten" onclick="toggleTerminationControl(<?=$term->id?>, 'name')"></i>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<span id="term-contact-<?=$term->id?>-text"><?=$term->contact?></span>
|
||||
<div class="input-group" id="term-contact-<?=$term->id?>-input" style="display:none">
|
||||
<input type="text" class="form-control" value="<?=$term->contact?>" />
|
||||
<div class="input-group-append">
|
||||
<button type="button" class="btn btn-primary" title="Speichern" onclick="saveTerminationControl(<?=$term->id?>, 'contact')"><i class="fas fa-check"></i></button>
|
||||
<button type="button" class="btn btn-secondary" title="Abbrechen" onclick="toggleTerminationControl(<?=$term->id?>, 'contact')"><i class="fas fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="float-right" id="term-contact-<?=$term->id?>-edit">
|
||||
<i class="far fa-edit text-pink" style="cursor:pointer" title="Kontakt Bearbeiten" onclick="toggleTerminationControl(<?=$term->id?>, 'contact')"></i>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<span id="term-phone-<?=$term->id?>-text"><?=$term->phone?></span>
|
||||
<div class="input-group" id="term-phone-<?=$term->id?>-input" style="display:none">
|
||||
<input type="text" class="form-control" value="<?=$term->phone?>" />
|
||||
<div class="input-group-append">
|
||||
<button type="button" class="btn btn-primary" title="Speichern" onclick="saveTerminationControl(<?=$term->id?>, 'phone')"><i class="fas fa-check"></i></button>
|
||||
<button type="button" class="btn btn-secondary" title="Abbrechen" onclick="toggleTerminationControl(<?=$term->id?>, 'phone')"><i class="fas fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="float-right" id="term-phone-<?=$term->id?>-edit">
|
||||
<i class="far fa-edit text-pink" style="cursor:pointer" title="Telefon Bearbeiten" onclick="toggleTerminationControl(<?=$term->id?>, 'phone')"></i>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<span id="term-email-<?=$term->id?>-text"><?=$term->email?></span>
|
||||
<div class="input-group" id="term-email-<?=$term->id?>-input" style="display:none">
|
||||
<input type="text" class="form-control" value="<?=$term->email?>" />
|
||||
<div class="input-group-append">
|
||||
<button type="button" class="btn btn-primary" title="Speichern" onclick="saveTerminationControl(<?=$term->id?>, 'email')"><i class="fas fa-check"></i></button>
|
||||
<button type="button" class="btn btn-secondary" title="Abbrechen" onclick="toggleTerminationControl(<?=$term->id?>, 'email')"><i class="fas fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="float-right" id="term-email-<?=$term->id?>-edit">
|
||||
<i class="far fa-edit text-pink" style="cursor:pointer" title="Email Bearbeiten" onclick="toggleTerminationControl(<?=$term->id?>, 'email')"></i>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
<td class="text-monospace"><?=__($term->status->name."-t")?></td>
|
||||
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||
<a href="<?=self::getUrl("Termination", "delete", ["id" => $term->id])?>" class="text-danger" onclick="if(!confirm('Objekt wirklich löschen?')) return false;" title="Objekt Löschen"><i class="fas fa-trash"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
||||
<?php endif; ?>
|
||||
<h4>Neuer Anschluss</h4>
|
||||
<form method="post" action="<?=self::getUrl("Termination", "save")?>">
|
||||
<input type="hidden" name="building_id" value="<?=$building->id?>" />
|
||||
<table class="table tale-bordered">
|
||||
<tr>
|
||||
<td><input type="text" class="form-control" value="<automatisch generiert>" disabled="disabled" /></td>
|
||||
<td><input type="text" class="form-control" name="name" value="" placeholder="Bezeichnung" /></td>
|
||||
<td><input type="text" class="form-control" name="contact" value="" placeholder="Kontakt" /></td>
|
||||
<td><input type="text" class="form-control" name="phone" value="" placeholder="Telefon" /></td>
|
||||
<td><input type="text" class="form-control" name="email" value="" placeholder="Email" /></td>
|
||||
<td><button type="submit" class="btn btn-primary">Speichern</button></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="display:none;">
|
||||
<td colspan="3"></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
||||
<div class="pagination justify-content-center">
|
||||
<?php if($pagination['maxItems']): ?>
|
||||
Objekte <?=$pagination['start']+1?> bis <?=($pagination['start'] + $pagination['count'] > $pagination['maxItems']) ? $pagination['maxItems'] : $pagination['start'] + $pagination['count']?> von <?=$pagination['maxItems']?>
|
||||
<?php else: ?>
|
||||
Keine Objekte gefunden
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php if($pagination['maxItems'] > $pagination['count']): ?>
|
||||
<nav>
|
||||
<ul class="pagination justify-content-center mb-1">
|
||||
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod, "Index", ["filter" => $filter])?>" tabindex="-1">Erste</a>
|
||||
</li>
|
||||
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $pagination['start'] - $pagination['count'], "filter" => $filter])?>" tabindex="-1">Zurück</a>
|
||||
</li>
|
||||
<?php for($i = 0; $i < ($pagination['maxItems'] / $pagination['count']); $i++): ?>
|
||||
<li class="page-item <?=($pagination['start'] == $i*$pagination['count']) ? "disabled font-weight-bold" : ""?>"><a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $i*$pagination['count'], "filter" => $filter])?>"><?=$i+1?></a></li>
|
||||
<?php endfor; ?>
|
||||
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $pagination['start'] + $pagination['count'], "filter" => $filter])?>">Vor</a>
|
||||
</li>
|
||||
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => ($pagination['maxItems'] - $pagination['maxItems'] % $pagination['count']), "filter" => $filter])?>">Letzte</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function toggleBuilding(id) {
|
||||
$('#building-detail-' + id).toggle();
|
||||
if($('#building-detail-' + id).is(":hidden")) {
|
||||
$('#building-' + id).removeClass("table-info");
|
||||
$('#building-' + id).removeClass("text-info");
|
||||
} else {
|
||||
$('#building-' + id).addClass("text-info");
|
||||
$('#building-' + id).addClass("table-info");
|
||||
}
|
||||
}
|
||||
|
||||
function toggleTerminationControl(id, type) {
|
||||
$("#term-" + type + "-" + id + "-text").toggle();
|
||||
$("#term-" + type + "-" + id + "-input").toggle();
|
||||
$("#term-" + type + "-" + id + "-edit").toggle();
|
||||
}
|
||||
|
||||
function saveTerminationControl(id, type) {
|
||||
if(!Number.isInteger(id) || id < 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var value = $("#term-" + type + "-" + id + "-input input[type=text]").val();
|
||||
|
||||
$.post("<?=self::getUrl("Termination","Api")?>",
|
||||
{
|
||||
'do': "setValue",
|
||||
id: id,
|
||||
type: type,
|
||||
value: value
|
||||
},
|
||||
function(success) {
|
||||
if(success.status == "OK") {
|
||||
$("#term-" + type + "-" + id + "-text").text(value);
|
||||
} else {
|
||||
console.log("error saving (" + type + ", '" + value + "')");
|
||||
}
|
||||
|
||||
toggleTerminationControl(id, type);
|
||||
},
|
||||
'json');
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
var building;
|
||||
var hash = window.location.hash.substr(1);
|
||||
var match = hash.match(/building=(\d+)/);
|
||||
if(match && match[1]) {
|
||||
building = match[1]
|
||||
toggleBuilding(building);
|
||||
|
||||
//$('body').scrollTop($('#building-' + building).offset() - 50);
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
||||
@@ -1,378 +0,0 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/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")?>">the-tool</a></li>
|
||||
<li class="breadcrumb-item active">CPE Provisioning</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">CPE Provisioning</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("Cpeprovisioning")?>">
|
||||
<div class="row">
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_network_id">Netzgebiet</label>
|
||||
<select name="filter[network_id]" id="filter_network_id" class="form-control">
|
||||
<option></option>
|
||||
<?php foreach(NetworkModel::getAll() as $fnet): ?>
|
||||
<option value="<?=$fnet->id?>" <?=($filter['network_id'] == $fnet->id) ? "selected='selected'" : ""?>><?=$fnet->name?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_routerconfig_finished">Provisioningstatus</label>
|
||||
<select name="filter[routerconfig_finished]" id="filter_routerconfig_finished" class="form-control">
|
||||
<option value="0" <?=($filter['routerconfig_finished'] == 0) ? "selected='selected'" : ""?>>Offen</option>
|
||||
<option value="1" <?=($filter['routerconfig_finished'] == 1) ? "selected='selected'" : ""?>>Abgeschlossen</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_hide_delayed_finish">Verzögerte Herstellung</label>
|
||||
<select name="filter[hide_delayed_finish]" id="filter_hide_delayed_finish" class="form-control">
|
||||
<option value="0" <?=(array_key_exists("hide_delayed_finish", $filter) &&$filter['hide_delayed_finish'] != 1) ? "selected='selected'" : ""?>>Anzeigen</option>
|
||||
<option value="1" <?=(!array_key_exists("hide_delayed_finish", $filter) || $filter['hide_delayed_finish'] == 1) ? "selected='selected'" : ""?>>Nicht anzeigen</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_owner">Kunde</label>
|
||||
<input type="text" class="form-control" name="filter[owner]" id="filter_owner" value="<?=$filter['owner']?>" />
|
||||
</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("Cpeprovisioning")?>">Filter zurücksetzen</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
<div class="float-left">
|
||||
<h4 class="header-title">CPE Provisioning</h4>
|
||||
</div>
|
||||
|
||||
<div class="pagination justify-content-center">
|
||||
<?php if(count($products)): ?>
|
||||
Zu provisionierende CPEs 1 bis <?=count($products)?>
|
||||
<?php else: ?>
|
||||
Keine zu provisionierende CPEs gefunden
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<table class="table">
|
||||
<?php $prov_count = 0; ?>
|
||||
<?php foreach($products as $product): ?>
|
||||
<tr class="<?=($prov_count % 2 == 0) ? "table-bg-even" : "table-bg-odd"?> bottom-no-border">
|
||||
<th>Netzgebiet</th>
|
||||
<th>Service PIN</th>
|
||||
<th>Kunde</th>
|
||||
<th>Produkt</th>
|
||||
<th>Access Type</th>
|
||||
<th>VLANs</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tr class="<?=($prov_count % 2 == 0) ? "table-bg-even" : "table-bg-odd"?> top-no-border bottom-no-border">
|
||||
<td class="pb-0">
|
||||
<?=($product->termination_id) ? $product->termination->building->network->name : $product->order->owner->zip." ".$product->order->owner->city?>
|
||||
</td>
|
||||
<td class="text-pink pb-0"><?=$product->order->owner->spin?></td>
|
||||
<td class="pb-0"><?=$product->order->owner->getCompanyOrName()?></td>
|
||||
<td class="pb-0"><?=$product->product->name?><?=($product->termination_id) ? " <small class='text-pink'>".$product->termination->code."</small>" : ""?></td>
|
||||
<td class="pb-0"><?=$product->product->attributes['bras_type']->value?> - Down: <?=$product->product->attributes["bw_down"]->value?> / Up: <?=$product->product->attributes["bw_up"]->value?></td>
|
||||
<td class="text-monospace pb-0">
|
||||
<?php if($product->termination_id): ?>
|
||||
<?php if($product->termination->getPop()->vlan_public): ?>
|
||||
<label class="order-date-pill active pointer mb-0">
|
||||
Public: <strong><?=$product->termination->getPop()->vlan_public?></strong>
|
||||
<input type="checkbox" name="vlan_public" form="cpeprovform-<?=$product->id?>" value="<?=$product->termination->getPop()->vlan_public?>" <?=($product->cpeprovisioning->vlan_public) ? "checked='checked'" : ""?> />
|
||||
</label>
|
||||
<?php endif; ?>
|
||||
<?php if($product->termination->getPop()->vlan_nat): ?>
|
||||
<label class="order-date-pill active pointer mb-0">
|
||||
NAT: <strong><?=$product->termination->getPop()->vlan_nat?></strong>
|
||||
<input type="checkbox" name="vlan_nat" form="cpeprovform-<?=$product->id?>" value="<?=$product->termination->getPop()->vlan_nat?>" <?=($product->cpeprovisioning->vlan_nat) ? "checked='checked'" : ""?> />
|
||||
</label>
|
||||
<?php endif; ?>
|
||||
<?php if($product->termination->getPop()->vlan_ipv6): ?>
|
||||
<label class="order-date-pill active pointer mb-0">
|
||||
IPv6: <strong><?=$product->termination->getPop()->vlan_ipv6?></strong>
|
||||
<input type="checkbox" name="vlan_ipv6" form="cpeprovform-<?=$product->id?>" value="<?=$product->termination->getPop()->vlan_ipv6?>" <?=($product->cpeprovisioning->vlan_ipv6) ? "checked='checked'" : ""?> />
|
||||
</label>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php if($product->product->attributes['vlan_default_public']->value): ?>
|
||||
<label class="order-date-pill active pointer mb-0">
|
||||
Public: <strong><?=$product->product->attributes['vlan_default_public']->value?></strong>
|
||||
<input type="checkbox" name="vlan_public" form="cpeprovform-<?=$product->id?>" value="<?=$product->product->attributes['vlan_default_public']->value?>" <?=($product->cpeprovisioning->vlan_public) ? "checked='checked'" : ""?> />
|
||||
</label>
|
||||
<?php endif; ?>
|
||||
<?php if($product->product->attributes['vlan_default_nat']->value): ?>
|
||||
<label class="order-date-pill active pointer mb-0">
|
||||
NAT: <strong><?=$product->product->attributes['vlan_default_nat']->value?></strong>
|
||||
<input type="checkbox" name="vlan_nat" form="cpeprovform-<?=$product->id?>" value="<?=$product->product->attributes['vlan_default_nat']->value?>" <?=($product->cpeprovisioning->vlan_public) ? "checked='checked'" : ""?> />
|
||||
</label>
|
||||
<?php endif; ?>
|
||||
<?php if($product->product->attributes['vlan_default_ipv6']->value): ?>
|
||||
<label class="order-date-pill active pointer mb-0">
|
||||
IPv6: <strong><?=$product->product->attributes['vlan_default_ipv6']->value?></strong>
|
||||
<input type="checkbox" name="vlan_ipv6" form="cpeprovform-<?=$product->id?>" value="<?=$product->product->attributes['vlan_default_ipv6']->value?>" <?=($product->cpeprovisioning->vlan_public) ? "checked='checked'" : ""?> />
|
||||
</label>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="pb-0" style="min-width: 180px; font-size: 1.1em;">
|
||||
<?php
|
||||
|
||||
$vot = false;
|
||||
$vo_termin = false;
|
||||
$hw = false;
|
||||
$voip = false;
|
||||
|
||||
foreach($product->order->products as $prod) {
|
||||
if(is_array($prod->product->attributes) && count($prod->product->attributes)) {
|
||||
if(array_key_exists("hw_only", $prod->product->attributes)) {
|
||||
if($prod->product->attributes["hw_only"]->value) {
|
||||
$hw[] = (int)$prod->amount."x ".$prod->product->name;
|
||||
}
|
||||
}
|
||||
if(array_key_exists("voip_chan", $prod->product->attributes)) {
|
||||
if($prod->product->attributes["voip_chan"]->value) {
|
||||
$voip = true;
|
||||
}
|
||||
}
|
||||
if(array_key_exists("vot", $prod->product->attributes)) {
|
||||
if($prod->product->attributes["vot"]->value) {
|
||||
$vot = true;
|
||||
}
|
||||
}
|
||||
if($product->order->install_date) {
|
||||
$vo_termin = $product->order->install_date;
|
||||
}
|
||||
if($hw && $voip_chan) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?=($vot || $vo_termin) ? "<i class='fas fa-tools text-purple mr-2' data-toggletooltip='tooltip' title='Vorortinstallation'></i>" : ""?>
|
||||
<?=($hw) ? "<a href='#' class='fas fa-shopping-bag text-purple mr-2' onclick='return false;' title='Zusatzprodukte' data-toggle='popover' data-placement='top' data-content='".implode("<br />",$hw)."' ></a>" : ""?>
|
||||
<?=($voip) ? "<i class='fas fa-phone text-purple mr-2' data-toggletooltip='tooltip' title='Voice Produkt vorhanden'></i>" : ""?>
|
||||
<?=($product->order->note) ? "<a href='#' class='fas fa-clipboard-list text-purple' onclick='return false;' data-toggle='popover' data-placement='top' data-content='".str_replace('"', '"', str_replace("\n",'<br />',$product->order->note))."'></a>" : ""?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="<?=($prov_count % 2 == 0) ? "table-bg-even" : "table-bg-odd"?> bottom-no-border top-no-border">
|
||||
<td>
|
||||
<?php if($product->termination_id && $product->termination->getPop()): ?>
|
||||
<strong>POP</strong>: <?=$product->termination->getPop()->name?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><strong>Telefon:</strong> <?=$product->order->owner->phone?></td>
|
||||
|
||||
<td><strong>Email:</strong> <?=$product->order->owner->email?></td>
|
||||
<td><a target="_blank" href="<?=self::getUrl("Order", "Index", ["id" => $product->order_id, "addJournal" => 1])?>"><i class="fas fa-scroll"></i> Bestelljournal</a></td>
|
||||
<td colspan="3"></td>
|
||||
|
||||
<tr class="<?=($prov_count % 2 == 0) ? "table-bg-even" : "table-bg-odd"?> bottom-no-border">
|
||||
<td colspan="6">
|
||||
|
||||
<form method="post" id="cpeprovform-<?=$product->id?>" action="<?=self::getUrl("Cpeprovisioning", "Save", ["filter" => $filter])?>">
|
||||
<input type="hidden" name="id" value="<?=$product->cpeprovisioning->id?>" />
|
||||
<input type="hidden" name="order_id" value="<?=$product->order_id?>" />
|
||||
<input type="hidden" name="orderproduct_id" value="<?=$product->id?>" />
|
||||
<input type="hidden" name="termination_id" value="<?=$product->termination_id?>" />
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="routertype-<?=$product->id?>">Router</label>
|
||||
<select class="form-control" name="routertype" id="routertype-<?=$product->id?>">
|
||||
<option></option>
|
||||
<option value="eigener Router" <?=($product->cpeprovisioning->routertype == "eigener Router") ? "selected='selected'" : ""?>>Eigener Router</option>
|
||||
<option value="anderes CPE" <?=($product->cpeprovisioning->routertype == "anderes CPE") ? "selected='selected'" : ""?>>Anderes CPE</option>
|
||||
<?php if(preg_match('/^(pppoe|dhcp)$/', $product->product->attributes['bras_type']->value)): ?>
|
||||
<option value="TP-Link Archer C80" <?=($product->cpeprovisioning->routertype == "TP-Link Archer C80") ? "selected='selected'" : ""?>>TP-Link Archer C80 (Inet, IPTV)</option>
|
||||
<option value="FritzBox 4040" <?=($product->cpeprovisioning->routertype == "FritzBox 4040") ? "selected='selected'" : ""?>>FritzBox 4040 (Inet, IPTV)</option>
|
||||
<option value="FritzBox 7530" <?=($product->cpeprovisioning->routertype == "FritzBox 7530") ? "selected='selected'" : ""?>>FritzBox 7530 (Inet, Phone, IPTV)</option>
|
||||
<option value="FritzBox 7590" <?=($product->cpeprovisioning->routertype == "FritzBox 7590") ? "selected='selected'" : ""?>>FritzBox 7590 (Inet, Phone, IPTV)</option>
|
||||
<?php elseif($product->product->attributes['bras_type']->value = "static"): ?>
|
||||
<option value="Mikrotik HAP AC" <?=($product->cpeprovisioning->routertype == "Mikrotik HAP AC") ? "selected='selected'" : ""?>>Mikrotik HAP AC (Inet, IPTV)</option>
|
||||
<option value="Mikrotik HEX S" <?=($product->cpeprovisioning->routertype == "Mikrotik HEX S") ? "selected='selected'" : ""?>>Mikrotik HEX S (Inet, IPTV)</option>
|
||||
<option value="Mikrotik RB3011" <?=($product->cpeprovisioning->routertype == "Mikrotik RB3011") ? "selected='selected'" : ""?>>Mikrotik RB3011 (Inet, IPTV)</option>
|
||||
<?php elseif($product->product->attributes['bras_type']->value == "cmts"): ?>
|
||||
<option value="FritzBox 6490 Cable" <?=($product->cpeprovisioning->routertype == "FritzBox 6490 Cable") ? "selected='selected'" : ""?>>FritzBox 6490 Cable (Inet, Phone, IPTV)</option>
|
||||
<?php endif; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="wifi_ssid-<?=$product->id?>">WLAN SSID</label>
|
||||
<input class="form-control" type="text" name="wifi_ssid" id="router_wifi_ssid-<?=$product->id?>" value="<?=$product->cpeprovisioning->wifi_ssid?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="wifi_pass-<?=$product->id?>">WPA Key</label>
|
||||
<input class="form-control" type="text" name="wifi_pass" id="router_wifi_pass-<?=$product->id?>" value="<?=$product->cpeprovisioning->wifi_pass?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if($vot || $vo_termin): ?>
|
||||
<div class="col-md-5"></div>
|
||||
<?php else: ?>
|
||||
<div class="col-md-1">
|
||||
<div class="form-group text-center">
|
||||
<label class="form-label" for="shipping-<?=$product->id?>">Versandauftrag</label>
|
||||
<input class="form-control" type="checkbox" value="1" name="shipping" id="shipping-<?=$product->id?>" <?=($vot) ? "disabled='disabled' title='Vorortinstallation bestellt'" : ""?> <?=($product->cpeprovisioning->shipping) ? "checked='checked'" : ""?> />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-1">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="ship_weight-<?=$product->id?>">Gewicht</label>
|
||||
<input class="form-control" type="text" name="ship_weight" id="ship_weight-<?=$product->id?>" value="<?=$product->cpeprovisioning->ship_weight?>" <?=($vot) ? "disabled='disabled' title='Vorortinstallation bestellt'" : ""?> />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="ship_length-<?=$product->id?>">Länge</label>
|
||||
<input class="form-control" type="text" name="ship_length" id="ship_length-<?=$product->id?>" value="<?=$product->cpeprovisioning->ship_length?>" <?=($vot) ? "disabled='disabled' title='Vorortinstallation bestellt'" : ""?> />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="ship_width-<?=$product->id?>">Breite</label>
|
||||
<input class="form-control" type="text" name="ship_width" id="ship_width-<?=$product->id?>" value="<?=$product->cpeprovisioning->ship_width?>" <?=($vot) ? "disabled='disabled' title='Vorortinstallation bestellt'" : ""?> />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="ship_height-<?=$product->id?>">Höhe</label>
|
||||
<input class="form-control" type="text" name="ship_height" id="ship_height-<?=$product->id?>" value="<?=$product->cpeprovisioning->ship_height?>" <?=($vot) ? "disabled='disabled' title='Vorortinstallation bestellt'" : ""?> />
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<div class="col-md-1">
|
||||
<div class="form-group text-center">
|
||||
<label class="form-label text-success" for="routerconfig_finished-<?=$product->id?>">Routerkonfig <i class="fas fa-check"></i></label>
|
||||
<input class="form-control" type="checkbox" value="1" name="routerconfig_finished" id="routerconfig_finished-<?=$product->id?>" <?=($product->cpeprovisioning->routerconfig_finished) ? "checked='checked'" : ""?> />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="<?=($prov_count % 2 == 0) ? "table-bg-even" : "table-bg-odd"?> top-no-border">
|
||||
<td colspan="6">
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="mac-<?=$product->id?>">Router MAC Adresse</label>
|
||||
<input class="form-control" form="cpeprovform-<?=$product->id?>" type="text" name="mac" id="mac-<?=$product->id?>" value="<?=$product->cpeprovisioning->mac?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<?php if($product->termination_id): ?>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="mac-<?=$product->id?>">ONT montiert / ONT SN</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<?php if($product->termination->getWorkflowValue("ont_deployed", "int")): ?>
|
||||
<button type="button" class="btn btn-outline-success" disabled="disabled"><i class="fas fa-check"></i></button>
|
||||
<?php else: ?>
|
||||
<button type="button" class="btn btn-outline-secondary" disabled="disabled"><i class="fas fa-times"></i></button>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<input class="form-control" form="cpeprovform-<?=$product->id?>" type="text" name="ont_sn" id="ont_sn-<?=$product->id?>" value="<?=($product->termination_id) ? $product->termination->getWorkflowValue("ont_sn", "string") : ""?>" />
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-1"></div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="note-<?=$product->id?>">Kommentar</label>
|
||||
<textarea class="form-control" form="cpeprovform-<?=$product->id?>" name="note" id="note-<?=$product->id?>"><?=htmlentities($product->cpeprovisioning->note)?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1"></div>
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label class="form-label"> </label>
|
||||
<button class="form-control btn btn-primary" form="cpeprovform-<?=$product->id?>" type="submit"><i class="fas fa-save"></i> Speichern</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php $prov_count++ ?>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
||||
<div class="pagination justify-content-center">
|
||||
<?php if(count($products)): ?>
|
||||
Zu provisionierende CPEs 1 bis <?=count($products)?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(function () {
|
||||
$('[data-toggle="popover"]').popover({html: true})
|
||||
})
|
||||
});
|
||||
|
||||
$(function () {
|
||||
$('[data-toggletooltip="tooltip"]').tooltip({html: true})
|
||||
})
|
||||
</script>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
||||
@@ -1,126 +0,0 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/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")?>">the-tool</a></li>
|
||||
<li class="breadcrumb-item"><a href="<?=self::getUrl("Cpeshipping")?>">CPE Versand</a></li>
|
||||
<li class="breadcrumb-item active">Versand-CSV History</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">CPE Versand</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<a class="btn btn-warning" href="<?=self::getUrl("Cpeshipping")?>">Zurück zu CPE-Versand</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
<h4 class="header-title">Versand-CSVs</h4>
|
||||
|
||||
<?php if($pagination['maxItems'] > $pagination['count']): ?>
|
||||
<nav>
|
||||
<ul class="pagination justify-content-center mb-1">
|
||||
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod, "Index", ["filter" => $filter])?>" tabindex="-1">Erste</a>
|
||||
</li>
|
||||
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $pagination['start'] - $pagination['count'], "filter" => $filter])?>" tabindex="-1">Zurück</a>
|
||||
</li>
|
||||
<?php for($i = 0; $i < ($pagination['maxItems'] / $pagination['count']); $i++): ?>
|
||||
<li class="page-item <?=($pagination['start'] == $i*$pagination['count']) ? "disabled font-weight-bold" : ""?>"><a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $i*$pagination['count'], "filter" => $filter])?>"><?=$i+1?></a></li>
|
||||
<?php endfor; ?>
|
||||
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $pagination['start'] + $pagination['count'], "filter" => $filter])?>">Vor</a>
|
||||
</li>
|
||||
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => ($pagination['maxItems'] - $pagination['maxItems'] % $pagination['count']), "filter" => $filter])?>">Letzte</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
<div class="pagination justify-content-center">
|
||||
<?php if($pagination['maxItems']): ?>
|
||||
Versand-CSVs <?=$pagination['start']+1?> bis <?=($pagination['start'] + $pagination['count'] > $pagination['maxItems']) ? $pagination['maxItems'] : $pagination['start'] + $pagination['count']?> von <?=$pagination['maxItems']?>
|
||||
<?php else: ?>
|
||||
Keine Versand-CSVs gefunden
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<table class="table table-striped table-hover">
|
||||
<tr>
|
||||
<th>Dateiname</th>
|
||||
<th>Name</th>
|
||||
<th>Versandt von</th>
|
||||
</tr>
|
||||
<?php foreach($shippings as $s): ?>
|
||||
<tr>
|
||||
<td><a href="<?=self::getUrl("File", "download", ["id" => $s->file_id])?>"><?=$s->file->filename?></a></td>
|
||||
<td><?=$s->file->name?></td>
|
||||
<td><?=$s->creator->name?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
||||
<?php if($pagination['maxItems'] > $pagination['count']): ?>
|
||||
<nav>
|
||||
<ul class="pagination justify-content-center mb-1">
|
||||
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod, "Index", ["filter" => $filter])?>" tabindex="-1">Erste</a>
|
||||
</li>
|
||||
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $pagination['start'] - $pagination['count'], "filter" => $filter])?>" tabindex="-1">Zurück</a>
|
||||
</li>
|
||||
<?php for($i = 0; $i < ($pagination['maxItems'] / $pagination['count']); $i++): ?>
|
||||
<li class="page-item <?=($pagination['start'] == $i*$pagination['count']) ? "disabled font-weight-bold" : ""?>"><a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $i*$pagination['count'], "filter" => $filter])?>"><?=$i+1?></a></li>
|
||||
<?php endfor; ?>
|
||||
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $pagination['start'] + $pagination['count'], "filter" => $filter])?>">Vor</a>
|
||||
</li>
|
||||
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => ($pagination['maxItems'] - $pagination['maxItems'] % $pagination['count']), "filter" => $filter])?>">Letzte</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
<div class="pagination justify-content-center">
|
||||
<?php if($pagination['maxItems']): ?>
|
||||
Versand-CSVs <?=$pagination['start']+1?> bis <?=($pagination['start'] + $pagination['count'] > $pagination['maxItems']) ? $pagination['maxItems'] : $pagination['start'] + $pagination['count']?> von <?=$pagination['maxItems']?>
|
||||
<?php else: ?>
|
||||
Keine Versand-CSVs gefunden
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
var download_id;
|
||||
var hash = window.location.hash.substr(1);
|
||||
var match = hash.match(/download=(\d+)/);
|
||||
if(match && match[1]) {
|
||||
download_id = match[1]
|
||||
console.log("<?=self::getUrl("File", "download")?>?id=" + download_id);
|
||||
window.location.href="<?=self::getUrl("File", "download")?>?id=" + download_id;
|
||||
window.location.hash = "";
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
||||
@@ -1,174 +0,0 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/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")?>">the-tool</a></li>
|
||||
<li class="breadcrumb-item active">CPE Versand</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">CPE Versand</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<a class="btn btn-success" href="<?=self::getUrl("Cpeshipping/History")?>">History anzeigen</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
<h4 class="header-title">CPE Versand</h4>
|
||||
|
||||
<?php if($pagination['maxItems'] > $pagination['count']): ?>
|
||||
<nav>
|
||||
<ul class="pagination justify-content-center mb-1">
|
||||
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod, "Index", ["filter" => $filter])?>" tabindex="-1">Erste</a>
|
||||
</li>
|
||||
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $pagination['start'] - $pagination['count'], "filter" => $filter])?>" tabindex="-1">Zurück</a>
|
||||
</li>
|
||||
<?php for($i = 0; $i < ($pagination['maxItems'] / $pagination['count']); $i++): ?>
|
||||
<li class="page-item <?=($pagination['start'] == $i*$pagination['count']) ? "disabled font-weight-bold" : ""?>"><a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $i*$pagination['count'], "filter" => $filter])?>"><?=$i+1?></a></li>
|
||||
<?php endfor; ?>
|
||||
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $pagination['start'] + $pagination['count'], "filter" => $filter])?>">Vor</a>
|
||||
</li>
|
||||
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => ($pagination['maxItems'] - $pagination['maxItems'] % $pagination['count']), "filter" => $filter])?>">Letzte</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
<div class="pagination justify-content-center">
|
||||
<?php if($pagination['maxItems']): ?>
|
||||
Zu versendende CPEs <?=$pagination['start']+1?> bis <?=($pagination['start'] + $pagination['count'] > $pagination['maxItems']) ? $pagination['maxItems'] : $pagination['start'] + $pagination['count']?> von <?=$pagination['maxItems']?>
|
||||
<?php else: ?>
|
||||
Keine CPEs zum Versenden gefunden
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<form method="post" id="submit-form" action="<?=self::getUrl("Cpeshipping", "save")?>">
|
||||
<table class="table table-striped table-hover">
|
||||
<tr>
|
||||
<th class="text-center">Versand<br /><input type="checkbox" id="checkAll" class="form-control" /></th>
|
||||
<th class="text-center">Vorleistungsdienst<br />bestellt</th>
|
||||
<th>Gerät</th>
|
||||
<th>Lieferort</th>
|
||||
<th>Kunde</th>
|
||||
<th>Kundennummer</th>
|
||||
</tr>
|
||||
<?php foreach($cpeprovisionings as $c): ?>
|
||||
<tr>
|
||||
<td class="versand-checkbox text-center"><input type="checkbox" class="form-control" id="ship-<?=$c->id?>" name="ships[]" value="<?=$c->id?>" /></td>
|
||||
<td class="text-center">
|
||||
<?php if(array_key_exists("hostnetwork_order", $c->orderproduct->product->attributes) && $c->orderproduct->product->attributes['hostnetwork_order']->value): ?>
|
||||
<input type="hidden" name="prov[]" value="<?=$c->id?>" />
|
||||
<input type="checkbox" class="form-control" id="external_finish-<?=$c->id?>" name="external_finish[<?=$c->id?>]" value="1" <?=($c->external_finished) ? "checked='checked'" : ""?> />
|
||||
<span id="ship-error-<?=$c->id?>" class="text-danger hidden">Vorleistungsdienst muss bestellt sein vor Versand!</span>
|
||||
<span class="text-info" <?=($c->external_finished_by) ? "title='Vorleistungsdienst bestellt von ".$c->external_finisher->name." (".$c->external_finisher->address->getCompanyOrName(true).")'" : ""?>>
|
||||
<?php if($c->external_finished_by): ?>
|
||||
<?=($c->external_finished_by) ? $c->external_finisher->getAbbrName() : ""?>
|
||||
<?php endif; ?>
|
||||
</span>
|
||||
<?php else: ?>
|
||||
<i>nicht erforderlich</i>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?=$c->routertype?></td>
|
||||
<td><?=($c->termination_id) ? $c->termination->building->zip." ".$c->termination->building->city : $c->order->owner->zip." ".$c->order->owner->city?></td>
|
||||
<td><?=$c->order->owner->getCompanyOrName()?></td>
|
||||
<td><?=$c->order->owner->customer_number?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<button type="submit" name="type" class="btn btn-outline-primary" value="save" />Speichern</button>
|
||||
<button type="submit" name="type" class="btn btn-primary ml-2" value="ship" >Versand-CSV generieren</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<?php if($pagination['maxItems'] > $pagination['count']): ?>
|
||||
<nav>
|
||||
<ul class="pagination justify-content-center mb-1">
|
||||
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod, "Index", ["filter" => $filter])?>" tabindex="-1">Erste</a>
|
||||
</li>
|
||||
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $pagination['start'] - $pagination['count'], "filter" => $filter])?>" tabindex="-1">Zurück</a>
|
||||
</li>
|
||||
<?php for($i = 0; $i < ($pagination['maxItems'] / $pagination['count']); $i++): ?>
|
||||
<li class="page-item <?=($pagination['start'] == $i*$pagination['count']) ? "disabled font-weight-bold" : ""?>"><a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $i*$pagination['count'], "filter" => $filter])?>"><?=$i+1?></a></li>
|
||||
<?php endfor; ?>
|
||||
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $pagination['start'] + $pagination['count'], "filter" => $filter])?>">Vor</a>
|
||||
</li>
|
||||
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => ($pagination['maxItems'] - $pagination['maxItems'] % $pagination['count']), "filter" => $filter])?>">Letzte</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
<div class="pagination justify-content-center">
|
||||
<?php if($pagination['maxItems']): ?>
|
||||
Zu versendende CPEs <?=$pagination['start']+1?> bis <?=($pagination['start'] + $pagination['count'] > $pagination['maxItems']) ? $pagination['maxItems'] : $pagination['start'] + $pagination['count']?> von <?=$pagination['maxItems']?>
|
||||
<?php else: ?>
|
||||
Keine CPEs zum Versenden gefunden
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("#checkAll").click(function() {
|
||||
$('.versand-checkbox input:checkbox').not(this).prop('checked', this.checked);
|
||||
});
|
||||
});
|
||||
|
||||
$("#submit-form" ).submit(function( event ) {
|
||||
$('[id^=ship-error-').each(function() {
|
||||
$(this).hide();
|
||||
});
|
||||
|
||||
var error = false;
|
||||
|
||||
$('input[id^=external_finish-]').each(function() {
|
||||
var id_match = $(this).attr("id").match(/external_finish-(\d+)$/);
|
||||
var id = id_match[1];
|
||||
|
||||
if(!$("input[id^=external_finish-").is(":checked")) {
|
||||
if($("#ship-" + id).is(":checked")) {
|
||||
error = true;
|
||||
$("#ship-error-" + id).show();
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
if(error) {
|
||||
console.log("not submitting");
|
||||
event.preventDefault();
|
||||
}
|
||||
return;
|
||||
});
|
||||
|
||||
</script>
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
||||
@@ -1,7 +0,0 @@
|
||||
<?php
|
||||
foreach($shippings as $ship):
|
||||
$order = $ship->order;
|
||||
$owner = $order->owner;
|
||||
?>
|
||||
"<?=$me->name?>";"XINON GmbH";"Fladnitz 150";"8322";"Studenzen";"AT";"office@xinon.at";"43";"311540800";"<?=$owner->getFullName()?>";"<?=($owner->company) ? $owner->company : $owner->getFullName()?>";"<?=($ship->termination_id) ? $ship->termination->building->street : $owner->street?>";"<?=($ship->termination_id) ? $ship->termination->building->zip : $owner->zip?>";"<?=($ship->termination_id) ? $ship->termination->building->city : $owner->city?>";"AT";"<?=$owner->splitPhoneNumber()[0]?>";"<?=$owner->splitPhoneNumber()[1]?>";"170863186";"<?=$ship->ship_weight?>";"EUR";"100";"DOM";"Elektronik";"1";"1";"<?=$ship->ship_length?>";"<?=$ship->ship_width?>";"<?=$ship->ship_height?>";"<?=$owner->customer_number?>";"<?=$owner->email?>"
|
||||
<?php endforeach;?>
|
||||
@@ -1,20 +0,0 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/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="javascript: void(0);">the-tool</a></li>
|
||||
<li class="breadcrumb-item active">Dashboard</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Dashboard</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
||||
@@ -1,104 +0,0 @@
|
||||
<?php
|
||||
|
||||
$this->setReturnValue([
|
||||
'filename' => "xinon_Service_PIN_".$owner->customer_number.".pdf"
|
||||
]);
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Wichtige Kundeninformation - Service PIN</title>
|
||||
<meta charset="utf-8" />
|
||||
<link href="<?=$ressourcePathPrefix?>fontawesome/css/all.min.css" rel="stylesheet" type="text/css" />
|
||||
<!--<link href="<?=$ressourcePathPrefix?>assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />-->
|
||||
<link href="<?=$ressourcePathPrefix?>assets/css/print.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div style="border-top: 1pt solid #000">
|
||||
|
||||
</div>
|
||||
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td style="width:50%">
|
||||
<img src="<?=$ressourcePathPrefix?>assets/pdf/logo.png" />
|
||||
</td>
|
||||
<td style="width:50%; text-align: right;">
|
||||
<table style="text-align: left; width:100%">
|
||||
<tr>
|
||||
<td style="text-align: right;">Kundennummer:</td>
|
||||
<td><?=$owner->customer_number?></td>
|
||||
</tr><tr>
|
||||
<td style="text-align: right;">Vertrag erfasst am:</td>
|
||||
<td><?=date('d.m.Y', $order->create)?></td>
|
||||
</tr><tr>
|
||||
<td style="text-align: right;">Bestelldatum:</td>
|
||||
<td><?=date('d.m.Y', $order->order_date)?></td>
|
||||
</tr><tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<div style="height:24pt;"></div>
|
||||
|
||||
<h3>Wichtige Kundeninformation</h3>
|
||||
|
||||
<div style="height:24pt;"></div>
|
||||
|
||||
<div>
|
||||
<?php if($owner->company): ?>
|
||||
<?=nl2br($owner->company)?><br />
|
||||
<?php endif; ?>
|
||||
<?php if($owner->getFullName()): ?>
|
||||
<?=$owner->getFullName()?><br />
|
||||
<?php endif; ?>
|
||||
<?=$owner->street?><br />
|
||||
<?=$owner->zip?> <?=$owner->city?>
|
||||
</div>
|
||||
|
||||
<div style="height:24pt;"></div>
|
||||
|
||||
<div>
|
||||
<p>Sehr geehrte Damen und Herren,</p>
|
||||
<p>wir freuen uns, dass Sie sich für ein Produkt von Xinon bzw. einem unserer Partner
|
||||
entschieden haben und bestätigen hiermit den Eingang Ihrer Bestellung.</p>
|
||||
<p>Bezüglich der ggf. erforderlichen Termine für die Installation melden wir uns (bzw.
|
||||
unsere Partner vom Leitungsbau) sobald die Herstellung möglich ist.</p>
|
||||
</div>
|
||||
|
||||
<div style="height:1.5pt;"></div>
|
||||
|
||||
<div style="background-color: #ccc;">
|
||||
<p style="padding-top: 4pt; padding-bottom: 5pt; padding-left: 4pt;"><strong>Ihr persönlicher Service-PIN lautet: <?=$owner->spin?></strong></p>
|
||||
</div>
|
||||
|
||||
<div style="height:1.5pt;"></div>
|
||||
|
||||
<div>
|
||||
<p>Gemäß der EU Datenschutzverordnung sind wir dazu verpflichtet, vor der Beauskunftung
|
||||
von persönlichen Daten eine Kundenidentifizierung vorzunehmen. Daher werden wir und
|
||||
unsere Partner Sie bei zukünftigen Kontaktaufnahmen (z.B. vergessenen Passwörtern,
|
||||
Rechnungsauskünfte, etc) nach Ihrem <strong>persönlichen Service-PIN</strong> fragen.</p>
|
||||
</div>
|
||||
|
||||
<div style="height:48pt;"></div>
|
||||
|
||||
<div>
|
||||
<p><strong>Sollten Sie noch Fragen haben erreichen Sie uns per Mail (office@xinon.at) oder
|
||||
telefonisch unter der Rufnummer 03115 40800.</strong></p>
|
||||
</div>
|
||||
|
||||
<div style="height:48pt;"></div>
|
||||
|
||||
<div>
|
||||
<p>Mit besten Grüßen,</p>
|
||||
|
||||
<p>Ihr XINON Team</p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,22 +0,0 @@
|
||||
<?php
|
||||
$this->setReturnValue([
|
||||
'subject' => "Ihre Bestellung wurde erfasst",
|
||||
'from_email' => "vertrieb@xinon.at",
|
||||
'from_email_name' => "XINON Kundenservice"
|
||||
]);
|
||||
?>
|
||||
|
||||
Sehr geehrte Damen und Herren,
|
||||
|
||||
im Anhang finden Sie weitere Informationen zur Ihrer Breitbandbestellung, sowie Ihren persönlichen Service-PIN.
|
||||
|
||||
Mit besten Grüßen,
|
||||
|
||||
Ihr XINON Team
|
||||
--
|
||||
XINON GmbH
|
||||
|
||||
p: +43 3115 40 800
|
||||
f: +43 3115 40 800 10
|
||||
a: Fladnitz im Raabtal 150, 8322 Studenzen, AUSTRIA
|
||||
w: www.xinon.at e: office@xinon.at
|
||||
@@ -1,121 +0,0 @@
|
||||
<?php
|
||||
$term_id = $order->terminations[0]->id;
|
||||
$op = OrderProductModel::getFirst(['order_id' => $order->id, 'termination_id' => $term_id]);
|
||||
|
||||
$billing_start = date('U');
|
||||
if($op->billing_delay) {
|
||||
$billing_start = strtotime("+".$op->billing_delay." months");
|
||||
}
|
||||
//var_dump($order->terminations[0]->building);exit;
|
||||
$this->setReturnValue([
|
||||
'subject' => $order->partner_number." - "
|
||||
."hergestellt am ".date("d.m.Y", $order->finish_date) . " - "
|
||||
."Verrechnung ab ".date("m", $billing_start)."/".date("Y", $billing_start)." - "
|
||||
.str_replace("\n", " ", str_replace("\r", "", $order->owner->getCompanyOrName())),
|
||||
|
||||
'from_email' => TT_OUTGOING_EMAIL,
|
||||
'from_email_name' => "XINON Partnerservice"
|
||||
]);
|
||||
|
||||
?>
|
||||
|
||||
Rechnungspositionen
|
||||
====================
|
||||
|
||||
Anzahl | Produktname | Verrechungsperiode | Preis periodisch | Preis Herstellung
|
||||
-----------------------------------------------------------------------------------------------------------------------
|
||||
<?php foreach($order->products as $op): ?>
|
||||
<?=sprintf("%-12s", substr($op->amount,0,12))?> | <?=utf8_encode(sprintf("%-42s", utf8_decode(substr($op->product->name,0,42))))?> | <?=utf8_encode(sprintf("%-18s", utf8_decode(($op->billing_period == 12) ? "Jährlich " : (($op->billing_period == 1) ? "Monatlich" : $op->billing_period."-monatlich")) ))?> | <?=sprintf("EUR %-12s", substr($op->price,0,12))?> | EUR <?=$op->price_setup?>
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php if(is_array($order->terminations) && count($order->terminations)): ?>
|
||||
Anschluss
|
||||
==========
|
||||
<?php foreach($order->terminations as $term): ?>
|
||||
<?=$term->getAddress()?>
|
||||
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
Bestelldetails
|
||||
===============
|
||||
Bestelldatum: <?=date("d.m.Y", $order->order_date)?>
|
||||
|
||||
Bestellung abgeschlossen: <?=date("d.m.Y", $order->finish_date)?>
|
||||
|
||||
Einwilligung Datenschutz: <?=($order->allow_contact)? "Ja" : "Nein"?>
|
||||
|
||||
|
||||
|
||||
Vertragsinhaber
|
||||
================
|
||||
Firma: <?=$order->owner->company?>
|
||||
|
||||
Vorname: <?=$order->owner->firstname?>
|
||||
|
||||
Nachname: <?=$order->owner->lastname?>
|
||||
|
||||
Straße: <?=$order->owner->street?>
|
||||
|
||||
PLZ: <?=$order->owner->zip?>
|
||||
|
||||
Ort: <?=$order->owner->city?>
|
||||
|
||||
Land: <?=$order->owner->country?>
|
||||
|
||||
Telefon: <?=$order->owner->phone?>
|
||||
|
||||
Fax: <?=$order->owner->fax?>
|
||||
|
||||
Mobiltelefon: <?=$order->owner->mobile?>
|
||||
|
||||
Email: <?=$order->owner->email?>
|
||||
|
||||
<?php if($order->billingaddress_id > 0 && $order->billingaddress_id != $order->owner_id): ?>
|
||||
|
||||
|
||||
Rechnungsempfänger
|
||||
===================
|
||||
Firma: <?=$order->billingaddress->company?>
|
||||
|
||||
Vorname: <?=$order->billingaddress->firstname?>
|
||||
|
||||
Nachname: <?=$order->billingaddress->lastname?>
|
||||
|
||||
Straße: <?=$order->billingaddress->street?>
|
||||
|
||||
PLZ: <?=$order->billingaddress->zip?>
|
||||
|
||||
Ort: <?=$order->billingaddress->city?>
|
||||
|
||||
Land: <?=$order->billingaddress->country?>
|
||||
|
||||
Telefon: <?=$order->billingaddress->phone?>
|
||||
|
||||
Fax: <?=$order->billingaddress->fax?>
|
||||
|
||||
Mobiltelefon: <?=$order->billingaddress->mobile?>
|
||||
|
||||
Email: <?=$order->billingaddress->email?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
Verrechnung
|
||||
============
|
||||
<?php if($order->billing_type == "invoice"): ?>
|
||||
Verrechnungsart: Rechnung
|
||||
<?php else: ?>
|
||||
Verrechnungsart: SEPA Bankeinzug
|
||||
Bank: <?=$order->bank_account_bank?>
|
||||
|
||||
Kontoinhaber: <?=$order->bank_account_owner?>
|
||||
|
||||
IBAN: <?=$order->bank_account_iban?>
|
||||
|
||||
BIC: <?=$order->bank_account_bic?>
|
||||
|
||||
<?php endif; ?>
|
||||
@@ -1,51 +0,0 @@
|
||||
<?php
|
||||
$term_id = $order->terminations[0]->id;
|
||||
$op = OrderProductModel::getFirst(['order_id' => $order->id, 'termination_id' => $term_id]);
|
||||
|
||||
$billing_start = date('U');
|
||||
if($op->billing_delay) {
|
||||
$billing_start = strtotime("+".$op->billing_delay." months");
|
||||
}
|
||||
//var_dump($order->terminations[0]->building);exit;
|
||||
$this->setReturnValue([
|
||||
'subject' => $order->terminations[0]->building->network->name." - "
|
||||
.(($order->terminations[0]->building->networksection_id) ? $order->terminations[0]->building->networksection->name : "<kein Bauabschnitt>")." - "
|
||||
."Verrechnung ab ".date("m", $billing_start)."/".date("Y", $billing_start)." - "
|
||||
.$order->owner->customer_number." - "
|
||||
.str_replace("\n", "", str_replace("\r\n", " ", $order->owner->getCompanyOrName()))." - ",
|
||||
|
||||
'from_email' => TT_OUTGOING_EMAIL,
|
||||
'from_email_name' => TT_OUTGOING_EMAIL_NAME
|
||||
]);
|
||||
|
||||
$nne_products = [];
|
||||
?>
|
||||
|
||||
Rechnungspositionen
|
||||
====================
|
||||
|
||||
Anzahl | Produktname | Verrechungsperiode | Preis periodisch | Preis Herstellung
|
||||
-----------------------------------------------------------------------------------------------------------------------
|
||||
<?php foreach($order->products as $op): ?>
|
||||
<?php if($op->product->price_nne > 0.0) $nne_products[] = $op; ?>
|
||||
<?=sprintf("%-12s", substr($op->amount,0,12))?> | <?=utf8_encode(sprintf("%-42s", utf8_decode(substr($op->product->name,0,42))))?> | <?=utf8_encode(sprintf("%-18s", utf8_decode(($op->billing_period == 12) ? "Jährlich " : (($op->billing_period == 1) ? "Monatlich" : $op->billing_period."-monatlich")) ))?> | <?=sprintf("EUR %-12s", substr($op->price,0,12))?> | EUR <?=$op->price_setup?>
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php if(count($nne_products)): ?>
|
||||
|
||||
Gutschriften
|
||||
=============
|
||||
|
||||
Anzahl | Produktname | Verrechungsperiode | Bauabschnitt | NNE
|
||||
-----------------------------------------------------------------------------------------------------------------------
|
||||
<?php foreach($nne_products as $op): ?>
|
||||
<?=sprintf("%-12s", substr($op->amount,0,12))?> | <?=utf8_encode(sprintf("%-42s", utf8_decode(substr($op->product->name,0,42))))?> | <?=utf8_encode(sprintf("%-18s", utf8_decode(($op->billing_period == 12) ? "Jährlich " : (($op->billing_period == 1) ? "Monatlich" : $op->billing_period."-monatlich")) ))?> | <?=sprintf("%-24s", substr(($op->termination->building->networksection_id) ? $op->termination->building->networksection->name : "<Kein Bauabschnitt>",0,24))?> | EUR <?=$op->price_nne?>
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php endif; // (count($nne_products))?>
|
||||
|
||||
|
||||
@@ -1,555 +0,0 @@
|
||||
<?php
|
||||
//var_dump($pagination);exit;
|
||||
?>
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
||||
<?php $wftype = "term"; ?>
|
||||
|
||||
|
||||
<!-- 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")?>">the-tool</a></li>
|
||||
<li class="breadcrumb-item active">Leitungsbau</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Leitungsbau</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("Linework")?>">
|
||||
<div class="row">
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_network_id">Netzgebiet</label>
|
||||
<select name="filter[network_id]" id="filter_network_id" class="form-control">
|
||||
<option></option>
|
||||
<?php foreach($mynetworks as $fnet): ?>
|
||||
<option value="<?=$fnet->id?>" <?=($filter['network_id'] == $fnet->id) ? "selected='selected'" : ""?>><?=$fnet->name?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_networksection_id">Bauabschnitt</label>
|
||||
<select name="filter[networksection_id]" id="filter_networksection_id" class="form-control">
|
||||
<option></option>
|
||||
<?php foreach($mynetworks as $fnet): ?>
|
||||
<?php if(is_array($fnet->sections) && count($fnet->sections)): ?>
|
||||
<optgroup label="<?=$fnet->name?>">
|
||||
<?php foreach($fnet->sections as $section): ?>
|
||||
<option value="<?=$section->id?>" <?=($filter['networksection_id'] == $section->id) ? "selected='selected'" : ""?>><?=$section->name?></option>
|
||||
<?php endforeach; ?>
|
||||
</optgroup>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_status_id">Anschlussstatus</label>
|
||||
<select name="filter[status_id]" id="filter_status_id" class="form-control">
|
||||
<option></option>
|
||||
<?php foreach(TerminationstatusModel::getAll() as $status): ?>
|
||||
<option
|
||||
value="<?=$status->id?>"
|
||||
<?php if(is_array($filter)): ?>
|
||||
<?=($filter['status_id'] == $status->id) ? "selected='selected'" : ""?>
|
||||
<?php else: ?>
|
||||
<?=(!array_key_exists("status_id", $filter) && $status->id == 3) ? "selected='selected'" : ""?>
|
||||
<?php endif; ?>
|
||||
>
|
||||
<?=$status->code?> - <?=__($status->name."-t")?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_code">Objekt ID</label>
|
||||
<input type="text" class="form-control" name="filter[code]" id="filter_code" value="<?=$filter['code']?>" />
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_building_street">Straße</label>
|
||||
<input type="text" class="form-control" name="filter[building_street]" id="filter_building_street" value="<?=$filter['building_street']?>" />
|
||||
</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("Linework")?>">Filter zurücksetzen</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
<h4 class="header-title">Auftragsliste nach Netzgebiet</h4>
|
||||
|
||||
<?php if($pagination['maxItems'] > $pagination['count']): ?>
|
||||
<nav>
|
||||
<ul class="pagination justify-content-center mb-1">
|
||||
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl("Linework", "Index", ["filter" => $filter])?>" tabindex="-1">Erste</a>
|
||||
</li>
|
||||
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl("Linework","Index",['s' => $pagination['start'] - $pagination['count'], "filter" => $filter])?>" tabindex="-1">Zurück</a>
|
||||
</li>
|
||||
<?php for($i = 0; $i < ($pagination['maxItems'] / $pagination['count']); $i++): ?>
|
||||
<li class="page-item <?=($pagination['start'] == $i*$pagination['count']) ? "disabled font-weight-bold" : ""?>"><a class="page-link" href="<?=$this->getUrl("Linework","Index",['s' => $i*$pagination['count'], "filter" => $filter])?>"><?=$i+1?></a></li>
|
||||
<?php endfor; ?>
|
||||
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl("Linework","Index",['s' => $pagination['start'] + $pagination['count'], "filter" => $filter])?>">Vor</a>
|
||||
</li>
|
||||
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl("Linework","Index",['s' => ($pagination['maxItems'] - $pagination['maxItems'] % $pagination['count']), "filter" => $filter])?>">Letzte</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
<div class="pagination justify-content-center">
|
||||
<?php if($pagination['maxItems']): ?>
|
||||
Leitungsbauaufträge <?=$pagination['start']+1?> bis <?=($pagination['start'] + $pagination['count'] > $pagination['maxItems']) ? $pagination['maxItems'] : $pagination['start'] + $pagination['count']?> von <?=$pagination['maxItems']?>
|
||||
<?php else: ?>
|
||||
Keine Leitungsbauaufträge gefunden
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if(is_array($networks) && count($networks)): ?>
|
||||
<?php foreach($networks as $networkname => $terminations): ?>
|
||||
<?php if(!count($terminations)) continue; ?>
|
||||
<h4><?=$networkname?></h4>
|
||||
<table class="table workflow-table mb-2">
|
||||
<?php $bcount = 0; foreach($terminations as $term): ?>
|
||||
<?php
|
||||
$rowspan = 1;
|
||||
foreach($term->workflowitems as $item) {
|
||||
if($item->type == "delimiter") {
|
||||
$rowspan++;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<tr id="termination-<?=$term->id?>" class="table-bg-<?=($bcount % 2 == 0) ? "even" : "odd"?>">
|
||||
<td>
|
||||
<div>
|
||||
<div>
|
||||
<?php if($term->building->gps_lat && $term->building->gps_long): ?>
|
||||
<a href="https://maps.google.com/maps?t=k&q=loc:<?=$term->building->gps_lat?>+<?=$term->building->gps_long?>" target="_blank">
|
||||
<i class='fas fa-globe-europe'></i> <strong style="white-space: nowrap;"><?=$term->building->street?></strong>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<strong style="white-space: nowrap;"><?=$term->building->street?></strong>
|
||||
<?php endif; ?>
|
||||
<br />
|
||||
<span class="text-monospace">[<?=__($term->building->status->name."-b")?>]</span>
|
||||
</div>
|
||||
<div class="mt-2">
|
||||
<a href="<?=self::getUrl("Pipework", "Index", ["filter" => ["code" => $term->building->code]])?>" target="_blank"><span class="text-success"><?=$term->code?></span></a>
|
||||
<br />
|
||||
<?php if($term->name): ?>
|
||||
<?=$term->name?><br />
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-3">
|
||||
<?=$term->contact?><br />
|
||||
<strong><?=$term->phone?></strong><br />
|
||||
<?=$term->email?>
|
||||
</div>
|
||||
<div class="mt-3">
|
||||
<label <?=(!$term->building->lineworker_id) ? "class='text-danger' title='Keine Leitungsbaufirma ausgewählt'" : ""?>>
|
||||
<input type="checkbox" form="wf-termination-<?=$term->id?>" name="linework_enabled" value="1"
|
||||
<?=($term->linework_enabled == 1) ? "checked='checked'" : ""?> <?=(!$term->building->lineworker_id || !$me->is(["Admin", "pipeplanner", "lineplanner"])) ? "disabled='disabled'" : ""?>
|
||||
>
|
||||
Baufreigabe
|
||||
</label>
|
||||
</div>
|
||||
<div class="mt-3">
|
||||
<button type="button" class="btn btn-primary" form="wf-termination-<?=$term->id?>" onclick="validateAndSubmit(<?=$term->id?>)">Speichern</button>
|
||||
</div>
|
||||
<div class="text-danger hidden mt-2" id="wf-submit-error-<?=$term->id?>">
|
||||
Nicht fertiggestellt.
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<table class="table workflow-table table-bordered table-sm table-bg-<?=($bcount % 2 == 0) ? "odd" : "even"?>">
|
||||
<tr>
|
||||
<th>AP-Typ</th>
|
||||
<th>AP-Name</th>
|
||||
<th>AP-Koordinaten</th>
|
||||
<th>Rohrverband</th>
|
||||
<th>Rohrtyp</th>
|
||||
<th>Rohrfarbe</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?=$term->building->workflowitems['anschlusspunkt_typ']->value->value_string?></td>
|
||||
<td><?=$term->building->workflowitems['anschlusspunkt_name']->value->value_string?></td>
|
||||
<td><?=($term->building->workflowitems['anschlusspunkt_gps']->value->value_string) ? "<a href='https://maps.google.com/maps?t=k&q=loc:".join("+", $term->building->workflowitems['anschlusspunkt_gps']->value->gps)."' target='_blank'><i class='fas fa-external-link-alt'></i> ".join(", ", $term->building->workflowitems['anschlusspunkt_gps']->value->gps)."</a>" : ""?></td>
|
||||
<td><?=$term->building->workflowitems['rohrverband_name']->value->value_string?></td>
|
||||
<td><?=$term->building->workflowitems['rohrtype']->value->value_string?></td>
|
||||
<td>
|
||||
<span
|
||||
style="
|
||||
background-color: #<?=TT_CABLE_COLORS[$term->building->workflowitems['rohrfarbe']->value->value_string]["hex"]?>;
|
||||
<?php if(TT_CABLE_COLORS[$term->building->workflowitems['rohrfarbe']->value->value_string]["mark"]): ?>
|
||||
color: #<?=TT_CABLE_COLORS[$term->building->workflowitems['rohrfarbe']->value->value_string]["hexfg"]?>;
|
||||
<?php else: ?>
|
||||
color: #<?=TT_CABLE_COLORS[$term->building->workflowitems['rohrfarbe']->value->value_string]["hex"]?>;
|
||||
<?php endif; ?>
|
||||
border-radius: 3px;
|
||||
">-------</span> <?=ucfirst($term->building->workflowitems['rohrfarbe']->value->value_string)?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<form method="post" name="wf-termination-<?=$term->id?>" id="wf-termination-<?=$term->id?>" action="<?=self::getUrl("Linework","save", ["filter" => $filter, "s" => $pagination['start']])?>" enctype="multipart/form-data">
|
||||
<input type="hidden" name="id" value="<?=$term->id?>" />
|
||||
<table class="table workflow-table">
|
||||
<?php $i = 0; foreach($term->workflowitems as $item): ?>
|
||||
<?php if($i==0): ?>
|
||||
<?php if($item->type == "delimiter"): ?>
|
||||
<tr class="workflow-header"><th colspan='<?=$wfColspan?>'><?=$item->label?></th></tr><tr>
|
||||
<?php else: ?>
|
||||
<tr>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php if($item->type == "delimiter"): ?>
|
||||
</tr><tr class="workflow-header"><th colspan='<?=$wfColspan?>'><?=$item->label?></th></tr><tr>
|
||||
<?php else: ?>
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/Workflow/form.php"); ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php $i++; endforeach; ?>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<label class="form-label">Kommentar</label> <textarea class="form-control" style="height:100%" form="wf-termination-<?=$term->id?>" name="workflow_comment" id="workflow_comment_<?=$term->id?>"><?=$term->workflow_comment?></textarea>
|
||||
</td>
|
||||
<td colspan="<?=$wfColspan - 3?>">
|
||||
<h5>Dokumente</h5>
|
||||
<table class="table table-sm">
|
||||
<?php if(is_array($term->files) && count($term->files)): $i=0; foreach($term->files as $file): ?>
|
||||
<?php if($i % 2 == 0): ?>
|
||||
<tr>
|
||||
<td title="<?=$file->file->filename?>">
|
||||
<a href="<?=self::getUrl("TerminationFile", "delete", ['id' => $file->id, "from" => "linework"])?>" onclick="if(!confirm('Dokument wirklich löschen?')) return false;" class="text-danger mr-1" title="Dokument löschen">
|
||||
<i class="fas fa-trash"></i>
|
||||
</a>
|
||||
<a href="<?=self::getUrl("File", "Download", ['id' => $file->file->id])?>">
|
||||
<i class="fas fa-download"></i> <?=$file->type?>
|
||||
</a>
|
||||
</td>
|
||||
<?php else: ?>
|
||||
<td title="<?=$file->file->filename?>">
|
||||
<a href="<?=self::getUrl("TerminationFile", "delete", ['id' => $file->id, "from" => "linework"])?>" onclick="if(!confirm('Dokument wirklich löschen?')) return false;" class="text-danger mr-1" title="Dokument löschen">
|
||||
<i class="fas fa-trash"></i>
|
||||
</a>
|
||||
<a href="<?=self::getUrl("File", "Download", ['id' => $file->file->id])?>">
|
||||
<i class="fas fa-download"></i> <?=$file->type?>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php $i++; endforeach; ?>
|
||||
<?php if($i % 2 != 0): ?>
|
||||
<td></td></tr>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<strong>Dokument hochladen</strong> <select class="form-control" name="file_type">
|
||||
<?php foreach(TT_WORKFLOW_TERMINATION_FILE_TYPES as $type): ?>
|
||||
<option value="<?=$type?>"><?=$type?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<small>Erlaubte Dateiendungen: <?=MFUPLOAD_ALLOWED_EXTENSIONS_STR?></small>
|
||||
<input type="file" name="LineworkFileUpload" class="form-control-file" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $bcount++; endforeach; ?>
|
||||
</table>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php if($pagination['maxItems'] > $pagination['count']): ?>
|
||||
<div class="pagination justify-content-center mb-1">
|
||||
<?php if($pagination['maxItems']): ?>
|
||||
Leitungsbauaufträge <?=$pagination['start']+1?> bis <?=($pagination['start'] + $pagination['count'] > $pagination['maxItems']) ? $pagination['maxItems'] : $pagination['start'] + $pagination['count']?> von <?=$pagination['maxItems']?>
|
||||
<?php else: ?>
|
||||
Keine Leitungsbauaufträge gefunden
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<ul class="pagination justify-content-center">
|
||||
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl("Linework")?>" tabindex="-1">Erste</a>
|
||||
</li>
|
||||
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl("Linework","Index",['s' => $pagination['start'] - $pagination['count'], "filter" => $filter])?>" tabindex="-1">Zurück</a>
|
||||
</li>
|
||||
<?php for($i = 0; $i < ($pagination['maxItems'] / $pagination['count']); $i++): ?>
|
||||
<li class="page-item <?=($pagination['start'] == $i*$pagination['count']) ? "disabled font-weight-bold" : ""?>"><a class="page-link" href="<?=$this->getUrl("Linework","Index",['s' => $i*$pagination['count'], "filter" => $filter])?>"><?=$i+1?></a></li>
|
||||
<?php endfor; ?>
|
||||
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl("Linework","Index",['s' => $pagination['start'] + $pagination['count'], "filter" => $filter])?>">Vor</a>
|
||||
</li>
|
||||
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl("Linework","Index",['s' => ($pagination['maxItems'] - $pagination['maxItems'] % $pagination['count']), "filter" => $filter])?>">Letzte</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php else: ?>
|
||||
<i>Keine Bauaufträge gefunden</i>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function() {
|
||||
var term;
|
||||
var hash = window.location.hash.substr(1);
|
||||
var match = hash.match(/object=(\d+)/);
|
||||
if(match && match[1]) {
|
||||
term = match[1]
|
||||
var pos = $('#termination-' + term).offset().top;
|
||||
$(window).scrollTop(pos - 150 );
|
||||
}
|
||||
|
||||
$('input[name=wfitemplaceholder_customer_passive_finished]').each(function() {
|
||||
var elem = this;
|
||||
$(elem).click(function() {
|
||||
var id_match = $(this).attr("id").match(/wfitemplaceholder_customer_passive_finished_(\d+)$/);
|
||||
var id = id_match[1];
|
||||
validateWorkflowItem(id);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$('select[id^="wfitem_abschlusstyp_"]').each(function() {
|
||||
var elem = this;
|
||||
$(elem).change(function() {
|
||||
var id_match = $(this).attr("id").match(/wfitem_abschlusstyp_(\d+)$/);
|
||||
var id = id_match[1];
|
||||
|
||||
if($('#wfitem_ist_abschlusstyp_' + id).val() == "") {
|
||||
if($(this).val() == "SC/APC in FTU") {
|
||||
$('#workflow-item-inhouse_cabling_supplied-' + id + ' .wf-content').show();
|
||||
$('#workflow-item-inhouse_cabling_deployed-' + id + ' .wf-content').show();
|
||||
} else {
|
||||
$('#workflow-item-inhouse_cabling_supplied-' + id + ' .wf-content').hide();
|
||||
$('#workflow-item-inhouse_cabling_deployed-' + id + ' .wf-content').hide();
|
||||
}
|
||||
} else {
|
||||
console.log("ist not empty");
|
||||
if($('#wfitem_ist_abschlusstyp_' + id).val() == "SC/APC in FTU") {
|
||||
$('#workflow-item-inhouse_cabling_supplied-' + id + ' .wf-content').show();
|
||||
$('#workflow-item-inhouse_cabling_deployed-' + id + ' .wf-content').show();
|
||||
} else {
|
||||
$('#workflow-item-inhouse_cabling_supplied-' + id + ' .wf-content').hide();
|
||||
$('#workflow-item-inhouse_cabling_deployed-' + id + ' .wf-content').hide();
|
||||
}
|
||||
}
|
||||
/*
|
||||
if($('#wfitem_ist_abschlusstyp_' + id).val().length && $('#wfitem_ist_abschlusstyp_' + id).val() != "SC/APC in FTU") {
|
||||
$('#workflow-item-inhouse_cabling_supplied-' + id + ' .wf-content').hide();
|
||||
$('#workflow-item-inhouse_cabling_deployed-' + id + ' .wf-content').hide();
|
||||
} else {
|
||||
if($(this).val() == "SC/APC in FTU") {
|
||||
$('#workflow-item-inhouse_cabling_supplied-' + id + ' .wf-content').hide();
|
||||
$('#workflow-item-inhouse_cabling_deployed-' + id + ' .wf-content').hide();
|
||||
} else {
|
||||
$('#workflow-item-inhouse_cabling_supplied-' + id + ' .wf-content').show();
|
||||
$('#workflow-item-inhouse_cabling_deployed-' + id + ' .wf-content').show();
|
||||
}
|
||||
}*/
|
||||
});
|
||||
$(elem).change();
|
||||
});
|
||||
|
||||
$('select[id^="wfitem_ist_abschlusstyp_"]').each(function() {
|
||||
var elem = this;
|
||||
$(elem).change(function() {
|
||||
var id_match = $(this).attr("id").match(/wfitem_ist_abschlusstyp_(\d+)$/);
|
||||
var id = id_match[1];
|
||||
|
||||
if($(this).val() == "") {
|
||||
console.log("ist empty");
|
||||
if($('#wfitem_abschlusstyp_' + id).val() == "SC/APC in FTU") {
|
||||
$('#workflow-item-inhouse_cabling_supplied-' + id + ' .wf-content').show();
|
||||
$('#workflow-item-inhouse_cabling_deployed-' + id + ' .wf-content').show();
|
||||
} else {
|
||||
$('#workflow-item-inhouse_cabling_supplied-' + id + ' .wf-content').hide();
|
||||
$('#workflow-item-inhouse_cabling_deployed-' + id + ' .wf-content').hide();
|
||||
}
|
||||
} else {
|
||||
console.log("ist not empty");
|
||||
if($('#wfitem_ist_abschlusstyp_' + id).val() == "SC/APC in FTU") {
|
||||
$('#workflow-item-inhouse_cabling_supplied-' + id + ' .wf-content').show();
|
||||
$('#workflow-item-inhouse_cabling_deployed-' + id + ' .wf-content').show();
|
||||
} else {
|
||||
$('#workflow-item-inhouse_cabling_supplied-' + id + ' .wf-content').hide();
|
||||
$('#workflow-item-inhouse_cabling_deployed-' + id + ' .wf-content').hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if($(elem).val() == "SC/APC in FTU") {
|
||||
$(elem).change();
|
||||
}
|
||||
//$(elem).change();
|
||||
});
|
||||
|
||||
$('form[id^="wf-termination-"]').each(function() {
|
||||
var elem = this;
|
||||
$(elem).submit(function(e) {
|
||||
|
||||
console.log(this);
|
||||
var id_match = $(this).attr("name").match(/wf-termination-(\d+)$/);
|
||||
var id = id_match[1];
|
||||
if(canSubmit(id)) {
|
||||
return true;
|
||||
} else {
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
function validateWorkflowItem(id) {
|
||||
var required_fields = {
|
||||
pop_id: "int",
|
||||
schrank: "string",
|
||||
baugruppe: "string",
|
||||
modul: "string",
|
||||
ports: "string",
|
||||
abschlusstyp: "string",
|
||||
bb_kabel: "string",
|
||||
bb_fasern: "string",
|
||||
kundenkabel_typ: "string",
|
||||
kundenkabel_fasern: "string",
|
||||
backbone_finished: "bool",
|
||||
bep_deployed: "bool",
|
||||
customer_cable_injected: "bool",
|
||||
spliced_network: "bool",
|
||||
spliced_customer: "bool",
|
||||
};
|
||||
|
||||
console.log("abschlusstyp: " + $("#wfitem_abschlusstyp_" + id).val());
|
||||
console.log("ist abschlusstyp: " + $("#wfitem_ist_abschlusstyp_" + id).val());
|
||||
if($("#wfitem_ist_abschlusstyp_" + id).val() == "SC/APC in FTU") {
|
||||
required_fields["inhouse_cabling_supplied"] = "bool";
|
||||
required_fields["inhouse_cabling_deployed"] = "bool";
|
||||
} else if($("#wfitem_abschlusstyp_" + id).val() == "SC/APC in FTU") {
|
||||
required_fields["inhouse_cabling_supplied"] = "bool";
|
||||
required_fields["inhouse_cabling_deployed"] = "bool";
|
||||
}
|
||||
|
||||
var missing = false;
|
||||
for(var field1 in required_fields) {
|
||||
var field2 = "ist_" + field1;
|
||||
var type = required_fields[field1];
|
||||
|
||||
var val1 = $("#wfitem_" + field1 + "_" + id).val();
|
||||
var val2 = true;
|
||||
if($("#wfitem_" + field2 + "_" + id).length) {
|
||||
var val2 = $("#wfitem_" + field2 + "_" + id).val();
|
||||
}
|
||||
|
||||
if(type == "bool") {
|
||||
if(!parseInt(val1)) {
|
||||
console.log(field1 + " missing");
|
||||
missing = true;
|
||||
}
|
||||
} else {
|
||||
if(!val1 && !val2) {
|
||||
console.log(field1 + " or " + field2 + " missing");
|
||||
missing = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
console.log("missing: ");
|
||||
console.log(missing);
|
||||
|
||||
if(missing) {
|
||||
$("#wfitemplaceholder_customer_passive_finished_" + id).prop('checked', false);
|
||||
$("#wfitem_customer_passive_finished_" + id).val(0);
|
||||
$("#wfitemplaceholder_customer_passive_finished_" + id).attr("readonly", true);
|
||||
|
||||
} else {
|
||||
$("#wfitemplaceholder_customer_passive_finished_" + id).attr("disabled", false);
|
||||
$("#wfitem_customer_passive_finished_" + id).val(1);
|
||||
$("#wfitemplaceholder_customer_passive_finished_" + id).prop('readonly', true);
|
||||
$("#wf-submit-error-" + id).hide();
|
||||
}
|
||||
|
||||
return !missing;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function canSubmit(id) {
|
||||
if($("#wfitemplaceholder_customer_passive_finished_" + id).prop('checked')) {
|
||||
if(!validateWorkflowItem(id)) {
|
||||
console.log("cant submit");
|
||||
$("#wf-submit-error-" + id).show();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
console.log("can submit");
|
||||
$("#wf-submit-error-" + id).hide();
|
||||
return true;
|
||||
}
|
||||
|
||||
function validateAndSubmit(id) {
|
||||
//e.preventDefault();
|
||||
if(canSubmit(id)) {
|
||||
$('#wf-termination-' + id).trigger("submit");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
||||
@@ -1,103 +0,0 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/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")?>">the-tool</a></li>
|
||||
<li class="breadcrumb-item"><a href="<?=self::getUrl("Network")?>">Netzgebiete</a></li>
|
||||
<li class="breadcrumb-item active"><?=($network->id) ? "bearbeiten" : "Neu" ?></li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Netzgebiete</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"><?=($network->id) ? "Netzbereich bearbeiten" : "Neuer Netzbereich"?></h4>
|
||||
|
||||
<form class="form-horizontal" method="post" action="<?=self::getUrl("Network", "save")?>">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<input type="hidden" name="id" value="<?=$network->id?>" />
|
||||
|
||||
<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="<?=$network->name?>">
|
||||
</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($owners as $owner): ?>
|
||||
<option value="<?=$owner->id?>" <?=($network->owner_id == $owner->id) ? "selected='selected'" : ""?>><?=($owner->getCompanyOrName())?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="sytemowner_action_status">Workorder Filter (Admins)</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="select2 form-control " name="sytemowner_action_status" id="sytemowner_action_status">
|
||||
<option></option>
|
||||
<option value="pipework_needed" <?=($network->sytemowner_action_status == "pipework_needed") ? "selected='selected'" : ""?>>Tiefbau ausständig</option>
|
||||
<option value="building_connected" <?=($network->sytemowner_action_status == "building_connected") ? "selected='selected'" : ""?>>Tiefbau erledigt</option>
|
||||
<option value="term_connected" <?=($network->sytemowner_action_status == "term_connected") ? "selected='selected'" : ""?>>Anschluss passiv erschlossen</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<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"><?=$network->note?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</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>
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#parent_id").select2({
|
||||
allowClear: true,
|
||||
placeholder: ""
|
||||
});
|
||||
$("#addresstypes").select2();
|
||||
</script>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
||||
@@ -1,296 +0,0 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/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")?>">the-tool</a></li>
|
||||
<?php if(is_array($filter['addresstype']) && count($filter['addresstype'])): ?>
|
||||
<li class="breadcrumb-item"><a href="<?=self::getUrl("Address")?>">Netzgebiete</a></li>
|
||||
<li class="breadcrumb-item active">
|
||||
<?php foreach($filter['addresstype'] as $type) { $types[] = __($type); } ?>
|
||||
<?=implode(", ", $types)?>
|
||||
</li>
|
||||
<?php else: ?>
|
||||
<li class="breadcrumb-item active">Netzgebiete</li>
|
||||
<?php endif; ?>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Netzgebiete</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="float-left">
|
||||
<h4 class="header-title mb-4">Liste aller Netzgebiete</h4>
|
||||
</div>
|
||||
<div class="float-right">
|
||||
<a class="btn btn-primary" href="<?=self::getUrl("Network", "add")?>"><i class="fas fa-plus"></i> Neues Netzgebiet anlegen</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if(is_array($networks) && count($networks)): ?>
|
||||
<table class="table table-hover table-striped">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Besitzer</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php foreach($networks as $network): ?>
|
||||
<tr class="network-list-tr" id="network-<?=$network->id?>">
|
||||
<td onclick="toggleNetwork(<?=$network->id?>)"><?=$network->name?></td>
|
||||
<td onclick="toggleNetwork(<?=$network->id?>)"><?=nl2br($network->owner->getCompanyOrName())?></td>
|
||||
<td class="controls" style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||
<!--<a href="<?=self::getUrl("Pop", "Index", ["filter" => ["network_id" => $network->id]])?>" title="POPs anzeigen"><i class="fas fa-project-diagram"></i></a>-->
|
||||
<a href="<?=self::getUrl("Network", "edit", ["id" => $network->id])?>"><i class="far fa-edit" title="Bearbeiten"></i></a>
|
||||
<a href="<?=self::getUrl("Network", "delete", ["id" => $network->id])?>" class="text-danger" title="Löschen"><i class="fas fa-trash"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="network-detail-<?=$network->id?>" style="display:none; background-color:#fff">
|
||||
<td colspan="3">
|
||||
<ul class="nav nav-pills navtab-bg nav-justified">
|
||||
<li class="nav-item"><a class="nav-link active" href="#net-detail-<?=$network->id?>-detail" data-toggle="tab" aria-expanded="false">Details</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#net-detail-<?=$network->id?>-pops" data-toggle="tab" aria-expanded="false">POPs</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#net-detail-<?=$network->id?>-sections" data-toggle="tab" aria-expanded="false">Bauabschnitte</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#net-detail-<?=$network->id?>-roles" data-toggle="tab" aria-expanded="false">Berechtigungen</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div id="net-detail-<?=$network->id?>-detail" class="tab-pane show active">
|
||||
<h4>Details zu <strong><?=$network->name?></strong></h4>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<table class="table table-bordered">
|
||||
<tr class="bg-white">
|
||||
<th>Name</th>
|
||||
<td><?=$network->name?></td>
|
||||
</tr>
|
||||
<tr class="bg-white">
|
||||
<th>Besitzer</th>
|
||||
<td><?=$network->owner->getCompanyOrName()?></td>
|
||||
</tr>
|
||||
<tr class="bg-white">
|
||||
<th>Interne Notiz</th>
|
||||
<td><?=nl2br($network->note)?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="net-detail-<?=$network->id?>-pops" class="tab-pane">
|
||||
<h4>POPs in <strong><?=$network->name?></strong></h4>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<?php if(is_array($network->pops) && count($network->pops)): ?>
|
||||
<table class="table" >
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>GPS (Breite, Länge)</th>
|
||||
<th>Standortinfo</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php foreach($network->pops as $pop): ?>
|
||||
<tr>
|
||||
<td><?=$pop->name?></td>
|
||||
<td><?=$pop->gps_lat?>, <?=$pop->gps_long?></td>
|
||||
<td><?=nl2br($pop->location)?></td>
|
||||
<td class="controls" style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||
<a href="<?=self::getUrl("Pop", "edit", ["id" => $pop->id])?>"><i class="far fa-edit" title="Bearbeiten"></i></a>
|
||||
<a href="<?=self::getUrl("Pop", "delete", ["id" => $pop->id])?>" class="text-danger" title="Löschen"><i class="fas fa-trash"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
<?php else: ?>
|
||||
<p><i>Keine POPs vorhanden.</i></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a class="btn btn-primary" href="<?=self::getUrl("Pop", "add", ['network_id' => $network->id])?>"><i class="fas fa-plus"></i> Neuen POP anlegen</a>
|
||||
</div>
|
||||
|
||||
<div id="net-detail-<?=$network->id?>-sections" class="tab-pane">
|
||||
<h4>Bauabschnitte in <strong><?=$network->name?></strong></h4>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<form method="post" action="<?=self::getUrl("Networksection", "save")?>">
|
||||
<input type="hidden" name="network_id" value="<?=$network->id?>" />
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<?php $i=1; foreach($network->sections as $section): ?>
|
||||
<td>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="sections[<?=$section->id?>]" value="<?=$section->name?>" />
|
||||
<div class="input-group-append">
|
||||
<button type="button" class="btn btn-danger" onclick="deleteSection(<?=$section->id?>)"><i class="fas fa-trash-alt"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<?php if($i > 0 && $i % 3 == 0): ?>
|
||||
</tr><tr>
|
||||
<?php endif; ?>
|
||||
<?php $i++; endforeach; ?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3"><input type="text" class="form-control" name="sections[new]" value="" placeholder="Neuer Bauabschnitt" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="submit" class="btn btn-primary" value="Speichern" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="net-detail-<?=$network->id?>-roles" class="tab-pane">
|
||||
<h4>Berechtigungen</h4>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<?php if(is_array($network->addresstypes) && count($network->addresstypes)): ?>
|
||||
<form class="form" method="post" action="<?=self::getUrl("NetworkAddress", "save")?>">
|
||||
<input type="hidden" name="network_id" value="<?=$network->id?>" />
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Netzeigentümer</th>
|
||||
<?php foreach(TT_NETWORK_ROLES as $role): ?>
|
||||
<th class="text-center"><?=__($role)?></th>
|
||||
<?php endforeach ?>
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php foreach($network->addresstypes as $address_id => $addresstypes): ?>
|
||||
<tr>
|
||||
<td><?=AddressModel::getOne($address_id)->getCompanyOrName()?></td>
|
||||
<td><input type="checkbox" <?=($network->owner_id == $address_id) ? "checked='checked'" : ""?> disabled="disabled" /></td>
|
||||
<?php foreach(TT_NETWORK_ROLES as $role): ?>
|
||||
<td class="text-center">
|
||||
<?php if(AddresstypeModel::getFirst(['address_id' => $address_id, 'addresstype' => [$role]]) !== null): ?>
|
||||
<input type="checkbox"
|
||||
type="checkbox"
|
||||
name="roles[<?=$address_id?>][]"
|
||||
value="<?=$role?>"
|
||||
<?php foreach($addresstypes as $type): ?>
|
||||
<?php if($type->type == $role): ?>
|
||||
checked='checked'
|
||||
<?php continue; endif; ?>
|
||||
<?php endforeach; ?>
|
||||
/>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<?php endforeach; ?>
|
||||
<td class="controls" style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||
<a href="<?=self::getUrl("NetworkAddress", "delete", ["network_id" => $network->id, "address_id" => $address_id])?>" onclick="if(!confirm('Berechtigungen wirklich löschen?')) return false;" class="text-danger" title="Löschen"><i class="fas fa-trash"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
||||
<button type="submit" class="btn btn-primary"><i class="fas fa-check"></i> Speichern</button>
|
||||
</form>
|
||||
<?php else: ?>
|
||||
<p><i>Keine berechtigten Firmen/Personen vorhanden.</i></p>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<h4 class="mt-4">Neu</h4>
|
||||
<form class="form" method="post" action="<?=self::getUrl("NetworkAddress", "create")?>">
|
||||
<input type="hidden" name="network_id" value="<?=$network->id?>" />
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th>Person / Firma</th>
|
||||
<?php foreach(TT_NETWORK_ROLES as $role): ?>
|
||||
<th class="text-center"><?=__($role)?></th>
|
||||
<?php endforeach ?>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<select class="select2 form-control" name="address_id" id="address_id">
|
||||
<option></option>
|
||||
<?php foreach(AddressModel::search(["parents_only" => 1, "addresstype" => TT_NETWORK_ROLES ]) as $address): ?>
|
||||
<?php if(is_array($network->addresstypes) && array_key_exists($address->id, $network->addresstypes)) continue; ?>
|
||||
<option value="<?=$address->id?>"><?=($address->getCompanyOrName())?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
<?php foreach(TT_NETWORK_ROLES as $role): ?>
|
||||
<td class="text-center">
|
||||
<input type="checkbox" name="roles[]" value="<?=$role?>" />
|
||||
</td>
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<button type="submit" class="btn btn-primary" ><i class="fas fa-plus"></i> Person / Firma hinzufügen</button>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="display:none;">
|
||||
<td colspan="3"></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
<?php else: ?>
|
||||
<div class="row"><p class="col-md-12"><i>Keine Netzgebiete gefunden</i></p></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function toggleNetwork(id) {
|
||||
$('#network-detail-' + id).toggle();
|
||||
if($('#network-detail-' + id).is(":hidden")) {
|
||||
$('#network-' + id).removeClass("table-info");
|
||||
$('#network-' + id).removeClass("text-info");
|
||||
} else {
|
||||
$('#network-' + id).addClass("text-info");
|
||||
$('#network-' + id).addClass("table-info");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var network;
|
||||
var hash = window.location.hash.substr(1);
|
||||
var match = hash.match(/net=(\d+)/);
|
||||
if(match && match[1]) {
|
||||
network = match[1]
|
||||
toggleNetwork(network);
|
||||
}
|
||||
match = hash.match(/view=([^&]+)/);
|
||||
if(match && match[1] && network) {
|
||||
view = match[1];
|
||||
$('a[href="#net-detail-' + network + '-' + view + '"]').tab('show');
|
||||
}
|
||||
|
||||
|
||||
//window.location.hash = "";
|
||||
|
||||
function deleteSection(id) {
|
||||
if(!confirm('Bauabschnitt wirklich löschen?')) return false;
|
||||
|
||||
window.location="<?=self::getUrl("Networksection","delete")?>/" + id;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,244 +0,0 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/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")?>">the-tool</a></li>
|
||||
<li class="breadcrumb-item active">Patchungen</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Patchungen</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("Patching")?>">
|
||||
<div class="row">
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_network_id">Netzgebiet</label>
|
||||
<select name="filter[network_id]" id="filter_network_id" class="form-control">
|
||||
<option></option>
|
||||
<?php foreach($mynetworks as $fnet): ?>
|
||||
<option value="<?=$fnet->id?>" <?=($filter['network_id'] == $fnet->id) ? "selected='selected'" : ""?>><?=$fnet->name?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_pop_id">POP</label>
|
||||
<select name="filter[pop_id]" id="filter_pop_id" class="form-control">
|
||||
<option></option>
|
||||
<?php foreach($mynetworks as $fnet): ?>
|
||||
<?php if(is_array($fnet->pops) && count($fnet->pops)): ?>
|
||||
<optgroup label="<?=$fnet->name?>">
|
||||
<?php foreach($fnet->pops as $pop): ?>
|
||||
<option value="<?=$pop->id?>" <?=($filter['pop_id'] == $pop->id) ? "selected='selected'" : ""?>><?=$pop->name?></option>
|
||||
<?php endforeach; ?>
|
||||
</optgroup>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_patched">Patchstatus</label>
|
||||
<select name="filter[patched]" id="filter_patched" class="form-control">
|
||||
<option value="0" <?=($filter['patched'] < 1) ? "selected='selected'" : ""?>>Nicht gepatched</option>
|
||||
<option value="1" <?=($filter['patched'] == 1) ? "selected='selected'" : ""?>>Gepatched</option>
|
||||
<option value="2" <?=($filter['patched'] == 2) ? "selected='selected'" : ""?>>Vorpatchen</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_hide_delayed_finish">Verzögerte Herstellung</label>
|
||||
<select name="filter[hide_delayed_finish]" id="filter_hide_delayed_finish" class="form-control">
|
||||
<option value="0" <?=(array_key_exists("hide_delayed_finish", $filter) &&$filter['hide_delayed_finish'] != 1) ? "selected='selected'" : ""?>>Anzeigen</option>
|
||||
<option value="1" <?=(!array_key_exists("hide_delayed_finish", $filter) || $filter['hide_delayed_finish'] == 1) ? "selected='selected'" : ""?>>Nicht anzeigen</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_code">Objekt ID</label>
|
||||
<input type="text" class="form-control" name="filter[code]" id="filter_code" value="<?=$filter['code']?>" />
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_street">Straße</label>
|
||||
<input type="text" class="form-control" name="filter[street]" id="filter_street" value="<?=$filter['street']?>" />
|
||||
</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("Patching")?>">Filter zurücksetzen</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
<div class="float-left">
|
||||
<h4 class="header-title">Patchungen</h4>
|
||||
</div>
|
||||
|
||||
<?php if($pagination['maxItems'] > $pagination['count']): ?>
|
||||
<nav>
|
||||
<ul class="pagination justify-content-center mb-1">
|
||||
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod, "Index", ["filter" => $filter])?>" tabindex="-1">Erste</a>
|
||||
</li>
|
||||
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $pagination['start'] - $pagination['count'], "filter" => $filter])?>" tabindex="-1">Zurück</a>
|
||||
</li>
|
||||
<?php for($i = 0; $i < ($pagination['maxItems'] / $pagination['count']); $i++): ?>
|
||||
<li class="page-item <?=($pagination['start'] == $i*$pagination['count']) ? "disabled font-weight-bold" : ""?>"><a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $i*$pagination['count'], "filter" => $filter])?>"><?=$i+1?></a></li>
|
||||
<?php endfor; ?>
|
||||
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $pagination['start'] + $pagination['count'], "filter" => $filter])?>">Vor</a>
|
||||
</li>
|
||||
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => ($pagination['maxItems'] - $pagination['maxItems'] % $pagination['count']), "filter" => $filter])?>">Letzte</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
<div class="pagination justify-content-center">
|
||||
<?php if($pagination['maxItems']): ?>
|
||||
Patchungen <?=$pagination['start']+1?> bis <?=($pagination['start'] + $pagination['count'] > $pagination['maxItems']) ? $pagination['maxItems'] : $pagination['start'] + $pagination['count']?> von <?=$pagination['maxItems']?>
|
||||
<?php else: ?>
|
||||
Keine Patchungen gefunden
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<table class="table table-striped table-hover">
|
||||
<tr class="table-bordered text-center">
|
||||
<th colspan="4">Standort</th>
|
||||
<th colspan="2">ODF</th>
|
||||
<th colspan="5">Abschluss/Device</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tr class="table-bordered">
|
||||
<th>Netzgebiet</th>
|
||||
<th>POP</th>
|
||||
<th>Kunde</th>
|
||||
<th>Standort</th>
|
||||
<th>Patchposition ODF</th>
|
||||
<th>ODF Port</th>
|
||||
<th>Typ</th>
|
||||
<th>Splitter / Gerät</th>
|
||||
<th>Port</th>
|
||||
<th>Gepatched</th>
|
||||
<th>Von</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php foreach($terminations as $term): ?>
|
||||
<tr>
|
||||
<td><?=$term->building->network->name?></td>
|
||||
<td>
|
||||
<?php if($term->getPop()): ?>
|
||||
<?=$term->getPop()->name?>
|
||||
<?php else: ?>
|
||||
<?=$term->building->pop->name?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?=($term->order->owner) ? $term->order->owner->customer_number : ""?><br /> <?=($term->order->owner) ? $term->order->owner->getCompanyOrName() : ""?></td>
|
||||
<td>
|
||||
<?=$term->building->street?><br />
|
||||
<?=$term->building->zip?> <?=$term->building->city?>
|
||||
</td>
|
||||
<td class="text-mono text-primary" title="Schrank: <?=$term->workflowitems["schrank"]->value->value_string?> / Baugruppe: <?=$term->workflowitems["baugruppe"]->value->value_string?> / Modul: <?=$term->workflowitems["modul"]->value->value_string?> / Port: <?=$term->workflowitems["ports"]->value->value_string?>">
|
||||
<?=$term->workflowitems["schrank"]->value->value_string?> /
|
||||
<?=$term->workflowitems["baugruppe"]->value->value_string?> /
|
||||
<?=$term->workflowitems["modul"]->value->value_string?> /
|
||||
<?=$term->workflowitems["ports"]->value->value_string?>
|
||||
</td>
|
||||
<td>
|
||||
<select name="linework_port" form="term-form-<?=$term->id?>" class="form-control">
|
||||
<?php foreach($term->getLineworkportPairs() as $ports): ?>
|
||||
<?php foreach($ports as $p): ?>
|
||||
<option value="<?=$p?>" <?=($term->patching->linework_ports == $p) ? "selected='selected'" : ""?>><?=$p?></option>
|
||||
<?php endforeach; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<select name="device_type" form="term-form-<?=$term->id?>" class="form-control">
|
||||
<option></option>
|
||||
<option value="splitter" <?=($term->patching->device_type == "splitter") ? "selected='selected'" : ""?>>Splitter</option>
|
||||
<option value="pon" <?=($term->patching->device_type == "pon") ? "selected='selected'" : ""?>>Shared PON-Port</option>
|
||||
<option value="switch" <?=($term->patching->device_type == "switch") ? "selected='selected'" : ""?>>Switch</option>
|
||||
</select>
|
||||
</td>
|
||||
<td><input type="text" class="form-control" form="term-form-<?=$term->id?>" name="device_name" value="<?=$term->patching->device_name?>" placeholder="Splitte / Gerät" /></td>
|
||||
<td><input type="text" class="form-control" form="term-form-<?=$term->id?>" name="device_port" value="<?=$term->patching->device_port?>" placeholder="Port" /></td>
|
||||
<td><input type="checkbox" class="form-control" form="term-form-<?=$term->id?>" name="patched" value="1" <?=($term->patching->patched == 1) ? "checked='checked'" : ""?> /></td>
|
||||
<td <?=($term->patching->patched == 1 && $term->patching->patched_by) ? "title='Gepatched: ".date("d.m.Y H:i",$term->patching->patched_date)." von ".$term->patching->patcher->name." (".$term->patching->patcher->address->getCompanyOrName(true).")'" : ""?>>
|
||||
|
||||
<?php if($term->patching->patched == 1 && $term->patching->patched_by): ?>
|
||||
<?=($term->patching->patcher) ? $term->patching->patcher->getAbbrName() : ""?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
<form method="post" id="term-form-<?=$term->id?>" action="<?=self::getUrl("Patching","save", ["s" => $pagination['start'], "filter" => $filter])?>">
|
||||
<input type="hidden" name="termination_id" value="<?=$term->id?>" />
|
||||
<input type="submit" class="btn btn-primary" value="Speichern" />
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
||||
<?php if($pagination['maxItems'] > $pagination['count']): ?>
|
||||
<nav>
|
||||
<ul class="pagination justify-content-center mb-1">
|
||||
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod, "Index", ["filter" => $filter])?>" tabindex="-1">Erste</a>
|
||||
</li>
|
||||
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $pagination['start'] - $pagination['count'], "filter" => $filter])?>" tabindex="-1">Zurück</a>
|
||||
</li>
|
||||
<?php for($i = 0; $i < ($pagination['maxItems'] / $pagination['count']); $i++): ?>
|
||||
<li class="page-item <?=($pagination['start'] == $i*$pagination['count']) ? "disabled font-weight-bold" : ""?>"><a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $i*$pagination['count'], "filter" => $filter])?>"><?=$i+1?></a></li>
|
||||
<?php endfor; ?>
|
||||
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $pagination['start'] + $pagination['count'], "filter" => $filter])?>">Vor</a>
|
||||
</li>
|
||||
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => ($pagination['maxItems'] - $pagination['maxItems'] % $pagination['count']), "filter" => $filter])?>">Letzte</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
<div class="pagination justify-content-center">
|
||||
<?php if($pagination['maxItems']): ?>
|
||||
Patchungen <?=$pagination['start']+1?> bis <?=($pagination['start'] + $pagination['count'] > $pagination['maxItems']) ? $pagination['maxItems'] : $pagination['start'] + $pagination['count']?> von <?=$pagination['maxItems']?>
|
||||
<?php else: ?>
|
||||
Keine Patchungen gefunden
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
||||
@@ -1,333 +0,0 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
||||
<?php $wftype = "building"; ?>
|
||||
|
||||
|
||||
<!-- 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")?>">the-tool</a></li>
|
||||
<li class="breadcrumb-item active">Tiefbau</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Tiefbau</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("Pipework")?>">
|
||||
<div class="row">
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_network_id">Netzgebiet</label>
|
||||
<select name="filter[network_id]" id="filter_network_id" class="form-control">
|
||||
<option></option>
|
||||
<?php foreach($mynetworks as $fnet): ?>
|
||||
<option value="<?=$fnet->id?>" <?=($filter['network_id'] == $fnet->id) ? "selected='selected'" : ""?>><?=$fnet->name?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_networksection_id">Bauabschnitt</label>
|
||||
<select name="filter[networksection_id]" id="filter_networksection_id" class="form-control">
|
||||
<option></option>
|
||||
<?php foreach($mynetworks as $fnet): ?>
|
||||
<?php if(is_array($fnet->sections) && count($fnet->sections)): ?>
|
||||
<optgroup label="<?=$fnet->name?>">
|
||||
<?php foreach($fnet->sections as $section): ?>
|
||||
<option value="<?=$section->id?>" <?=($filter['networksection_id'] == $section->id) ? "selected='selected'" : ""?>><?=$section->name?></option>
|
||||
<?php endforeach; ?>
|
||||
</optgroup>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_status_id">Objektstatus</label>
|
||||
<select name="filter[status_id]" id="filter_status_id" class="form-control">
|
||||
<option></option>
|
||||
<?php foreach(BuildingstatusModel::getAll() as $status): ?>
|
||||
<option
|
||||
value="<?=$status->id?>"
|
||||
<?php if(is_array($filter)): ?>
|
||||
<?=($filter['status_id'] == $status->id) ? "selected='selected'" : ""?>
|
||||
<?php else: ?>
|
||||
<?=(!array_key_exists("status_id", $filter) && $status->id == 3) ? "selected='selected'" : ""?>
|
||||
<?php endif; ?>
|
||||
>
|
||||
<?=$status->code?> - <?=__($status->name."-b")?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_code">Objekt ID</label>
|
||||
<input type="text" class="form-control" name="filter[code]" id="filter_code" value="<?=$filter['code']?>" />
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_street">Straße</label>
|
||||
<input type="text" class="form-control" name="filter[street]" id="filter_street" value="<?=$filter['street']?>" />
|
||||
</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("Pipework")?>">Filter zurücksetzen</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
<h4 class="header-title">Auftragsliste nach Netzgebiet</h4>
|
||||
|
||||
<?php if($pagination['maxItems'] > $pagination['count']): ?>
|
||||
<nav>
|
||||
<ul class="pagination justify-content-center mb-1">
|
||||
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod, "Index", ["filter" => $filter])?>" tabindex="-1">Erste</a>
|
||||
</li>
|
||||
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $pagination['start'] - $pagination['count'], "filter" => $filter])?>" tabindex="-1">Zurück</a>
|
||||
</li>
|
||||
<?php for($i = 0; $i < ($pagination['maxItems'] / $pagination['count']); $i++): ?>
|
||||
<li class="page-item <?=($pagination['start'] == $i*$pagination['count']) ? "disabled font-weight-bold" : ""?>"><a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $i*$pagination['count'], "filter" => $filter])?>"><?=$i+1?></a></li>
|
||||
<?php endfor; ?>
|
||||
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $pagination['start'] + $pagination['count'], "filter" => $filter])?>">Vor</a>
|
||||
</li>
|
||||
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => ($pagination['maxItems'] - $pagination['maxItems'] % $pagination['count']), "filter" => $filter])?>">Letzte</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
<div class="pagination justify-content-center">
|
||||
<?php if($pagination['maxItems']): ?>
|
||||
Tiefbauaufträge <?=$pagination['start']+1?> bis <?=($pagination['start'] + $pagination['count'] > $pagination['maxItems']) ? $pagination['maxItems'] : $pagination['start'] + $pagination['count']?> von <?=$pagination['maxItems']?>
|
||||
<?php else: ?>
|
||||
Keine Tiefbauaufträge gefunden
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if(is_array($networks) && count($networks)): ?>
|
||||
<?php foreach($networks as $networkname => $buildings): ?>
|
||||
<?php if(!count($buildings)) continue; ?>
|
||||
<h4><?=$networkname?></h4>
|
||||
<table class="table workflow-table">
|
||||
<?php $bcount = 0; foreach($buildings as $building): ?>
|
||||
<?php
|
||||
$rowspan = 1;
|
||||
foreach($building->workflowitems as $item) {
|
||||
if($item->type == "delimiter") {
|
||||
$rowspan++;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<tr id="building-<?=$building->id?>" class="table-bg-<?=($bcount % 2 == 0) ? "even" : "odd"?>">
|
||||
<td>
|
||||
<div>
|
||||
<strong style="white-space: nowrap;"><?=$building->street?></strong><br />
|
||||
<span class="text-success"><?=$building->code?></span><br />
|
||||
</div>
|
||||
<div class="mt-3">
|
||||
<?=$building->contact?><br />
|
||||
<strong><?=$building->phone?></strong><br />
|
||||
<?=$building->email?>
|
||||
</div>
|
||||
<div class="mt-3">
|
||||
<label <?=(!$building->pipeworker_id) ? "class='text-danger' title='Keine Tiefbaufirma ausgewählt'" : ""?>><input type="checkbox" form="wf-building-<?=$building->id?>" name="pipework_enabled" value="1" <?=($building->pipework_enabled==1) ? "checked='checked'" : ""?> <?=(!$building->pipeworker_id || !$me->is(["Admin", "pipeplanner"])) ? "disabled='disabled'" : ""?>> Baufreigabe</label>
|
||||
</div>
|
||||
<div class="mt-3">
|
||||
<button type="button" class="btn btn-primary" form="wf-building-<?=$building->id?>" onclick="document.getElementById(this.getAttribute('form')).submit()">Speichern</button>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<form method="post" name="wf-building-<?=$building->id?>" id="wf-building-<?=$building->id?>" action="<?=self::getUrl("Pipework","save", ["s" => $pagination['start'], "filter" => $filter])?>" enctype="multipart/form-data" >
|
||||
<input type="hidden" name="id" value="<?=$building->id?>" />
|
||||
<table class="table workflow-table">
|
||||
<?php $i = 0; foreach($building->workflowitems as $item): ?>
|
||||
<?php if($i==0): ?>
|
||||
<?php if($item->type == "delimiter"): ?>
|
||||
<tr class="workflow-header"><th colspan='<?=$wfColspan?>'><?=$item->label?></th></tr><tr>
|
||||
<?php else: ?>
|
||||
<tr>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php if($item->type == "delimiter"): ?>
|
||||
</tr><tr class="workflow-header"><th colspan='<?=$wfColspan?>'><?=$item->label?></th></tr><tr>
|
||||
<?php else: ?>
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/Workflow/form.php"); ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php $i++; endforeach; ?>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<label class="form-label">Kommentar</label> <textarea class="form-control" style="height:100%" form="wf-building-<?=$building->id?>" name="workflow_comment" id="workflow_comment_<?=$building->id?>"><?=$building->workflow_comment?></textarea>
|
||||
</td>
|
||||
<td colspan="<?=$wfColspan - 3?>">
|
||||
<h5>Dokumente</h5>
|
||||
<table class="table-sm">
|
||||
<?php $i=0; foreach($building->files as $file): ?>
|
||||
<?php if($i % 2 == 0): ?>
|
||||
<tr>
|
||||
<td title="<?=$file->file->filename?>">
|
||||
<a href="<?=self::getUrl("BuildingFile", "delete", ['id' => $file->id, "from" => "pipework"])?>" onclick="if(!confirm('Dokument wirklich löschen?')) return false;" class="text-danger mr-1" title="Dokument löschen">
|
||||
<i class="fas fa-trash"></i>
|
||||
</a>
|
||||
<a href="<?=self::getUrl("File", "Download", ['id' => $file->file->id])?>">
|
||||
<i class="fas fa-download"></i> <?=$file->type?>
|
||||
</a>
|
||||
</td>
|
||||
<?php else: ?>
|
||||
<td title="<?=$file->file->filename?>">
|
||||
<a href="<?=self::getUrl("BuildingFile", "delete", ['id' => $file->id, "from" => "pipework"])?>" onclick="if(!confirm('Dokument wirklich löschen?')) return false;" class="text-danger mr-1" title="Dokument löschen">
|
||||
<i class="fas fa-trash"></i>
|
||||
</a>
|
||||
<a href="<?=self::getUrl("File", "Download", ['id' => $file->file->id])?>">
|
||||
<i class="fas fa-download"></i> <?=$file->type?>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php $i++; endforeach; ?>
|
||||
<?=($i % 2 != 0) ? "<td></td></tr>" : ""?>
|
||||
<tr>
|
||||
<td>
|
||||
<strong>Dokument hochladen</strong> <select class="form-control" name="file_type">
|
||||
<?php foreach(TT_WORKFLOW_BUILDING_FILE_TYPES as $type): ?>
|
||||
<option value="<?=$type?>"><?=$type?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<small>Erlaubte Dateiendungen: <?=MFUPLOAD_ALLOWED_EXTENSIONS_STR?></small>
|
||||
<input type="file" name="PipeworkFileUpload" class="form-control-file" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $bcount++; endforeach; ?>
|
||||
</table>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php if($pagination['maxItems'] > $pagination['count']): ?>
|
||||
<div class="pagination justify-content-center">
|
||||
<?php if($pagination['maxItems']): ?>
|
||||
Tiefbauaufträge <?=$pagination['start']+1?> bis <?=($pagination['start'] + $pagination['count'] > $pagination['maxItems']) ? $pagination['maxItems'] : $pagination['start'] + $pagination['count']?> von <?=$pagination['maxItems']?>
|
||||
<?php else: ?>
|
||||
Keine Tiefbauaufträge gefunden
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<nav>
|
||||
<ul class="pagination justify-content-center mb-1">
|
||||
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod)?>" tabindex="-1">Erste</a>
|
||||
</li>
|
||||
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $pagination['start'] - $pagination['count'], "filter" => $filter])?>" tabindex="-1">Zurück</a>
|
||||
</li>
|
||||
<?php for($i = 0; $i < ($pagination['maxItems'] / $pagination['count']); $i++): ?>
|
||||
<li class="page-item <?=($pagination['start'] == $i*$pagination['count']) ? "disabled font-weight-bold" : ""?>"><a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $i*$pagination['count'], "filter" => $filter])?>"><?=$i+1?></a></li>
|
||||
<?php endfor; ?>
|
||||
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $pagination['start'] + $pagination['count'], "filter" => $filter])?>">Vor</a>
|
||||
</li>
|
||||
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => ($pagination['maxItems'] - $pagination['maxItems'] % $pagination['count']), "filter" => $filter])?>">Letzte</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php else: ?>
|
||||
<i>Keine Bauaufträge gefunden</i>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function() {
|
||||
var building;
|
||||
var hash = window.location.hash.substr(1);
|
||||
var match = hash.match(/object=(\d+)/);
|
||||
if(match && match[1]) {
|
||||
building = match[1]
|
||||
var pos = $('#building-' + building).offset().top;
|
||||
$(window).scrollTop(pos - 150 );
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
$('select[name=wfitem_pipework_finished]').each(function() {
|
||||
var elem = this;
|
||||
//console.log(elem);
|
||||
$(elem).click(function() {
|
||||
var id_match = $(this).attr("id").match(/wfitem_pipework_finished_(\d+)$/);
|
||||
var id = id_match[1];
|
||||
//console.log(id);
|
||||
|
||||
var ap_type=$('#wfitem_anschlusspunkt_typ_' + id).val();
|
||||
var ap_name=$('#wfitem_anschlusspunkt_name_' + id).val();
|
||||
var rohrname=$('#wfitem_rohrverband_name_' + id).val();
|
||||
var rohrtype=$('#wfitem_rohrtype_' + id).val();
|
||||
var rohrfarbe=$('#wfitem_rohrfarbe_' + id).val();
|
||||
|
||||
var ist_ap_type=$('#wfitem_ist_anschlusspunkt_typ_' + id).val();
|
||||
var ist_ap_name=$('#wfitem_ist_anschlusspunkt_name_' + id).val();
|
||||
var ist_rohrname=$('#wfitem_ist_rohrverband_name_' + id).val();
|
||||
var ist_rohrtype=$('#wfitem_ist_rohrtype_' + id).val();
|
||||
var ist_rohrfarbe=$('#wfitem_ist_rohrfarbe_' + id).val();
|
||||
|
||||
//console.log(ap_type, ap_name, rohrname, rohrtype, rohrfarbe);
|
||||
|
||||
if((!ap_type && !ist_ap_type) || (!ap_name && !ist_ap_type) || (!rohrname && !ist_rohrname) || (!rohrtype || !ist_rohrtype) || (!rohrfarbe && !ist_rohrfarbe)) {
|
||||
$(this).find("option").attr("disabled", true);
|
||||
}
|
||||
|
||||
if((ap_type || ist_ap_type) && (ap_name || ist_ap_name) && (rohrname || ist_rohrname) && (rohrtype || ist_rohrtype) && (rohrfarbe || ist_rohrfarbe)) {
|
||||
//console.log("enable");
|
||||
$(this).find("option").removeAttr("disabled");
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
||||
@@ -1,150 +0,0 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/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")?>">the-tool</a></li>
|
||||
<li class="breadcrumb-item"><a href="<?=self::getUrl("Network")?>">Netzgebiete</a></li>
|
||||
<li class="breadcrumb-item">POP</li>
|
||||
<li class="breadcrumb-item active"><?=($pop->id) ? "bearbeiten" : "Neu" ?></li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title"><?=($pop->id) ? "POP bearbeiten" : "Neuer POP" ?></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"><?=($pop->id) ? "POP bearbeiten" : "Neuer POP"?></h4>
|
||||
|
||||
<form class="form-horizontal" method="post" action="<?=self::getUrl("Pop", "save")?>">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<input type="hidden" name="id" value="<?=$pop->id?>" />
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="network_id">Netzgebiet</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="select2 form-control " name="network_id" id="owner_id">
|
||||
<option></option>
|
||||
<?php foreach($networks as $network): ?>
|
||||
<option value="<?=$network->id?>" <?=($pop->network_id == $network->id) ? "selected='selected'" : ""?>><?=($network->name)?></option>
|
||||
<?php endforeach; ?>
|
||||
</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="<?=$pop->name?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="gps_lat">GPS Breite</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="number" step="any" class="form-control" name="gps_lat" id="name" value="<?=$pop->gps_lat?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="gps_long">GPS Länge</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="number" step="any" class="form-control" name="gps_long" id="name" value="<?=$pop->gps_long?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="location">Standortinfo</label>
|
||||
<div class="col-lg-10">
|
||||
<textarea id="note" class="form-control" name="location" rows="5"><?=$pop->location?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h2 class="header-title mb-2">Access VLANs</h2>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="vlan_public">Public</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="number" class="form-control" name="vlan_public" id="vlan_public" value="<?=$pop->vlan_public?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="vlan_nat">NAT</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="number" class="form-control" name="vlan_nat" id="vlan_nat" value="<?=$pop->vlan_nat?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="vlan_ipv6">IPv6</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="number" class="form-control" name="vlan_ipv6" id="vlan_ipv6" value="<?=$pop->vlan_ipv6?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<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"><?=$pop->note?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</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>
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#parent_id").select2({
|
||||
allowClear: true,
|
||||
placeholder: ""
|
||||
});
|
||||
$("#addresstypes").select2();
|
||||
|
||||
// disable mousewheel on a input number field when in focus
|
||||
$('form').on('focus', 'input[type=number]', function (e) {
|
||||
$(this).on('wheel.disableScroll', function (e) {
|
||||
e.preventDefault()
|
||||
})
|
||||
});
|
||||
$('form').on('blur', 'input[type=number]', function (e) {
|
||||
$(this).off('wheel.disableScroll')
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
||||
@@ -1,284 +0,0 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/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")?>">the-tool</a></li>
|
||||
<li class="breadcrumb-item"><a href="<?=self::getUrl("Product")?>">Produkte</a></li>
|
||||
<li class="breadcrumb-item active"><?=($product->id) ? "bearbeiten" : "Neu" ?></li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Produkte</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"><?=($product->id) ? "Produkt bearbeiten" : "Neues Produkt"?></h4>
|
||||
|
||||
<form class="form-horizontal" method="post" action="<?=self::getUrl("Product", "save")?>">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<input type="hidden" name="id" value="<?=$product->id?>" />
|
||||
|
||||
<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="<?=$product->name?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="description">Beschreibung</label>
|
||||
<div class="col-lg-10">
|
||||
<textarea name="description" id="description" class="form-control" rows="2"><?=$product->description?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="external">Fremdprodukt *</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="select2 form-control " name="external" id="external">
|
||||
<option value="0" <?=($product->external != 1) ? "selected='selected'" : ""?>>Nein</option>
|
||||
<option value="1" <?=($product->external == 1) ? "selected='selected'" : ""?>>Ja</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="productgroup_id">Produktgruppe *</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="select2 form-control" name="productgroup_id" id="productgroup_id">
|
||||
<option></option>
|
||||
<option value="new">Neue Produktgruppe...</option>
|
||||
<?php foreach($productgroups as $group): ?>
|
||||
<option value="<?=$group->id?>" <?=($product->productgroup_id == $group->id) ? "selected='selected'" : ""?>><?=$group->name?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row" id="productgroup_form" style="display:none;">
|
||||
<label class="col-lg-2 col-form-label" for="productgroup_new"></label>
|
||||
<div class="col-lg-10">
|
||||
<div class="row">
|
||||
<div class="col-lg-2">Neue Produktgruppe:</div>
|
||||
<div class="col-lg-10">
|
||||
Name: <input type="text" class="form-control" name="productgroup_new_name" id="productgroup_new_name" value="<?=$productgroup_new_name?>">
|
||||
Beschreibung: <textarea class="form-control" name="productgroup_new_description" id="productgroup_new_description"><?=$productgroup_new_description?></textarea>
|
||||
Interne Notiz: <textarea class="form-control" name="productgroup_new_note" id="productgroup_new_note"><?=$productgroup_new_note?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="producttech_id">Technologie</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="select2 form-control " name="producttech_id" id="producttech_id">
|
||||
<option></option>
|
||||
<option value="new">Neue Technologie...</option>
|
||||
<?php foreach($producttechs as $tech): ?>
|
||||
<option value="<?=$tech->id?>" <?=($product->producttech_id == $tech->id) ? "selected='selected'" : ""?>><?=$tech->name?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row" id="producttech_form" style="display: none;">
|
||||
<label class="col-lg-2 col-form-label" for="producttech_new"></label>
|
||||
<div class="col-lg-10">
|
||||
<div class="row">
|
||||
<div class="col-lg-2">Neue Technologie:</div>
|
||||
<div class="col-lg-10">
|
||||
Name: <input type="text" class="form-control" name="producttech_new_name" id="producttech_new_name" value="<?=$producttech_new_name?>">
|
||||
Kundentyp: <select name="producttech_new_customer_type" class="form-control"><option value="residential">Residential</option><option value="business">Business</option></select>
|
||||
RTR Code: <input type="text" class="form-control" name="producttech_new_rtrcode" id="producttech_new_rtrcode" value="<?=$producttech_new_rtrcode?>">
|
||||
Beschreibung: <textarea class="form-control" name="producttech_new_description" id="productgroup_new_description"><?=$producttech_new_description?></textarea>
|
||||
Interne Notiz: <textarea class="form-control" name="producttech_new_note" id="productgroup_new_note"><?=$producttech_new_note?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="sla_id">SLA</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="select2 form-control " name="sla_id" id="sla_id">
|
||||
<option></option>
|
||||
<?php foreach($slas as $sla): ?>
|
||||
<option value="<?=$sla->id?>" <?=($product->sla_id == $sla->id) ? "selected='selected'" : ""?>><?=$sla->name?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="networks">Netzgebiete</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="select2 form-control select2-multiple" name="networks[]" id="networks" multiple="multiple" data-placeholder="Choose ...">
|
||||
<option></option>
|
||||
<?php foreach($networks as $network): ?>
|
||||
<option value="<?=$network->id?>" <?=(is_array($product->networks) && array_key_exists($network->id, $product->networks)) ? "selected='selected'" : ""?>><?=$network->name?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="ivt_id">IVT Produkt ID</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="ivt_id" id="ivt_id" value="<?=$product->ivt_id?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4 class="header-title mb-2">Verrechnungsdaten</h4>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="price">Setup Preis Netto (Einmalig) *</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" name="price_setup" id="price_setup" class="form-control" value="<?=$this::dotToComma($product->price_setup)?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="price">Verkaufspreis Netto (Periodisch) *</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" name="price" id="price" class="form-control" value="<?=$this::dotToComma($product->price)?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="nne">Netznutzungsentgelt (NNE)</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="price_nne" id="price_nne" value="<?=$this::dotToComma($product->price_nne)?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="nbe">Netzbetriebsentgelt (NBE)</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="price_nbe" id="price_nbe" value="<?=$this::dotToComma($product->price_nbe)?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="billing_period">Verrechnungsperiode *</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="select2 form-control " name="billing_period" id="billing_period">
|
||||
<option value="12" <?=($product->billing_period == 12) ? "selected='selected'" : ""?>>Jährlich</option>
|
||||
<option value="1" <?=($product->billing_period == 1) ? "selected='selected'" : ""?>>Monatlich</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="billing_delay">Verzögerter Verrechnungsstart (Monate)</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" name="billing_delay" id="billing_delay" class="form-control" value="<?=$this::dotToComma($product->billing_delay)?>" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<?php if(is_array($product->attributes) && count($product->attributes)): ?>
|
||||
<h4 class="header-title mb-2">Produktattribute</h4>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<?php foreach($product->attributes as $attrib): ?>
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="attributes_<?=$attrib->producttechattribute_id?>"><?=$attrib->displayname?></label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="attributes[<?=$attrib->producttechattribute_id?>]" id="attributes_<?=$attrib->producttechattribute_id?>" value="<?=$attrib->value?>" />
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<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"><?=$product->note?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</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>
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#productgroup_id").select2({
|
||||
allowClear: true,
|
||||
placeholder: ""
|
||||
});
|
||||
$("#producttech_id").select2({
|
||||
allowClear: true,
|
||||
placeholder: ""
|
||||
});
|
||||
$("#networks").select2({
|
||||
allowClear: true,
|
||||
placeholder: ""
|
||||
});
|
||||
|
||||
$('#productgroup_id').change(function() {
|
||||
var value = $('#productgroup_id option:selected').val();
|
||||
console.log(value);
|
||||
if(value == "new") {
|
||||
$('#productgroup_form').show();
|
||||
} else {
|
||||
$('#productgroup_form').hide();
|
||||
}
|
||||
});
|
||||
|
||||
$('#producttech_id').change(function() {
|
||||
var value = $('#producttech_id option:selected').val();
|
||||
console.log(value);
|
||||
if(value == "new") {
|
||||
$('#producttech_form').show();
|
||||
} else {
|
||||
$('#producttech_form').hide();
|
||||
}
|
||||
});
|
||||
|
||||
// disable mousewheel on input number field when in focus
|
||||
$('form').on('focus', 'input[type=number]', function (e) {
|
||||
$(this).on('wheel.disableScroll', function (e) {
|
||||
e.preventDefault()
|
||||
})
|
||||
});
|
||||
$('form').on('blur', 'input[type=number]', function (e) {
|
||||
$(this).off('wheel.disableScroll')
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
||||
@@ -1,68 +0,0 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/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")?>">the-tool</a></li>
|
||||
<li class="breadcrumb-item active">Produkte</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Produkte</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
<div class="float-left">
|
||||
<h4 class="header-title">Liste aller Produkte</h4>
|
||||
</div>
|
||||
<div class="float-right">
|
||||
<a class="btn btn-primary mb-2" href="<?=self::getUrl("Product", "add")?>"><i class="fas fa-plus"></i> Neues Produkt anlegen</a>
|
||||
</div>
|
||||
|
||||
<table class="table table-striped table-hover">
|
||||
<tr>
|
||||
<th>Netzgebiete</th>
|
||||
<th>Gruppe</th>
|
||||
<th>Name</th>
|
||||
<th>Technologie</th>
|
||||
<th>Kundentyp</th>
|
||||
<th>Verkaufspreis</th>
|
||||
<th>Verr. Periode</th>
|
||||
<th>SLA</th>
|
||||
<th>IVT ID</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php foreach($products as $product): ?>
|
||||
<tr>
|
||||
<td><?=(count($product->networks)) ? array_shift($product->networks)->name . ((count($product->networks) > 1) ? ", ..." : "") : ""?></td>
|
||||
<td><?=$product->productgroup->name?></td>
|
||||
<td><?=$product->name?></td>
|
||||
<td><?=$product->producttech->name?> (<?=$product->attributes[TT_ATTRIB_RTRTECHCODE_NAME]->value?>)</td>
|
||||
<td><?=__($product->producttech->customer_type)?></td>
|
||||
<td><?=$product->price?></td>
|
||||
<td><?=(12 / $product->billing_period)?>x Jährlich</td>
|
||||
<td><?=$product->sla->name?></td>
|
||||
<td><?=$product->ivt_id?></td>
|
||||
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||
<a href="<?=self::getUrl("Product", "edit", ["id" => $product->id])?>"><i class="far fa-edit" title="Produkt Bearbeiten"></i></a>
|
||||
<a href="<?=self::getUrl("Product", "delete", ["id" => $product->id])?>" class="text-danger" onclick="if(!confirm('Berechtigungen wirklich löschen?')) return false;" title="Produkt Löschen"><i class="fas fa-trash"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
||||
@@ -1,228 +0,0 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/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")?>">the-tool</a></li>
|
||||
<li class="breadcrumb-item"><a href="<?=self::getUrl("Product")?>">Produkte</a></li>
|
||||
<li class="breadcrumb-item"><a href="<?=self::getUrl("Producttech")?>">Technologien</a></li>
|
||||
<li class="breadcrumb-item active"><?=($producttech->id) ? "bearbeiten" : "Neu" ?></li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Technologien</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"><?=($producttech->id) ? "Technologie bearbeiten" : "Neue Technologie"?></h4>
|
||||
|
||||
<form class="form-horizontal" method="post" action="<?=self::getUrl("Producttech", "save")?>">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<input type="hidden" name="id" value="<?=$producttech->id?>" />
|
||||
|
||||
<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="<?=$producttech->name?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="customer_type">Kundentyp</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="select2 form-control " name="customer_type" id="customer_type">
|
||||
<option value="residential" <?=($producttech->customer_type != "business") ? "selected='selected'" : ""?>>Residential</option>
|
||||
<option value="business" <?=($producttech->customer_type == "business") ? "selected='selected'" : ""?>>Business</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="description">Beschreibung</label>
|
||||
<div class="col-lg-10">
|
||||
<textarea name="description" id="description" class="form-control" rows="2"><?=$producttech->description?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4 class="header-title mb-2">Produktattribute</h4>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<?php if(is_array($producttech->attributes) && count($producttech->attributes)): ?>
|
||||
<?php $i=0; foreach($producttech->attributes as $attribute): ?>
|
||||
<div class="p-2 <?=($i % 2 == 0) ? "bg-light" : ""?>">
|
||||
<div class="row">
|
||||
<div class="col-md-11 float-left">
|
||||
<h4 class="header-title">Attribut <span class="text-monospace text-pink"><?=$attribute->name?></span></h4>
|
||||
</div>
|
||||
<div class="col-md-1 float-right">
|
||||
<small><a class="text-danger" href="<?=self::getUrl("ProducttechAttribute", "delete", ['id' => $attribute->id])?>" onclick="if(!confirm('Attribut wirklich löschen?')) return false;"><i class="fas fa-trash-alt"></i> löschen</a></small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="attributes_<?=$attribute->id?>_name">Name <small class="text-monospace">[a-z0-9._-]</small></label>
|
||||
<input type="text" class="form-control" id="attributes_<?=$attribute->id?>_name" name="attributes[<?=$attribute->id?>][name]" value="<?=$attribute->name?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="attributes_<?=$attribute->id?>_displayname">Anzeigename</label>
|
||||
<input type="text" class="form-control" id="attributes_<?=$attribute->id?>_displayname" name="attributes[<?=$attribute->id?>][displayname]" value="<?=$attribute->displayname?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="attributes_<?=$attribute->id?>_value">Standardwert</label>
|
||||
<input type="text" class="form-control" id="attributes_<?=$attribute->id?>_value" name="attributes[<?=$attribute->id?>][value]" value="<?=$attribute->value?>">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="attributes_<?=$attribute->id?>_description">Beschreibung</label>
|
||||
<input type="text" class="form-control" id="attributes_<?=$attribute->id?>_description" name="attributes[<?=$attribute->id?>][description]" value="<?=$attribute->description?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="attributes_<?=$attribute->id?>_note">Interne Notiz</label>
|
||||
<input type="text" class="form-control" id="attributes_<?=$attribute->id?>_note" name="attributes[<?=$attribute->id?>][note]" value="<?=$attribute->note?>" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php $i++; endforeach; ?>
|
||||
|
||||
<?php endif; ?>
|
||||
<hr />
|
||||
<h4 class="header-title">Neues Attribut:</h4>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="attributes_new_name">Name <small class="text-monospace">[a-z0-9._-]</small></label>
|
||||
<input type="text" class="form-control" id="attributes_new_name" name="attributes[new][name]" value="" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="attributes_new_displayname">Anzeigename</label>
|
||||
<input type="text" class="form-control" id="attributes_new_displayname" name="attributes[new][displayname]" value="" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label for="attributes_new_value">Standardwert</label>
|
||||
<input type="text" class="form-control" id="attributes_new_value" name="attributes[new][value]" value="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="attributes_new_description">Beschreibung</label>
|
||||
<input type="text" class="form-control" id="attributes_new_description" name="attributes[new][description]" value="" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="attributes_new_note">Interne Notiz</label>
|
||||
<input type="text" class="form-control" id="attributes_new_note" name="attributes[new][note]" value="" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<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"><?=$product->note?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</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>
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#productgroup_id").select2({
|
||||
allowClear: true,
|
||||
placeholder: ""
|
||||
});
|
||||
$("#producttech_id").select2({
|
||||
allowClear: true,
|
||||
placeholder: ""
|
||||
});
|
||||
$("#networks").select2({
|
||||
allowClear: true,
|
||||
placeholder: ""
|
||||
});
|
||||
|
||||
$('#productgroup_id').change(function() {
|
||||
var value = $('#productgroup_id option:selected').val();
|
||||
console.log(value);
|
||||
if(value == "new") {
|
||||
$('#productgroup_form').show();
|
||||
} else {
|
||||
$('#productgroup_form').hide();
|
||||
}
|
||||
});
|
||||
|
||||
$('#producttech_id').change(function() {
|
||||
var value = $('#producttech_id option:selected').val();
|
||||
console.log(value);
|
||||
if(value == "new") {
|
||||
$('#producttech_form').show();
|
||||
} else {
|
||||
$('#producttech_form').hide();
|
||||
}
|
||||
});
|
||||
|
||||
// disable mousewheel on input number field when in focus
|
||||
$('form').on('focus', 'input[type=number]', function (e) {
|
||||
$(this).on('wheel.disableScroll', function (e) {
|
||||
e.preventDefault()
|
||||
})
|
||||
});
|
||||
$('form').on('blur', 'input[type=number]', function (e) {
|
||||
$(this).off('wheel.disableScroll')
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
||||
@@ -1,55 +0,0 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/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")?>">the-tool</a></li>
|
||||
<li class="breadcrumb-item"><a href="<?=self::getUrl("Product")?>">Produkte</a></li>
|
||||
<li class="breadcrumb-item active">Technologien</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Produkttechnologien</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
<div class="float-left">
|
||||
<h4 class="header-title">Liste aller Technologien</h4>
|
||||
</div>
|
||||
<div class="float-right">
|
||||
<a class="btn btn-primary mb-2" href="<?=self::getUrl("Producttech", "add")?>"><i class="fas fa-plus"></i> Neue Technologie anlegen</a>
|
||||
</div>
|
||||
|
||||
<table class="table table-striped table-hover">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Kundentyp</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php foreach($producttechs as $tech): ?>
|
||||
<tr>
|
||||
<td><?=$tech->name?></td>
|
||||
<td><?=__($tech->customer_type)?></td>
|
||||
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||
<a href="<?=self::getUrl("Producttech", "edit", ["id" => $tech->id])?>"><i class="far fa-edit" title="Technologie Bearbeiten"></i></a>
|
||||
<a href="<?=self::getUrl("Producttech", "delete", ["id" => $tech->id])?>" class="text-danger" onclick="if(!confirm('Technologie wirklich löschen?')) return false;" title="Technologie Löschen"><i class="fas fa-trash"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
||||
@@ -1,87 +0,0 @@
|
||||
<?php
|
||||
$siteTitle = "Benutzer";
|
||||
?>
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/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")?>">the-tool</a></li>
|
||||
<li class="breadcrumb-item"><a href="<?=self::getUrl("User")?>">Benutzer</a></li>
|
||||
<li class="breadcrumb-item"><?=($action == "edit") ? "bearbeiten" : "neu"?></li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Benutzer</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
<!-- Main content -->
|
||||
<div class="row">
|
||||
<div class="col-lg">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title mb-3">Benutzer bearbeiten</h4>
|
||||
|
||||
<form method="post" action="<?=$this->getUrl("User","save")?>">
|
||||
<input type="hidden" name="id" value="<?=$user->id?>" />
|
||||
<div class="form-group">
|
||||
<label for="username">Username:</label>
|
||||
<input type="text" id="username" name="username" class="form-control" value="<?=$user->username?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="name">Name:</label>
|
||||
<input type="text" id="name" name="name" class="form-control" value="<?=$user->name?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email">Email:</label>
|
||||
<input type="text" id="email" name="email" class="form-control" value="<?=$user->email?>" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="address_id">Firma/Person:</label>
|
||||
<select name="address_id" id="address_id" class="form-control">
|
||||
<option value=""></option>
|
||||
<?php foreach($addresses as $address): ?>
|
||||
<option value="<?=$address->id?>" <?=($address->id == $user->address_id || $address->id == $address_id) ? "selected='selected'" : ""?>><?=($address->company) ? $address->company : $address->getFullName()?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="admin">Admin:</label>
|
||||
<select name="admin" class="form-control" <?=($user->id == 1) ? "disabled='disabled'" : ""?>>
|
||||
<option value="false" <?=(isset($user) && !$user->isAdmin()) ? "selected='selected'" : ""?>>No</option>
|
||||
<option value="true" <?=(isset($user) && $user->isAdmin() || $user->id == 1) ? "selected='selected'" : ""?>>Yes</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password">Password:</label>
|
||||
<input type="password" id="password" name="password" class="form-control" value="" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password2">Repeat Password:</label>
|
||||
<input type="password" id="password2" name="password2" class="form-control" value="" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<input type="submit" name="submit" value="Speichern" class="btn btn-primary" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#address_id").select2({
|
||||
allowClear: true,
|
||||
placeholder: ""
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?><?php
|
||||
@@ -1,85 +0,0 @@
|
||||
<?php
|
||||
$siteTitle = "Benutzer";
|
||||
?>
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/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")?>">the-tool</a></li>
|
||||
<li class="breadcrumb-item active">Benutzer</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Benutzer</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
<!-- Main content -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
<div class="float-left">
|
||||
<h4 class="header-title">Benutzerliste</h4>
|
||||
<p class="sub-header">
|
||||
<?php if(is_array($filter) && count($filter)): ?>
|
||||
<?php if($filter['address_id']): ?>
|
||||
Zugehörig zu <?=(AddressModel::getOne($filter["address_id"])->getCompanyOrName())?><br />
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
Zeige alle Benutzer
|
||||
<?php endif; ?>
|
||||
</p>
|
||||
</div>
|
||||
<div class="float-right">
|
||||
<?php if(is_array($filter) && count($filter) && is_numeric($filter['address_id'])): ?>
|
||||
<a class="btn btn-primary" href="<?=self::getUrl("User", "add", ['address_id' => $filter['address_id']])?>"><i class="fas fa-plus"></i> Neuen Benutzer anlegen</a>
|
||||
<?php else: ?>
|
||||
<a class="btn btn-primary" href="<?=self::getUrl("User", "add")?>"><i class="fas fa-plus"></i> Neuen Benutzer anlegen</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<table class="table table-striped table-hover">
|
||||
<tr>
|
||||
<th>Username</th>
|
||||
<th>Name</th>
|
||||
<th>Firma / Person</th>
|
||||
<th>Email</th>
|
||||
<th>Admin</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php foreach($users as $user): ?>
|
||||
<tr>
|
||||
<td><?=$user->username?></td>
|
||||
<td><?=$user->name?></td>
|
||||
<td><?=($user->address->company) ? $user->address->company : $user->address->getFullName()?></td>
|
||||
<td><?=$user->email?></td>
|
||||
<td><?=($user->isAdmin()) ? "Ja" : "Nein"?></td>
|
||||
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||
<a href="<?=self::getUrl("User","edit", ['id' => $user->id])?>" title="User bearbeiten"><i class="far fa-edit"></i></a>
|
||||
<?php if($user->id > 1): ?>
|
||||
<a href="<?=self::getUrl("User","delete", ['id' => $user->id])?>" class="text-danger" title="User löschen" onclick="if(!confirm('Benutzer wirklich löschen?')) return false;"><i class="far fa-trash-alt"></i></a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Control Sidebar -->
|
||||
<aside class="control-sidebar control-sidebar-dark">
|
||||
<!-- Control sidebar content goes here -->
|
||||
</aside>
|
||||
<!-- /.control-sidebar -->
|
||||
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
||||
@@ -1,72 +0,0 @@
|
||||
<?php
|
||||
$wfLabelClass = "";
|
||||
$m = [];
|
||||
if(preg_match('/<!--class:\s*([^>]+)-->/',$item->label, $m)) {
|
||||
if($m[1]) {
|
||||
$wfLabelClass = $m[1];
|
||||
}
|
||||
}
|
||||
?>
|
||||
<td id="workflow-item-<?=$item->name?>-<?=$$wftype->id?>" class="workflow-item wfitem-<?=$item->type?> wfitem-width-<?=$item->width?>" <?=($item->width > 1) ? "colspan='".$item->width."'" : ""?> style="width: <?=$this->commaToDot(round(100 / $wfColspan, 2) * $item->width)?>%">
|
||||
<div class="wf-content">
|
||||
<?php if($item->type != "gps"): ?>
|
||||
<label class="form-label <?=$wfLabelClass?>" for="wfitem_<?=$item->name?>_<?=$$wftype->id?>">
|
||||
<?=($item->label) ? $item->label : " "?>
|
||||
<?=($item->label && $item->required == 1) ? "*" : ""?>
|
||||
</label>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
|
||||
switch($item->type) {
|
||||
case "string":
|
||||
include(realpath(dirname(__FILE__)."/items/")."/string.php");
|
||||
break;
|
||||
case "int":
|
||||
include(realpath(dirname(__FILE__)."/items/")."/int.php");
|
||||
break;
|
||||
case "bool":
|
||||
include(realpath(dirname(__FILE__)."/items/")."/bool.php");
|
||||
break;
|
||||
case "enum":
|
||||
include(realpath(dirname(__FILE__)."/items/")."/enum.php");
|
||||
break;
|
||||
case "text":
|
||||
include(realpath(dirname(__FILE__)."/items/")."/text.php");
|
||||
break;
|
||||
case "file":
|
||||
include(realpath(dirname(__FILE__)."/items/")."/file.php");
|
||||
break;
|
||||
case "gps":
|
||||
include(realpath(dirname(__FILE__)."/items/")."/gps.php");
|
||||
break;
|
||||
case "color":
|
||||
include(realpath(dirname(__FILE__)."/items/")."/color.php");
|
||||
break;
|
||||
case "delimiter":
|
||||
include(realpath(dirname(__FILE__)."/items/")."/delimiter.php");
|
||||
break;
|
||||
case "date":
|
||||
include(realpath(dirname(__FILE__)."/items/")."/date.php");
|
||||
break;
|
||||
case "empty":
|
||||
include(realpath(dirname(__FILE__)."/items/")."/empty.php");
|
||||
break;
|
||||
default:
|
||||
include(realpath(dirname(__FILE__)."/items/")."/string.php");
|
||||
}
|
||||
?>
|
||||
<div style="overflow-x: hidden">
|
||||
<small
|
||||
class="text-info text-mono"
|
||||
<?php if($item->value->changed): ?>
|
||||
title="Geändert: <?=date("d.m.Y H:i",$item->value->changed)?> von <?=$item->value->changer->name?> (<?=$item->value->changer->address->getCompanyOrName(true)?>)"
|
||||
<?php endif; ?>
|
||||
>
|
||||
<?php if($item->value->changed): ?>
|
||||
<?=$item->value->changer->getAbbrName()?>
|
||||
<?php endif; ?>
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
@@ -1,10 +0,0 @@
|
||||
<input type="hidden" name="wfitem_<?=$item->name?>" id="wfitem_<?=$item->name?>_<?=$$wftype->id?>" value="<?=($item->value->value_int == 1) ? "1" : "0"?>" />
|
||||
<input
|
||||
type="checkbox"
|
||||
class="form-control"
|
||||
name="wfitemplaceholder_<?=$item->name?>"
|
||||
id="wfitemplaceholder_<?=$item->name?>_<?=$$wftype->id?>"
|
||||
value="1"
|
||||
<?=($item->value->value_int == 1) ? "checked='checked'" : ""?>
|
||||
onchange="$('#wfitem_<?=$item->name?>_<?=$$wftype->id?>').val((this.checked) ? 1 : 0)"
|
||||
>
|
||||
@@ -1,48 +0,0 @@
|
||||
<?php
|
||||
$color_name = $item->value->value_string;
|
||||
$cmatch = [];
|
||||
if(preg_match('/^(.+)-1R$/', $color_name, $cmatch)) {
|
||||
$color_name = $cmatch[1];
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<select class="form-control selectpicker show-tick" name="wfitem_<?=$item->name?>" id="wfitem_<?=$item->name?>_<?=$$wftype->id?>" title="Farbe wählen" data-style="btn-outline-<?=$color_name?>">
|
||||
<option></option>
|
||||
<?php foreach(TT_CABLE_COLORS as $name => $color): ?>
|
||||
<option
|
||||
style="background-color: rgba(<?=$color["r"]?>,<?=$color["g"]?>,<?=$color["b"]?>, .5); color: #<?=$color["hexfg"]?>"
|
||||
value="<?=$name?>"
|
||||
data-bg-color="#<?=$color["hex"]?>" <?=($color['mark']) ? "data-icon='fa-ellipsis-h'" : ""?>
|
||||
<?=($name == $item->value->value_string) ? "selected='selected'" : ""?>
|
||||
>
|
||||
<?=ucfirst($name)?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
|
||||
<script type="text/javascript">
|
||||
$('#wfitem_<?=$item->name?>_<?=$$wftype->id?>').change(function() {
|
||||
var color = $('#wfitem_<?=$item->name?>_<?=$$wftype->id?> option:selected').data("bg-color");
|
||||
var name = $('#wfitem_<?=$item->name?>_<?=$$wftype->id?> option:selected').val();
|
||||
$("wfitem_<?=$item->name?>_<?=$$wftype->id?>").data("style", "btn-danger");
|
||||
console.log("button [data-id='wfitem_<?=$item->name?>_<?=$$wftype->id?>']");
|
||||
console.log($("button [data-id='wfitem_<?=$item->name?>_<?=$$wftype->id?>']"));
|
||||
|
||||
var matches;
|
||||
if(matches = name.match(/^(.+)-1R$/)) {
|
||||
name = matches[1];
|
||||
}
|
||||
|
||||
$("[data-id='wfitem_<?=$item->name?>_<?=$$wftype->id?>']").removeClass(function (index, className) {
|
||||
console.log(className);
|
||||
return (className.match (/(^|\s)btn-outline-\S+/g) || []).join(' ');
|
||||
});
|
||||
|
||||
$("[data-id='wfitem_<?=$item->name?>_<?=$$wftype->id?>']").addClass("btn-outline-" + name)
|
||||
|
||||
console.log(color);
|
||||
console.log(name);
|
||||
});
|
||||
</script>
|
||||
@@ -1,11 +0,0 @@
|
||||
<input type="text" class="form-control" name="wfitem_<?=$item->name?>" id="wfitem_<?=$item->name?>_<?=$$wftype->id?>" value="<?=$item->value->value_string?>" placeholder="<?=$item->placeholder?>" />
|
||||
|
||||
<script type="text/javascript">
|
||||
$('#wfitem_<?=$item->name?>_<?=$$wftype->id?>').datepicker({
|
||||
language: 'de',
|
||||
format: "dd.mm.yyyy",
|
||||
showWeekDays: true,
|
||||
todayBtn: 'linked',
|
||||
autoclose: true
|
||||
});
|
||||
</script>
|
||||
@@ -1 +0,0 @@
|
||||
<hr />
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
<?php
|
||||
$options = [];
|
||||
if(strpos($item->typedata, "=Model=") !== false) {
|
||||
// get options from Model
|
||||
$m = [];
|
||||
if(preg_match('/^=Model=(\w+)(?::([^:]+):)?$/', $item->typedata, $m)) {
|
||||
// dynamic enum
|
||||
$model = $m[1];
|
||||
$modelClass = $model."Model";
|
||||
|
||||
if($m[2]) {
|
||||
$filter_parts = explode("=", $m[2]);
|
||||
$filter_name = $filter_parts[0];
|
||||
$filter_value = $filter_parts[1];
|
||||
|
||||
if(substr($filter_value, 0, 1) == '`') {
|
||||
$filter_value = substr($filter_value, 1, strlen($filter_value) - 2);
|
||||
$objPath = explode("->", $filter_value);
|
||||
|
||||
if(count($objPath) > 1) {
|
||||
$obj = array_shift($objPath);
|
||||
$curr = $$obj;
|
||||
foreach($objPath as $part) {
|
||||
$curr = $curr->$part;
|
||||
}
|
||||
$filter_value = $curr;
|
||||
}
|
||||
}
|
||||
|
||||
foreach($modelClass::search([$filter_name => $filter_value]) as $modelObject) {
|
||||
$options[] = $modelObject->id . "=" . $modelObject->name;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
$options = explode(";", $item->typedata);
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<select class="form-control" name="wfitem_<?=$item->name?>" id="wfitem_<?=$item->name?>_<?=$$wftype->id?>">
|
||||
<option></option>
|
||||
<?php foreach($options as $opt): ?>
|
||||
<?php
|
||||
$key = $opt;
|
||||
$label = $opt;
|
||||
if(strpos($opt, "=") !== false) {
|
||||
$opt_parts = explode('=', $opt);
|
||||
$key = $opt_parts[0];
|
||||
$label = $opt_parts[1];
|
||||
}
|
||||
?>
|
||||
|
||||
<option value="<?=$key?>" <?=($key == $item->value->value_string) ? "selected='selected'" : ""?>><?=$label?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
@@ -1 +0,0 @@
|
||||
<input type="text" class="form-control" name="wfitem_<?=$item->name?>" id="wfitem_<?=$item->name?>_<?=$$wftype->id?>" value="<?=$item->value->value_string?>">
|
||||
@@ -1,23 +0,0 @@
|
||||
<?php
|
||||
$lat = "";
|
||||
$long = "";
|
||||
if($item->value->value_string) {
|
||||
$gps_parts = explode(";", $item->value->value_string);
|
||||
$lat = $gps_parts[0];
|
||||
$long = $gps_parts[1];
|
||||
}
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="col-md-5 padding-right-2">
|
||||
<label class="form-label" for="wfitem_<?=$item->name?>_lat_<?=$$wftype->id?>">GPS Breite <?=($item->required == 1) ? "*" : ""?></label>
|
||||
<input type="text" class="form-control" name="wfitem_<?=$item->name?>[lat]" id="wfitem_<?=$item->name?>_lat_<?=$$wftype->id?>" value="<?=$lat?>" placeholder="<?=str_replace(",", ".", TT_PLACEHOLDER_GPS_LAT)?>">
|
||||
</div>
|
||||
<div class="col-md-5 padding-left-2">
|
||||
<label class="form-label" for="wfitem_<?=$item->name?>_long_<?=$$wftype->id?>">GPS Länge <?=($item->required == 1) ? "*" : ""?></label>
|
||||
<input type="text" class="form-control" name="wfitem_<?=$item->name?>[long]" id="wfitem_<?=$item->name?>_long_<?=$$wftype->id?>" value="<?=$long?>" placeholder="<?=str_replace(",", ".", TT_PLACEHOLDER_GPS_LONG)?>">
|
||||
</div>
|
||||
<div class="col-md-2 padding-left-2">
|
||||
<label class="form-label"> </label>
|
||||
<div><?php if($lat && $long): ?><a href="https://www.google.com/maps/search/?api=1&query=<?=$lat?>,<?=$long?>" target="_blank">Maps</a><?php endif; ?></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1 +0,0 @@
|
||||
<input type="text" class="form-control" name="wfitem_<?=$item->name?>" id="wfitem_<?=$item->name?>_<?=$$wftype->id?>" value="<?=$item->value->value_string?>">
|
||||
@@ -1 +0,0 @@
|
||||
<input type="text" class="form-control" name="wfitem_<?=$item->name?>" id="wfitem_<?=$item->name?>_<?=$$wftype->id?>" value="<?=$item->value->value_string?>" placeholder="<?=$item->placeholder?>">
|
||||
@@ -1 +0,0 @@
|
||||
<input type="text" class="form-control" name="wfitem_<?=$item->name?>" id="wfitem_<?=$item->name?>_<?=$$wftype->id?>" value="<?=$item->value->value_string?>">
|
||||
@@ -6,16 +6,10 @@
|
||||
<footer class="footer">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
andom-tec Fiberbuddy © 2021 - Made by SKnetworX
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="text-md-right footer-links d-none d-sm-block">
|
||||
<a href="#">About Us</a>
|
||||
<a href="#">Help</a>
|
||||
<a href="#">Contact Us</a>
|
||||
</div>
|
||||
<div class="col-md-6 <?=(MFAPPNAME == "devthetool") ? "text-danger" : ""?>">
|
||||
<span title="<?=MFAPPNAME?>">andom-tec Fiberbuddy © <?=date('Y')?></span> - Made by SKnetworX
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Fiberbuddy</title>
|
||||
<title><?=MFAPPNAME_FULL?></title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<!-- App favicon -->
|
||||
<link rel="shortcut icon" href="<?=self::getResourcePath()?>assets/images/favicon.ico">
|
||||
|
||||
<!-- App css -->
|
||||
<link href="<?=self::getResourcePath()?>fontawesome/css/all.min.css" rel="stylesheet" type="text/css" />
|
||||
<link href="<?=self::getResourcePath()?>fontawesome/css/all.min.css?<?=date('U')?>" rel="stylesheet" type="text/css" />
|
||||
<link href="<?=self::getResourcePath()?>assets/css/bootstrap.min.css?<?=date('U')?>" rel="stylesheet" type="text/css" />
|
||||
<link href="<?=self::getResourcePath()?>assets/css/icons.css" rel="stylesheet" type="text/css" />
|
||||
<link href="<?=self::getResourcePath()?>assets/css/app.css?<?=date('U')?>" rel="stylesheet" type="text/css" />
|
||||
@@ -18,17 +18,26 @@
|
||||
<link href="<?=self::getResourcePath()?>assets/libs/select2/select2.min.css" rel="stylesheet" type="text/css" />
|
||||
<link href="<?=self::getResourcePath()?>assets/css/bootstrap-select.min.css" rel="stylesheet" type="text/css" />
|
||||
<link href="<?=self::getResourcePath()?>css/bootstrap-datepicker3.min.css" rel="stylesheet" type="text/css" />
|
||||
<link href="<?=self::getResourcePath()?>plugins/summernote/summernote-bs4.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script type="text/javascript" src="<?=self::getResourcePath()?>js/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="<?=self::getResourcePath()?>assets/libs/select2/select2.min.js"></script>
|
||||
<script src="<?=self::getResourcePath()?>js/bootstrap-datepicker.min.js"></script>
|
||||
<script src="<?=self::getResourcePath()?>js/bootstrap-datepicker.de.min.js"></script>
|
||||
<script type="text/javascript" src="<?=self::getResourcePath()?>js/bootstrap-datepicker.min.js"></script>
|
||||
<script type="text/javascript" src="<?=self::getResourcePath()?>js/bootstrap-datepicker.de.min.js"></script>
|
||||
<script type="text/javascript" src="<?=self::getResourcePath()?>assets/js/geo/geo.js"></script>
|
||||
<script type="text/javascript" src="<?=self::getResourcePath()?>assets/js/leaflet.js"></script>
|
||||
<script type="text/javascript" src="<?=self::getResourcePath()?>js/popper.min.js"></script>
|
||||
<script type="text/javascript" src="<?=self::getResourcePath()?>js/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="<?=self::getResourcePath()?>assets/js/bootstrap-select.min.js"></script>
|
||||
<script type="text/javascript" src="<?=self::getResourcePath()?>js/bootstrap-autocomplete.min.js"></script>
|
||||
|
||||
|
||||
<?php if(MFAPPNAME == "devthetool"): ?>
|
||||
<style type="text/css">
|
||||
body {
|
||||
border-left: 8px dashed #f672a7;
|
||||
}
|
||||
</style>
|
||||
<?php endif; ?>
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
@@ -4,27 +4,37 @@
|
||||
<!-- Navigation Menu-->
|
||||
<ul class="navigation-menu">
|
||||
|
||||
<?php if(!$me->is("Admin")): ?>
|
||||
<li class="has-submenu">
|
||||
<a href="<?=self::getUrl("Dashboard")?>"><i class="fe-airplay"></i>Dashboard</a>
|
||||
<a href="<?=self::getUrl("Dashboard")?>"><i class="fe-airplay"></i> Dashboard</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php if($me->is("Admin")): ?>
|
||||
<li class="has-submenu">
|
||||
<a href="<?=self::getUrl("Dashboard")?>"><i class="fe-airplay"></i> Dashboard <div class="arrow-down"></div></a>
|
||||
<ul class="submenu">
|
||||
<li><a href="<?=self::getUrl("News")?>"><i class="far fa-th-list text-info"></i> News</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="has-submenu">
|
||||
<a href="#">
|
||||
<i class="fas fa-database"></i>Stammdaten <div class="arrow-down"></div>
|
||||
<i class="far fa-database"></i>Stammdaten <div class="arrow-down"></div>
|
||||
</a>
|
||||
<ul class="submenu">
|
||||
<li class="has-sub-submenu">
|
||||
<a href="<?=self::getUrl("Address")?>"><i class="fas fa-user"></i> Personen & Firmen</a>
|
||||
<a href="<?=self::getUrl("Address")?>"><i class="fad fa-user text-info"></i> Personen & Firmen</a>
|
||||
<!--<ul class="sub-submenu">
|
||||
<li><a href="<?=self::getUrl("Address", "Index" , ["filter" => ["addresstype" => ["employee"]]])?>"><i class="fas fa-"></i> Mitarbeiter</a></li>
|
||||
<li><a href="<?=self::getUrl("Address", "Index" , ["filter" => ["addresstype" => ["supplier"]]])?>"><i class="fas fa-"></i> Lieferanten</a></li>
|
||||
</ul>-->
|
||||
</li>
|
||||
<li><a href="<?=self::getUrl("Product")?>"><i class="fab fa-product-hunt"></i> Produkte</a></li>
|
||||
<li><a href="<?=self::getUrl("Producttech")?>"><i class="fas fa-microchip"></i> Technologien</a></li>
|
||||
<li><a href="<?=self::getUrl("User")?>"><i class="fas fa-users"></i> Benutzer</a></li>
|
||||
<li><a href="<?=self::getUrl("Network")?>"><i class="fas fa-network-wired"></i> Netzgebiete</a></li>
|
||||
<li><a href="<?=self::getUrl("Product")?>"><i class="far fa-rectangle-list text-info"></i> Produkte</a></li>
|
||||
<li><a href="<?=self::getUrl("Producttech")?>"><i class="fad fa-microchip text-info"></i> Technologien</a></li>
|
||||
<li><a href="<?=self::getUrl("User")?>"><i class="fad fa-users text-info"></i> Benutzer</a></li>
|
||||
<li><a href="<?=self::getUrl("Network")?>"><i class="fad fa-network-wired text-info"></i> Netzgebiete</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
@@ -36,10 +46,10 @@
|
||||
<i class="fas fa-hard-hat"></i>Netzbau <div class="arrow-down"></div>
|
||||
</a>
|
||||
<ul class="submenu">
|
||||
<?php if($me->is(["Admin","netowner","pipeplanner"])): ?><li><a href="<?=self::getUrl("Building")?>"><i class="fas fa-city"></i> Objekte & Anschlüsse</a></li><?php endif; ?>
|
||||
<?php if($me->is(["Admin","netowner","pipeplanner","pipeworker","lineplanner","lineworker"])): ?><li><a href="<?=self::getUrl("Pipework")?>"><i class="fas fa-wrench"></i> Tiefbau</a></li><?php endif; ?>
|
||||
<?php if($me->is(["Admin","netowner","lineplanner","lineworker"])): ?><li><a href="<?=self::getUrl("Linework")?>"><i class="fas fa-ethernet"></i> Leitungsbau</a></li><?php endif; ?>
|
||||
<?php if($me->is(["Admin", "netowner", "netoperator", "lineworker"])): ?><li><a href="<?=self::getUrl("Patching")?>"><i class="fas fa-plug"></i> Patchungen</a></li><?php endif; ?>
|
||||
<?php if($me->is(["Admin","netowner","pipeplanner"])): ?><li><a href="<?=self::getUrl("Building")?>"><i class="fas fa-city text-info"></i> Objekte & Anschlüsse</a></li><?php endif; ?>
|
||||
<?php if($me->is(["Admin","netowner","pipeplanner","pipeworker","lineplanner","lineworker"])): ?><li><a href="<?=self::getUrl("Pipework")?>"><i class="fad fa-wrench text-info"></i> Tiefbau</a></li><?php endif; ?>
|
||||
<?php if($me->is(["Admin","netowner","lineplanner","lineworker"])): ?><li><a href="<?=self::getUrl("Linework")?>"><i class="fas fa-ethernet text-info"></i> Leitungsbau</a></li><?php endif; ?>
|
||||
<?php if($me->is(["Admin", "netowner", "netoperator", "lineworker"])): ?><li><a href="<?=self::getUrl("Patching")?>"><i class="fas fa-plug text-info"></i> Patchungen</a></li><?php endif; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
@@ -47,11 +57,22 @@
|
||||
<?php if($me->is(["Admin"])): ?>
|
||||
<li class="has-submenu">
|
||||
<a href="#">
|
||||
<i class="fas fa-running"></i>Netzbetrieb <div class="arrow-down"></div>
|
||||
<i class="fad fa-running"></i>Netzbetrieb <div class="arrow-down"></div>
|
||||
</a>
|
||||
<ul class="submenu">
|
||||
<li><a href="<?=self::getUrl("Cpeprovisioning")?>"><i class="fas fa-hdd"></i> CPE Provisioning</a></li>
|
||||
<li><a href="<?=self::getUrl("Cpeshipping")?>"><i class="fas fa-shipping-fast"></i> CPE Versand</a></li>
|
||||
<li><a href="<?=self::getUrl("Cpeprovisioning")?>"><i class="fad fa-hdd text-info"></i> CPE Provisioning</a></li>
|
||||
<li><a href="<?=self::getUrl("Cpeshipping")?>"><i class="fad fa-shipping-fast text-info"></i> CPE Versand</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($me->is(["Admin"])): ?>
|
||||
<li class="has-submenu">
|
||||
<a href="#">
|
||||
<i class="fad fa-phone"></i>Telefonie <div class="arrow-down"></div>
|
||||
</a>
|
||||
<ul class="submenu">
|
||||
<li><a href="<?=self::getUrl("Voicenumberblock")?>"><i class="fad fa-blender-phone text-info"></i> Rufnummernblöcke</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
@@ -59,14 +80,30 @@
|
||||
<?php if($me->is(["Admin","salespartner"])): ?>
|
||||
<li class="has-submenu">
|
||||
<a href="#">
|
||||
<i class="fas fa-shopping-basket"></i>Verkauf <div class="arrow-down"></div>
|
||||
<i class="fal fa-money-bill-wave"></i>Verkauf <div class="arrow-down"></div>
|
||||
</a>
|
||||
<ul class="submenu">
|
||||
<li><a href="<?=self::getUrl("Order")?>"><i class="fas fa-file-contract"></i> Bestellungen</a></li>
|
||||
<?php if($me->is(["Admin"])): ?>
|
||||
<li><a href="<?=self::getUrl("Preordercampaign")?>"><i class="far fa-calendar-lines text-info"></i> Vorbestellung</a></li>
|
||||
<?php endif; ?>
|
||||
<li><a href="<?=self::getUrl("Order")?>"><i class="far fa-file-signature text-info"></i> Bestellungen</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<!--
|
||||
<?php if($me->is(["Admin"])): ?>
|
||||
<li class="has-submenu">
|
||||
<a href="#">
|
||||
<i class="fas fa-shopping-basket"></i>Verträge<div class="arrow-down"></div>
|
||||
</a>
|
||||
<ul class="submenu">
|
||||
<li><a href="<?=self::getUrl("Contract")?>"><i class="fas fa-file-contract"></i> Verträge</a></li>
|
||||
<li><hr /></li>
|
||||
<li><a href="<?=self::getUrl("Contractconfig")?>"><i class="fas fa-wrench"></i> Vertragsconfig</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
-->
|
||||
</ul>
|
||||
<!-- End navigation menu -->
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>mvcfronk Error 404 - Module not found</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Error 404</h1>
|
||||
<h3>The Module was not found</h3>
|
||||
<!-- <?=$Exception?> -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,10 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>500 - Internal application error</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Error 500</h1>
|
||||
<h3>An internal Error occured.</h3>
|
||||
<!-- <?=$Exception?> -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +0,0 @@
|
||||
<?php
|
||||
$code=$Exception->Code;
|
||||
if($code) {
|
||||
echo "Error $code: ";
|
||||
}
|
||||
echo $Exception->Message;
|
||||
echo "\n";
|
||||
@@ -1,8 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Error</title>
|
||||
</head>
|
||||
<body>
|
||||
<h3><?=$Exception?></h3>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,73 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>Fiberbuddy | Log in</title>
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="shortcut icon" href="assets/images/favicon.ico">
|
||||
|
||||
<link rel="stylesheet" href="<?=self::getResourcePath()?>fontawesome/css/all.min.css">
|
||||
<!-- Theme style -->
|
||||
<link rel="stylesheet" href="<?=self::getResourcePath()?>css/adminlte.css">
|
||||
<link rel="stylesheet" href="<?=self::getResourcePath()?>css/fonts.css?<?=date('U')?>">
|
||||
<link rel="stylesheet" href="<?=self::getResourcePath()?>css/main.css?<?=date('U')?>">
|
||||
|
||||
<!-- jQuery -->
|
||||
<script src="<?=self::getResourcePath()?>plugins/jquery/jquery.min.js"></script>
|
||||
</head>
|
||||
<body class="hold-transition login-page" onload="setFocus()">
|
||||
<div class="login-box">
|
||||
<div class="login-logo">
|
||||
<a href="<?=self::getUrl("/")?>"><img src="<?=self::getResourcePath()?>assets/images/andom-tec-logo-transp.png" /></a>
|
||||
</div>
|
||||
<!-- /.login-logo -->
|
||||
<div class="card">
|
||||
<div class="card-body login-card-body">
|
||||
<p class="login-box-msg">Bitte einloggen</p>
|
||||
|
||||
<form action="" method="post">
|
||||
<input type="hidden" name="action" value="mfLogin_Login" class="form-control nosave" />
|
||||
|
||||
<div class="input-group mb-3">
|
||||
<input type="text" name="Username" id="mfUsername" class="form-control" placeholder="Benutzer">
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">
|
||||
<span class="fas fa-user"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group mb-3">
|
||||
<input type="password" name="Password" class="form-control" placeholder="Passwort">
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">
|
||||
<span class="fas fa-lock"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
<div class="col-4">
|
||||
<button type="submit" class="btn btn-primary btn-block">Einloggen</button>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<!-- /.login-card-body -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.login-box -->
|
||||
|
||||
<script type="text/javascript">
|
||||
function setFocus() {
|
||||
document.getElementById('mfUsername').focus();
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -118,10 +118,10 @@
|
||||
<li class="logo-box float-left">
|
||||
<a href="<?=self::getUrl("Dashboard")?>" class="logo">
|
||||
<span class="logo-lg">
|
||||
<img src="<?=self::getResourcePath()?>assets/images/the-tool-logo-kopf.png" alt="" style="height:80px; padding-top:12px; padding-left:32px;">
|
||||
<img src="<?=self::getResourcePath()?>assets/images/<?=MFAPPNAME_SLUG?>-logo-top.png" alt="" style="height:80px; padding-top:12px; padding-left:32px;">
|
||||
</span>
|
||||
<span class="logo-sm">
|
||||
<img src="<?=self::getResourcePath()?>assets/images/the-tool-logo-kopf.png" alt="" height="28">
|
||||
<img src="<?=self::getResourcePath()?>assets/images/<?=MFAPPNAME_SLUG?>-logo-top.png" alt="" height="28">
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user