Explorar el Código

Few changes to extensions importer page

Stephen Ficklin hace 10 años
padre
commit
744024d9dc
Se han modificado 1 ficheros con 8 adiciones y 4 borrados
  1. 8 4
      tripal_core/includes/tripal_core.extensions.inc

+ 8 - 4
tripal_core/includes/tripal_core.extensions.inc

@@ -330,10 +330,10 @@ function tripal_core_extension_form_add_extensions(&$form, $form_state, $extensi
       $tvs_temp = preg_split('/, /', $extension[$namespace]['tripal_version']);
       $tvs_temp = preg_split('/, /', $extension[$namespace]['tripal_version']);
       $cvs_temp = preg_split('/, /', $extension[$namespace]['chado_version']);
       $cvs_temp = preg_split('/, /', $extension[$namespace]['chado_version']);
       if (!in_array($my_tripal_version, $tvs_temp)) {
       if (!in_array($my_tripal_version, $tvs_temp)) {
-        $incompatible .= "<li>This extensions is not compatible with this version of Tripal.</li>";
+        $incompatible .= "<li>This extension is not compatible with this version of Tripal.</li>";
       }
       }
       if (!in_array($my_chado_version, $cvs_temp)) {
       if (!in_array($my_chado_version, $cvs_temp)) {
-        $incompatible .= "<li>This extensions is not compatible with the installed Chado version.</li>";
+        $incompatible .= "<li>This extension is not compatible with the installed Chado version.</li>";
       }
       }
       $incompatible = t($incompatible);
       $incompatible = t($incompatible);
 
 
@@ -407,12 +407,15 @@ function tripal_core_extension_form_add_extensions(&$form, $form_state, $extensi
         $notices = '<div class="messages status"><ul>' . $is_installed . '</ul></div>';
         $notices = '<div class="messages status"><ul>' . $is_installed . '</ul></div>';
       }
       }
       $warnings = '';
       $warnings = '';
-      if ($incompatible or $project or $other) {
+      if ($project or $other) {
         $warnings = '<div class="messages warning"><ul>' .
         $warnings = '<div class="messages warning"><ul>' .
-          $incompatible . ' ' .
           $project .  ' ' .
           $project .  ' ' .
           $other . '</ul></div>';
           $other . '</ul></div>';
       }
       }
+      $errors = '';
+      if ($incompatible) {
+        $errors = '<div class="messages error"><ul>' . $incompatible .  '</ul></div>';
+      }
 
 
       $state = '';
       $state = '';
       if (array_key_exists('dev_stage', $extension[$namespace])) {
       if (array_key_exists('dev_stage', $extension[$namespace])) {
@@ -435,6 +438,7 @@ function tripal_core_extension_form_add_extensions(&$form, $form_state, $extensi
         "<strong>tripal.info Page: </strong>" . l($extension['link'], $extension['link']) . "</br>" .
         "<strong>tripal.info Page: </strong>" . l($extension['link'], $extension['link']) . "</br>" .
         $notices .
         $notices .
         $warnings .
         $warnings .
+        $errors .
         "<p>" . $extension['description'] . "</p>",
         "<p>" . $extension['description'] . "</p>",
       );
       );
       // Add an import button to each of types that can support import.
       // Add an import button to each of types that can support import.