<%@language = "javascript" %>
<% /*
    $Revision$
    $Id$

    Description:    SCF-overzicht van msg_message's

    Notes:
*/
%>
<!-- #include file="../scf/scaffolding.inc" -->
<!-- #include file="../Shared/iface.inc" -->
<!-- #include file="../api2/model_msg_message.inc" -->
<%
var this_model = new model_msg_message();

scaffolding(this_model,
    {
        "search": {
            "autosearch": true,
            "filters": [
                "sender",
                "subject",
                "description",
                "priority",
                "created"
            ]
        },
        "list": {
            "columns": [
                "sender",
                "subject",
                "description",
                "priority",
                "created"
            ],
            "default_action": "show_mes",
            "orderby": [
                "created DESC"
            ],
            "buttons": [
                { icon: "fa-plus", title: L("lcl_add"), action: "msg_add()", id: "msg_add" }
            ]
        },
        "edit": {
        },
        "layout": {
            "miscellaneous": {
                "icon": "fa-comment-alt-lines"
            }
        }
    });
%>
<script>
    function show_mes(row)
    {
        var mes_key = row.getAttribute("ROWKEY");
        var url = "appl/msg/msg_message.asp?message_key=" + mes_key;
        FcltMgr.openDetail(url, { reuse: true });
    }

    function msg_add() {
        FcltMgr.openDetail("appl/msg/msg_message.asp?message_key=-1", L("lcl_add") + " " + "<%=safe.jsstring(this_model.record_title)%>");
    }
</script>
<% ASPPAGE_END(); %>
