Subversion-Projekte lars-tiefland.webanos.faltradxxs.de

Revision

Revision 99 | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
26 lars 1
{extends file="index.tpl"}
24 lars 2
{block name="maincontent"}
3
    <!-- $Id: actions.tpl 1548 2023-04-29 11:08:55Z lars $ BEGIN -->
4
    <script>
5
        $(function (){
99 lars 6
            $('#editActionDlg').dialog({
7
                autoOpen:false,
8
                modal:true,
9
                resizable:false,
10
                width:800
11
            })
24 lars 12
            $("#new").uibutton({
13
                icons:{
14
                    primary:"ui-icon-plus"
15
                }
16
            }).click(function()
17
            {
102 lars 18
                let url="/Online-Shop/actions/create/";
19
                $('#editActionDlg').load(url).dialog("open");
24 lars 20
            });
21
            $(".edit").uibutton({
22
                icons:{
23
                    primary:"ui-icon-pencil"
24
                }
25
            }).click(function() {
99 lars 26
                let url="/Online-Shop/actions/"+$(this).attr("data-id")+"/edit/";
27
                $('#editActionDlg').load(url).dialog("open");
24 lars 28
            });
29
            $(".del").uibutton({
30
                icons:{
31
                    primary:"ui-icon-trash"
32
                }
33
            })
34
            $("#aktionenTable").dataTable({
35
                "columnDefs": [
36
                    { "type": "de_date", targets: [3,4] },
37
                    { "orderable":false, targets: [0,2,5] }
38
                ],
39
                "lengthMenu": [[100, -1], [100, "Alle"]],
40
                "language": {
25 lars 41
                    "url": "/js/DataTables-1.10.19/German.json"
24 lars 42
                }
43
            });
44
        })
45
    </script>
46
    <button id="new"></button>
47
    <br><br>
48
    <table style="width:100%" id="aktionenTable">
49
        <thead>
50
        <tr>
51
            <th>Status</th>
52
            <th>Kategorie</th>
53
            <th>Name</th>
54
            <th>von</th>
55
            <th>bis</th>
56
            <th>Aktionen</th>
57
        </tr>
58
        </thead>
59
        <tbody>
60
        {foreach $aktionen as $aktion}
61
            <tr>
25 lars 62
                <td><img src="/images/lieferstatus/common/{$aktion.status}.gif"  alt=""/></td>
24 lars 63
                <td>{$aktion.category}</td>
64
                <td>{$aktion.headline}</td>
65
                <td>{$aktion.valid_from|date_format:"d.m.Y"}</td>
66
                <td>{$aktion.valid_to|date_format:"d.m.Y"}</td>
67
                <td>
68
                    <button class="edit" data-id="{$aktion.id}"></button>
69
                    <button class="del" data-id="{$aktion.id}"></button>
70
                </td>
71
            </tr>
72
        {/foreach}
73
        </tbody>
74
    </table>
99 lars 75
    <div id="editActionDlg"></div>
24 lars 76
    <!-- $Id: actions.tpl 1548 2023-04-29 11:08:55Z lars $ END -->
77
{/block}