summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 44eda20)
raw | patch | inline | side by side (parent: 44eda20)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 31 Mar 2010 08:06:47 +0000 (08:06 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 31 Mar 2010 08:06:47 +0000 (08:06 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17420 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/goto/admin/applications/application-filter-release.xml b/gosa-plugins/goto/admin/applications/application-filter-release.xml
index 53591c8eff133be638d528e43decc81587e2a547..35702f59adc3124a226ad845c3038f373960e8d1 100644 (file)
<filterdef>
<definition>
<category>application</category>
- <template>application-filter-release.tpl</template>
<initial>true</initial>
+
+ <attribute>dn</attribute>
+ <attribute>objectClass</attribute>
+ <attribute>cn</attribute>
+ <attribute>description</attribute>
+
+ <scope>auto</scope>
+ <default>default</default>
+
</definition>
<search>
+ <tag>default</tag>
+ <label>Default filter</label>
<query>
<backend>LDAP</backend>
- <filter>(&(objectClass=gosaApplication)$NAME)</filter>
- <attribute>dn</attribute>
- <attribute>objectClass</attribute>
- <attribute>cn</attribute>
- <attribute>description</attribute>
+ <filter>(&(objectClass=gosaApplication)(|(cn=$)(description=$)))</filter>
</query>
- <scope>auto</scope>
- </search>
-
- <element>
- <tag>RELEASE</tag>
- <type>combobox</type>
- <value>Loading.</value>
- <value>Loading..</value>
- <value>Loading...</value>
- </element>
-
- <element>
- <type>textfield</type>
- <tag>NAME</tag>
- <size>20</size>
- <maxlength>60</maxlength>
- <default></default>
- <unset></unset>
- <set>(|(cn=*$*)(description=*$*))</set>
- <alphabet>true</alphabet>
<autocomplete>
<backend>LDAP</backend>
- <filter>(&(objectClass=gosaApplication)(|(cn=*$NAME*)(description=*$NAME*)))</filter>
<attribute>cn</attribute>
<frequency>0.5</frequency>
<characters>3</characters>
</autocomplete>
- </element>
+ </search>
</filterdef>
diff --git a/gosa-plugins/goto/admin/applications/application-list-release.tpl b/gosa-plugins/goto/admin/applications/application-list-release.tpl
index dcc71691abcbc33ec5c8e9af4fb8b81b6563fb6a..e406e1d449a24fae968477218d457bf4a76eaedf 100644 (file)
<div class="mainlist-nav">
<table summary="{$HEADLINE}">
<tr>
- <td>{$ROOT}</td>
- <td>{$BACK}</td>
- <td>{$HOME}</td>
<td>{$RELOAD}</td>
- <td class="left-border">{t}Base{/t} {$BASE}</td>
+ <td class="left-border">{t}Release{/t} {$RELEASE}</td>
<td class="left-border">{$ACTIONS}</td>
<td class="left-border">{$FILTER}</td>
</tr>
diff --git a/gosa-plugins/goto/admin/applications/class_applicationManagement.inc b/gosa-plugins/goto/admin/applications/class_applicationManagement.inc
index 43ec0c5bbd1921be09c5bf4030b47bd07970fc18..aec27779e8660a9311ee619697e4b3c640170e5f 100644 (file)
var $plIcon = "plugins/goto/images/application.png";
var $app_release = ""; // The currently selected release while in release management mode!
+ var $app_base = ""; // The currently selected release while in release management mode!
// Tab definition
protected $tabClass = "apptabs";
protected $aclPlugin = "application";
protected $objectName = "application";
+ var $releaseSelector = NULL;
+
function __construct($config,$ui)
{
$this->config = $config;
$this->ui = $ui;
+ $this->app_base = get_ou('applicationRDN').$this->config->current['BASE'];
+ $this->app_release = get_ou('applicationRDN').$this->config->current['BASE'];
if($this->IsReleaseManagementActivated()){
- $this->app_release = get_ou('applicationRDN').$this->config->current['BASE'];
$filter_xml = "application-filter-release.xml";
$list_xml = "application-list-release.xml";
$this->storagePoints= array("");
+ $releases = faiManagement::getReleaseStates($this->config,$this->app_base);
+ $this->releaseSelector = new releaseSelector($releases, $this->app_release, $this->app_release);
}else{
$filter_xml = "application-filter.xml";
$list_xml = "application-list.xml";
$this->registerAction("edit_mailapplication","editEntry");
}
+
+ /*! \brief Overridden render method of class mangement.
+ * this allows us to add a release selection box.
+ */
function renderList()
{
+ $smarty = get_smarty();
$filter = $this->getFilter();
$headpage = $this->getHeadpage();
- if($this->IsReleaseManagementActivated()){
- $filter->setComboBoxOptions("RELEASE",$this->getReleaseList());
- if(isset($_POST['RELEASE'])){
- $this->app_release = get_post('RELEASE');
- }
- $headpage->setBase($this->app_release);
- }
+ $this->releaseSelector->update();
+ $this->app_release = $this->releaseSelector->getBase();
+ $headpage->setBase($this->app_release);
$headpage->update();
+ $smarty->assign("RELEASE", $this->releaseSelector->render());
$display = $headpage->render();
return($this->getHeader().$display);
}
+
function getReleaseList($base = "", $prefix ="")
{
$list = array();