blob: 8888af36168f89f4eeac72e35b98999579e7d154 [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$record = registry::get($id, true);
15if ($record === false) security::notFound();
16
17if (!$isAdmin) registry::checkRecordIsFromPerson($record["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 del elemento del registro</h4>
28<div class="mdl-dialog__content">
29 <ul>
30 <li><b>Creador:</b> <?=($record["creator"] == -1 ? "<span style='font-family: monospace;'>cron</span>" : security::htmlsafe(people::userData("name", $record["creator"])))?></li>
31 <li><b>Fecha de creación:</b> <?=date("d/m/Y H:i", $record["created"])?></li>
32 <?php if ($record["invalidatedby"] != -1) { ?><li><b>Invalidado por:</b> <?=security::htmlsafe(people::userData("name", $record["invalidatedby"]))?></li><?php } ?>
33 <?php
34 if ($record["state"] == registry::STATE_VALIDATED_BY_WORKER) {
35 $validation = json_decode($record["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>