Overview
Comment:Mise en commun des éléments
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0c1f27c28d671e5a28a8439f03b80f6c1d086ebd
User & Date: bohwaz on 2015-02-19 06:52:48
Other Links: manifest | tags
Context
2015-02-19
06:53
Permettre self_url sans query string, permettre de changer une date en timestamp check-in: ef1b8f1267 user: bohwaz tags: trunk
06:52
Mise en commun des éléments check-in: 0c1f27c28d user: bohwaz tags: trunk
06:52
Gestion des listes à cocher/décocher plus propre (et passage de l'indentation en tabs) check-in: 9e3b4eda67 user: bohwaz tags: trunk
Changes

Modified src/templates/admin/membres/index.tpl from [db8b01474f] to [16475009f5].

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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
{include file="admin/_head.tpl" title="Liste des membres" current="membres"}

{if $user.droits.membres >= Garradin\Membres::DROIT_ECRITURE}
<ul class="actions">
    <li class="current"><a href="{$admin_url}membres/">Liste des membres</a></li>
    <li><a href="{$admin_url}membres/recherche.php">Recherche avancée</a></li>
    {if $user.droits.membres >= Garradin\Membres::DROIT_ADMIN}
        <li><a href="{$admin_url}membres/import.php">Import &amp; export</a></li>
        <li><a href="{$admin_url}membres/recherche_sql.php">Recherche par requête SQL</a></li>
    {/if}
</ul>
{/if}

{if isset($tpl.get.sent)}
    <p class="confirm">Votre message a été envoyé.</p>
{/if}

{if !empty($membres_cats)}
<form method="get" action="{$self_url|escape}" class="filterCategory">
    <fieldset>
        <legend>Filtrer par catégorie</legend>
        <select name="cat" id="f_cat" onchange="this.form.submit();">
            <option value="0" {if $current_cat == 0} selected="selected"{/if}>-- Toutes</option>
        {foreach from=$membres_cats key="id" item="nom"}
            {if $user.droits.membres >= Garradin\Membres::DROIT_ECRITURE
                || !array_key_exists($id, $membres_cats_cachees)}
            <option value="{$id|escape}"{if $current_cat == $id} selected="selected"{/if}>{$nom|escape}</option>
            {/if}
        {/foreach}
        </select>
        <noscript><input type="submit" value="Filtrer &rarr;" /></noscript>
    </fieldset>
</form>
{/if}

<form method="get" action="{$admin_url}membres/{if $user.droits.membres >= Garradin\Membres::DROIT_ECRITURE}recherche.php{/if}" class="searchMember">
    <fieldset>
        <legend>Rechercher un membre</legend>
        <input type="text" name="r" value="" />
        <input type="submit" value="Chercher &rarr;" />
    </fieldset>
</form>

{if $user.droits.membres >= Garradin\Membres::DROIT_ECRITURE}

    <form method="post" action="action.php" class="memberList">

    {if !empty($liste)}
    <table class="list">
        <thead class="userOrder">

            {if $user.droits.membres == Garradin\Membres::DROIT_ADMIN}<td class="check"><input type="checkbox" value="Tout cocher / décocher" onclick="checkUncheck();" /></td>{/if}
            <td class="{if $order == 'id'} cur {if $desc}desc{else}asc{/if}{/if}" title="Numéro unique"><a href="?o=id&amp;a" class="icn up">&uarr;</a><a href="?o=id&amp;d" class="icn dn">&darr;</a></td>
            {foreach from=$champs key="c" item="champ"}
                <td class="{if $order == $c} cur {if $desc}desc{else}asc{/if}{/if}">{$champ.title|escape} <a href="?o={$c|escape}&amp;a" class="icn up">&uarr;</a><a href="?o={$c|escape}&amp;d" class="icn dn">&darr;</a></td>
            {/foreach}
            <td></td>

        </thead>
        <tbody>
            {foreach from=$liste item="membre"}
                <tr>
                    {if $user.droits.membres == Garradin\Membres::DROIT_ADMIN}<td class="check"><input type="checkbox" name="selected[]" value="{$membre.id|escape}" /></td>{/if}
                    <td class="num"><a href="{$admin_url}membres/fiche.php?id={$membre.id|escape}">{$membre.id|escape}</a></th>
                    {foreach from=$champs key="c" item="cfg"}
                        <td>{$membre[$c]|escape|display_champ_membre:$cfg}</td>
                    {/foreach}
                    <td class="actions">
                        {if !empty($membre.email)}<a class="icn" href="{$admin_url}membres/message.php?id={$membre.id|escape}" title="Envoyer un message">✉</a> {/if}
                        <a class="icn" href="{$admin_url}membres/fiche.php?id={$membre.id|escape}" title="Fiche membre">👤</a>
                        <a class="icn" href="{$admin_url}membres/modifier.php?id={$membre.id|escape}" title="Modifier la fiche membre">✎</a>
                    </td>
                </tr>
            {/foreach}
        </tbody>
    </table>

    {if $user.droits.membres == Garradin\Membres::DROIT_ADMIN}
    <p class="checkUncheck">
        <input type="button" value="Tout cocher / décocher" onclick="checkUncheck();" />
    </p>
    <p class="actions">
        <em>Pour les membres cochés :</em>
        <input type="submit" name="move" value="Changer de catégorie" />
        <input type="submit" name="delete" value="Supprimer" />
        {csrf_field key="membres_action"}
    </p>
    {/if}

    {pagination url=$pagination_url page=$page bypage=$bypage total=$total}
    {else}
    <p class="alert">
        Aucun membre trouvé.
    </p>
    {/if}

    </form>

    <script type="text/javascript">
    {literal}
    (function() {
        var checked = false;

        window.checkUncheck = function()
        {
            var elements = document.getElementsByTagName('input');
            var el_length = elements.length;

            for (i = 0; i < el_length; i++)
            {
                var elm = elements[i];

                if (elm.type == 'checkbox')
                {
                    if (checked)
                        elm.checked = false;
                    else
                        elm.checked = true;
                }
            }

            checked = checked ? false : true;
            return true;
        }
    }())
    {/literal}
    </script>
{else}
    {if !empty($liste)}
    <table class="list">
        <thead>
            <th>Membre</th>
            <td></td>
        </thead>
|

















|
















|














>
|
|
|
|
|
|
>




















<
<
<
















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







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
{include file="admin/_head.tpl" title="Liste des membres" current="membres" js=1}

{if $user.droits.membres >= Garradin\Membres::DROIT_ECRITURE}
<ul class="actions">
    <li class="current"><a href="{$admin_url}membres/">Liste des membres</a></li>
    <li><a href="{$admin_url}membres/recherche.php">Recherche avancée</a></li>
    {if $user.droits.membres >= Garradin\Membres::DROIT_ADMIN}
        <li><a href="{$admin_url}membres/import.php">Import &amp; export</a></li>
        <li><a href="{$admin_url}membres/recherche_sql.php">Recherche par requête SQL</a></li>
    {/if}
</ul>
{/if}

{if isset($tpl.get.sent)}
    <p class="confirm">Votre message a été envoyé.</p>
{/if}

{if !empty($membres_cats)}
<form method="get" action="{$self_url|escape}" class="shortFormRight">
    <fieldset>
        <legend>Filtrer par catégorie</legend>
        <select name="cat" id="f_cat" onchange="this.form.submit();">
            <option value="0" {if $current_cat == 0} selected="selected"{/if}>-- Toutes</option>
        {foreach from=$membres_cats key="id" item="nom"}
            {if $user.droits.membres >= Garradin\Membres::DROIT_ECRITURE
                || !array_key_exists($id, $membres_cats_cachees)}
            <option value="{$id|escape}"{if $current_cat == $id} selected="selected"{/if}>{$nom|escape}</option>
            {/if}
        {/foreach}
        </select>
        <noscript><input type="submit" value="Filtrer &rarr;" /></noscript>
    </fieldset>
</form>
{/if}

<form method="get" action="{$admin_url}membres/{if $user.droits.membres >= Garradin\Membres::DROIT_ECRITURE}recherche.php{/if}" class="shortFormLeft">
    <fieldset>
        <legend>Rechercher un membre</legend>
        <input type="text" name="r" value="" />
        <input type="submit" value="Chercher &rarr;" />
    </fieldset>
</form>

{if $user.droits.membres >= Garradin\Membres::DROIT_ECRITURE}

    <form method="post" action="action.php" class="memberList">

    {if !empty($liste)}
    <table class="list">
        <thead class="userOrder">
            <tr>
                {if $user.droits.membres == Garradin\Membres::DROIT_ADMIN}<td class="check"><input type="checkbox" title="Tout cocher / décocher" /></td>{/if}
                <td class="{if $order == 'id'} cur {if $desc}desc{else}asc{/if}{/if}" title="Numéro unique"><a href="?o=id&amp;a" class="icn up">&uarr;</a><a href="?o=id&amp;d" class="icn dn">&darr;</a></td>
                {foreach from=$champs key="c" item="champ"}
                    <td class="{if $order == $c} cur {if $desc}desc{else}asc{/if}{/if}">{$champ.title|escape} <a href="?o={$c|escape}&amp;a" class="icn up">&uarr;</a><a href="?o={$c|escape}&amp;d" class="icn dn">&darr;</a></td>
                {/foreach}
                <td></td>
            </tr>
        </thead>
        <tbody>
            {foreach from=$liste item="membre"}
                <tr>
                    {if $user.droits.membres == Garradin\Membres::DROIT_ADMIN}<td class="check"><input type="checkbox" name="selected[]" value="{$membre.id|escape}" /></td>{/if}
                    <td class="num"><a href="{$admin_url}membres/fiche.php?id={$membre.id|escape}">{$membre.id|escape}</a></th>
                    {foreach from=$champs key="c" item="cfg"}
                        <td>{$membre[$c]|escape|display_champ_membre:$cfg}</td>
                    {/foreach}
                    <td class="actions">
                        {if !empty($membre.email)}<a class="icn" href="{$admin_url}membres/message.php?id={$membre.id|escape}" title="Envoyer un message">✉</a> {/if}
                        <a class="icn" href="{$admin_url}membres/fiche.php?id={$membre.id|escape}" title="Fiche membre">👤</a>
                        <a class="icn" href="{$admin_url}membres/modifier.php?id={$membre.id|escape}" title="Modifier la fiche membre">✎</a>
                    </td>
                </tr>
            {/foreach}
        </tbody>
    </table>

    {if $user.droits.membres == Garradin\Membres::DROIT_ADMIN}



    <p class="actions">
        <em>Pour les membres cochés :</em>
        <input type="submit" name="move" value="Changer de catégorie" />
        <input type="submit" name="delete" value="Supprimer" />
        {csrf_field key="membres_action"}
    </p>
    {/if}

    {pagination url=$pagination_url page=$page bypage=$bypage total=$total}
    {else}
    <p class="alert">
        Aucun membre trouvé.
    </p>
    {/if}

    </form>






























{else}
    {if !empty($liste)}
    <table class="list">
        <thead>
            <th>Membre</th>
            <td></td>
        </thead>

Modified src/templates/admin/membres/recherche.tpl from [be73f64a9b] to [5f0fb47d43].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{include file="admin/_head.tpl" title="Recherche de membre" current="membres"}

{if $user.droits.membres >= Garradin\Membres::DROIT_ADMIN}
<ul class="actions">
    <li><a href="{$admin_url}membres/">Liste des membres</a></li>
    <li class="current"><a href="{$admin_url}membres/recherche.php">Recherche avancée</a></li>
    <li><a href="{$admin_url}membres/recherche_sql.php">Recherche par requête SQL</a></li>
</ul>
{/if}


<form method="get" action="{$admin_url}membres/recherche.php" class="searchMember">
    <fieldset>
        <legend>Rechercher un membre</legend>
        <dl>
            <dt><label for="f_champ">Champ</label></dt>
            <dd>
                <select name="c" id="f_champ">
                    {foreach from=$champs_liste key="k" item="v"}











|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{include file="admin/_head.tpl" title="Recherche de membre" current="membres"}

{if $user.droits.membres >= Garradin\Membres::DROIT_ADMIN}
<ul class="actions">
    <li><a href="{$admin_url}membres/">Liste des membres</a></li>
    <li class="current"><a href="{$admin_url}membres/recherche.php">Recherche avancée</a></li>
    <li><a href="{$admin_url}membres/recherche_sql.php">Recherche par requête SQL</a></li>
</ul>
{/if}


<form method="get" action="{$admin_url}membres/recherche.php" class="shortFormLeft">
    <fieldset>
        <legend>Rechercher un membre</legend>
        <dl>
            <dt><label for="f_champ">Champ</label></dt>
            <dd>
                <select name="c" id="f_champ">
                    {foreach from=$champs_liste key="k" item="v"}

Modified src/www/admin/static/admin.css from [1ae3606732] to [c5459a3acb].

61
62
63
64
65
66
67

68
69
70
71
72
73
74

.header .menu a {
    color: #fff;
    font-weight: bold;
    padding: 0.4em 0.4em 0.4em 1em;
    display: block;
    text-decoration: none;

}

.header .menu a:hover {
    text-decoration: underline;
    background: rgb(217, 134, 40);
    background: rgba(217, 134, 40, 0.5);
}







>







61
62
63
64
65
66
67
68
69
70
71
72
73
74
75

.header .menu a {
    color: #fff;
    font-weight: bold;
    padding: 0.4em 0.4em 0.4em 1em;
    display: block;
    text-decoration: none;
    transition: background .3s;
}

.header .menu a:hover {
    text-decoration: underline;
    background: rgb(217, 134, 40);
    background: rgba(217, 134, 40, 0.5);
}
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226

input[type=number], input[type=date] {
    padding: 0.2em 0.4em;
    font-family: Sans-serif;
    min-width: 2em;
}

input[type=submit], input[type=button] {
    padding: 0.3em;
    cursor: pointer;
    transition: opacity .5s ease;
}

.loader {
    width: 100%;







|







213
214
215
216
217
218
219
220
221
222
223
224
225
226
227

input[type=number], input[type=date] {
    padding: 0.2em 0.4em;
    font-family: Sans-serif;
    min-width: 2em;
}

input[type=submit], input[type=button], input[type=checkbox] {
    padding: 0.3em;
    cursor: pointer;
    transition: opacity .5s ease;
}

.loader {
    width: 100%;
403
404
405
406
407
408
409

410
411
412
413
414
415
416
417
418
419
420
421
422
423
424





425
426
427
428
429
430
431
table.list th, table.list td {
    padding: 0.2em 0.5em;
}

table.list tr {
    border: 1px solid rgb(217, 134, 40);
    border: 1px solid rgba(217, 134, 40, 0.5);

}

table.list tr:nth-child(even) {
    background: rgb(255, 174, 80);
    background: rgba(217, 134, 40, 0.2);
}

table.list.multi tr:nth-child(even) {
    background: inherit;
}

table.list.multi tr:nth-child(4n+1), table.list.multi tr:nth-child(4n+2) {
    background: rgb(255, 174, 80);
    background: rgba(217, 134, 40, 0.2);
}






table.list .error {
    color: red;
    font-weight: bold;
}

table.list .alert {







>















>
>
>
>
>







404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
table.list th, table.list td {
    padding: 0.2em 0.5em;
}

table.list tr {
    border: 1px solid rgb(217, 134, 40);
    border: 1px solid rgba(217, 134, 40, 0.5);
    transition: background .5s
}

table.list tr:nth-child(even) {
    background: rgb(255, 174, 80);
    background: rgba(217, 134, 40, 0.2);
}

table.list.multi tr:nth-child(even) {
    background: inherit;
}

table.list.multi tr:nth-child(4n+1), table.list.multi tr:nth-child(4n+2) {
    background: rgb(255, 174, 80);
    background: rgba(217, 134, 40, 0.2);
}

table.list tr.checked {
    color: #633;
    background: #ffc;
}

table.list .error {
    color: red;
    font-weight: bold;
}

table.list .alert {
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
    margin-bottom: 0.8em;
}

.infos dl dd {
    margin: 0.2em 1em;
}

.filterCategory {
    width: 30em;
    float: right;
    font-size: 80%;
    text-align: center;
    margin-left: 1em;
}

.searchMember {
    font-size: 80%;
}

.searchMember .special {
    display: none;
}

.filterCategory p.submit {
    margin-top: -2em;
    float: right;
}

.memberList {
    clear: both;
}







|







|



|



|







704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
    margin-bottom: 0.8em;
}

.infos dl dd {
    margin: 0.2em 1em;
}

.shortFormRight {
    width: 30em;
    float: right;
    font-size: 80%;
    text-align: center;
    margin-left: 1em;
}

.shortFormLeft {
    font-size: 80%;
}

.shortFormLeft .special {
    display: none;
}

.shortFormRight p.submit {
    margin-top: -2em;
    float: right;
}

.memberList {
    clear: both;
}