Code

* Folder fix
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 14 Apr 2008 12:24:44 +0000 (12:24 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 14 Apr 2008 12:24:44 +0000 (12:24 +0000)
* Added templatize template

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

13 files changed:
gosa-core/plugins/admin/acl/acl_role.tpl
gosa-core/plugins/admin/departments/class_divListDepartment.inc
gosa-core/plugins/admin/departments/generic.tpl
gosa-core/plugins/admin/groups/class_divListGroup.inc
gosa-core/plugins/admin/groups/generic.tpl
gosa-core/plugins/admin/ogroups/class_divListOGroup.inc
gosa-core/plugins/admin/ogroups/generic.tpl
gosa-core/plugins/admin/users/class_divListUsers.inc
gosa-core/plugins/admin/users/class_userManagement.inc
gosa-core/plugins/admin/users/templatize.tpl [new file with mode: 0644]
gosa-core/plugins/personal/generic/generic.tpl
gosa-core/plugins/personal/generic/multiple_generic.tpl
gosa-core/setup/setup_ldap.tpl

index 3dce4dc8a4bdd8bbead85d803f3bd4c3d862f052..bf4eda01338bf26e9ddf93776edb7c006c5b0688 100644 (file)
@@ -34,7 +34,7 @@
 {/render}
 
 {render acl=$baseACL disable_picture='images/lists/folder_grey.png'}
-               <input type="image" name="chooseBase" src="images/lists/folder.png" class="center" title="{t}Select a base{/t}">
+               <input type="image" name="chooseBase" src="images/lists/lists/folder.png" class="center" title="{t}Select a base{/t}">
 {/render}
 
        </td>
index 0abfb0d8b9680ad28b30cb44845ad833a0cdab5f..d33e817d36060a30537fe36b49a21c46487f709c 100644 (file)
@@ -216,7 +216,7 @@ class divListDepartment extends MultiSelectWindow
             "attach" => "style='width:20px;'");
       }
 
-      $field0 = array("string" => "<img src='images/".$non_empty."lists/folder.png' title='"._("department")."' alt='department'>", "attach" => "style='text-align:center;width:20px;'");
+      $field0 = array("string" => "<img src='images/".$non_empty."lists/lists/folder.png' title='"._("department")."' alt='department'>", "attach" => "style='text-align:center;width:20px;'");
       $field1 = array("string" => sprintf($linkopen,base64_encode($key),$val), "attach" => "style='' title='".$title."'");
       $field2 = array("string" => preg_replace("/%KEY%/", base64_encode($key), $actions), "attach" => "style='width:60px;border-right:0px;text-align:
           right;'");
@@ -227,7 +227,7 @@ class divListDepartment extends MultiSelectWindow
     /* Create summary string for list footer */
     $num_deps=count($list);
     $num_dep_str = _("Number of listed departments");
-    $str = "<img class='center' src='images/lists/folder.png'
+    $str = "<img class='center' src='images/lists/lists/folder.png'
               title='".$num_dep_str."' alt='".$num_dep_str."'>&nbsp;".$num_deps."&nbsp;&nbsp;&nbsp;&nbsp;";
     $this->set_List_Bottom_Info($str);
 
index 36921ad1e54f947e25a8d9b9aee9de7ca27bcc20..a1d42430eb1cc4aa0e375b644e879cc6096c4072 100644 (file)
@@ -42,7 +42,7 @@
 {/render}
 
 {render acl=$baseACL disable_picture='images/lists/folder_grey.png'}
-        <input type="image" name="chooseBase" src="images/lists/folder.png" class="center" title="{t}Select a base{/t}">
+        <input type="image" name="chooseBase" src="images/lists/lists/folder.png" class="center" title="{t}Select a base{/t}">
 {/render}
        </td>
        </tr>
index aec943a89de080ace9366b6281743735623aee9a..7122fa21204513ae50932e1ecb13804243d7726a 100644 (file)
@@ -366,7 +366,7 @@ class divListGroup extends MultiSelectWindow
 
     $str = "<img class='center' src='images/select_groups.png'
               title='".$num_grp_str."' alt='".$num_grp_str."'>&nbsp;".$num_grps."&nbsp;&nbsp;&nbsp;&nbsp;";
-    $str.= "<img class='center' src='images/lists/folder.png'
+    $str.= "<img class='center' src='images/lists/lists/folder.png'
               title='".$num_dep_str."' alt='".$num_dep_str."'>&nbsp;".$num_deps."&nbsp;&nbsp;&nbsp;&nbsp;";
 
     $this->set_List_Bottom_Info($str);
index aa6b61a2fdde3a2b1d05d1bfc5ea8c40bd45ea38..76df0b15062d1f738e7aad5388469c2abe9f249f 100644 (file)
@@ -46,7 +46,7 @@
 {/render}
 
 {render acl=$baseACL disable_picture='images/lists/folder_grey.png'}
-       <input type="image" name="chooseBase" src="images/lists/folder.png" class="center" title="{t}Select a base{/t}">
+       <input type="image" name="chooseBase" src="images/lists/lists/folder.png" class="center" title="{t}Select a base{/t}">
 {/render}
      </td>
     </tr>
index db7bae3f116882826a644680a13a515982d216f7..3c7fdf0ec78f66996eb6cd3e3d806e7f04db4a40 100644 (file)
@@ -353,7 +353,7 @@ class divListOGroup extends MultiSelectWindow
 
     $str = "<img class='center' src='images/select_ogroup.png'
               title='".$num_obj_str."' alt='".$num_obj_str."'>&nbsp;".$num_objs."&nbsp;&nbsp;&nbsp;&nbsp;";
-    $str.= "<img class='center' src='images/lists/folder.png'
+    $str.= "<img class='center' src='images/lists/lists/folder.png'
               title='".$num_dep_str."' alt='".$num_dep_str."'>&nbsp;".$num_deps."&nbsp;&nbsp;&nbsp;&nbsp;";
 
     $this->set_List_Bottom_Info($str);
index 19cb69cacf983878145dea3bd8617e9bbc9ffe02..a091d1747d34bfe5a9c83f56f94024b652d1c9ef 100644 (file)
@@ -31,7 +31,7 @@
       </select>
 {/render}
 {render acl=$baseACL disable_picture='images/lists/folder_grey.png'}
-      <input type="image" name="chooseBase" src="images/lists/folder.png" class="center" title="{t}Select a base{/t}">
+      <input type="image" name="chooseBase" src="images/lists/lists/folder.png" class="center" title="{t}Select a base{/t}">
 {/render}
      </td>
     </tr>
index ad94f6eb1ff405dfc92d0ce3bc0130ddc327c8b7..3c6a019f64d67ad2507272b8338a11de103f663d 100644 (file)
@@ -446,7 +446,7 @@ class divListUsers extends MultiSelectWindow
 
     $str = "<img class='center' src='images/select_user.png'
               title='".$num_user_str."' alt='".$num_user_str."'>&nbsp;".$num_users."&nbsp;&nbsp;&nbsp;&nbsp;";
-    $str.= "<img class='center' src='images/lists/folder.png'
+    $str.= "<img class='center' src='images/lists/lists/folder.png'
               title='".$num_dep_str."' alt='".$num_dep_str."'>&nbsp;".$num_deps."&nbsp;&nbsp;&nbsp;&nbsp;";
 
     $this->set_List_Bottom_Info($str);
index 7f29d036c7fbc33c5b28a65e391d82bd676c2234..7b9535cb4c9290d45c7063c74612d6ad471eaff5 100644 (file)
@@ -440,12 +440,14 @@ class userManagement extends plugin
     /********************
       Apply template to multiple entries requested, display confirm dialog
      ********************/
+
+
     # TODO: show dialog to choose
     #       * template
     #       * when the template is choosen refresh the list of
     #         available attributes with a checkbox - everything checked
     #       * when pressing apply do the stuff below
-    if ($s_action=="ttemplatize_multiple"){
+    if ($s_action=="templatize_multiple"){
       $ids = $this->list_get_selected_items();
       $this->dns = array();
       if(count($ids)){
@@ -459,20 +461,21 @@ class userManagement extends plugin
         }
       }
 
-      # Test stuff
-      foreach ($this->dns as $dn){
-
-        echo "Template test with '$dn'<br>";
-        $template_dn= "cn=super44 super44,ou=people,dc=gonicus,dc=de";
-        $usertab= new usertabs($this->config, $this->config->data['TABS']['USERTABS'], $dn);
-        $usertab->adapt_from_template($template_dn, array("sn", "givenName", "uid"));
-        $usertab->save();
-        unset ($usertab);
-        $usertab= NULL;
-      }
-
+      return($smarty->fetch(get_template_path('templatize.tpl', TRUE)));
     }
 
+# TODO: apply after we pressed some button
+#      foreach ($this->dns as $dn){
+#
+#        echo "Template test with '$dn'<br>";
+#        $template_dn= "cn=super44 super44,ou=people,dc=gonicus,dc=de";
+#        $usertab= new usertabs($this->config, $this->config->data['TABS']['USERTABS'], $dn);
+#        $usertab->adapt_from_template($template_dn, array("sn", "givenName", "uid"));
+#        $usertab->save();
+#        unset ($usertab);
+#        $usertab= NULL;
+#      }
+
 
     /********************
       Delete MULTIPLE entries requested, display confirm dialog
diff --git a/gosa-core/plugins/admin/users/templatize.tpl b/gosa-core/plugins/admin/users/templatize.tpl
new file mode 100644 (file)
index 0000000..3288ebf
--- /dev/null
@@ -0,0 +1,38 @@
+<div style="font-size:18px;">
+  {t}Applying a template to users{/t}
+</div>
+
+<p>
+ {t}Applying a template to several users will replace all user attributes defined in the template.{/t}
+</p>
+
+<p class="seperator">&nbsp;</p>
+
+<br>
+
+<table summary="" style="vertical-align:top; text-align:left;" cellpadding=4 border=0>
+  <tr>
+    <td><b><LABEL for="template">{t}Template{/t}</LABEL></b></td>
+    <td>
+      <select size="1" name="template" id="template">
+       {html_options options=$templates selected=$template}
+      </select>
+    </td>
+  </tr>
+</table>
+
+<br>
+<p class="plugbottom">
+  <input type=submit name="template_continue" value="{msgPool type=applyButton}">
+  &nbsp;
+  <input type=submit name="edit_cancel" value="{msgPool type=cancelButton}">
+</p>
+
+
+
+<!-- Place cursor -->
+<script language="JavaScript" type="text/javascript">
+  <!-- // First input field on page
+       focus_field('template');
+  -->
+</script>
index a0130e8f20cef539d1043ff28fef1aab80686b32..0f5c0cfd4d57dc389272bb32d867f4354bdb3bf4 100644 (file)
                </select>
 {/render}
 {render acl=$baseACL disable_picture='images/lists/folder_grey.png'}
-               <input type="image" name="chooseBase" src="images/lists/folder.png" class="center" title="{t}Select a base{/t}">
+               <input type="image" name="chooseBase" src="images/lists/lists/folder.png" class="center" title="{t}Select a base{/t}">
 {/render}
      </td>
     </tr>
index 06ed929ac786c43aaef95d42955078a54c4e6f6c..e8a1a21abaa148b114428b09be8598d477b39ebf 100644 (file)
@@ -53,7 +53,7 @@
       <select id="base" size="1" name="base" title="{t}Choose subtree to place user in{/t}">
        {html_options options=$bases selected=$base_select}
       </select>
-      <input type="image" name="chooseBase" src="images/lists/folder.png" class="center" title="{t}Select a base{/t}">
+      <input type="image" name="chooseBase" src="images/lists/lists/folder.png" class="center" title="{t}Select a base{/t}">
      </td>
     </tr>
    </table>
index 8c3788db8251a28254a61f5efb4c4a9cc0a8653e..93525a39e4cb1a5bf8cac56719115a04b81ce99e 100644 (file)
@@ -75,7 +75,7 @@
                <div class='step4_value'>
                        <input type='text' name='admin_given' maxlength='160' size='40' value='{$admin_given}'>
                        {if $append_base_to_admin_dn},{$base_to_append}{/if}
-                       <input type='image' class='center' src='images/lists/folder.png' title='{t}Select user{/t}' name='resolve_user' alt='{t}Select user{/t}'>
+                       <input type='image' class='center' src='images/lists/lists/folder.png' title='{t}Select user{/t}' name='resolve_user' alt='{t}Select user{/t}'>
                </div>
        </div>