diff --git a/apps/maarch_entreprise/js/functions.js b/apps/maarch_entreprise/js/functions.js index 36eb095f8a93a417880ac65fbf71bfd42650b468..a2c78e1c00e84a73547e4a550855a453062eae69 100755 --- a/apps/maarch_entreprise/js/functions.js +++ b/apps/maarch_entreprise/js/functions.js @@ -3041,9 +3041,28 @@ function loadDiffList(id) parameters: { res_id : id }, onSuccess: function(answer){ eval("response = "+answer.responseText); - $('divDiffList_'+id).innerHTML = response.toShow; + $('divDiffList_'+id).innerHTML = '<fieldset style="border: 1px dashed rgb(0, 157, 197);width:100%;"><legend>Liste de diffusion:</legend>'+response.toShow+'</fieldset>'; } }); + var path_manage_script = 'index.php?module=entities&page=loadDiffList&display=true'; + new Ajax.Request(path_manage_script, + { + method:'post', + parameters: { res_id : id,typeList : 'VISA_CIRCUIT',showStatus : true }, + onSuccess: function(answer){ + eval("response = "+answer.responseText); + if(!response.toShow.match(/<div style="font-style:italic;text-align:center;color:#ea0000;margin:10px;">/)){ + $('divDiffList_'+id).innerHTML += '<fieldset style="border: 1px dashed rgb(0, 157, 197);width:100%;"><legend>Circuit de visa:</legend>'+response.toShow+'</fieldset>'; + $j('#divDiffList_'+id).css({"width":"97%","display":"table"}); + $j('#divDiffList_'+id).children().css({"width":"48%","display":"table-cell","vertical-align":"top","padding":"5px","margin":"5px"}); + } + + + + } + }); + //$('divDiffList_'+id).childNodes[0].style.width = '50%'; + //$('divDiffList_'+id).childNodes[1].style.width = '50%'; } function loadContactsList(id) diff --git a/apps/maarch_entreprise/template/documents_list_with_attachments.html b/apps/maarch_entreprise/template/documents_list_with_attachments.html index 63ab4c349c92a9eeb1fb16d7bc79febba47d3c63..db0ac81a931f26308ba3dd846fa1ce357a779f4e 100644 --- a/apps/maarch_entreprise/template/documents_list_with_attachments.html +++ b/apps/maarch_entreprise/template/documents_list_with_attachments.html @@ -164,8 +164,7 @@ Mods </tr> <tr id="noteList_##loadValue|res_id##" name="noteList_##loadValue|res_id##" style="display: none; border-bottom: solid 1px black; background-color: white;" width="100%"> <td colspan="6" style="background-color: #f2f2f2;"> - <div id="divNoteList_##loadValue|res_id##" align="center" style="color: grey;margin:10px;padding:10px; - border: 1px dashed #009DC5;"> + <div id="divNoteList_##loadValue|res_id##" align="center" style="color: grey;margin:10px;padding:10px;border: 1px dashed #009DC5;"> <i class="fa fa-spinner fa-2x"></i><br /> ##define_lang|_LOADING_INFORMATIONS## </div> @@ -190,8 +189,7 @@ Mods </tr> <tr id="diffList_##loadValue|res_id##" name="diffList_##loadValue|res_id##" style="display: none; border-bottom: solid 1px black;" width="100%"> <td colspan="2" style="background-color: #f2f2f2;"> - <div id="divDiffList_##loadValue|res_id##" align="center" style="color: grey;margin:10px;padding:10px; - border: 1px dashed #009DC5;"> + <div id="divDiffList_##loadValue|res_id##" align="center" style="color: grey;margin:10px;padding:10px;"> <i class="fa fa-spinner fa-2x"></i><br /> ##defineLang|_LOADING_INFORMATIONS## </div> diff --git a/modules/entities/class/class_manage_listdiff_Abstract.php b/modules/entities/class/class_manage_listdiff_Abstract.php index c40d49673264dcfbeea4f4913dab88dbd3178163..529e02e51c0d32580925a105057a5e18630dfdef 100644 --- a/modules/entities/class/class_manage_listdiff_Abstract.php +++ b/modules/entities/class/class_manage_listdiff_Abstract.php @@ -716,9 +716,9 @@ abstract class diffusion_list_Abstract extends functions #********************************************************************** $stmt = $db->query( "select l.item_id, e.entity_label, l.visible, l.viewed, l.item_mode, l.difflist_type, l.process_date, l.process_comment from " . ENT_LISTINSTANCE - . " l, " . ENT_ENTITIES . " e where l.coll_id = ? " + . " l, " . ENT_ENTITIES . " e where l.difflist_type = ? and l.coll_id = ? " . "and l.item_type = 'entity_id' and l.item_id = e.entity_id " - . "and l.res_id = ? order by l.sequence ",array($collId,$resId) + . "and l.res_id = ? order by l.sequence ",array($typeList,$collId,$resId) ); while ($res = $stmt->fetchObject()) { diff --git a/modules/entities/difflist_display.php b/modules/entities/difflist_display.php index ab5e0b3fe091e2f7c2badc482c80cfbdd47869fe..fb5d048f0d2376a6cb785f2c4251a2df8930499f 100644 --- a/modules/entities/difflist_display.php +++ b/modules/entities/difflist_display.php @@ -43,14 +43,24 @@ <i class="fa fa-user fa-2x" title="<?php echo _USER;?>"></i> </td> <td style="width:10%;"><?php - if($user['visible'] == 'Y') { ?> + /* if($user['visible'] == 'Y') { ?> <i class="fa fa-check fa-2x" title="<?php echo _VISIBLE;?>"></i> <?php } else {?> <i class="fa fa-times fa-2x" title="<?php echo _NOT_VISIBLE;?>"></i><?php - } ?> + } */?> </td> <td style="width:37%;"><?php functions::xecho($user['lastname'] . " " . $user['firstname']);?></td> <td style="width:38%;"><?php functions::xecho($user['entity_label']);?></td> + <?php + if($showStatus == true){ + if(!empty($difflist[$role_id]['users'][$i]['process_date'])){ + echo '<td style="width:5%;"><i class="fa fa-check" aria-hidden="true" style="color:green;"></i></td>'; + }else{ + echo '<td style="width:5%;"><i class="fa fa-hourglass" aria-hidden="true"></i></td>'; + } + } + + ?> </tr><?php } ?> </table><?php @@ -70,11 +80,11 @@ <i class="fa fa-sitemap fa-2x" title="<?php echo _ENTITY . " " . $role_label ;?>" ></i> </td> <td style="width:10%;"><?php - if($entity['visible'] == 'Y') { ?> + /*if($entity['visible'] == 'Y') { ?> <i class="fa fa-check fa-2x" title="<?php echo _VISIBLE;?>"></i><?php } else {?> <i class="fa fa-times fa-2x" title="<?php echo _NOT_VISIBLE;?>"></i><?php - } ?> + }*/ ?> </td> <td style="width:37%;"><?php functions::xecho($entity['entity_id']);?></td> <td style="width:38%;"><?php functions::xecho($entity['entity_label']);?></td> diff --git a/modules/entities/loadDiffList.php b/modules/entities/loadDiffList.php index a3f007a0740a8eedba4984f76349ff3483df245d..5adb6069738812175fb22e0426615f9067212672 100644 --- a/modules/entities/loadDiffList.php +++ b/modules/entities/loadDiffList.php @@ -6,9 +6,20 @@ $Core_Tools->load_lang(); $status = 0; +if(isset($_REQUEST['typeList'])){ + $typeList = $_REQUEST['typeList']; +}else{ + $typeList = 'entity_id'; +} + +if(isset($_REQUEST['showStatus'])){ + $showStatus = true; +}else{ + $showStatus = false; +} require_once('modules/entities/class/class_manage_listdiff.php'); $diffListObj = new diffusion_list(); -$difflist = $diffListObj->get_listinstance($_REQUEST['res_id'], false, $_SESSION['collection_id_choice']); +$difflist = $diffListObj->get_listinstance($_REQUEST['res_id'], false, $_SESSION['collection_id_choice'],$typeList); # Include display of list $roles = $diffListObj->list_difflist_roles(); diff --git a/modules/entities/xml/IVS/validation_rules.xml b/modules/entities/xml/IVS/validation_rules.xml index 46306bf2a84b7bb2387f79fc809b5c8cd54bc85a..a9208ffd9588f82257b8474819de52e7455ae378 100755 --- a/modules/entities/xml/IVS/validation_rules.xml +++ b/modules/entities/xml/IVS/validation_rules.xml @@ -212,6 +212,8 @@ <validationRule name="loadDiffList" extends="standardForm" mode="error"> <parameter name="module" type="identifier" /> <parameter name="res_id" type="integer" /> + <parameter name="typeList" type="string" /> + <parameter name="showStatus" type="boolean" /> </validationRule> <validationRule name="loadDiffListHistory" extends="standardForm" mode="error">