Changed menu option text for GL inquiry.
[fa-stable.git] / includes / ui / ui_lists.inc
index 72abeecb1879f5b9bf20ab0719edbff241fe3a97..a68454cf8b267c7c1a0a430a0e9e81ae49da44dd 100644 (file)
@@ -330,7 +330,7 @@ $opts = array(              // default options
        if ($spec_option !== false) { // if special option used - add it
                $first_id = $spec_id;
                $first_opt = $spec_option;
-               $sel = $found!==false ? 'selected' : '';
+               $sel = $found===false ? 'selected' : '';
                $selector = "<option $sel value='$spec_id'>$spec_option</option>\n"
                        . $selector;
        }
@@ -1823,7 +1823,8 @@ function systypes_list_cells($label, $name, $value=null, $submit_on_change=false
        $str = array_selector($name, $value, $systypes_array, 
                array( 
                        'select_submit'=> $submit_on_change,
-                       'async' => false
+                       'async' => false,
+                       'default' => 0
                        )
        );
        echo "</td>\n";
@@ -2126,17 +2127,63 @@ function security_roles_list_row($label, $name, $selected_id=null, $new_item=fal
        return $str;
 }
 
-function tab_list_row($label, $name, $selected_id=null)
+function tab_list_row($label, $name, $selected_id=null, $all = false)
 {
-       global $tabs;
+       global $installed_extensions;
+       
+       $tabs = array();
+       foreach ($_SESSION['App']->applications as $app) {
+               $tabs[$app->id] = access_string($app->name, true);
+       }
+       if ($all) {     // add also not active ext. modules
+               foreach ($installed_extensions as $ext) {
+                       if ($ext['type'] == 'module' && !$ext['active'])
+                               $tabs[$ext['tab']] = access_string($ext['title'], true);
+               }
+       }
        echo "<tr>\n";
        echo "<td>$label</td><td>\n";
+       array_selector($name, $selected_id, $tabs);
+       echo "</td></tr>\n";
+}
 
-       $items = array();
+//-----------------------------------------------------------------------------------------------
 
-       array_selector($name, $selected_id, $tabs);
+function tag_list($name, $height, $type, $multi=false, $all=false)
+{
+       // Get tags
+       global $path_to_root;
+       include_once($path_to_root . "/admin/db/tags_db.inc");
+       $results = get_tags($type,$all);
 
-       echo "</td></tr>\n";
+       while ($tag = db_fetch($results))
+               $tags[$tag['id']] = $tag['name'];
+       
+       if (!isset($tags)) {
+               $tags[''] = _("No ".($all?"":"active ")."tags defined.");
+       }
+       return array_selector($name, null, $tags,
+               array(
+                       'multi' => $multi,
+                       'height' => $height,
+               ) );
+}
+
+function tag_list_cells($label, $name, $height, $type, $mult=false, $all=false)
+{
+       if ($label != null)
+               echo "<td>$label</td>\n";
+       echo "<td>\n";
+       tag_list($name, $height, $type, $mult, $all);
+       echo "</td>\n";
+       
+}
+
+function tag_list_row($label, $name, $height, $type, $mult=false, $all=false)
+{
+       echo "<tr>\n";
+       tag_list_cells($label, $name, $height, $type, $mult, $all);
+       echo "</tr>\n"; 
 }
 
 //---------------------------------------------------------------------------------------------