<%@ language = "JavaScript" %> <% /* $Revision$ $Id$ File: fac_locale_list_std.asp Description: zoekt op basis van de zoekvelden in de vertaaltabel Parameters: search: zoekstring taal Context: Vanuit fac_locale_search_std.asp Note: Variant op fac_locale_list.asp die het voor dialect-teksten doet */ %> <% FCLTHeader.Requires({plugins:["jQuery"], js: ["jquery-ui.js"]}); var autfunction = "WEB_LCLSYS"; var authparams = user.checkAutorisation(autfunction); var vTaal = getQParam("sTaal", "-1"); var vSearchString = getQParam("sString", ""); var vModule = getQParam("sModule", "-1"); var outputmode = getQParamInt("outputmode", 0); var showall = getQParamInt("showall", 0) == 1; var overruled = (getQParam("lcl_overrule", "") == "on") var SorteerKolommen = []; var vWhere = ""; // Bepaal de verschillende talen of dialecten die er gebruikt worden // en maak daar kolommen voor. for (var l in S("language_toggles")) { if (vTaal == "-1" || vTaal == S("language_toggles")[l]) { SorteerKolommen.push("MAX(CASE WHEN fac_locale_xsl_lang = " + safe.quoted_sql(S("language_toggles")[l]) + " THEN fac_locale_xsl_tekst END) LANG_" + S("language_toggles")[l]); SorteerKolommen.push("MAX(CASE WHEN fac_locale_xsl_lang = " + safe.quoted_sql(S("language_toggles")[l]) + " THEN fac_locale_xsl_cust END) CUST_" + S("language_toggles")[l]); } } sqln = "SELECT l.fac_locale_xsl_label" + " , " + SorteerKolommen.join(',') + " , COUNT(DISTINCT fac_locale_xref_filepath) n_file" + " FROM fac_locale_xsl l," + " fac_locale_xref x" + " WHERE fac_locale_xsl_module = 'ASP'" + " AND x.fac_locale_xsl_key(+) = l.fac_locale_xsl_key" if (overruled) { sqln +=" AND l.fac_locale_xsl_label IN " + " (SELECT l2.fac_locale_xsl_label " + " FROM fac_locale_xsl l2" + " WHERE l2.fac_locale_xsl_module = 'ASP'" + " AND fac_locale_xsl_cust IS NOT NULL" + " ) "; } if (vSearchString != "") { sqln += " AND (fac_locale_xsl_label) IN " + "(SELECT fac_locale_xsl_label " + " FROM fac_locale_xsl " + " WHERE ( (UPPER(fac_locale_xsl_label) LIKE "+safe.quoted_sql_wild("%"+vSearchString+"%") + ") " + "OR (UPPER(fac_locale_xsl_tekst) LIKE "+safe.quoted_sql_wild("%"+vSearchString+"%") + ") " + "OR (UPPER(fac_locale_xsl_cust) LIKE "+safe.quoted_sql_wild("%"+vSearchString+"%") + ") " + ") " + ") "; } if (vModule != "-1") { sqln +=" AND l.fac_locale_xsl_label IN " + " (SELECT l2.fac_locale_xsl_label " + " FROM fac_locale_xsl l2," + " fac_locale_xref x2" + " WHERE l2.fac_locale_xsl_module = 'ASP'" + " AND x2.fac_locale_xsl_key = l2.fac_locale_xsl_key" + " AND x2.fac_locale_xref_filepath LIKE "+safe.quoted_sql("%/" + vModule + "/%") + " ) "; } sqln += " GROUP BY fac_locale_xsl_label" + " ORDER BY fac_locale_xsl_label"; %>
<% FCLTHeader.Generate(); %>
<% function fnrowData(oRs) {return {}; var kolomnaam = oRs("fac_locale_kolomnaam").value; var kolomkeyval = oRs("fac_locale_kolomkeyval").value; var kolomkeydata = oRs("fac_locale_default").value; if (kolomnaam == null) kolomnaam = -1; if (kolomkeyval == null) kolomkeyval = -1; if (kolomkeydata == null) kolomkeydata = -1; var data = {fac_kolomnaam:kolomnaam, fac_kolomkeyval:kolomkeyval, fac_kolomkeydata:kolomkeydata}; return JSON.stringify(data); } function fnNaam (oRs) { return "
"+oRs("fac_locale_xsl_label").value+"
"; } var rst = new ResultsetTable({ sql: sqln, keyColumn: "fac_locale_xsl_label", ID: "localetable", rowData: fnrowData, showAll: showall, buttons: [] }); rst.addColumn(new Column({hasActions: true, caption:L("lcl_lcl_xsl_label"), content:fnNaam})); rst.addColumn(new Column({hasActions: true, caption:L("lcl_lcl_n_file"), content:"n_file"})); // Toon het variabel aantal kolommen voor Taal/Dialect for (var l in S("language_toggles")) { if (vTaal == "-1" || vTaal == S("language_toggles")[l]) { rst.addColumn(new Column({caption: S("language_toggles")[l], content: "LANG_" + S("language_toggles")[l]})); rst.addColumn(new Column({caption: "CUST_" + S("language_toggles")[l], content: "CUST_" + S("language_toggles")[l]})); } } rst.addAction({action: "localeedit", caption: L("lcl_edit"), isDefault: true}); rst.processResultset(); %>