summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 57c948f)
raw | patch | inline | side by side (parent: 57c948f)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 14 Apr 2008 09:18:36 +0000 (09:18 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 14 Apr 2008 09:18:36 +0000 (09:18 +0000) |
-Added some comments for the package classes
-Fixed Package Select dialog.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10393 594d385d-05f5-0310-b6e9-bd551577e9d8
-Fixed Package Select dialog.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10393 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/fai/admin/fai/class_faiPackageConfiguration.inc | patch | blob | history | |
gosa-plugins/fai/admin/fai/class_faiPackageEntry.inc | patch | blob | history |
diff --git a/gosa-plugins/fai/admin/fai/class_faiPackageConfiguration.inc b/gosa-plugins/fai/admin/fai/class_faiPackageConfiguration.inc
index 4e6ebf517e1ec39dcb461a411624741d3d2bf62b..ab437c3bc3254caff06dc610194527eb1a9f1a74 100644 (file)
var $obj;
var $release;
+
+ /*! \brief Configure a FAI package entry.
+ @param Object $config GOsa configuration object;
+ @param String The DN of the current package.
+ @param String The package name (e.g. apache)
+ @param String The release name (e.g. edge)
+ @param Array The current package configuration.
+ */
function faiPackageConfiguration (&$config, $dn= NULL,$obj,$release,$pkg_config)
{
plugin::plugin ($config, $dn);
$this->release = $release;
$this->pkg_config = $pkg_config;
- /* Read pkg debconf info */
+ /* Read pkg debconf info from gosaSupportDaemon
+ */
$q = new gosaSupportDaemon();
$ret = $q->FAI_get_packages($this->release,array("package","template"),array($this->obj));
if($q->is_error()){
msg_dialog::display(_("Service infrastructure"),msgPool::siError($q->get_error()),ERROR_DIALOG);
}
+
+ /* If we do not get a useable answer, use an empty template
+ */
$tpl = "";
if(isset($ret['ANSWER1']) && isset($ret['ANSWER1']['TEMPLATE'])){
$tpl = base64_decode($ret['ANSWER1']['TEMPLATE']);
}
+
+ /* Create package configuration mask
+ */
$this->Debconf_handle = new debconf(preg_replace('/_.*$/', '', get_browser_language()));
$this->Debconf_handle->load_from_string($tpl);
if($this->Debconf_handle->has_template()){
}
+ /*! \brief Returns a html interface, that allow to modify
+ the package attributes.
+ @return String HTML content/ui for this plugin
+ */
function execute()
{
/* Call parent execute */
return($smarty->fetch(get_template_path('faiPackageConfiguration.tpl', TRUE)));
}
+
/* Save data to object */
function save_object()
{
return ($message);
}
+
+ /*! \brief Returns an array with all configured attributes
+ @return Array All configured attributes.
+ */
function save()
{
$this->Debconf_handle->PostCheck();
diff --git a/gosa-plugins/fai/admin/fai/class_faiPackageEntry.inc b/gosa-plugins/fai/admin/fai/class_faiPackageEntry.inc
index 7888d78bc36bd1f9d82ee43d65aa00dc5c0ad31e..e9697009d2fb440b1770e802bd4623aa172cca8c 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);
$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"=>"style='width:240px;'" ),
$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"=>"<div style='width:238px; overflow:hidden;'>".htmlentities($pkg['VERSION']), "attach" => "style='width:240px'"),
- array("string"=>htmlentities($pkg['DESCRIPTION']), "attach" => "style='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($pkg['DESCRIPTION']),
+ "attach" => "style='border-right:0px;text-align:left;'")));
}
$smarty->assign("Section_boxes" , $Section_boxes);