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

Revision

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