diff --git a/modules/visa/class/class_modules_tools_Abstract.php b/modules/visa/class/class_modules_tools_Abstract.php index e0b43e342091412ebb387d1822f5c45decdd72a9..bfc577f6cd67ae85d23b0fef2cb366dda6ce86b6 100644 --- a/modules/visa/class/class_modules_tools_Abstract.php +++ b/modules/visa/class/class_modules_tools_Abstract.php @@ -492,7 +492,7 @@ abstract class visa_Abstract extends Database } public function getList($res_id, $coll_id, $bool_modif=false, $typeList, $isVisaStep = false, $fromDetail = ""){ - + $core = new core_tools(); $circuit = $this->getWorkflow($res_id, $coll_id, $typeList); $str .= '<div class="error" id="divErrorVisa" onclick="this.hide();"></div>'; @@ -554,9 +554,9 @@ abstract class visa_Abstract extends Database if(count($circuit['visa']['users']) > 0){ foreach ($circuit['visa']['users'] as $it=>$info_userVis) { if(empty($info_userVis['process_date'])){ - if($lastUserVis == true && $isVisaStep == true){ + if(($lastUserVis == true && $isVisaStep == true)){ $vised = ' currentVis'; - $modif = 'false'; + $disabled = ''; $link_vis = 'arrow-right '; $del_vis = '<div class="delete_visa"></div>'; @@ -567,6 +567,13 @@ abstract class visa_Abstract extends Database $info_vised = '<p style="font-weight:normal;">'._VISA_USER_COU.'</p>'; $dropZone = ''; } + if($core->test_service('modify_visa_in_signatureBook', 'visa', false)){ + $modif = 'true'; + $dropZone = '<i class="fa fa-exchange fa-2x fa-rotate-90" aria-hidden="true"></i>'; + $del_vis = '<i class="fa fa-trash" aria-hidden="true" onclick="delVisaUser(this.parentElement.parentElement);" title="'._DELETE.'"></i>'; + }else{ + $modif = 'false'; + } @@ -646,15 +653,20 @@ abstract class visa_Abstract extends Database $dropZone = ''; $info_vised = '<p style="font-weight:normal;">'._SIGN_USER_COU.'</p>'; } - - + if($core->test_service('modify_visa_in_signatureBook', 'visa', false)){ + $modif = 'true'; + $dropZone = '<i class="fa fa-exchange fa-2x fa-rotate-90" aria-hidden="true"></i>'; + $del_vis = '<i class="fa fa-trash" aria-hidden="true" onclick="delVisaUser(this.parentElement.parentElement);" title="'._DELETE.'"></i>'; + }else{ + $modif = 'false'; + } }else{ $dropZone = '<i class="fa fa-exchange fa-2x fa-rotate-90" aria-hidden="true"></i>'; $vised = ''; if($bool_modif == true){ $modif = 'true'; - $del_vis = '<i class="fa fa-trash" aria-hidden="true" onclick="delVisaUser(this.parentElement.parentElement);"></i>'; + $del_vis = '<i class="fa fa-trash" aria-hidden="true" onclick="delVisaUser(this.parentElement.parentElement);" title="'._DELETE.'"></i>'; $disabled = ''; }else{ $modif = 'false'; diff --git a/modules/visa/lang/fr.php b/modules/visa/lang/fr.php index d49fecb26ca4de8b9c23844d1e2dff7e7683b42c..a8ae8e0f76ed0f0907b5c9633cab21b782a79914 100644 --- a/modules/visa/lang/fr.php +++ b/modules/visa/lang/fr.php @@ -153,3 +153,9 @@ if (!defined("_ADD_VISA_ROLE")) if (!defined("_ADD_VISA_MODEL")) define("_ADD_VISA_MODEL", "Utiliser un modèle de circuit de visa"); + +if (!defined("_MODIFY_VISA_IN_SIGNATUREBOOK")) + define("_MODIFY_VISA_IN_SIGNATUREBOOK", "Modifier le viseur en cours depuis le parapheur"); + +if (!defined("_MODIFY_VISA_IN_SIGNATUREBOOK_DESC")) + define("_MODIFY_VISA_IN_SIGNATUREBOOK_DESC", "Utile si le parahpeur sert en tant que parapheur de supervision"); diff --git a/modules/visa/xml/services.xml b/modules/visa/xml/services.xml index fa7f53b15f1fc6af711ed5a0082d973b89412844..ae79b1294cbed150ea760f85c3a70cd3a72c5423 100644 --- a/modules/visa/xml/services.xml +++ b/modules/visa/xml/services.xml @@ -39,6 +39,15 @@ <system_service>false</system_service> <enabled>true</enabled> </SERVICE> + <SERVICE> + <id>modify_visa_in_signatureBook</id> <!-- if servicetype = menu, this id must be equal to the id of the menu item --> + <name>_MODIFY_VISA_IN_SIGNATUREBOOK</name> + <comment>_MODIFY_VISA_IN_SIGNATUREBOOK_DESC</comment> + <servicepage></servicepage> + <servicetype>use</servicetype> + <system_service>false</system_service> + <enabled>true</enabled> + </SERVICE> <SERVICE> <id>print_folder_doc</id> <!-- if servicetype = menu, this id must be equal to the id of the menu item -->