diff --git a/gosa-plugins/fai/admin/fai/class_faiPackageEntry.inc b/gosa-plugins/fai/admin/fai/class_faiPackageEntry.inc
index 4d4dd3b35707f73e02ff0f71b1babc01e6bb7d43..f86f89a96aff64eefcd72d3697101ef4e5c5789e 100644 (file)
<?php
+/*! \brief See contructor
+
+*/
class faiPackageEntry extends plugin
{
/* attribute list for save action */
var $FAIAllclasses = array();
var $FAIdebianRelease ="";
+
+ /*! \brief Allows to select a set of packages for a specific release.
+ The packages are loaded from the GOsa si daemon directly
+ @param Object The GOsa configuration object
+ @param String The release name for which the packages will be loaded
+ @param Array Packages that schould be marked as selected.
+ */
function faiPackageEntry (&$config,$release, $used_packages=array())
{
plugin::plugin ($config, NULL);
{
$this->package_sections = array();
$q = new gosaSupportDaemon();
- $ret = $q->FAI_get_packages($this->FAIdebianRelease,array("distinct section"));
+ $ret = $q->FAI_get_package_sections($this->FAIdebianRelease);
if($q->is_error()){
msg_dialog::display(_("Service infrastructure"),msgPool::siError($q->get_error()),ERROR_DIALOG);
}else{
/* Create section checkboxes
*/
- $Section_boxes = "<input type='hidden' value='chkchange' name='chkchange'><table summary=''><tr>";
+ $Section_boxes = "
+ <div style='height:450px; overflow:scroll;'>
+ <input type='hidden' value='chkchange' name='chkchange'><table summary=''><tr>";
$i = 0;
foreach($this->package_sections as $cat => $selected){
- if($i == 3){
+ if($i == 2){
$Section_boxes .="</tr><tr>";
$i = 0;
}
}
$i ++ ;
}
- $Section_boxes .= "</tr></table>";
+ $Section_boxes .= "</tr></table></div>";
/* Create List && fill it with packages
*/
$divlist->SetPluginMode();
$divlist->SetSummary(_("This list displays all assigned package names for this repository settings."));
$divlist->SetEntriesPerPage(0);
- $divlist->SetHeight("650px;");
$divlist->SetHeader(array(array("string" => " ", "attach" => "style='text-align:center;width:20px;'"),
array("string" => "Name", "attach" => "style='width:180px;'"),
- array("string" => "Version", "attach" ),
- array("string" => "Description", "attach" => "style='width:240px;border-right:0px;text-align:left;'")));
+ array("string" => "Version", "attach"=>"style='width:240px;'" ),
+ array("string" => "Description", "attach" => "style='border-right:0px;text-align:left;'")));
foreach($this->pkgs as $pkg){
if(in_array($pkg['PACKAGE'],$this->selected)){
}else{
$check = "";
}
+
+ $desc = " ";
+ if(isset($pkg['DESCRIPTION'])){
+ $desc = base64_decode($pkg['DESCRIPTION']);
+ }
+
$chkbox = "<input type='checkbox' value='1' name='use_".base64_encode($pkg['PACKAGE'])."' ".$check.">
<input type='hidden' value='1' name='wasonpage_".base64_encode($pkg['PACKAGE'])."'>";
$divlist->AddEntry(array(array("string"=>$chkbox, "attach" => "style='text-align:center;width:20px;'"),
- array("string"=>$pkg['PACKAGE'], "attach" => "style='width:180px;'"),
- array("string"=>htmlentities($pkg['VERSION'])),
- array("string"=>htmlentities($pkg['DESCRIPTION']), "attach" => "style='width:221px;border-right:0px;text-align:left;'")));
+ array("string"=>"<div style='width:178px; overflow:hidden;'>".$pkg['PACKAGE']."</div>",
+ "attach" => "style='width:180px;' title='".$pkg['PACKAGE']." (".$pkg['VERSION'].")'"),
+ array("string"=>"<div style='width:238px; overflow:hidden;'>".htmlentities($pkg['VERSION'])."</div>",
+ "attach" => "style='width:240px' title='".$pkg['PACKAGE']." (".$pkg['VERSION'].")'"),
+ array("string"=>htmlentities($desc),
+ "attach" => "style='border-right:0px;text-align:left;'")));
}
$smarty->assign("Section_boxes" , $Section_boxes);
$smarty->assign("launchimage" , get_template_path('images/launch.png'));
$smarty->assign("alphabet" , generate_alphabet());
$smarty->assign("apply" , apply_filter(TRUE));
- $smarty->assign("search_image" , get_template_path('images/search.png'));
+ $smarty->assign("search_image" , get_template_path('images/lists/search.png'));
$display.= $smarty->fetch(get_template_path('faiPackageEntry.tpl', TRUE));
return($display);
{
$this->pkgs = array();
$q = new gosaSupportDaemon();
- $filter = preg_replace("/\*/","%",$this->searchStrPKG);
+ $filter = preg_replace("/\*/","%",array($this->searchStrPKG));
$attrs = array("distribution", "package","version", "section", "description", "timestamp");
- $ret = $q->FAI_get_packages($this->FAIdebianRelease,$attrs,$filter);
+ $ret = $q->FAI_get_packages($this->FAIdebianRelease,$attrs,$filter,0,200);
if($q->is_error()){
msg_dialog::display(_("Service infrastructure"),msgPool::siError($q->get_error()),ERROR_DIALOG);
}else{