Code

Updated departments.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 2 Jul 2008 05:46:13 +0000 (05:46 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 2 Jul 2008 05:46:13 +0000 (05:46 +0000)
-Hide the base selector, if the currently edited department is the base object.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11502 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/admin/departments/class_departmentGeneric.inc
gosa-core/plugins/admin/departments/country.tpl
gosa-core/plugins/admin/departments/dcObject.tpl
gosa-core/plugins/admin/departments/generic.tpl
gosa-core/plugins/admin/departments/locality.tpl
gosa-core/plugins/admin/departments/organization.tpl

index 8b04650e2df8779b61e3edaf18be38fc3da5a4d2..eec9adf02ce43d5b9d99100d8578e65fd61ddef3 100644 (file)
@@ -107,6 +107,13 @@ class department extends plugin
                $this->config->make_idepartments();
                $smarty= get_smarty();
 
+    /* Hide base selector, if this object represents the base itself 
+     */
+    $smarty->assign("hide_base", FALSE);
+    if($this->dn == $this->config->current['BASE']){
+      $smarty->assign("hide_base", TRUE);
+    }
+
     $tmp = $this->plInfo();
     foreach($tmp['plProvidedAcls'] as $name => $translation){
       $smarty->assign($name."ACL",$this->getacl($name));
index c2ad34b2dd6a969d363baeb0775ece27ae001890..be7717f243ff911abfe385a03cd328df45adeee8 100644 (file)
@@ -23,6 +23,7 @@
 {/render}
        </td>
       </tr>
+       {if !$hide_base}
       <tr>
         <td><LABEL for="base">{t}Base{/t}</LABEL>{$must}</td>
         <td>
@@ -37,6 +38,7 @@
 {/render}
          </td>
         </tr>
+       {/if}
        </table>
   </td>
  </tr>
index 29ecf5c80af8827be9d9bba3a4f51c09e08b1dc0..92465f0d9814db01956d4ca446761502d7e48b29 100644 (file)
@@ -23,6 +23,7 @@
 {/render}
        </td>
       </tr>
+       {if !$hide_base}
       <tr>
         <td><LABEL for="base">{t}Base{/t}</LABEL>{$must}</td>
         <td>
@@ -37,6 +38,7 @@
 {/render}
          </td>
         </tr>
+       {/if}
        </table>
   </td>
  </tr>
index 3b44f6f1e3347a278bff944d66ee949a05781a52..bfc135ed7a8b0083f4704303f2229f0bec9c2a75 100644 (file)
@@ -34,6 +34,7 @@
       <tr>
         <td colspan="2"><br></td>
       </tr>
+       {if !$hide_base}
       <tr>
         <td><LABEL for="base">{t}Base{/t}</LABEL>{$must}</td>
 
@@ -49,6 +50,7 @@
 {/render}
        </td>
        </tr>
+       {/if}
      </table>
 
    </td>
index 8a1f46e3f86e9df9fecf33bc041fe1889c14b84a..d3715757d3d01535825cd5c1db4081dbdf836e8e 100644 (file)
@@ -23,6 +23,7 @@
 {/render}
        </td>
       </tr>
+       {if !$hide_base}
       <tr>
         <td><LABEL for="base">{t}Base{/t}</LABEL>{$must}</td>
         <td>
@@ -37,6 +38,7 @@
 {/render}
          </td>
         </tr>
+       {/if}
        </table>
   </td>
  </tr>
index 69fb3c1e5dfa9e77eebc7d76e6d76f33e8b462be..2b2563be33ea966860533ae351651cecb72d4e07 100644 (file)
@@ -34,6 +34,7 @@
       <tr>
         <td colspan="2"><br></td>
       </tr>
+       {if !$hide_base}
       <tr>
         <td><LABEL for="base">{t}Base{/t}</LABEL>{$must}</td>
 
@@ -49,6 +50,7 @@
 {/render}
        </td>
        </tr>
+       {/if}
      </table>
 
    </td>