AADS#32729 Tracking bij de notities bij Opdrachten

svn path=/Website/trunk/; revision=27191
This commit is contained in:
Erik Groener
2015-12-01 09:34:24 +00:00
parent 4486b8a684
commit 24b515a659

View File

@@ -15,6 +15,7 @@
<!-- #include file="../Shared/common.inc" -->
<!-- #include file="../Shared/iface.inc" -->
<!-- #include file="../Shared/status.inc"-->
<!-- #include file="./mld.inc" -->
<!-- #include file="../Shared/resultset_table_v2.inc" -->
<%
@@ -64,10 +65,10 @@ lcl.set_dialect(mld_opdr.opdr_type, "MLD_TYPEOPDR_KEY");
return html;
}
var buttons = [];
var buttons = [];
if (this_opdr.canEditOpdrNote) // Manual allowed
{
if (this_opdr.canEditOpdrNote) // Manual allowed
{
var sql = "SELECT mld_opdr_note_key, prs_perslid_key"
+ " FROM mld_opdr_note"
+ " WHERE mld_opdr_key =" + opdr_key
@@ -82,7 +83,30 @@ lcl.set_dialect(mld_opdr.opdr_type, "MLD_TYPEOPDR_KEY");
}
oRs.Close();
buttons.push({title: L("lcl_add"), icon: "plus.png", action:"opdr_notechange()", id:"bchange_opdr_note" });
}
}
function fnrowClass(oRs)
{
var rclass = ""
if (oRs("prs_perslid_key").Value == user_key)
rclass = rclass + "self";
if (oRs("fac_srtnotificatie_code").Value)
rclass = rclass + " trtrack";
else
rclass = rclass + " trnote";
return rclass;
}
function fnOmschrijving(oRs)
{
var html = "";
if (oRs("mld_opdr_note_omschrijving").Value)
html = safe.html(oRs("mld_opdr_note_omschrijving").Value);
else if (oRs("fac_srtnotificatie_code").Value)
html = status.getsrtnotificatietext(oRs("fac_srtnotificatie_code").Value);
return html;
}
var sql = "SELECT n.mld_opdr_note_aanmaak"
+ ", n.mld_opdr_note_key"
@@ -118,7 +142,8 @@ lcl.set_dialect(mld_opdr.opdr_type, "MLD_TYPEOPDR_KEY");
noPrint:(embedded != -1),
ID: "notestable",
buttons: buttons,
title: L("lcl_opdr_frame_notes"),
title: (opdr_key == -1 || S("mld_opdr_merge_notes_and_tracking") == 0 ? L("lcl_opdr_frame_notes"): L("lcl_opdr_frame_trackandnotes")),
rowClass: fnrowClass,
outputmode: outputmode,
showAll: showall,
emptySetString : L("lcl_mld_note_emptyset")
@@ -127,7 +152,7 @@ lcl.set_dialect(mld_opdr.opdr_type, "MLD_TYPEOPDR_KEY");
rst.addColumn(new Column({caption: L("lcl_date"), content: "mld_opdr_note_aanmaak", datatype:"date", prettydate: true, nowrap: true}));
rst.addColumn(new Column({caption: L("lcl_time"), content: "mld_opdr_note_aanmaak", datatype:"time"}));
rst.addColumn(new Column({caption: L("lcl_mld_changedby"), content: fnPerslidNaamFull}));
rst.addColumn(new Column({caption: L("lcl_mld_note"), content: "mld_opdr_note_omschrijving"}));
rst.addColumn(new Column({caption: L("lcl_mld_note"), content: fnOmschrijving}));
var cnt = rst.processResultset();
%>