FSN#33833 Rapport mogelijkheden sturen via S("fac_usrrap_mode")

svn path=/Website/trunk/; revision=26462
This commit is contained in:
Jos Groot Lipman
2015-09-24 07:22:28 +00:00
parent 41e16456ec
commit 883a604d95
2 changed files with 8 additions and 8 deletions

View File

@@ -16,9 +16,9 @@
<!-- #include file="./model_reportcolumns.inc" -->
<%
function model_reportsx(usrrap_key, params)
function model_reportsx(usrrap_key, rapparams)
{
params = params || {};
rapparams = rapparams || {};
this.table = "fac_usrrap";
this.primary = "fac_usrrap_key";
this.records_name = "reports";
@@ -51,7 +51,7 @@ function model_reportsx(usrrap_key, params)
filters: ["id", "name", "description"]
};
this.includes = {"columns": { model: new model_reportcolumns(usrrap_key, { internal: params.internal }),
this.includes = {"columns": { model: new model_reportcolumns(usrrap_key, { internal: rapparams.internal }),
joinfield: "fac_usrrap_key",
single_only: true
}
@@ -121,7 +121,7 @@ function model_reportsx(usrrap_key, params)
+ " WHERE w.prs_perslid_key = " + user_key
+ " ) OR fac_functie_key IS NULL)");
}
if (S("fac_usrrap_mode") != 1) // Als je niet mag clonen heb je niets aan UDR template rapporten
if (S("fac_usrrap_mode") != 1 || rapparams.forview) // Als je niet mag clonen heb je niets aan UDR template rapporten
{
query.wheres.push("BITAND(COALESCE(fac_usrrap_functie, 0), 32) = 0");
}
@@ -206,7 +206,7 @@ function model_reportsx(usrrap_key, params)
return { key: the_key, warning: "" };
};
if (!params.internal)
if (!rapparams.internal)
{
if (user.oslogin() == "_FACILITOR")
settings.overrule_setting("fac_usrrap_mode", 1); // _FACILITOR mag alles
@@ -236,8 +236,8 @@ function model_reportsx(usrrap_key, params)
if (usrrap_key > 0)
{
params.filter = { "id" : usrrap_key };
this.data = this.REST_GET(params)[0];
rapparams.filter = { "id" : usrrap_key };
this.data = this.REST_GET(rapparams)[0];
}
}

View File

@@ -14,7 +14,7 @@
<!-- #include file="../api2/model_reportsx.inc" -->
<%
var reportsx = new model_reportsx();
var reportsx = new model_reportsx(-1, { forview: true });
reportsx.REST_POST = false; // geen toevoegen knop hier
reportsx.list.default_url = "appl/fac/fac_report.asp?usrrap_key=";