Overview
Comment:Implement sticky alert message
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | dev
Files: files | file ages | folders
SHA3-256: 17bd86df887383c9c0955479774defc2f4a0ea7d666f0d6ba3663a286a53543d
User & Date: bohwaz on 2023-05-26 14:07:54
Other Links: branch diff | manifest | tags
Context
2023-05-26
14:40
Fix backup rotate check-in: 54ec80e30c user: bohwaz tags: dev
14:07
Implement sticky alert message check-in: 17bd86df88 user: bohwaz tags: dev
2023-05-24
04:18
Reçus fiscaux: use #form sections check-in: c617c9a50f user: bohwaz tags: dev
Changes

Modified src/config.dist.php from [e61e7ac8e5] to [aeac8f74f9].

804
805
806
807
808
809
810














 * Ce texte (HTML) est affiché en bas des pages du site public.
 * Utile pour indiquer les mentions légales obligatoires
 * Le %1$s est remplacé par le nom de l'association, %2$s par son adresse.
 *
 * Défaut : "Hébergé par nom_association, adresse_association"
 */
//const LEGAL_LINE = 'Hébergé par <strong>%1$s</strong>, %2$s';





















>
>
>
>
>
>
>
>
>
>
>
>
>
>
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
 * Ce texte (HTML) est affiché en bas des pages du site public.
 * Utile pour indiquer les mentions légales obligatoires
 * Le %1$s est remplacé par le nom de l'association, %2$s par son adresse.
 *
 * Défaut : "Hébergé par nom_association, adresse_association"
 */
//const LEGAL_LINE = 'Hébergé par <strong>%1$s</strong>, %2$s';

/**
 * Message d'avertissement
 *
 * Sera affiché en haut de toutes les pages de l'administration.
 *
 * Code HTML autorisé.
 * Utiliser NULL pour désactiver le message.
 *
 * Défaut : null
 *
 * @var null|string
 */
//const ALERT_MESSAGE = 'Ceci est un compte de test.';

Modified src/include/init.php from [b425d12323] to [b7b08a5c4e].

226
227
228
229
230
231
232

233
234
235
236
237
238
239
	'PDFTOTEXT_COMMAND'     => null,
	'CALC_CONVERT_COMMAND'  => null,
	'CONTRIBUTOR_LICENSE'   => null,
	'SQL_DEBUG'             => null,
	'SYSTEM_SIGNALS'        => [],
	'LOCAL_LOGIN'           => null,
	'LEGAL_LINE'            => 'Hébergé par <strong>%1$s</strong>, %2$s',

	'DISABLE_INSTALL_PING'  => false,
	'WOPI_DISCOVERY_URL'    => null,
	'SQLITE_JOURNAL_MODE'   => 'TRUNCATE',
];

foreach ($default_config as $const => $value)
{







>







226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
	'PDFTOTEXT_COMMAND'     => null,
	'CALC_CONVERT_COMMAND'  => null,
	'CONTRIBUTOR_LICENSE'   => null,
	'SQL_DEBUG'             => null,
	'SYSTEM_SIGNALS'        => [],
	'LOCAL_LOGIN'           => null,
	'LEGAL_LINE'            => 'Hébergé par <strong>%1$s</strong>, %2$s',
	'ALERT_MESSAGE'         => null,
	'DISABLE_INSTALL_PING'  => false,
	'WOPI_DISCOVERY_URL'    => null,
	'SQLITE_JOURNAL_MODE'   => 'TRUNCATE',
];

foreach ($default_config as $const => $value)
{

Modified src/templates/_head.tpl from [b6ee776d31] to [ef9c7b5a47].

43
44
45
46
47
48
49








50




51
52
53
54
55
56
57
	<link rel="manifest" href="{$admin_url}manifest.php" />
	{if isset($config)}
		<link rel="icon" type="image/png" href="{$config->fileURL('favicon')}" />
	{/if}
	{custom_colors config=$config}
</head>









<body{if !empty($layout)} class="{$layout}"{/if}>





{if !array_key_exists('_dialog', $_GET) && empty($layout)}
<header class="header">
	<nav class="menu">
		<figure class="logo">
		{if isset($config) && ($url = $config->fileURL('logo', '150px'))}
				<a href="{$admin_url}"><img src="{$url}" alt="" /></a>







>
>
>
>
>
>
>
>
|
>
>
>
>







43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
	<link rel="manifest" href="{$admin_url}manifest.php" />
	{if isset($config)}
		<link rel="icon" type="image/png" href="{$config->fileURL('favicon')}" />
	{/if}
	{custom_colors config=$config}
</head>

<?php
$class = $layout ?? '';

if (ALERT_MESSAGE) {
	$class .= ' sticky';
}
?>

<body{if !empty($class)} class="{$class}"{/if}>

{if ALERT_MESSAGE}
	<div id="sticky-alert"><?=ALERT_MESSAGE?></div>
{/if}

{if !array_key_exists('_dialog', $_GET) && empty($layout)}
<header class="header">
	<nav class="menu">
		<figure class="logo">
		{if isset($config) && ($url = $config->fileURL('logo', '150px'))}
				<a href="{$admin_url}"><img src="{$url}" alt="" /></a>

Modified src/www/admin/static/styles/01-layout.css from [bbc9aa674d] to [c3e802ffb9].

254
255
256
257
258
259
260
















}

header.summary {
    margin-bottom: 1em;
    border-bottom: 2px solid #999;
    text-align: center;
}























>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
}

header.summary {
    margin-bottom: 1em;
    border-bottom: 2px solid #999;
    text-align: center;
}

#sticky-alert {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #ffd;
    border-bottom: 2px solid #990;
    padding: 5px;
    z-index: 10000;
    text-align: center;
}

body.sticky, body.sticky .header .menu {
    padding-top: 2em;
}