diff --git a/apps/maarch_entreprise/smartphone/details.php b/apps/maarch_entreprise/smartphone/details.php
index 112a20147c53ff9c7151b9adb8acbbb4ae800f3f..cd67213f00e46ab3773495437fddbb0387b250e8 100755
--- a/apps/maarch_entreprise/smartphone/details.php
+++ b/apps/maarch_entreprise/smartphone/details.php
@@ -234,7 +234,8 @@ else{
         </ul>-->
         <?php
     }
-    if ($_SESSION['current_basket']['id'] == "EsigBasket" && $infos_attach['attachment_type'] != 'signed_response'){
+    $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']);
diff --git a/apps/maarch_entreprise/smartphone/list_result.php b/apps/maarch_entreprise/smartphone/list_result.php
index f9d01a164f788e2e2aeeec318fcf351c2743a095..c7ac0c96c0b46143404e575bcd6545927174844b 100755
--- a/apps/maarch_entreprise/smartphone/list_result.php
+++ b/apps/maarch_entreprise/smartphone/list_result.php
@@ -67,16 +67,19 @@ 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 ($_SESSION['current_basket']['id'] == "EsigBasket" && $view != "res_view_attachments"){
+                    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=';
                 } else {
-                    if ($_SESSION['current_basket']['id'] == "EsigBasket" && $view != "res_view_attachments"){
+                    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 $line = '<li id=res_' . $i . ' style="display:none;"><a href="details.php?id=';
                 }
             }
             for ($j = 0; $j < count($tab[$i]); $j++) {