Added pagination to Pipework and Linework
This commit is contained in:
@@ -100,6 +100,34 @@
|
||||
<div class="card-body mb-3">
|
||||
<h4 class="header-title mb-3">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)?>" 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']): ?>
|
||||
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 => $buildings): ?>
|
||||
@@ -140,13 +168,13 @@
|
||||
<?php $i = 0; foreach($building->workflowitems as $item): ?>
|
||||
<?php if($i==0): ?>
|
||||
<?php if($item->type == "delimiter"): ?>
|
||||
<tr class="workflow-header"><th colspan='<?=$building_wf_colspan?>'><?=$item->label?></th></tr><tr>
|
||||
<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='<?=$building_wf_colspan?>'><?=$item->label?></th></tr><tr>
|
||||
</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; ?>
|
||||
@@ -158,7 +186,7 @@
|
||||
<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="<?=$building_wf_colspan - 3?>">
|
||||
<td colspan="<?=$wfColspan - 3?>">
|
||||
<h5>Dokumente</h5>
|
||||
<table class="table-sm">
|
||||
<?php $i=0; foreach($building->files as $file): ?>
|
||||
|
||||
Reference in New Issue
Block a user