diff --git a/apps/maarch_entreprise/smartphone/details.php b/apps/maarch_entreprise/smartphone/details.php index c19dd99e3af988a6e4644e475e62b4d4a2356694..d35af764cb4e35e15722168b4d5f7ae815543188 100755 --- a/apps/maarch_entreprise/smartphone/details.php +++ b/apps/maarch_entreprise/smartphone/details.php @@ -239,25 +239,28 @@ if (isset($_REQUEST['res_id_master'])) { <?php } - $action = \Action\models\ActionModel::getById(['id' => $_SESSION['current_basket']['default_action'], 'select' => ['action_page']]); - if (!empty($action) && $action['action_page'] == 'visa_mail' && $infos_attach['attachment_type'] != 'signed_response') { - ?> - <a href="signature_main_panel.php?id=<?php functions::xecho($s_id); ?>&collId=<?php - functions::xecho($_SESSION['collection_id_choice']); ?>&tableName=<?php - functions::xecho($_SESSION['res_table']); ?>&res_id_attach=<?php - functions::xecho($att_id); ?>"> - <span class="bubble" style="cursor: pointer;margin-right: 5px;"> - <i class="fa fa-hand-point-up fa-2x mCdarkGrey" aria-hidden="true"></i> - </span> - </a> + if(!empty($_SESSION['current_basket']['default_action'])){ + $action = \Action\models\ActionModel::getById(['id' => $_SESSION['current_basket']['default_action'], 'select' => ['action_page']]); + if (!empty($action) && $action['action_page'] == 'visa_mail' && $infos_attach['attachment_type'] != 'signed_response') { + ?> + <a href="signature_main_panel.php?id=<?php functions::xecho($s_id); ?>&collId=<?php + functions::xecho($_SESSION['collection_id_choice']); ?>&tableName=<?php + functions::xecho($_SESSION['res_table']); ?>&res_id_attach=<?php + functions::xecho($att_id); ?>"> + <span class="bubble" style="cursor: pointer;margin-right: 5px;"> + <i class="fa fa-hand-point-up fa-2x mCdarkGrey" aria-hidden="true"></i> + </span> + </a> - <span class="bubble" style="cursor: pointer;margin-right: 5px;" onclick="switchFrame('<?php functions::xecho($_SESSION['config']['businessappurl'].'index.php?page=doc_thumb_frame&body_loaded&module=thumbnails'); ?>',<?php functions::xecho($s_id); ?>,<?php functions::xecho($pdf_id); ?>);"> - <i class="fa fa-retweet fa-2x mCdarkGrey"></i> - </span> - <input type="hidden" id="type_doc_show" value="attach" /> - <?php + <span class="bubble" style="cursor: pointer;margin-right: 5px;" onclick="switchFrame('<?php functions::xecho($_SESSION['config']['businessappurl'].'index.php?page=doc_thumb_frame&body_loaded&module=thumbnails'); ?>',<?php functions::xecho($s_id); ?>,<?php functions::xecho($pdf_id); ?>);"> + <i class="fa fa-retweet fa-2x mCdarkGrey"></i> + </span> + <input type="hidden" id="type_doc_show" value="attach" /> + <?php + } } + ?> <br/> <br/> diff --git a/apps/maarch_entreprise/smartphone/list_result.php b/apps/maarch_entreprise/smartphone/list_result.php index ae4d3b5074401012e8a793e81b74e99800f6c520..5fa7deb260e70b8750ec88faa45c3d1a6a9246d2 100755 --- a/apps/maarch_entreprise/smartphone/list_result.php +++ b/apps/maarch_entreprise/smartphone/list_result.php @@ -63,19 +63,23 @@ if (isset($whereRequest) && !empty($whereRequest)) { if ($view == 'view_folders') { $line = '<li>'; } else { - $action = \Action\models\ActionModel::getById(['id' => $_SESSION['current_basket']['default_action'], 'select' => ['action_page']]); - if ($i < $nombreDeLignesAffiche) { - if (!empty($action) && $action['action_page'] == 'visa_mail' && $view != 'res_view_attachments') { - $line = '<li id=res_'.$i.' style="display:block;"><a href="view_attachments.php?id='; + if(!empty($_REQUEST['baskets'])){ + $action = \Action\models\ActionModel::getById(['id' => $_SESSION['current_basket']['default_action'], 'select' => ['action_page']]); + if ($i < $nombreDeLignesAffiche) { + if (!empty($action) && $action['action_page'] == 'visa_mail' && $view != 'res_view_attachments') { + $line = '<li id=res_'.$i.' style="display:block;"><a href="view_attachments.php?id='; + } else { + $line = '<li id=res_'.$i.' style="display:block;"><a href="details.php?id='; + } } else { - $line = '<li id=res_'.$i.' style="display:block;"><a href="details.php?id='; + if (!empty($action) && $action['action_page'] == 'visa_mail' && $view != 'res_view_attachments') { + $line = '<li id=res_'.$i.' style="display:block;"><a href="view_attachments.php?id='; + } else { + $line = '<li id=res_'.$i.' style="display:none;"><a href="details.php?id='; + } } } else { - if (!empty($action) && $action['action_page'] == 'visa_mail' && $view != 'res_view_attachments') { - $line = '<li id=res_'.$i.' style="display:block;"><a href="view_attachments.php?id='; - } else { - $line = '<li id=res_'.$i.' style="display:none;"><a href="details.php?id='; - } + $line = '<li id=res_'.$i.' style="display:block;"><a href="details.php?id='; } } for ($j = 0; $j < count($tab[$i]); ++$j) {