Filter and pagination is still set after saving Order
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
<?php foreach($contracts as $contract): ?>
|
||||
<tr>
|
||||
<td><a href="<?=self::getUrl("Address", "Edit", ["id" => $contract->owner_id])?>" target="_blank"><?=$contract->owner->getCompanyOrName()?></a></td>
|
||||
<td><?=$contract->product->name?></td>
|
||||
<td><?=$contract->product->product->name?></td>
|
||||
<td>
|
||||
<?php if($contract->termination_id): ?>
|
||||
<?=$contract->termination->building->street?><br />
|
||||
|
||||
@@ -32,7 +32,11 @@
|
||||
<form method="post" action="<?=$this->getUrl("User","save")?>">
|
||||
|
||||
<?php if(is_array($group->items) && count($group->items)): ?>
|
||||
<?php foreach($group->items as $item): ?>
|
||||
<?php $i = 0; foreach($group->items as $item): ?>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
<div class="p-2 <?=($i % 2 == 0) ? "bg-light" : ""?>">
|
||||
<div class="row">
|
||||
@@ -40,7 +44,7 @@
|
||||
<h4 class="header-title">Attribut <span class="text-monospace text-pink"><?=$item->name?></span></h4>
|
||||
</div>
|
||||
<div class="col-md-1 float-right">
|
||||
<small><a class="text-danger" href="<?=self::getUrl("ProducttechAttribute", "delete", ['id' => $item->id])?>" onclick="if(!confirm('Attribut wirklich löschen?')) return false;"><i class="fas fa-trash-alt"></i> löschen</a></small>
|
||||
<small><a class="text-danger" href="<?=self::getUrl("Contractconfig", "delete", ['id' => $item->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">
|
||||
@@ -93,8 +97,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endforeach; ?>
|
||||
<?php $i++; endforeach; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
@@ -1,6 +1,17 @@
|
||||
<?php
|
||||
//var_dump($order);exit;
|
||||
$includes_external_product = false;
|
||||
|
||||
$urlfilter = [];
|
||||
if($s) {
|
||||
$urlfilter['s'] = $s;
|
||||
}
|
||||
if($noTermProducts) {
|
||||
$urlfilter['noTermProducts'] = 1;
|
||||
}
|
||||
if(is_array($filter) && count($filter)) {
|
||||
$urlfilter["filter"] = $filter;
|
||||
}
|
||||
$posturl = self::getUrl("Order", "save", $urlfilter);
|
||||
?>
|
||||
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/header.php"); ?>
|
||||
|
||||
@@ -34,7 +45,7 @@
|
||||
<div class="card-body">
|
||||
<h4 class="mb-2"><?=($order->id) ? "Bestellung bearbeiten" : "Neue Bestellung"?></h4>
|
||||
|
||||
<form class="form-horizontal" method="post" action="<?=self::getUrl("Order", "save")?>" name="orderForm" id="orderForm" enctype="multipart/form-data">
|
||||
<form class="form-horizontal" method="post" action="<?=$posturl?>" name="orderForm" id="orderForm" enctype="multipart/form-data">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
@@ -141,10 +141,16 @@
|
||||
|
||||
<ul class="nav nav-tabs ml-1 border-0" role="tablist">
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link <?=(!$showLonelies) ? "active" : ""?>" href="<?=self::getUrl("Order", "Index", ["filter" => $filter])?>">Bestellungen mit Anschluss</a>
|
||||
<a class="nav-link <?=(!$showLonelies) ? "active" : ""?>" href="<?=self::getUrl("Order", "Index", ["filter" => $filter])?>">Bestellungen mit Anschluss<?php if(is_array($lonelyOrders)): ?> <span class="counter"><?=$pagination['maxItems']?></span><?php endif; ?></a>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link <?=($showLonelies) ? "active" : ""?>" href="<?=self::getUrl("Order", "Index", ["noTermProducts" => 1, "filter" => $filter])?>">Bestellungen ohne Anschluss</a>
|
||||
<a class="nav-link <?=($showLonelies) ? "active" : ""?>" href="<?=self::getUrl("Order", "Index", ["noTermProducts" => 1, "filter" => $filter])?>">
|
||||
<?php if(is_array($lonelyOrders)): ?>
|
||||
Bestellungen ohne Anschluss <span class="counter"><?=count($lonelyOrders)?></span>
|
||||
<?php else: ?>
|
||||
Bestellungen ohne Anschluss
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<?php if($showLonelies): ?>
|
||||
@@ -234,7 +240,7 @@
|
||||
<?php endif; ?>
|
||||
<a href="<?=self::getUrl("Order", "downloadServicePin", ["id" => $order->id])?>"><i class="fas fa-file-alt" title="Service PIN als PDF herunterladen"></i></a>
|
||||
<a href="<?=self::getUrl("Order", "sendServicePin", ["id" => $order->id])?>" onclick="if(!confirm('Soll der Service-PIN an den Vertragsinhaber gesendet werden?')) return false;"><i class="fas fa-paper-plane" title="Service PIN als PDF per Email an Vertragsinhaber"></i></a>
|
||||
<a href="<?=self::getUrl("Order", "edit", ["id" => $order->id])?>"><i class="far fa-edit" title="Bearbeiten"></i></a>
|
||||
<a href="<?=self::getUrl("Order", "edit", ["id" => $order->id, "filter" => $filter, "noTermProducts" => 1])?>"><i class="far fa-edit" title="Bearbeiten"></i></a>
|
||||
<a href="<?=self::getUrl("Order", "delete", ["id" => $order->id])?>" onclick="if(!confirm('Bestellung wirklich löschen?')) return false;" class="text-danger" title="Löschen"><i class="fas fa-trash"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -255,7 +261,7 @@
|
||||
<div class="row justify-content-center mt-2">
|
||||
<div class="col-xl-8 col-lg-12">
|
||||
|
||||
<ul class="nav nav-tabs">
|
||||
<ul class="nav nav-tabs order-tab">
|
||||
<li class="nav-item"><a class="nav-link active" href="#order-detail-<?=$order->id?>-journal" data-toggle="tab" aria-expanded="false">Journal</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#order-detail-<?=$order->id?>-contact" data-toggle="tab" aria-expanded="false">Kontakt</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#order-detail-<?=$order->id?>-details" data-toggle="tab" aria-expanded="false">Details</a></li>
|
||||
@@ -535,7 +541,7 @@
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
<?php else: ?>
|
||||
<i>Keine anschlusslosen Bestellungen zu den Suchkriterien gefunden</i>
|
||||
<i>Keine <strong>anschlusslosen</strong> Bestellungen zu den Suchkriterien gefunden</i>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -544,11 +550,10 @@
|
||||
<?php else: ?>
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
|
||||
<?php if(count($orders)): ?>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/tpl/pagination.php"); ?>
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/tpl/pagination-summary.php"); ?>
|
||||
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th></th>
|
||||
@@ -647,7 +652,7 @@
|
||||
<?php endif; ?>
|
||||
<a href="<?=self::getUrl("Order", "downloadServicePin", ["id" => $order->id])?>"><i class="fas fa-file-alt" title="Service PIN als PDF herunterladen"></i></a>
|
||||
<a href="<?=self::getUrl("Order", "sendServicePin", ["id" => $order->id])?>" onclick="if(!confirm('Soll der Service-PIN an den Vertragsinhaber gesendet werden?')) return false;"><i class="fas fa-paper-plane" title="Service PIN als PDF per Email an Vertragsinhaber"></i></a>
|
||||
<a href="<?=self::getUrl("Order", "edit", ["id" => $order->id])?>"><i class="far fa-edit" title="Bearbeiten"></i></a>
|
||||
<a href="<?=self::getUrl("Order", "edit", ["id" => $order->id, "filter" => $filter, "s" => $pagination['start']])?>"><i class="far fa-edit" title="Bearbeiten"></i></a>
|
||||
<a href="<?=self::getUrl("Order", "delete", ["id" => $order->id])?>" onclick="if(!confirm('Bestellung wirklich löschen?')) return false;" class="text-danger" title="Löschen"><i class="fas fa-trash"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -677,7 +682,7 @@
|
||||
<div class="row justify-content-center mt-2">
|
||||
<div class="col-xl-8 col-lg-12">
|
||||
|
||||
<ul class="nav nav-tabs">
|
||||
<ul class="nav nav-tabs order-tab">
|
||||
<li class="nav-item"><a class="nav-link active" href="#order-detail-<?=$order->id?>-journal" data-toggle="tab" aria-expanded="false">Journal</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#order-detail-<?=$order->id?>-contact" data-toggle="tab" aria-expanded="false">Kontakt</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#order-detail-<?=$order->id?>-details" data-toggle="tab" aria-expanded="false">Details</a></li>
|
||||
@@ -967,6 +972,9 @@
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/tpl/pagination.php"); ?>
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/tpl/pagination-summary.php"); ?>
|
||||
<?php else: ?>
|
||||
<i>Keine Bestellungen <strong>mit Anschluss</strong> zu den Suchkriterien gefunden</i>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -996,7 +1004,13 @@
|
||||
toggleOrder(order);
|
||||
//$('body').scrollTop($('#order-' + order).offset() - 50);
|
||||
scrollToDiv('#order-' + order);
|
||||
|
||||
if(hash.match(/order=(\d+)-details/)) {
|
||||
$('.order-tab a[href="#order-detail-' + order + '-details"]').tab('show');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user