Files
thetool/Layout/default/Voiceplan/View.php
Frank Schubert 8214acd3e9 Added Voiceplan, Admin IVT product matcher and Voicenumber update
updates number in ContractConfig
2023-05-04 15:01:28 +02:00

105 lines
4.3 KiB
PHP

<?php
$pagination_baseurl = $this->getUrl($Mod,"View");
$pagination_baseurl_params = ["filter" => $filter, "id" => $plan->id];
$pagination_entity_name = "Destinations";
?>
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/header.php"); ?>
<!-- start page title -->
<div class="row">
<div class="col-12">
<div class="page-title-box">
<div class="page-title-right">
<ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="<?=self::getUrl("Dashboard")?>"><?=MFAPPNAME_SLUG?></a></li>
<li class="breadcrumb-item"><a href="<?=self::getUrl("Voiceplan")?>">Sprachtarife</a></li>
<li class="breadcrumb-item active"><?=$plan->name?></li>
</ol>
</div>
<h4 class="page-title">Sprachtarife</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-12">
<div class="float-left">
<h4 class="header-title">Destinations für Sprachtarifpaket <?=$plan->name?></h4>
</div>
<div class="float-right">
<a class="btn btn-primary mb-2" href="<?=self::getUrl("Voiceplandestination", "add", ["voiceplan_id" => $plan->id])?>"><i class="fas fa-plus"></i> Neue Destination anlegen</a>
</div>
</div>
</div>
<?php include(realpath(dirname(__FILE__)."/../")."/tpl/pagination.php"); ?>
<?php include(realpath(dirname(__FILE__)."/../")."/tpl/pagination-summary.php"); ?>
<table class="table table-striped table-hover">
<tr>
<th>Destination</th>
<th>Prefix</th>
<th>Taktung</th>
<th>Einkaufspreis</th>
<th>Verkaufspreis</th>
<th>Erstellt</th>
<th>Bearbeitet</th>
<th></th>
</tr>
<?php foreach($destinations as $destination): ?>
<tr>
<td><?=$destination->destination?></td>
<td><?=$destination->prefix?></td>
<td><?=($destination->increment_first && $destination->increment) ? "$destination->increment_first"."/".$destination->increment : ""?></td>
<td><?=$destination->purchase_price?></td>
<td><?=$destination->price?></td>
<td><?=date("d.m.Y H:i", $plan->create)?> (<?=$plan->creator->name?>)</td>
<td><?=date("d.m.Y H:i", $plan->edit)?> (<?=$plan->editor->name?>)</td>
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
<a href="<?=self::getUrl("Voiceplandestination", "view", ["id" => $destination->id])?>"><i class="far fa-eyes" title="Anzeigen"></i></a>
<a href="<?=self::getUrl("Voiceplandestination", "edit", ["id" => $destination->id])?>"><i class="far fa-edit" title="Bearbeiten"></i></a>
<a href="<?=self::getUrl("Voiceplandestination", "delete", ["id" => $destination->id])?>" onclick="if(!confirm('Destination wirklich löschen?')) return false;" class="text-danger" title="Löschen"><i class="fas fa-trash"></i></a>
</td>
</tr>
<?php endforeach; ?>
</table>
<?php include(realpath(dirname(__FILE__)."/../")."/tpl/pagination-summary.php"); ?>
<?php include(realpath(dirname(__FILE__)."/../")."/tpl/pagination.php"); ?>
</div>
</div>
</div>
</div>
<script type="text/javascript">
function toggleBlock(id) {
$('#block-detail-' + id).toggle();
if($('#block-detail-' + id).is(":hidden")) {
$('#block-' + id).removeClass("table-info");
$('#block-' + id).removeClass("text-info");
} else {
$('#block-' + id).addClass("text-info");
$('#block-' + id).addClass("table-info");
}
}
var block;
var hash = window.location.hash.substr(1);
var match = hash.match(/block=(\d+)/);
if(match && match[1]) {
block = match[1]
toggleBlock(block);
}
</script>
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/footer.php"); ?>