Code

Updated FAI stuff.
[gosa.git] / gosa-plugins / fai / admin / fai / class_divListFai.inc
index 342c502c63edcf3acd324e055162114dc4336a78..f1c500ddf1b06b985567500e94ee86208a1d736e 100644 (file)
@@ -40,12 +40,11 @@ class divListFai extends MultiSelectWindow
     $this->selectedBase  = session::get('CurrentMainBase');
 
     /* Set list strings */
-    $this->SetTitle(_("List of FAI classes"));
-    $this->SetSummary(_("This table displays all FAI classes in the selected tree."));
+    $this->SetTitle(_("List of classes"));
+    $this->SetSummary(_("List of deployment classes and packages"));
 
     /* Result page will look like a headpage */
     $this->SetHeadpageMode();
-    $this->SetInformation(_("This menu allows you to create, delete and edit FAI classes."));
 
     $this->EnableAplhabet   (true);
   
@@ -66,21 +65,21 @@ class divListFai extends MultiSelectWindow
     /* set Page header */
     $this->AddHeader(array("string"=> $chk,          "attach"=>"style='width:20px;'"));
     $this->AddHeader(array("string" => " ",                "attach" => "style='text-align:center;width:20px;'"));
-    $this->AddHeader(array("string" => _("Name of FAI class"),  "attach" => "style=''"));
+    $this->AddHeader(array("string" => _("Class name"),  "attach" => "style=''"));
     $this->AddHeader(array("string" => _("Class type"),         "attach" => "style='width:200px;'"));
     $this->AddHeader(array("string" => _("Actions"),            "attach" => "style='width:".$action_col_size."px;border-right:0px;text-align:right;'"));
 
-    $this->AddCheckBox("ShowProfiles"   , _("Display FAI profile objects")    ,_("Show profiles")     ,true);
-    $this->AddCheckBox("ShowTemplates"  , _("Display FAI template objects")   ,_("Show templates")    ,true);
-    $this->AddCheckBox("ShowScripts"    , _("Display FAI scripts")            ,_("Show scripts")      ,true);
-    $this->AddCheckBox("ShowHooks"      , _("Display FAI hooks")              ,_("Show hooks")        ,true);
-    $this->AddCheckBox("ShowVariables"  , _("Display FAI variables")          ,_("Show variables")    ,true);
-    $this->AddCheckBox("ShowPackages"   , _("Display FAI packages")           ,_("Show packages")     ,true);
-    $this->AddCheckBox("ShowPartitions" , _("Display FAI partitions")         ,_("Show partitions")   ,true);
+    $this->AddCheckBox("ShowProfiles"   , sprintf(_("Display objects of type '%s'."),_("Profile"))  ,_("Show profiles")     ,true);
+    $this->AddCheckBox("ShowTemplates"  , sprintf(_("Display objects of type '%s'."),_("Variable")) ,_("Show templates")    ,true);
+    $this->AddCheckBox("ShowScripts"    , sprintf(_("Display objects of type '%s'."),_("Script"))   ,_("Show scripts")      ,true);
+    $this->AddCheckBox("ShowHooks"      , sprintf(_("Display objects of type '%s'."),_("Hook"))     ,_("Show hooks")        ,true);
+    $this->AddCheckBox("ShowVariables"  , sprintf(_("Display objects of type '%s'."),_("Variable")) ,_("Show variables")    ,true);
+    $this->AddCheckBox("ShowPackages"   , sprintf(_("Display objects of type '%s'."),_("Package"))  ,_("Show packages")     ,true);
+    $this->AddCheckBox("ShowPartitions" , sprintf(_("Display objects of type '%s'."),_("Partition")),_("Show partitions")   ,true);
 
     /* Add SubSearch checkbox */
     //$this->AddCheckBox(SEPERATOR);
-    //$this->AddCheckBox("SubSearch",  _("Select to search within subtrees"), _("Search in subtrees"), false);
+    //$this->AddCheckBox("SubSearch",  msgPool::selectToView("","subsearch"), msgPool::selectToView("","subsearch_small"), false);
 
     /*                  Name                 ,Text                              ,Default  , Connect with alphabet  */
     $this->AddRegex   ("Regex",     _("Display users matching"),"*" , true);
@@ -276,7 +275,6 @@ class divListFai extends MultiSelectWindow
            "FAIprofile"         => array("IMG"=> "images/fai_profile.png",        "NAME"=>_("Profile") ,       "KZL"=> "P",  "VAR"=>"ShowProfiles"),
            "FAItemplate"        => array("IMG"=> "images/fai_template.png",       "NAME"=>_("Templates") ,     "KZL"=> "T",  "VAR"=>"ShowTemplates"));
 
-    $editlink ="<a href='?plug=".$_GET['plug']."&amp;edit_entry=%KEY%' title='%TITLE%'>%NAME%</a>";
 
     /* Dynamic action col, depending on snapshot icons */
     $action_col_size = 120;
@@ -328,11 +326,13 @@ class divListFai extends MultiSelectWindow
            src='images/editcopy.png' alt='"._("copy")."' name='copy_%KEY%' title='"._("Copy this entry")."'>&nbsp;";
        }
 
-       if($value['FAIstate'] == "freeze"){
+       if(preg_match("/^freeze/", $value['FAIstate'])){
+         $editlink ="<a href='?plug=".$_GET['plug']."&amp;edit_freeze_entry=%KEY%' title='%TITLE%'>%NAME%</a>";
          $action.=  "<input class='center' type='image' src='images/edit.png'  alt='"._("edit")."'
-                      name='entry_edit_%KEY%' title='"._("Edit class")."'>";
+           name='entry_freeze_edit_%KEY%' title='"._("Edit class")."'>";
          $action.=  "<img src='images/closedlock.png' alt='F' class='center'>";
        }else{
+         $editlink ="<a href='?plug=".$_GET['plug']."&amp;edit_entry=%KEY%' title='%TITLE%'>%NAME%</a>";
          $action.= "<input class='center' type='image' src='images/edit.png'  alt='"._("edit")."'
            name='entry_edit_%KEY%' title='"._("Edit class")."'>";
          if(preg_match("/d/",$value['acl'])){
@@ -370,14 +370,14 @@ class divListFai extends MultiSelectWindow
        $num_deps = count($this->Added_Departments);
      }
 
-     $profile_str    = _("Number of listed profiles");
-     $partition_str  = _("Number of listed partitions");
-     $script_str     = _("Number of listed scripts");
-     $hook_str       = _("Number of listed hooks");
-     $variable_str   = _("Number of listed variables");
-     $template_str   = _("Number of listed templates");
-     $package_str    = _("Number of listed packages");
-     $dep_str        = _("Number of listed departments");
+     $profile_str    = sprintf(_("Number of listed '%s'"),_("profiles"));
+     $partition_str  = sprintf(_("Number of listed '%s'"),_("partitions"));
+     $script_str     = sprintf(_("Number of listed '%s'"),_("scripts"));
+     $hook_str       = sprintf(_("Number of listed '%s'"),_("hooks"));
+     $variable_str   = sprintf(_("Number of listed '%s'"),_("variables"));
+     $template_str   = sprintf(_("Number of listed '%s'"),_("templates"));
+     $package_str    = sprintf(_("Number of listed '%s'"),_("packages"));   
+     $dep_str        = sprintf(_("Number of listed '%s'"),_("departments"));
 
      $str = "<img class='center' src='".$objects['FAIprofile']['IMG']."'
        title='".$profile_str."' alt='".$profile_str."'>&nbsp;".$cnts['FAIprofile']."&nbsp;&nbsp;&nbsp;&nbsp;";