blob: 28b3babe958cefe095ef80fdb701324577bbf05c [file] [log] [blame]
Copybara botbe50d492023-11-30 00:16:42 +01001<?php
Adrià Vilanova Martínez5af86512023-12-02 20:44:16 +01002/*
3 * hores
4 * Copyright (c) 2023 Adrià Vilanova Martínez
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Affero General Public License as
8 * published by the Free Software Foundation, either version 3 of the
9 * License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Affero General Public License for more details.
15 *
16 * You should have received a copy of the GNU Affero General Public
17 * License along with this program.
18 * If not, see http://www.gnu.org/licenses/.
19 */
20
Copybara botbe50d492023-11-30 00:16:42 +010021require_once("core.php");
22security::checkType(security::ADMIN);
23
24$conf_redacted = $conf;
25foreach ($conf_redacted["db"] as &$el) {
26 $el = "*CENSURADO*";
27}
28$conf_redacted["mail"]["password"] = "*CENSURADO*";
29?>
30<!DOCTYPE html>
31<html>
32<head>
33 <title><?php echo $conf["appName"]; ?></title>
34 <?php visual::includeHead(); ?>
35 <link rel="stylesheet" href="css/dashboard.css">
36
37 <style>
38 a {
39 color: blue;
40 }
41 </style>
42</head>
43<?php visual::printBodyTag(); ?>
44 <div class="mdl-layout mdl-js-layout mdl-layout--fixed-header mdl-layout--fixed-drawer">
45 <?php visual::includeNav(); ?>
46 <main class="mdl-layout__content">
47 <div class="page-content">
48 <div class="main mdl-shadow--4dp">
49 <h2>Configuración</h2>
50 <a class="clicky-container" href="companies.php">
51 <div class="clicky mdl-js-ripple-effect">
52 <div class="text">
53 <span class="title">Empresas</span><br>
54 <span class="description">Configura las diferentes empresas de la aplicación.</span>
55 </div>
56 <div class="mdl-ripple"></div>
57 </div>
58 </a>
59 <a class="clicky-container" href="categories.php">
60 <div class="clicky mdl-js-ripple-effect">
61 <div class="text">
62 <span class="title">Categorías de trabajadores</span><br>
63 <span class="description">Configura las categorías en las que se pueden clasificar los trabajadores.</span>
64 </div>
65 <div class="mdl-ripple"></div>
66 </div>
67 </a>
68 <a class="clicky-container" href="incidenttypes.php">
69 <div class="clicky mdl-js-ripple-effect">
70 <div class="text">
71 <span class="title">Tipos de incidencias</span><br>
72 <span class="description">Configura los diferentes motivos que se pueden seleccionar al crear una incidencia.</span>
73 </div>
74 <div class="mdl-ripple"></div>
75 </div>
76 </a>
77 <a class="clicky-container" href="calendars.php">
78 <div class="clicky mdl-js-ripple-effect">
79 <div class="text">
80 <span class="title">Calendarios</span><br>
81 <span class="description">Configura los días festivos, lectivos y laborables del año.</span>
82 </div>
83 <div class="mdl-ripple"></div>
84 </div>
85 </a>
86 <a class="clicky-container" href="logs.php">
87 <div class="clicky mdl-js-ripple-effect">
88 <div class="text">
89 <span class="title">Logs</span><br>
90 <span class="description">Ver los logs del programa que registra los horarios diariamente.</span>
91 </div>
92 <div class="mdl-ripple"></div>
93 </div>
94 </a>
95 <?php
96 if (security::isAllowed(security::HYPERADMIN)) {
97 ?>
98 <a class="clicky-container" href="help.php">
99 <div class="clicky mdl-js-ripple-effect">
100 <div class="text">
101 <span class="title">Recursos de ayuda</span><br>
102 <span class="description">Configura los enlaces de ayuda que se ofrecen a los trabajadores en el aplicativo.</span>
103 </div>
104 <div class="mdl-ripple"></div>
105 </div>
106 </a>
107 <a class="clicky-container" href="powertools.php">
108 <div class="clicky mdl-js-ripple-effect">
109 <div class="text">
110 <span class="title">Herramientas avanzadas</span><br>
111 <span class="description">Ver herramientas para hiperadministradores del aplicativo.</span>
112 </div>
113 <div class="mdl-ripple"></div>
114 </div>
115 </a>
116 <?php
117 }
118
119 if ($conf["debug"]) {
120 ?>
121 <details class="debug margintop">
122 <summary>Ajustes establecidos en el fichero <code>config.php</code>:</summary>
123 <pre><?=visual::debugJson($conf_redacted); ?></pre>
124 </details>
125 <?php
126 }
127 ?>
128 </div>
129 </div>
130 </main>
131 </div>
132</body>
133</html>