PNBR#36941 Foto bij res_deel en res_artikel ook prodsearch en eigen folder

svn path=/Website/trunk/; revision=30552
This commit is contained in:
Jos Groot Lipman
2016-09-05 12:28:12 +00:00
parent d7dc5b00e5
commit 5dd2ffe7bb
10 changed files with 37 additions and 15 deletions

View File

@@ -121,7 +121,7 @@ function model_res_artikel()
"dbs": "res_artikel_image",
"label": L("res_artikel_image"),
"typ": "varchar",
"flexmodule": "RESPH"
"flexmodule": "RESPHA"
},
"open": {
"dbs": "res_artikel_begintijd",

View File

@@ -119,7 +119,7 @@ function model_res_deel()
"dbs": "res_deel_image",
"label": L("res_deel_image"),
"typ": "varchar",
"flexmodule": "RESPH"
"flexmodule": "RESPHD"
},
"res_deel_vervaldatum": {
"dbs": "res_deel_vervaldatum",

View File

@@ -208,10 +208,22 @@ function fncolAction(oRs)
break;
case "resartikel":
icon = "../Pictures/cake_p.png";
if (oRs.Fields("foto").Value != null)
{
icon = oRs.Fields("foto").Value;
if (!icon.match(/^http/))
icon = S("res_image_path") + "artikel/" + icon;
}
hint = L("lcl_do_reservering_hint");
break;
case "resdeel":
icon = "../Pictures/television_p.png";
if (oRs.Fields("foto").Value != null)
{
icon = oRs.Fields("foto").Value;
if (!icon.match(/^http/))
icon = S("res_image_path") + "deel/" + icon;
}
hint = L("lcl_do_reservering_hint");
break;
case "bescatalogus":

View File

@@ -255,7 +255,7 @@ function prodsearch_queries(write_discs, filter)
+ " null alg_locatie_key,"
+ " res_discipline_key disc_key,"
+ lcl.xsql('d.ins_discipline_omschrijving', 'd.ins_discipline_key') + " vakgroep,"
+ " null foto"
+ " res_artikel_image foto"
+ " FROM res_v_aanwezigartikel r,"
+ " res_v_aanwezigdiscipline d"
+ " WHERE r.res_discipline_key = d.ins_discipline_key"
@@ -283,7 +283,7 @@ function prodsearch_queries(write_discs, filter)
+ " l.alg_locatie_key alg_locatie_key,"
+ " res_discipline_key disc_key,"
+ lcl.xsql('rd.ins_discipline_omschrijving', 'rd.ins_discipline_key') + " vakgroep,"
+ " null foto"
+ " res_deel_image foto"
+ " FROM res_v_aanwezigdeel r,"
+ " res_v_aanwezigdiscipline rd,"
+ " ins_deel d,"

View File

@@ -9,7 +9,7 @@
<!-- #include file="../api2/model_res_artikel.inc" -->
<%
var url = "appl/shared/BijlagenForm.asp?module=RESPH";
var url = "appl/shared/BijlagenForm.asp?module=RESPHA";
var proturl = protectQS.create(url);
var fotoaction = "FcltMgr.openDetail('" + safe.jsstring(proturl) + "', L(\"lcl_photos\"))";

View File

@@ -9,7 +9,7 @@
<!-- #include file="../api2/model_res_deel.inc" -->
<%
var url = "appl/shared/BijlagenForm.asp?module=RESPH";
var url = "appl/shared/BijlagenForm.asp?module=RESPHD";
var proturl = protectQS.create(url);
var fotoaction = "FcltMgr.openDetail('" + safe.jsstring(proturl) + "', L(\"lcl_photos\"))";

View File

@@ -80,8 +80,14 @@ function fncolIcon(oRs)
icon = S("res_image_path") + oRs("foto").Value;
break;
case "resartikel":
icon = "../Pictures/cake_p.png";
if (oRs("foto").value != null)
icon = S("res_image_path") + "/artikel/" + oRs("foto").Value;
break;
case "resdeel":
icon = "../Pictures/television_p.png";
if (oRs("foto").value != null)
icon = S("res_image_path") + "/deel/" + oRs("foto").Value;
break;
case "bescatalogus":
case "besartikelgroep":

View File

@@ -254,7 +254,7 @@ function make_cat(discipline_key, rsv_ruimte_key, existing_only, res_artikel_key
// Voor het gemak wel \n --> <br>
if (oRs("res_artikel_image").Value || oRs("res_artikel_opmerking").Value)
{
safe_tooltip += String(oRs("res_artikel_opmerking").Value).replace(/\n/g, "<br>");
safe_tooltip += String(oRs("res_artikel_opmerking").Value||"").replace(/\n/g, "<br>");
%> <td class="label"
OnMouseOver="showOpmerking('#remark_cat<%=art_key%>', event);"

View File

@@ -50,6 +50,8 @@
// TODO: Authorisatie functies anders, lcl's??
bijlagen("WEB_PRSSYS", "Reservering foto's", "RESPH");
bijlagen("WEB_PRSSYS", "Reservering artikel foto's", "RESPHA");
bijlagen("WEB_PRSSYS", "Reservering voorziening foto's", "RESPHD");
bijlagen("WEB_PRSSYS", "Facilitor Graphics DWF bestanden", "FGII");
bijlagen("WEB_PRSSYS", "Facilitor Graphics Vluchtplannen", "FGIIV");
bijlagen("WEB_PRSSYS", "Facilitor Graphics Symbolen", "FGIIS");

View File

@@ -65,8 +65,7 @@ function bepaalKenmerkGegevens(pModule, pKenmerkkey)
{
case "ALG": table = "alg_kenmerk";
break;
case "BES":
case "BESPH": table = "bes_kenmerk";
case "BES": table = "bes_kenmerk";
srttable = "bes_srtkenmerk";
break;
case "BEZ": table = "bez_kenmerk";
@@ -76,18 +75,15 @@ function bepaalKenmerkGegevens(pModule, pKenmerkkey)
break;
case "FIN": table = "fin_kenmerk";
break;
case "INS":
case "INSPH": table = "ins_kenmerk";
case "INS": table = "ins_kenmerk";
srttable = "ins_srtkenmerk";
break;
case "MLD":
case "MLDPH": table = "mld_kenmerk";
case "MLD": table = "mld_kenmerk";
srttable = "mld_srtkenmerk";
break;
case "PRS": table = "prs_kenmerk";
break;
case "RES":
case "RESPH": table = "res_kenmerk";
case "RES": table = "res_kenmerk";
srttable = "res_srtkenmerk";
break;
case "FAQ": table = "faq_kenmerk";
@@ -265,8 +261,14 @@ function flexProps(pModule, pKey, pSubpath, pNiveau, params)
}
break;
case "RESPH":
case "RESPHA":
case "RESPHD":
// Bestanden zijn te vinden op ...cust/x/photos
result.AttachRootPath = Server.MapPath(S("res_image_path"));
if (pModule == "RESPHA")
result.AttachRootPath += '/artikel';
if (pModule == "RESPHD")
result.AttachRootPath += '/deel';
result.AttachPath = result.AttachRootPath + "/";
result.extFilter = "jpg";
result.searchfile = true;