]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-13103 merging from 1.9
authornicolasconnault <nicolasconnault>
Fri, 25 Jan 2008 16:31:50 +0000 (16:31 +0000)
committernicolasconnault <nicolasconnault>
Fri, 25 Jan 2008 16:31:50 +0000 (16:31 +0000)
lib/adminlib.php
theme/standard/styles_color.css
theme/standard/styles_fonts.css

index 3293cf3f968061773fe98ed938ed48a72d536293..9ae1e9567b7651224d4dfca103a7a4173fc68aa2 100644 (file)
@@ -4638,10 +4638,12 @@ function print_plugin_tables() {
     
     $strstandard    = get_string('standard');
     $strnonstandard = get_string('nonstandard');
+    $strmissingfromdisk = '(' . get_string('missingfromdisk') . ')';
+    $strabouttobeinstalled = '(' . get_string('abouttobeinstalled') . ')';
 
     $html = '';
 
-    foreach ($plugins_ondisk as $cat => $list) {
+    foreach ($plugins_ondisk as $cat => $list_ondisk) {
         $strcaption = get_string($cat);
         if ($cat == 'mod') {
             $strcaption = get_string('activitymodule');
@@ -4657,11 +4659,14 @@ function print_plugin_tables() {
         
         $row = 1;      
 
-        foreach ($list as $k => $plugin) {
+        foreach ($list_ondisk as $k => $plugin) {
+            $status = 'ok';
             $standard = 'standard';
+            $note = '';
 
             if (!in_array($plugin, $plugins_standard[$cat])) {
                 $standard = 'nonstandard';
+                $status = 'warning';
             }    
             
             // Get real name and full path of plugin
@@ -4673,34 +4678,39 @@ function print_plugin_tables() {
             $plugin_name = get_plugin_name($plugin, $cat);
             
             // Determine if the plugin is about to be installed
-            $strabouttobeinstalled = '';
             if ($cat != 'filter' && !in_array($plugin, $plugins_installed[$cat])) {
-                $strabouttobeinstalled = ' (' . get_string('abouttobeinstalled') . ')';
+                $note = $strabouttobeinstalled;
                 $plugin_name = $plugin;
             }
 
             $html .= "<tr class=\"r$row\">\n"
                   .  "<td class=\"cell c0\">$plugin_path</td>\n"
                   .  "<td class=\"cell c1\">$plugin_name</td>\n"
-                  .  "<td class=\"$standard cell c2\">" . ${'str' . $standard} . $strabouttobeinstalled . "</td>\n</tr>\n";
+                  .  "<td class=\"$standard $status cell c2\">" . ${'str' . $standard} . " $note</td>\n</tr>\n";
             $row++;
 
             // If the plugin was both on disk and in the db, unset the value from the installed plugins list
-            if ($key = array_search($plugin, $plugins_standard[$cat])) {
-                unset($plugins_standard[$cat][$key]);
+            if ($key = array_search($plugin, $plugins_installed[$cat])) {
+                unset($plugins_installed[$cat][$key]);
             } 
         } 
 
         // If there are plugins left in the plugins_installed list, it means they are missing from disk
-        $strmissingfromdisk = get_string('missingfromdisk');
-        foreach ($plugins_standard[$cat] as $k => $missing_plugin) { 
+        foreach ($plugins_installed[$cat] as $k => $missing_plugin) { 
             // Make sure the plugin really is missing from disk
             if (!in_array($missing_plugin, $plugins_ondisk[$cat])) {
-                $plugin_name = get_plugin_name($missing_plugin, $cat);
+                $standard = 'standard';
+                $status = 'warning';
+
+                if (!in_array($plugin, $plugins_standard[$cat])) {
+                    $standard = 'nonstandard';
+                }
+
+                $plugin_name = $missing_plugin;
                 $html .= "<tr class=\"r$row\">\n"
                       .  "<td class=\"cell c0\">?</td>\n"
                       .  "<td class=\"cell c1\">$plugin_name</td>\n"
-                      .  "<td class=\"missingplugin cell c2\">$strstandard ($strmissingfromdisk)</td>\n</tr>\n";
+                      .  "<td class=\"$standard $status cell c2\">" . ${'str' . $standard} . " $strmissingfromdisk</td>\n</tr>\n";
                 $row++; 
             }
         }
index 3ea5d38afdbd0f4e849e6485744bcccdd88c4df5..4e56b90e5008ed76fb704b0b8834990e0859853b 100644 (file)
@@ -318,18 +318,17 @@ table.flexible .r1 {
   background-color: green;
 }
 
-.plugincompattable td.standard {
+
+.plugincompattable td.ok {
     color: #008000;
 }
 
-.plugincompattable td.nonstandard {
-    color: #FF7500;
-    font-weight: bold;
+.plugincompattable td.warning {
+    color: #DF7800;
 }
 
-.plugincompattable td.missingplugin {
-    color: #FF7500;
-    font-weight: bold;
+.plugincompattable td.error {
+    color: #DF0000;
 }
 
 /* Admin settings */
index 22920c38e6401f78e97ceb0fd09416906508c627..7bc6551f526493772a5b2d18e9938bde9d3b39d5 100644 (file)
@@ -276,6 +276,21 @@ body#admin-index .copyright {
   font-size: 0.8em;
 }
 
+.plugincompattable td.standard {
+    font-weight: normal;
+}
+
+.plugincompattable td.nonstandard {
+    font-weight: bold;
+}
+
+.plugincompattable td.missingplugin {
+    font-weight: bold;
+}
+
+.plugincompattable td.warning {
+    font-style: normal;
+}
 /***
  *** Blocks
  ***/