Patching readonly

This commit is contained in:
Frank Schubert
2021-09-21 23:12:53 +02:00
parent 1d162fedb7
commit 3cc3f3f50c
8 changed files with 428 additions and 4 deletions

View File

@@ -0,0 +1,34 @@
<?php
class PatchingController extends mfBaseController {
protected function init() {
$this->needlogin=true;
$me = new User();
$me->loadMe();
$this->me = $me;
$this->layout()->set("me",$me);
if(!$me->is(["Admin", "netowner", "netoperator", "lineworker"])) {
$this->redirect("Dashboard");
}
}
protected function indexAction() {
$this->layout()->setTemplate("Patching/Index");
$terminations = PatchingModel::searchByTermination();
$terms = [];
foreach($terminations as $term) {
$term->order = OrderModel::getFirst(["termination_id" => $term->id]);
$terms[] = $term;
//var_dump($term);
}
//exit;
$this->layout()->set("terminations", $terms);
}
}