blob: 2880272c74af05bfe3c2bd63caa4793fabef8ffc [file] [log] [blame]
Copybara botbe50d492023-11-30 00:16:42 +01001<?php
2require_once("core.php");
3security::checkType(security::HYPERADMIN);
4
5$mdHeaderRowBefore = visual::backBtn("settings.php");
6?>
7<!DOCTYPE html>
8<html>
9<head>
10 <title><?php echo $conf["appName"]; ?></title>
11 <?php visual::includeHead(); ?>
12 <link rel="stylesheet" href="css/dashboard.css">
13</head>
14<?php visual::printBodyTag(); ?>
15 <div class="mdl-layout mdl-js-layout mdl-layout--fixed-header mdl-layout--fixed-drawer">
16 <?php visual::includeNav(); ?>
17 <main class="mdl-layout__content">
18 <div class="page-content">
19 <div class="main mdl-shadow--4dp">
20 <h2>Recursos de ayuda</h2>
21 <div class="overflow-wrapper overflow-wrapper--for-table">
22 <table class="mdl-data-table mdl-js-data-table mdl-shadow--2dp">
23 <thead>
24 <tr>
25 <th class="mdl-data-table__cell--non-numeric">Sitio</th>
26 <th class="mdl-data-table__cell--non-numeric">URL</th>
27 <th class="mdl-data-table__cell--non-numeric"></th>
28 </tr>
29 </thead>
30 <tbody>
31 <?php
32 foreach (help::$places as $p) {
33 $h = help::get($p);
34 $isset = ($h !== false);
35 ?>
36 <tr<?=(!$isset ? " class='mdl-color-text--grey-600'" : "")?>>
37 <td class="mdl-data-table__cell--non-numeric"><?=security::htmlsafe(help::$placesName[$p])?></td>
38 <td class="mdl-data-table__cell--non-numeric"><?=($h === false ? "-" : $h)?></td>
39 <td class='mdl-data-table__cell--non-numeric'><a href='dynamic/sethelpresource.php?place=<?=security::htmlsafe($p)?>' data-dyndialog-href='dynamic/sethelpresource.php?place=<?=security::htmlsafe($p)?>' title='Configurar enlace de ayuda'><i class='material-icons icon'>build</i></a></td>
40 </tr>
41 <?php
42 }
43 ?>
44 </tbody>
45 </table>
46 </div>
47 </div>
48 </div>
49 </main>
50 </div>
51
52 <?php
53 visual::smartSnackbar([
54 ["success", "Se ha configurado el enlace correctamente."],
55 ["invalidurl", "La URL proporcionada está malformada. Por favor, introduce una URL correcta."],
56 ["empty", "Faltan datos por introducir en el formulario."],
57 ["unexpected", "Ha ocurrido un error inesperado. Inténtelo de nuevo en unos segundos."]
58 ]);
59 ?>
60</body>
61</html>