Code

first container for sudo-ldap
authorzeph <zeph@594d385d-05f5-0310-b6e9-bd551577e9d8>
Sun, 23 Mar 2008 20:18:11 +0000 (20:18 +0000)
committerzeph <zeph@594d385d-05f5-0310-b6e9-bd551577e9d8>
Sun, 23 Mar 2008 20:18:11 +0000 (20:18 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5-plugins@9960 594d385d-05f5-0310-b6e9-bd551577e9d8

sudo-ldap/src/class_sudoLdap.inc
sudo-ldap/src/sudoldap.tpl [new file with mode: 0644]

index d6652aad6623652366dad128333078b97fda0502..bdbd9a1c98fc85c16ec3de40863505547416ca90 100644 (file)
@@ -46,9 +46,29 @@ class sudoLdap extends plugin
        /* Call parent execute */
        plugin::execute();
        $display= "";
+       $smarty= get_smarty();
 
-       $display = "execute()";
-       
+       $RoleList = new divSelectBox("sudoRoles");
+       $RoleList -> SetHeight(300);
+       $editImg = "<input type='image' src='images/edit.png' name='editZone_%s'>
+       <input type='image' src='images/edittrash.png' name='delZone_%s'>";
+       /*
+       foreach($this->Zones as $zone => $values ){
+               $link = "<a href='?plug=".$_GET['plug']."&act=edit&id=%s'>%s</a>";
+               $ZoneList->AddEntry(array(
+                       array("string" => sprintf($link,base64_encode($zone),getNameFromMix($zone))),
+                       array("string" => sprintf($link,base64_encode($zone),_("Reverse zone")." : ".getNameFromMix($values['ReverseZone']))),
+                       array("string" => _("TTL")." : ".$values['sOAttl']),
+                       array("string" => _("Class")." : ".$values['dNSClass']),
+                       array("string" => str_replace("%s",base64_encode($zone),$editImg))
+            ));
+       }    
+       */
+
+       $smarty->assign("sudoldapACL",chkacl($this->acl,"sudoldap"));
+
+       $smarty->assign("RoleList",$RoleList->DrawList());
+       $display.= $smarty->fetch(get_template_path('sudoldap.tpl', TRUE));
        return($display);
   }
 
diff --git a/sudo-ldap/src/sudoldap.tpl b/sudo-ldap/src/sudoldap.tpl
new file mode 100644 (file)
index 0000000..409f218
--- /dev/null
@@ -0,0 +1,14 @@
+<table summary="" width="100%">
+<tr>
+       <td style="width:100%;vertical-align:top;">
+<h2>{t}Sudo Roles{/t}</h2>
+               {$RoleList}
+               <input type="submit" name="AddRole" value="{t}Add{/t}" {$sudoldapACL}>
+       </td>
+</tr>
+</table>
+<script language="JavaScript" type="text/javascript">
+  <!-- // First input field on page
+       focus_field('AddRole');
+  -->
+</script>