#affiche les boites, requete SQL pour récupérer les affectations et traitements des différents affichages en HTML lib.organigramme.box_orga = COA_INT lib.organigramme.box_orga { 10 = LOAD_REGISTER 10.affectation1.field = tx_mask_affectation1 20 = LOAD_REGISTER 20.affectation2.field = tx_mask_affectation2 30 = LOAD_REGISTER 30.affectation3.field = tx_mask_affectation3 40 = LOAD_REGISTER 40.affectation4.field = tx_mask_affectation4 50 = LOAD_REGISTER 50.affectation5.field = tx_mask_affectation5 60 = LOAD_REGISTER 60.display_searchpicto.field = tx_mask_display_searchpicto 70 = LOAD_REGISTER 70.display_plusinfospicto.field = tx_mask_plusinfos 70.display_plusinfospicto.parseFunc = < lib.parseFunc_RTE 80 = LOAD_REGISTER 80.blocId.field = uid 100 = CONTENT 100 { table = tx_ifsttar_affectation select { pidInList = {$affectation} #where = show_orga = 1 AND affectation1 = '{register:affectation1}' AND affectation2 = '{register:affectation2}' AND affectation3 = '{register:affectation3}' AND affectation4 = '{register:affectation4}' AND affectation5 = '{register:affectation5}' # On génère la clause where : la valeur "%" peut être saisie en BDD car nous avons mis des LIKE dans la requête # Autre cas spécifique : si on saisi une liste d'affectation séparée par un pipe | # Cela a été fait seulement l'affectation 2 car le cas est arrivé seulement pour cette affectation where.cObject = COA where.cObject { 10 = TEXT 10 { data = register:affectation1 noTrimWrap = |show_orga = 1 AND affectation1 LIKE "|"| } # On génère le début de la requête pour l'affectation 2 18 = TEXT 18 { noTrimWrap = | AND ( 0 | } # Pour chaque affectation2 20 = TEXT 20 { data = register:affectation2 split { token = | cObjNum = 1 1 { 10 = TEXT 10 { current = 1 noTrimWrap = | OR (affectation2 LIKE "|") | } } } } # On ferme la requête 22 = TEXT 22 { noTrimWrap = | ) | } 30 = TEXT 30 { data = register:affectation3 noTrimWrap = | AND affectation3 LIKE "|" | } 40 = TEXT 40 { data = register:affectation4 noTrimWrap = | AND affectation4 LIKE "|" | } 50 = TEXT 50 { data = register:affectation5 noTrimWrap = | AND affectation5 LIKE "|" | } } where.insertData = 1 orderBy = sorting ASC } wrap.cObject = TEXT wrap.cObject { value =
} # Title Box end tag 12 = TEXT 12 { field = title_box wrap = |
# On surcharge si on est sur l'organigramme des labos stdWrap { override.field = affectation2 override { if.equals = {$organigrammeLabo} if.value = 1 } } } # Link 20 = COA 20 { 5 = TEXT 5.value=
}
# Title Position et responsable externe
60 = TEXT
60 {
if.isTrue.cObject = COA
if.isTrue.cObject {
20 = TEXT
20.field = title_position
}
dataWrap = {field:title_position}
}
#responsable externe
66 = TEXT
66 {
if.isTrue.cObject = COA
if.isTrue.cObject {
20 = TEXT
20.field = responsable_externe
}
dataWrap = {field:responsable_externe}
}
# User(s)
70 = TEXT
70 {
if.isFalse.cObject = COA
if.isFalse.cObject {
20 = TEXT
20.field = responsable
30 = TEXT
30.field = title_position
40 = TEXT
40.field = responsable_externe
}
value = N.
wrap = |
}
75 = TEXT
75.value =
75.if.value = 5
75.if.isGreaterThan.field = sorting
75.insertData = 1
80 = CONTENT
80 {
if.isTrue.field = responsable
table = fe_users
select {
selectFields = first_name,name
pidInList = {$user}
where.data = field:responsable
where.wrap = uid IN(|)
}
wrap = |
wrap.insertData = 1
renderObj = COA
renderObj {
10 = TEXT
10 {
value = ,
}
20 = TEXT
20 {
typolink {
parameter = {$pagePerso}
target = _blank
additionalParams = &userid={field:uid}
additionalParams.insertData = 1
}
value = {field:first_name} {field:name}
insertData = 1
}
}
}
}
# description
55 = TEXT
55 {
if.isTrue.field = description
dataWrap =