<%@language = "javascript" %>

<!-- #include file="../scf/scaffolding.inc" -->
<!-- #include file="../mgt/mgt_tools.inc" -->
<!-- #include file="../api2/model_alg_kenmerk.inc" -->
<%
var niveau = getQParam("alg_kenmerk_niveau"); // [ D | L | T | G | V | R ]
var this_model = new model_alg_kenmerk(niveau);

this_model.hook_pre_edit = function (obj, fld)
{
    var kenmerktype = (obj.property_type ? obj.property_type.id : "");
    fld.property_type.LOV = buildKenmerktypeLOV(kenmerktype);
%>
<script type="text/javascript">
  var module = "ALG";
  var property_type = "<%=kenmerktype%>";
</script>
<%
}

scaffolding(this_model,
    {
        "search": {
            "autosearch": true,
            "filters": [
                "property_type",
                "name"
            ]
        },
        "list": {
            "columns": [
                "id",
                "alg_kenmerk_niveau",
                "sequence",
                "name",
                "property_type"
            ]
        },
        "edit": {
            "requires": { js: ["./mgt_srtkenmerk.js"] }
        },
        "print": {},
        "transit": { "alg_kenmerk_niveau": niveau }
    });



    function fill_og_niveau_LOV()
    {
        return  "D;"+L("lcl_district")
             + ";L;"+L("lcl_location")
             + ";G;"+L("lcl_building")
             + ";R;"+L("lcl_room"); // Moet hier T en V ook nog bij?
    }
%>
