Merge branch 'fronkdev' into 'master'
Restored old Contract View See merge request fronk/thetool!859
This commit is contained in:
@@ -92,6 +92,39 @@ class ContractController extends mfBaseController {
|
||||
}
|
||||
|
||||
protected function viewAction() {
|
||||
if(1) {
|
||||
if(!$this->me->is(["Admin"])) {
|
||||
$this->redirect("Dashboard");
|
||||
}
|
||||
|
||||
$this->layout()->setTemplate("Contract/View");
|
||||
|
||||
$id = $this->request->contract_id;
|
||||
if (!$id) {
|
||||
$id = $this->request->id;
|
||||
}
|
||||
if (!is_numeric($id) || !$id) {
|
||||
$this->layout()->setFlash("Vertrag nicht gefunden", "error");
|
||||
$this->redirect("Contract");
|
||||
}
|
||||
|
||||
$contract = new Contract($id);
|
||||
if (!$contract->id) {
|
||||
$this->layout()->setFlash("Vertrag nicht gefunden", "error");
|
||||
$this->redirect("Contract");
|
||||
}
|
||||
|
||||
$this->layout()->set("contract", $contract);
|
||||
|
||||
if ($this->request->filter) {
|
||||
$this->layout()->set("filter", $this->request->filter);
|
||||
}
|
||||
if ($this->request->s) {
|
||||
$this->layout()->set("filter", $this->request->s);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!$this->me->is(["Admin"])) {
|
||||
$this->redirect("Dashboard");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user