summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a41336b)
raw | patch | inline | side by side (parent: a41336b)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 29 Aug 2006 07:48:52 +0000 (07:48 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 29 Aug 2006 07:48:52 +0000 (07:48 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4532 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/groups/application.tpl | patch | blob | history | |
plugins/admin/groups/class_groupApplication.inc | patch | blob | history |
index 31f015199aa8d57df06bb58e8394c96353255af2..ce7099d7c8440463eda65a155c70d4aab6200426 100644 (file)
{$Release}
{/if}
<p class="seperator"> </p>
-{/if}
+{
+/if}
<table summary="" style="width:100%;">
<tr>
<td style="width:48%; vertical-align:top;">
- <b><LABEL for="used_apps">{t}Used applications{/t}</LABEL></b>
- {$UsedApps}
- <input type="text" value="" size="30" name='CatName'>
- <input type="submit" value="{t}Add category{/t}" name='AddCat'>
+ <b>
+ <LABEL for="used_apps">{t}Used applications{/t}</LABEL>
+ </b>
+ {$UsedApps}
+{render acl=$gosaMemberApplicationACL}
+ <input type="text" value="" size="30" name='CatName'>
+{/render}
+{render acl=$gosaMemberApplicationACL}
+ <input type="submit" value="{t}Add category{/t}" name='AddCat'>
+{/render}
</td>
<td>
</td>
<td style="width:48%;vertical-align:top;">
- <b><LABEL for="apps">{t}Available applications{/t}</LABEL></b>
- <br>
+ <b>
+ <LABEL for="apps">{t}Available applications{/t}</LABEL>
+ </b>
+ <br>
{$List}
- <input type="submit" value="{t}Add{/t}" name='AddApps'>
- </td>
+{render acl=$gosaMemberApplicationACL}
+ <input type="submit" value="{t}Add{/t}" name='AddApps'>
+{/render}
+ </td>
</tr>
</table>
diff --git a/plugins/admin/groups/class_groupApplication.inc b/plugins/admin/groups/class_groupApplication.inc
index 133717d6c59ea57244a7a040dafe50b729e8d47d..c01d01df2c4b2ae64a624a9d526aa9cb623bea13 100644 (file)
plugin::execute();
if((isset($_GET['act']))&&($_GET['act']=="depopen")){
- $dep = base64_decode($_GET['depid']);
- if(isset($this->config->idepartments[$dep])){
- $this->curbase =$dep;
- }
+ $dep = base64_decode($_GET['depid']);
+ $this->curbase =$dep;
}
if((isset($_GET['act']))&&($_GET['act']=="open")){
$departments = array();
$res = get_list("(objectClass=gosaDepartment)", "department", $this->curbase,array("description","cn","ou"),GL_SIZELIMIT);
foreach($res as $value){
- $fdn= @LDAP::fix($value['dn']);
+ $fdn= @LDAP::fix(str_replace($this->curbase,"",$value['dn']));
if($value["description"][0]!=".."){
$departments[$value['dn']]= convert_department_dn($fdn)." - [".$value["description"][0]."]";
}else{
}
}
+ if($this->acl_is_writeable("gosaMemberApplication")){
+ $linkadd = "<a href='?plug=".$_GET['plug']."&act=add&id=%s'>%s</a>";
+ }else{
+ $linkadd = "%s";
+ }
+
$linkopen = "<a href='?plug=".$_GET['plug']."&act=depopen&depid=%s'>%s</a>";
- $linkadd = "<a href='?plug=".$_GET['plug']."&act=add&id=%s'>%s</a>";
$base_back = preg_replace("/^[^,]+,/","",$this->curbase);
if((strlen($base_back)>= strlen($this->config->current['BASE']))&&($this->curbase!=$this->config->current['BASE'])){
$div2 = new DivSelectBox("appgroup");
$div2->SetHeight(300);
- $linkopen = "<img class='center' src='images/folder.png' alt=\"\"> <a href='?plug=".$_GET['plug']."&act=open&id=%s'>%s</a>";
- $catremove = " <input type='image' src='images/edittrash.png' title='"._("Delete entry")."' name='DelCat_%s' value='%s'>";
- $app = "<img class='center' src='images/select_application.png' alt=\"\"> %s";
-
- $catupdown = "<a href='?plug=".$_GET['plug']."&act=cat_up&id=%s'>
- <img align='top' alt=\"\" src='images/sort_up.png' border=0 title='"._("Move up")."'></a> <a href='?plug=".$_GET['plug']."&act=cat_down&id=%s'>
- <img alt=\"\" src='images/sort_down.png' title='"._("Move down")."' border=0></a>";
+ if(!$this->acl_is_writeable("gosaMemberApplication")){
+ $linkopen = "<img class='center' src='images/folder.png' alt=\"\"> <a href='?plug=".$_GET['plug']."&act=open&id=%s'>%s</a>";
+ $catremove = " <img sry='images/empty.png' alt=' '>";
+ $catupdown = "";
+ }else{
+ $linkopen = "<img class='center' src='images/folder.png' alt=\"\"> <a href='?plug=".$_GET['plug']."&act=open&id=%s'>%s</a>";
+ $catremove = " <input type='image' src='images/edittrash.png' title='"._("Delete entry")."' name='DelCat_%s' value='%s'>";
+ $catupdown = "<a href='?plug=".$_GET['plug']."&act=cat_up&id=%s'>".
+ "<img align='top' alt=\"\" src='images/sort_up.png' border=0 title='"._("Move up")."'>".
+ "</a> ".
+ "<a href='?plug=".$_GET['plug']."&act=cat_down&id=%s'>".
+ "<img alt=\"\" src='images/sort_down.png' title='"._("Move down")."' border=0>".
+ "</a>";
+ }
if(empty($this->curCatDir)){
$cnt =0;
$separator ="<hr size=1>";
- $sep = "<input type='image' src='images/back.png' title='"._("Insert seperator")."' value='%s' name='AddSep_%s'>";
-
- $upudown ="<a href='?plug=".$_GET['plug']."&act=one_up&id=%s'> <img alt='{t}sort{/t}' align='top' src='images/sort_up.png' title='"._("Move up")."' border=0></a>".
- " <a href='?plug=".$_GET['plug']."&act=one_down&id=%s'> <img alt='{t}sort{/t}' src='images/sort_down.png' title='"._("Move down")."' border=0></a>".
- " <input type='image' src='images/edittrash.png' title='"._("Delete entry")."' name='DelApp_%s' value='%s' alt='{t}delete{/t}' >";
- $edit= " <input type='image' src='images/edit.png' title='"._("Edit entry")."' name='EdiApp_%s' value='%s' alt='{t}edit{/t}' >";
+ if($this->acl_is_writeable("gosaMemberApplication")){
+ $sep = "<input type='image' src='images/back.png' title='"._("Insert seperator")."' value='%s' name='AddSep_%s'>";
+ $upudown = "<a href='?plug=".$_GET['plug']."&act=one_up&id=%s'>".
+ " <img alt='{t}sort{/t}' align='top' src='images/sort_up.png' title='"._("Move up")."' border=0>".
+ "</a> ".
+ "<a href='?plug=".$_GET['plug']."&act=one_down&id=%s'>".
+ " <img alt='{t}sort{/t}' src='images/sort_down.png' title='"._("Move down")."' border=0>".
+ "</a> ".
+ "<input type='image' src='images/edittrash.png' title='"._("Delete entry")."' name='DelApp_%s' value='%s' alt='{t}delete{/t}' >";
+ }else{
+ $sep = "";
+ $upudown = "";
+ }
+
+ if($this->acl_is_writeable("gosaApplicationParameter")){
+ $edit= " <input type='image' src='images/edit.png' title='"._("Edit entry")."' name='EdiApp_%s' value='%s' alt='{t}edit{/t}' >";
+ }else{
+ $edit= "";
+ }
$Differences = $this->diffAppsInReleases();
$smarty->assign("ReleaseSelectAble", true);
}
}
- $smarty->assign("ReleaseSelectAble", true);
+ $smarty->assign("ReleaseSelectAble", true);
+
+ /* Set acls to template */
+ $tmp = $this->plInfo();
+ foreach($tmp['plProvidedAcls'] as $acl => $translation){
+ $smarty->assign($acl."ACL",$this->getacl($acl));
+ }
/* Show main page */
if ($this->dialog){
} else {
$display.= $smarty->fetch (get_template_path('application.tpl', TRUE));
}
+
return ($display);
}