cbs.html 3.01 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
<section>
<h2>Gestion des CB</h2>
<form name="f" method="POST" action="{{ 'cbs' | alias }}">
    <input type="hidden" id="action" name="action" value="" />
    <input type="hidden" id="id" name="id" value="" />
    <input type="hidden" id="csrf" name="csrf" value="{{ @CSRF }}" />
    <input type="hidden" id="checkboxes" name="checkboxes" value="" />

    <label for="texte">Id/Nom/Email/Adresse</label>
    <input type="text" id="texte" name="texte" size="30" value="{{ @texte }}" />

    <label for="status">Statut</label>
    <select name="status" id="status">
        <option value="">-- Tous les status --</option>
        <repeat group="{{ @CB_STATUTS }}" key="{{ @key }}" value="{{ @value }}">
        <option value="{{ @key }}" <check if="{{ @status==@key }}">selected</check> >{{ @value }}</option>
        </repeat>
    </select>

Okhin's avatar
Okhin committed
20 21 22
    <label for="page">Page</label>
    <input type="text" id="page" name="page" size="3" value="{{ @page }}" />

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
    <label for="limite">Limite</label>
    <input type="text" id="limite" name="limite" size="3" value="{{ @limite }}" />

    <input type="submit" value="Filtrer" />

    <input type="button" value="Export CSV" onclick="export_csv()" />

    <br />
    <label for="command">Action à faire sur les cases à cocher:</label>
    <select name="command" id="command">
        <option value="">-- Quoi faire ? --</option>
        <repeat group="{{ @CB_STATUTS }}" key="{{ @key }}" value="{{ @value }}">
        <option value="{{ @key }}" />{{ @value }}</option>
        </repeat>
    </select>
    <input type="button" value="Action" onclick="checkbox_command()" />
</form>
<check if="{{ @row_count }}"><b>{{ @row_count }} résultats</b> => </check>{{ @query }}
<br />
<table cellspacing="0" cellpadding="0">
<theader>
    <th><label for="all"><input type="checkbox" name="all" id="all" onclick="check_all()" />Id</label></th>
    <th>Email</th>
    <th>Expiration</th>
    <th>Statut</th>
    <th>Actions</th>
</theader>
<tbody>
    <repeat group="{{ @data }}" value="{{ @row }}">
    <tr>
        <td><label for="chk_{{ @row.id }}"><input type="checkbox" name="chk_{{ @row.id }}" id="chk_{{ @row.id }}" value="{{ @row.id }}" />{{ @row.id }}</label></td>
54
	<td><a href="{{ 'user_info', 'id='.@row.id | alias }}">{{ @row.email }}</a></td>
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
        <td>{{ @row.expiration }}</td>
        <td class="inline">{{ @CB_STATUTS[@row.status] }}</td>
        <td>
        <check if="{{ @row.status!=1 }}" >
            <span class="lien" onclick="current({{ @row.id }})">En cours</span>
            -
        </check>
        <check if="{{ @row.status!=2 }}" >
            <span class="lien" onclick="to_relaunch({{ @row.id }})">À relancer</span>
            -
        </check>
        <check if="{{ @row.status!=3 }}" >
            <span class="lien" onclick="relaunched({{ @row.id }})">Relancé</span>
            -
        </check>
        <check if="{{ @row.status!=99 }}" >
            <span class="lien" onclick="canceled({{ @row.id }})">Résilié</span>
        </check>
        </td>
    </tr>
    </repeat>
</tbody>
</table>
</section>