Overview
Comment:Refactoring of CSS, continued, change of old icon links to icon buttons
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | dev
Files: files | file ages | folders
SHA1: 27965d10c757f38ac677e3844bd303ad0d10c379
User & Date: bohwaz on 2020-11-16 21:37:28
Other Links: branch diff | manifest | tags
Context
2020-11-16
21:38
Beta5 release check-in: aafd665d1d user: bohwaz tags: dev, 1.0.0-beta5
21:37
Refactoring of CSS, continued, change of old icon links to icon buttons check-in: 27965d10c7 user: bohwaz tags: dev
21:24
$wiki must always be set, so the method should always be run check-in: 169b994c9e user: bohwaz tags: dev
Changes

Modified src/templates/admin/config/_menu.tpl from [a9a820896f] to [e4219ce6af].

2
3
4
5
6
7
8
9
10
11
	<ul>
		<li{if $current == 'index'} class="current"{/if}><a href="{$admin_url}config/">Général</a></li>
		<li{if $current == 'categories'} class="current"{/if}><a href="{$admin_url}config/categories/">Catégories de membres</a></li>
		<li{if $current == 'fiches_membres'} class="current"{/if}><a href="{$admin_url}config/membres.php">Fiche des membres</a></li>
		<li{if $current == 'site'} class="current"{/if}><a href="{$admin_url}config/site.php">Site public</a></li>
		<li{if $current == 'donnees'} class="current"{/if}><a href="{$admin_url}config/donnees/">Sauvegarde et restauration</a></li>
		<li{if $current == 'plugins'} class="current"{/if}><a href="{$admin_url}config/plugins.php">Extensions</a></li>
		<li{if $current == 'logs'} class="current"{/if}><a href="{$admin_url}config/logs.php">Journaux</a></li>
	</ul>
</nav>







|


2
3
4
5
6
7
8
9
10
11
	<ul>
		<li{if $current == 'index'} class="current"{/if}><a href="{$admin_url}config/">Général</a></li>
		<li{if $current == 'categories'} class="current"{/if}><a href="{$admin_url}config/categories/">Catégories de membres</a></li>
		<li{if $current == 'fiches_membres'} class="current"{/if}><a href="{$admin_url}config/membres.php">Fiche des membres</a></li>
		<li{if $current == 'site'} class="current"{/if}><a href="{$admin_url}config/site.php">Site public</a></li>
		<li{if $current == 'donnees'} class="current"{/if}><a href="{$admin_url}config/donnees/">Sauvegarde et restauration</a></li>
		<li{if $current == 'plugins'} class="current"{/if}><a href="{$admin_url}config/plugins.php">Extensions</a></li>
		<li{if $current == 'logs'} class="current"{/if}><a href="{$admin_url}config/logs.php?type=errors">Journaux</a></li>
	</ul>
</nav>

Modified src/templates/admin/config/categories/index.tpl from [2edfe53a50] to [5d521a2809].

14
15
16
17
18
19
20
21
22
23
24

25


26
27
28
29
30
31
32
            <tr>
                <th>{$cat.nom}</th>
                <td class="num">{$cat.nombre}</td>
                <td class="droits">
                    {format_droits droits=$cat}
                </td>
                <td class="actions">
                    <a class="icn" href="{$admin_url}membres/?cat={$cat.id}" title="Liste des membres">👪</a>
                    <a class="icn" href="{$admin_url}config/categories/modifier.php?id={$cat.id}" title="Modifier">✎</a>
                    {if $cat.id != $user.id_categorie}
                    <a class="icn" href="{$admin_url}config/categories/supprimer.php?id={$cat.id}" title="Supprimer">✘</a>

                    {/if}


                </td>
            </tr>
        {/foreach}
    </tbody>
</table>

<form method="post" action="{$self_url}">







<
<

<
>

>
>







14
15
16
17
18
19
20


21

22
23
24
25
26
27
28
29
30
31
32
            <tr>
                <th>{$cat.nom}</th>
                <td class="num">{$cat.nombre}</td>
                <td class="droits">
                    {format_droits droits=$cat}
                </td>
                <td class="actions">


                    {if $cat.id != $user.id_categorie}

                        {linkbutton shape="delete" label="Supprimer" href="config/categories/supprimer.php?id=%d"|args:$cat.id}
                    {/if}
                    {linkbutton shape="edit" label="Modifier" href="config/categories/modifier.php?id=%d"|args:$cat.id}
                    {linkbutton shape="users" label="Liste des membres" href="membres/?cat=%d"|args:$cat.id}
                </td>
            </tr>
        {/foreach}
    </tbody>
</table>

<form method="post" action="{$self_url}">

Modified src/templates/admin/config/logs.tpl from [9846d308f5] to [64e9f1fe33].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
..
81
82
83
84
85
86
87
88


89
90
91
92
93
94
95
{include file="admin/_head.tpl" title="Journaux" current="config" custom_css=["styles/config.css"]}

{include file="admin/config/_menu.tpl" current="logs"}

{if ERRORS_ENABLE_LOG_VIEW}
<nav class="tabs">
	<ul class="sub">
		<li{if $type != 'errors'} class="current"{/if}><a href="{$self_url_no_qs}">Actions utilisateurs</a></li>
		<li{if $type == 'errors'} class="current"{/if}><a href="?type=errors">Erreurs système</a></li>
	</ul>
</nav>
{/if}

{if isset($reports) && isset($id)}
	<section class="error">
................................................................................
					<th><a href="?type=errors&id={$ref}">{$ref}</a></th>
					<td>
						{$error.message}<br />
						<tt>{$error.source}</tt>
					</td>
					<td>{$error.count}</td>
					<td>{$error.last_seen|date_fr}</td>
					<td class="actions"><a title="Voir les détails" class="icn" href="?type=errors&id={$ref}">𝍢</a></td>


				</tr>
				{/foreach}
			</tbody>
		</table>
	{/if}
{else}
	<p class="help">







|







 







|
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
..
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
{include file="admin/_head.tpl" title="Journaux" current="config" custom_css=["styles/config.css"]}

{include file="admin/config/_menu.tpl" current="logs"}

{if ERRORS_ENABLE_LOG_VIEW}
<nav class="tabs">
	<ul class="sub">
		{*<li{if $type != 'errors'} class="current"{/if}><a href="{$self_url_no_qs}">Actions utilisateurs</a></li>*}
		<li{if $type == 'errors'} class="current"{/if}><a href="?type=errors">Erreurs système</a></li>
	</ul>
</nav>
{/if}

{if isset($reports) && isset($id)}
	<section class="error">
................................................................................
					<th><a href="?type=errors&id={$ref}">{$ref}</a></th>
					<td>
						{$error.message}<br />
						<tt>{$error.source}</tt>
					</td>
					<td>{$error.count}</td>
					<td>{$error.last_seen|date_fr}</td>
					<td class="actions">
						{linkbutton shape="menu" label="Voir les détails" href="%s?type=errors&id=%s"|args:$self_url_no_qs,$ref}
					</td>
				</tr>
				{/foreach}
			</tbody>
		</table>
	{/if}
{else}
	<p class="help">

Modified src/templates/admin/config/membres.tpl from [ce57eab378] to [011f044254].

1
2
3
4
5
6
7
8
...
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
{include file="admin/_head.tpl" current="config" js=1}

{include file="admin/config/_menu.tpl" current="fiches_membres"}

{if isset($status) && $status == 'OK'}
    <p class="block confirm">
        La configuration a bien été enregistrée.
    </p>
................................................................................
        </dl>
    </fieldset>

    <p class="submit">
        {csrf_field key="config_membres"}
        {button type="submit" name="reset" label="Annuler les changements" shape="left"}
        {button type="submit" name="review" label="Vérifier les changements" shape="right" class="main"}
        (un récapitulatif sera présenté et une confirmation sera demandée)
    </p>
</form>

<script type="text/javascript">
var champ_identifiant = "f_{$config.champ_identifiant|escape:'js'}";
var champ_identite = "f_{$config.champ_identite|escape:'js'}";

|







 







|







1
2
3
4
5
6
7
8
...
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
{include file="admin/_head.tpl" current="config" js=1 custom_css=['styles/config.css']}

{include file="admin/config/_menu.tpl" current="fiches_membres"}

{if isset($status) && $status == 'OK'}
    <p class="block confirm">
        La configuration a bien été enregistrée.
    </p>
................................................................................
        </dl>
    </fieldset>

    <p class="submit">
        {csrf_field key="config_membres"}
        {button type="submit" name="reset" label="Annuler les changements" shape="left"}
        {button type="submit" name="review" label="Vérifier les changements" shape="right" class="main"}
        <em class="help">(un récapitulatif sera présenté et une confirmation sera demandée)</em>
    </p>
</form>

<script type="text/javascript">
var champ_identifiant = "f_{$config.champ_identifiant|escape:'js'}";
var champ_identite = "f_{$config.champ_identite|escape:'js'}";

Modified src/templates/admin/config/site.tpl from [a7761b4f24] to [5e149c8aab].

48
49
50
51
52
53
54

55
56

57
58
59
60
61
62
63
..
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
{else}

    <fieldset>
        <legend>Activation du site public</legend>
        <dl>
            <dt>
                <form method="post" action="{$self_url}">

                    {button type="submit" name="desactiver_site" label="Désactiver le site public" shape="right" class="main"}
                {csrf_field key="config_site"}

                </form>
            </dt>
            <dd class="help">
                En désactivant le site public, les visiteurs seront automatiquement redirigés vers la page de connexion.<br />
                Cette option est utile si vous avez déjà un site web et ne souhaitez pas utiliser la fonctionnalité site web de Garradin.
            </dd>
        </dl>
................................................................................
            <tbody>
            {foreach from=$sources key="source" item="local"}
                <tr>
                    <td>{if $local && $local.dist}<input type="checkbox" name="select[]" value="{$source}" id="f_source_{$iteration}" /><label for="f_source_{$iteration}"></label>{/if}</td>
                    <th><a href="{$admin_url}config/site.php?edit={$source|escape:'url'}" title="Éditer">{$source}</a></th>
                    <td>{if $local}{$local.mtime|date_fr:'d/m/Y à H:i:s'}{else}<em>(fichier non modifié)</em>{/if}</td>
                    <td class="actions">
                        <a class="icn" href="{$admin_url}config/site.php?edit={$source|escape:'url'}" title="Éditer">✎</a>
                    </td>
                </tr>
            {/foreach}
            </tbody>
        </table>

        <p class="actions">







>
|
|
>







 







|







48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
..
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
{else}

    <fieldset>
        <legend>Activation du site public</legend>
        <dl>
            <dt>
                <form method="post" action="{$self_url}">
                    <p class="submit">
                        {button type="submit" name="desactiver_site" label="Désactiver le site public" shape="right" class="main"}
                        {csrf_field key="config_site"}
                    </p>
                </form>
            </dt>
            <dd class="help">
                En désactivant le site public, les visiteurs seront automatiquement redirigés vers la page de connexion.<br />
                Cette option est utile si vous avez déjà un site web et ne souhaitez pas utiliser la fonctionnalité site web de Garradin.
            </dd>
        </dl>
................................................................................
            <tbody>
            {foreach from=$sources key="source" item="local"}
                <tr>
                    <td>{if $local && $local.dist}<input type="checkbox" name="select[]" value="{$source}" id="f_source_{$iteration}" /><label for="f_source_{$iteration}"></label>{/if}</td>
                    <th><a href="{$admin_url}config/site.php?edit={$source|escape:'url'}" title="Éditer">{$source}</a></th>
                    <td>{if $local}{$local.mtime|date_fr:'d/m/Y à H:i:s'}{else}<em>(fichier non modifié)</em>{/if}</td>
                    <td class="actions">
                        {linkbutton shape="edit" label="Éditer" href="config/site.php?edit=%s"|args:$source}
                    </td>
                </tr>
            {/foreach}
            </tbody>
        </table>

        <p class="actions">

Modified src/templates/admin/wiki/_fichiers.tpl from [f239a0b083] to [f7f28ddc72].

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
..
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
{if !empty($images)}
<ul class="gallery">
{foreach from=$images item="file"}
    <li>
        <figure>
            <a href="{$file.url}" data-id="{$file.id}"><img src="{$file.thumb}" alt="" title="{$file.nom}" /></a>
            <form class="actions" method="post" action="{$self_url}">
                <a href="{$file.url}" onclick="return !window.open(this.href);" class="icn" title="Télécharger">⇓</a>
                {csrf_field key=$csrf_id}
                <input type="hidden" name="delete" value="{$file.id}" />
                <noscript><input type="submit" value="Supprimer" /></noscript>
            </form>
        </figure>
    </li>
{/foreach}
................................................................................
    <tbody>
    {foreach from=$fichiers item="file"}
        <tr>
            <th>{$file.nom}</th>
            <td>{if $file.type}{$file.type}{/if}</td>
            <td class="actions">
                <form class="actions" method="post" action="{$self_url}">
                    <a href="{$file.url}" onclick="return !window.open(this.href);" class="icn" title="Télécharger">⇓</a>
                    {csrf_field key=$csrf_id}
                    <input type="hidden" name="delete" value="{$file.id}" />
                    <noscript><input type="submit" value="Supprimer" /></noscript>
                </form>
            </td>
        </tr>
    {/foreach}
    </tbody>
</table>
{/if}

{include file="admin/_foot.tpl"}







|







 







|












42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
..
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
{if !empty($images)}
<ul class="gallery">
{foreach from=$images item="file"}
    <li>
        <figure>
            <a href="{$file.url}" data-id="{$file.id}"><img src="{$file.thumb}" alt="" title="{$file.nom}" /></a>
            <form class="actions" method="post" action="{$self_url}">
                {linkbutton shape="download" label="Télécharger" href=$file.url target="_blank"}
                {csrf_field key=$csrf_id}
                <input type="hidden" name="delete" value="{$file.id}" />
                <noscript><input type="submit" value="Supprimer" /></noscript>
            </form>
        </figure>
    </li>
{/foreach}
................................................................................
    <tbody>
    {foreach from=$fichiers item="file"}
        <tr>
            <th>{$file.nom}</th>
            <td>{if $file.type}{$file.type}{/if}</td>
            <td class="actions">
                <form class="actions" method="post" action="{$self_url}">
                    {linkbutton shape="download" label="Télécharger" href=$file.url target="_blank"}
                    {csrf_field key=$csrf_id}
                    <input type="hidden" name="delete" value="{$file.id}" />
                    <noscript><input type="submit" value="Supprimer" /></noscript>
                </form>
            </td>
        </tr>
    {/foreach}
    </tbody>
</table>
{/if}

{include file="admin/_foot.tpl"}

Modified src/www/admin/static/scripts/wiki_fichiers.js from [fdc7825154] to [0dc8ddc2bb].

73
74
75
76
77
78
79
80
81
82
83

84
85
86
87
88
89
90
                        thumb: this.firstChild.src
                    });
                    return false;
                };
            }
        }

        var a = document.createElement('a');
        a.className = 'icn';
        a.title = 'Supprimer';
        a.innerHTML = '✘';

        a.onclick = function() { if (confirm('Supprimer ce fichier ?')) this.parentNode.submit(); };

        var items = document.body.getElementsByTagName('form');

        for (var i = 0; i < items.length, form = items[i]; i++)
        {
            if (form.className != 'actions') continue;







|
|
|
|
>







73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
                        thumb: this.firstChild.src
                    });
                    return false;
                };
            }
        }

        var a = document.createElement('button');
        a.className = 'icn-btn';
        a.innerText = 'Supprimer';
        a.dataset.icon = '✘';
        a.type = 'button';
        a.onclick = function() { if (confirm('Supprimer ce fichier ?')) this.parentNode.submit(); };

        var items = document.body.getElementsByTagName('form');

        for (var i = 0; i < items.length, form = items[i]; i++)
        {
            if (form.className != 'actions') continue;

Deleted src/www/admin/static/styles/02-blocks.css version [f84ddc18b6].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/** Alert, confirm and error messages */
h3.warning {
    margin: 1em;
    color: red;
}

span.error, b.error {
    color: #900;
}

span.confirm, b.confirm {
    color: #090;
}

span.alert, b.alert {
    color: #990;
}

.alert p, .error p, .confirm p {
    margin-bottom: .8em;
}

.alert.block, .error.block, .confirm.block, .help.block {
    border: 1px solid #ccc;
    padding: .5em;
    margin-bottom: 1em;
    border-radius: .3em;
    padding-left: 3em;
    position: relative;
}

.alert.block {
    border-color: #cc0;
    background-color: #ffc;
}

.error.block {
    border-color: #c00;
    background-color: #fcc;
}

.confirm.block {
    border-color: #0c0;
    background-color: #cfc;
}

.help.block {
    border-color: #999;
    background-color: #eee;
}

.confirm.block::before, .alert.block::before, .error.block::before, .help.block::before {
    font-family: "gicon";
    left: .5em;
    top: .2em;
    position: absolute;
    font-size: 1.5em;
    text-shadow: 2px 2px 5px #666;
}

.confirm.block::before {
    content: "☑";
    color: green;
}

.alert.block::before {
    content: "⚠";
    color: yellow;
}

.error.block::before {
    content: "⚠";
    color: red;
}

.help.block::before {
    content: "❓";
    color: #666;
}

.help {
    color: #666;
}

p.help {
    margin: 1em;
}

.help ul li {
    list-style-type: disc;
    margin: .5em;
    margin-left: 2em;
}

dd em.help {
    margin-left: 1em;
}

dd.help li {
    list-style-type: disc;
}

.error ul, .alert ul, .confirm ul {
    margin-left: 1.5em;
    list-style: disc;
}

dd.help, small.help {
    color: #666;
}

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






























































































































































































































Modified src/www/admin/static/styles/02-common.css from [7efeb85c78] to [5bcbb5c0f8].

100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
    list-style-type: disc;
}

.error ul, .alert ul, .confirm ul {
    margin-left: 1.5em;
    list-style: disc;
}

dd.help, small.help {
    color: #666;
}


h2.ruler {
    margin: .5em;
    text-align: center;
    color: #333;
    overflow: hidden;
}







<
<
<
<
<







100
101
102
103
104
105
106





107
108
109
110
111
112
113
    list-style-type: disc;
}

.error ul, .alert ul, .confirm ul {
    margin-left: 1.5em;
    list-style: disc;
}






h2.ruler {
    margin: .5em;
    text-align: center;
    color: #333;
    overflow: hidden;
}

Modified src/www/admin/static/styles/03-forms.css from [6665670b96] to [4f38ccc328].

470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
    color: rgb(var(--gMainColor));
    text-shadow: 1px 1px 1px #999;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 200;
}

a.icn[title]:after {
    display: none;
    position: absolute;
    content: attr(title);
    font-size: 10pt;
    border-radius: .2em;
    top: 0;
    bottom: 0;
    right: 0;
    z-index: -1;
    padding: .3em .4em;
    background: #ff9;
    text-shadow: none;
    white-space: pre;
    box-shadow: 0px 0px 2px #000;
    text-decoration: underline;
    padding-right: 2em;
}

dl dd.actions a.icn[title]:after {
    right: auto;
    left: 0;
    padding-left: 2em;
    padding-right: .4em;
}

a.icn[title]:hover:after {
    display: inline-block;
}


fieldset.memberMessage {
    max-width: 30em;
}

fieldset.memberMessage #f_sujet, fieldset.memberMessage #f_message {
    width: 95%;
}







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








470
471
472
473
474
475
476































477
478
479
480
481
482
483
484
    color: rgb(var(--gMainColor));
    text-shadow: 1px 1px 1px #999;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 200;
}
































fieldset.memberMessage {
    max-width: 30em;
}

fieldset.memberMessage #f_sujet, fieldset.memberMessage #f_message {
    width: 95%;
}

Modified src/www/admin/static/styles/config.css from [633b142bc7] to [bc72f7c8a4].

51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
    line-height: .8em;
    color: #666;
}

#orderFields fieldset .actions {
    display: block;
    position: absolute;
    top: 0.2em;
    right: 1em;
}

#orderFields fieldset .actions .icn {
    position: absolute;
}








|







51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
    line-height: .8em;
    color: #666;
}

#orderFields fieldset .actions {
    display: block;
    position: absolute;
    top: 1em;
    right: 1em;
}

#orderFields fieldset .actions .icn {
    position: absolute;
}