blob: 25194f37f5bc1b76bba8d636f856cc63dbb71b68 [file] [log] [blame]
Copybara botbe50d492023-11-30 00:16:42 +01001<?php
2require_once(__DIR__."/../core.php");
3security::checkType(security::WORKER, security::METHOD_NOTFOUND);
4security::checkWorkerUIEnabled();
5
6$isAdmin = security::isAllowed(security::ADMIN);
7
8if (!isset($_GET["id"])) {
9 security::notFound();
10}
11
12$id = (int)$_GET["id"];
13
14$incident = incidents::get($id, true);
15if ($incident === false) security::notFound();
16
17if (!$isAdmin) incidents::checkIncidentIsFromPerson($incident["id"]);
18?>
19
20<style>
21#dynDialog {
22 max-width: 380px;
23 width: auto;
24}
25</style>
26
27<h4 class="mdl-dialog__title">Autoría de la incidencia</h4>
28<div class="mdl-dialog__content">
29 <ul>
30 <?php if ($incident["creator"] != -1) { ?><li><b>Creador:</b> <?=security::htmlsafe(people::userData("name", $incident["creator"]))?></li><?php } ?>
31 <?php if ($incident["updatedby"] != -1) { ?><li><b>Última modificación por:</b> <?=security::htmlsafe(people::userData("name", $incident["updatedby"]))?></li><?php } ?>
32 <?php if ($incident["confirmedby"] != -1) { ?><li><b>Revisor:</b> <?=security::htmlsafe(people::userData("name", $incident["confirmedby"]))?></li><?php } ?>
33 <?php
34 if ($incident["state"] == incidents::STATE_VALIDATED_BY_WORKER) {
35 $validation = json_decode($incident["workervalidation"], true);
36 validationsView::renderValidationInfo($validation);
37 }
38 ?>
39 </ul>
40</div>
41<div class="mdl-dialog__actions">
42 <button data-dyndialog-close class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--accent">Cerrar</button>
43</div>