From ddd3edd34596c1847f66e3058d5365d95e8823bc Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 1 Jul 2009 11:46:35 +0000 Subject: [PATCH] Updated role management git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13868 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../roleManagement/class_divListRole.inc | 5 +- .../roleManagement/class_roleGeneric.inc | 15 ++ .../roleManagement/class_roleManagement.inc | 48 ++++-- .../admin/roleManagement/roleGeneric.tpl | 139 +++++++++++------- .../roleManagement/html/images/new.png | Bin 0 -> 754 bytes .../roleManagement/html/images/occupant.png | Bin 0 -> 868 bytes .../roleManagement/html/images/plugin.png | Bin 0 -> 4255 bytes .../roleManagement/html/images/role.png | Bin 0 -> 778 bytes 8 files changed, 138 insertions(+), 69 deletions(-) create mode 100644 gosa-plugins/roleManagement/html/images/new.png create mode 100644 gosa-plugins/roleManagement/html/images/occupant.png create mode 100644 gosa-plugins/roleManagement/html/images/plugin.png create mode 100644 gosa-plugins/roleManagement/html/images/role.png diff --git a/gosa-plugins/roleManagement/admin/roleManagement/class_divListRole.inc b/gosa-plugins/roleManagement/admin/roleManagement/class_divListRole.inc index 22c7f1d0a..d83524efe 100644 --- a/gosa-plugins/roleManagement/admin/roleManagement/class_divListRole.inc +++ b/gosa-plugins/roleManagement/admin/roleManagement/class_divListRole.inc @@ -154,11 +154,8 @@ class divListRole extends MultiSelectWindow $acl = $ui->get_permissions($val['dn'],"roles/role"); $acl_all= $ui->has_complete_category_acls($val['dn'],"roles"); - // Add copy & cut functionality - $actions = $this->parent->get_copypaste_action($val['dn'],"roles","role"); - // Create edit and remove icon buttons - $actions.= ""; $actions.= $this->parent->get_snapshot_action($val['dn'],$this->module); diff --git a/gosa-plugins/roleManagement/admin/roleManagement/class_roleGeneric.inc b/gosa-plugins/roleManagement/admin/roleManagement/class_roleGeneric.inc index 48c6c7570..9fd6a3705 100644 --- a/gosa-plugins/roleManagement/admin/roleManagement/class_roleGeneric.inc +++ b/gosa-plugins/roleManagement/admin/roleManagement/class_roleGeneric.inc @@ -58,6 +58,7 @@ class roleGeneric extends plugin { $tmp = $this->allowedBasesToMoveTo(); $smarty->assign("bases", $tmp); $smarty->assign("base_select",$this->base); + $smarty->assign("members",$this->convert_list()); foreach($this->attributes as $attr){ $smarty->assign($attr,$this->$attr); } @@ -69,6 +70,20 @@ class roleGeneric extends plugin { } + function convert_list() + { + $temp= ""; + foreach ($this->roleOccupant as $key => $value){ + $temp.= " + \n"; + } + + return ($temp); + } + + function save(){ plugin::save(); diff --git a/gosa-plugins/roleManagement/admin/roleManagement/class_roleManagement.inc b/gosa-plugins/roleManagement/admin/roleManagement/class_roleManagement.inc index 598dcf80f..d3d9da484 100644 --- a/gosa-plugins/roleManagement/admin/roleManagement/class_roleManagement.inc +++ b/gosa-plugins/roleManagement/admin/roleManagement/class_roleManagement.inc @@ -68,7 +68,7 @@ class roleManagement extends plugin plugin::execute(); /* Variables to restore after 'entry locked' warning was displayed */ - session::set('LOCK_VARS_TO_USE',array('/^role_/')); + session::set('LOCK_VARS_TO_USE',array('/^role_/','/^act/','/^id/','/^menu_action/')); $smarty = get_smarty(); $s_action = ""; @@ -113,7 +113,7 @@ class roleManagement extends plugin * New handling ***************/ - if($s_action == "new"){ + if($s_action == "new" && $this->dialog instanceOf tabs){ $this->dialog = new roletabs($this->config, $this->config->data['TABS']['ROLETABS'], "new"); $this->dialog->set_acl_base($this->DivListRoles->selectedBase); } @@ -122,12 +122,28 @@ class roleManagement extends plugin * Edit handling ***************/ - if($s_action == "edit"){ + if($s_action == "edit" && !$this->dialog instanceOf tabs){ if(!isset($this->roles[$s_entry])){ trigger_error("Unknown entry!"); }else{ + $entry = $this->roles[$s_entry]; - $this->dialog = new roletabs($this->config, $this->config->data['TABS']['ROLETABS'], $entry['dn']); + $this->dn = $entry['dn']; + + /* Check locking, save current plugin in 'back_plugin', so + the dialog knows where to return. */ + if (($user= get_lock($this->dn)) != ""){ + return(gen_locked_message ($user, $this->dn,TRUE)); + } + + /* Lock the current entry, so everyone will get the above dialog */ + add_lock ($this->dn, $this->ui->dn); + + /* Open the dialog */ + $this->dialog = new roletabs($this->config, $this->config->data['TABS']['ROLETABS'], + $entry['dn'], "roles"); + $this->dialog->set_acl_base($this->dn); + set_object_info($this->dn); } } @@ -135,25 +151,25 @@ class roleManagement extends plugin * Dialog handling ***************/ - if (isset($_POST['edit_finish']) && $this->dialog instanceOf tabs){ + if ((isset($_POST['edit_finish']) || isset($_POST['edit_apply'])) && $this->dialog instanceOf tabs){ $this->dialog->save_object(); $msgs = $this->dialog->check(); if(count($msgs)){ msg_dialog::displayChecks($msgs); }else{ $this->dialog->save(); - if(isset($this->grouptab->dn)){ + if (!isset($_POST['edit_apply'])){ $this->remove_lock(); + $this->dialog= NULL; + set_object_info(); + }else{ + $this->dialog->re_init(); } - $this->dialog= NULL; - set_object_info(); } } if (isset($_POST['edit_cancel']) && $this->dialog instanceOf tabs){ - if(isset($this->grouptab->dn)){ - $this->remove_lock(); - } + $this->remove_lock(); $this->dialog= NULL; set_object_info(); } @@ -195,7 +211,7 @@ class roleManagement extends plugin // Add departments if subsearch is disabled if(!$this->DivListRoles->SubSearch){ - $this->DivListRoles->AddDepartments($this->DivListRoles->selectedBase,4,1); + $this->DivListRoles->AddDepartments($this->DivListRoles->selectedBase,3,1); } $this->reload (); $this->DivListRoles->setEntries($this->roles); @@ -252,6 +268,14 @@ class roleManagement extends plugin function remove_lock() { + if (isset($this->dialog->dn)){ + del_lock ($this->dialog->dn); + }elseif(isset($this->dn) && !empty($this->dn) && $this->dn != "new"){ + del_lock($this->dn); + } + if(isset($this->dns) && is_array($this->dns) && count($this->dns)){ + del_lock($this->dns); + } } diff --git a/gosa-plugins/roleManagement/admin/roleManagement/roleGeneric.tpl b/gosa-plugins/roleManagement/admin/roleManagement/roleGeneric.tpl index ca1fc0c22..f99855100 100644 --- a/gosa-plugins/roleManagement/admin/roleManagement/roleGeneric.tpl +++ b/gosa-plugins/roleManagement/admin/roleManagement/roleGeneric.tpl @@ -1,60 +1,93 @@ - - - - - - - - - +
{t}cn{/t}: - {render acl=$cnACL} - - {/render} -
{t}description{/t}: - {render acl=$descriptionACL} - - {/render} -
- - - - - - - - - - - - - - -
-
- +
+ +

  + {t}Generic{/t} +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{t}Name{/t} + {render acl=$cnACL} + + {/render} +
{t}Description{/t} + {render acl=$descriptionACL} + + {/render} +
+
+ +
+
+ {render acl=$baseACL} + + {/render} + {render acl=$baseACL disable_picture='images/lists/folder_grey.png'} + + {/render} +

 


{t}X.121 Address{/t} + {render acl=$x121AddressACL} + + {/render} +
{t}Phone number{/t} + {render acl=$telephoneNumberACL} + + {/render} +
{t}Fax number{/t} + {render acl=$facsimileTelephoneNumberACL} + + {/render} +
+
-
-{render acl=$baseACL} -
+

  + {t}Occupants{/t} +

+ +{render acl=$roleOccupantACL} + {/render} -{render acl=$baseACL disable_picture='images/lists/folder_grey.png'} - +
+{render acl=$roleOccupantACL} +   +{/render} +{render acl=$roleOccupantACL} + {/render}
{t}x121Address{/t}: - {render acl=$x121AddressACL} - - {/render} -
{t}telephoneNumber{/t}: - {render acl=$telephoneNumberACL} - - {/render} -
{t}facsimileTelephoneNumber{/t}: - {render acl=$facsimileTelephoneNumberACL} - - {/render} -
+ diff --git a/gosa-plugins/roleManagement/html/images/new.png b/gosa-plugins/roleManagement/html/images/new.png new file mode 100644 index 0000000000000000000000000000000000000000..318715a4d05d33b8ca0a378ec1e32e0c47ff9d7d GIT binary patch literal 754 zcmVg*DM|&EWEVn-sIZGcmQj1Ex9FjVupsg! za)T}}5k2%0k#y0b9x97&nv_wxE|_JPEjROK)>as8=>onV>q@8rBjYl+8ybnmlJ;KZ0nYgDA>^rLPj*^B;(&)k0O(1Q0O%U+7q z^op!_AyWND#BsdWi~4Jb@~41+h_1^B_kD2V72J6Xng)*A;sV8-@BCxH-KE&W2dg}n zHW#1CC6W^wfw2s*S)kAchDp#96pU-lb-;uar|+!7(!AQf$5G#OGHun)rL)V6oJu5Z zZo4{PNhClu!ly8Jzk~K!N7D)^9bNd``SpUY9SG_7Z!K%fTeGprV4j}A=K;_{lqnyS zaL*8rOv!1r0LV)n`}~LKE?vybMYdTV3VjQ|-THb{_qw^f&tcClWWW#M7=$BWP+&?9 zsO=BmzzLL$udNq&3ZAnV zhD{Ik4ppiuv-G8CVbCHlI0#=p!pJB)PK|l$OkEYkIv{T^V1j$=psfd8i3O!!`~aB; z=1e>nZsC0C?&vh**>6qily5H}*yAR;Xya%H?*lAasURTz(?&Z+JyNO$+uOp(KR zhR4$sHYH)JNGFogBasS;c~ptsRuY<)J0x!8=cm$V=~)R(O&Q`&!YLj17)6<`)W=(i k{to}O#EryTiT>{Y0IQ!PB%1f>c>n+a07*qoM6N<$f@vOGQ2+n{ literal 0 HcmV?d00001 diff --git a/gosa-plugins/roleManagement/html/images/occupant.png b/gosa-plugins/roleManagement/html/images/occupant.png new file mode 100644 index 0000000000000000000000000000000000000000..8f69e2b998bb897869c8582b3fdd7836ae098a5e GIT binary patch literal 868 zcmV-q1DpJbP)^ywm&f$DH=SVyN;bVc}BS((D+0z{BHu6T{yRkFhPJMm-6JYH@Ts(d9%OCyn zp_s@_iYw_!aV2wAjHky%|7hP?K;{1V7w^eD^KgLWX`9*8mEe$mYDrq;o1343WFrJ< ziVx3#_aJ9D#x1_s6sYSyxa;VN1Md&STK3^Q?_8P~xOTSgo!$$n&uQ}NxKx4TK*5Bh zoyXJ4E^|}Bzir3y(GR|V{m^4k$+19^*c*H4*@jEoIA4AdUrP$V8>$x6O7KukCbLXp z^M&aCSKf%U_eLk@3m}025TI+ji5e&AY5JH(-9@<~5nr`g8Y^F}{^fkNDG+XM-I_Hm zEXTp)l0kr3bI4j1g6tt=93VgmujL_aSfuBE_zlPaC;;9_=bn8-!+RTbsMj_8J{3)s zv1=-}dV@fHk>cMWOfyW-w}o0~zCSs&@`sb*cLg9fKQ+_XvGcj7p6H2mL{uWWii*bd z^m%T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!C5Z%tjjFowmetjN3w7O}blr&?DLuH|w&%0^z}#bWMg0(Ev@V|)9at^NI#p~%5~?$?gNra?1DJ zGT=F{*dnlx(W;T@Xn|IY@uKTlgpe(A5o=Tr=T)VuDxOj`-`Waw&edSCQ$=6IzZ#(Z zz8^MCZlQFLXOO0lCyq@WpBvJKFen;=L#23#7OMk0m~~a!W`k#agMUksj(sG2_%)N) z9Sk&ZIm5og94CoWNHhYiIIS$mcQ^+K^P>BiJ0u6ztH+2VfJ&rv^28ES`x@h zZ543`3q_S)sOs4BMjtUC~Z`y4-0@O=SK za4Cygsbp`w&A8q}dx#4GP!Fgm!DZoLcVEmIj>{sfvp6PB!6;(56ihO{XtWohe2`PXNyrZ@S>|PxJ(}MFFj&5C-F<$C`<9912B^ci7S_8co4b2#+ZJ{TD2T^JMaL1# zs2iFw5nRkcmV87o0TaV97X3@XLt1(%;P^rSckp;cPyAl4HO+FWJIW`DyvSuo3roLx z>F35@>67|bYJSI2?s)%V*L+F)zY=h#eMSHG`Ck)ee}Qb-ZGQj&002ovPDHLkV1kzm BZ0i63 literal 0 HcmV?d00001 diff --git a/gosa-plugins/roleManagement/html/images/role.png b/gosa-plugins/roleManagement/html/images/role.png new file mode 100644 index 0000000000000000000000000000000000000000..3b82c19b683ca99f704e143a92d0f238eea5f4da GIT binary patch literal 778 zcmV+l1NHogP)s z6bjMS))u8w31iF&fumYPXfzr`QH1Atl*{Gwtyb$-mCNPq+S(e6i;D~m4bjg9fa5r9 zZ*NnrR+*ffG>+qB0hG1Y=JRgrK*xlV_e0-crrE)x@T-ODlUa!+^Hp%DnD5Ve)0JPREiaVaGthzLq4eBUPs0)ikwDTOhH`>AH^pvUvwebyC}1_me;i=ve3 z9to&Ysl?RO6k!-1I>=;Du8X!7yYnBHZZGrX>u0(9%zHFnI>*f$-}YXam^lB~>C;ch z%F4>EYPDK9vYVzUagw0Z6eEKD^cqoPiF*@c)Xuy~@XP1)YK^3L>9W55&DTH4;NalJ z>FMcrL?keW;qCHEL*O^5iledjoIr-SzM9&dkldCjB1f z4S4qe!e#jQkMc-;cj6Vt&3fwvvrELN_*RK9E_2p_=^%GDa&%xu%;Kp$r^H&YB z!(co{M*qZ*PVw(R>1-a(IQ;~EfTfbJUbu29{G!&qPvW`I+lTEG|7M%|XFnf&@YU)k z`>@$J!UKdkcshaJ#rz|a7oLh