Subversion-Projekte lars-tiefland.webanos.marine-sales.de

Revision

Revision 86 | Revision 98 | Zur aktuellen Revision | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
2 lars 1
{extends file="index.tpl"}
2
{block name="maincontent"}
87 lars 3
    <!-- $Id: manufacturerList.tpl 87 2023-07-08 22:19:17Z lars $ BEGIN -->
2 lars 4
    <script>
5
        $(function (){
85 lars 6
            $('#editDlg').dialog({
2 lars 7
                autoOpen:false,
8
                modal:true,
9
                resizable:false,
10
                width:800
11
            })
12
            $("#new").uibutton({
13
                icons:{
14
                    primary:"ui-icon-plus"
15
                }
16
            }).click(function()
17
            {
85 lars 18
                let url="/Online-Shop/manufacturers/create/";
19
                $('#editDlg').load(url).dialog("open");
2 lars 20
            });
21
            $(".edit").uibutton({
22
                icons:{
23
                    primary:"ui-icon-pencil"
24
                }
25
            }).click(function() {
86 lars 26
                let url="/Online-Shop/manufacturers/"+$(this).attr("data-id")+"/edit/";
85 lars 27
                $('#editDlg').load(url).dialog("open");
2 lars 28
            });
29
            $(".del").uibutton({
30
                icons:{
31
                    primary:"ui-icon-trash"
32
                }
33
            })
87 lars 34
            $("#dataTable").dataTable({
2 lars 35
                "lengthMenu": [[100, -1], [100, "Alle"]],
36
                "language": {
37
                    "url": "/js/DataTables-1.10.19/German.json"
38
                }
39
            });
40
        })
41
    </script>
42
    <button id="new"></button>
43
    <br><br>
87 lars 44
    <table style="width:100%" id="dataTable">
2 lars 45
        <thead>
46
        <tr>
47
            <th>Name</th>
48
            <th>Aktionen</th>
49
        </tr>
50
        </thead>
51
        <tbody>
85 lars 52
        {foreach $manufacturers as $manufacturer}
2 lars 53
            <tr>
85 lars 54
                <td>{$manufacturer.name}</td>
2 lars 55
                <td>
85 lars 56
                    <button class="edit" data-id="{$manufacturer.id}"></button>
57
                    <button class="del" data-id="{$manufacturer.id}"></button>
2 lars 58
                </td>
59
            </tr>
60
        {/foreach}
61
        </tbody>
62
    </table>
85 lars 63
    <div id="editDlg"></div>
87 lars 64
    <!-- $Id: manufacturerList.tpl 87 2023-07-08 22:19:17Z lars $ END -->
2 lars 65
{/block}