Index: controlies/trunk/applications/controlies/controllers/usuarios.py
===================================================================
--- controlies/trunk/applications/controlies/controllers/usuarios.py	(revision 234)
+++ controlies/trunk/applications/controlies/controllers/usuarios.py	(revision 235)
@@ -69,7 +69,7 @@
 @auth.requires_login()   
 def create_home_directory():
     from applications.controlies.modules.SSHConnection import SSHConnection
-
+    print request.vars
     c = SSHConnection(request.vars['host'],request.vars['user'],request.vars['password'])
     response = c.process()
     
Index: controlies/trunk/applications/controlies/modules/Groups.py
===================================================================
--- controlies/trunk/applications/controlies/modules/Groups.py	(revision 234)
+++ controlies/trunk/applications/controlies/modules/Groups.py	(revision 235)
@@ -26,7 +26,7 @@
 
 import ldap
 import logging
-from math import ceil
+from math import floor
 from operator import itemgetter
 from Utils import Utils, LdapUtils
 
@@ -134,8 +134,12 @@
 				rows.append(row)				
 								
 			
-		if len(search) > 0:
-			totalPages = ceil( len(search) / int(limit) )
+		if len(rows) > 0:
+			totalPages = floor( len(rows) / int(limit) )
+			module = len(rows) % int(limit)
+
+			if module > 0:
+				totalPages = totalPages+1
 		else:
 			totalPages = 0
 
Index: controlies/trunk/applications/controlies/modules/Hosts.py
===================================================================
--- controlies/trunk/applications/controlies/modules/Hosts.py	(revision 234)
+++ controlies/trunk/applications/controlies/modules/Hosts.py	(revision 235)
@@ -27,7 +27,7 @@
 import ldap
 import logging
 import time
-from math import ceil
+from math import floor
 from operator import itemgetter
 from Utils import ValidationUtils
 
@@ -125,8 +125,6 @@
 
         # sort by field
         sortBy = args['sidx']
-        #if sortBy == "uid":
-            #sortBy = "id"
 
         # reverse Sort
         reverseSort = False
@@ -191,9 +189,14 @@
 				rows.append(row)
 
         if len(rows) > 0:
-            totalPages = ceil( len(rows) / int(limit) )
+            totalPages = floor( len(rows) / int(limit) )
+            module = len(rows) % int(limit)
+
+            if module > 0:
+				totalPages = totalPages+1
         else:
             totalPages = 0
+
         if page > totalPages:
             page = totalPages
 
Index: controlies/trunk/applications/controlies/modules/Users.py
===================================================================
--- controlies/trunk/applications/controlies/modules/Users.py	(revision 234)
+++ controlies/trunk/applications/controlies/modules/Users.py	(revision 235)
@@ -26,7 +26,7 @@
 import logging
 import hashlib
 import base64
-from math import ceil
+from math import floor
 from operator import itemgetter
 from Utils import Utils, LdapUtils
 
@@ -163,7 +163,11 @@
                     
         # grid parameters
         if len(rows) > 0:
-            totalPages = ceil( len(rows) / int(limit) )
+            totalPages = floor( len(rows) / int(limit) )
+            module = len(rows) % int(limit)
+
+            if module > 0:
+				totalPages = totalPages+1
         else:
             totalPages = 0
 
Index: controlies/trunk/applications/controlies/modules/Thinclients.py
===================================================================
--- controlies/trunk/applications/controlies/modules/Thinclients.py	(revision 234)
+++ controlies/trunk/applications/controlies/modules/Thinclients.py	(revision 235)
@@ -25,7 +25,7 @@
 import ldap
 import logging
 import time
-from math import ceil
+from math import floor
 from operator import itemgetter
 from Utils import ValidationUtils
 
@@ -143,9 +143,14 @@
 				rows.append(row)
 				
         if len(rows) > 0:
-            totalPages = ceil( len(rows) / int(limit) )
+            totalPages = floor( len(rows) / int(limit) )
+            module = len(rows) % int(limit)
+
+            if module > 0:
+				totalPages = totalPages+1
         else:
             totalPages = 0
+            
         if page > totalPages:
             page = totalPages
 			
Index: controlies/trunk/applications/controlies/views/usuarios/form_home_directory.html
===================================================================
--- controlies/trunk/applications/controlies/views/usuarios/form_home_directory.html	(revision 234)
+++ controlies/trunk/applications/controlies/views/usuarios/form_home_directory.html	(revision 235)
@@ -1,43 +1,40 @@
 <script language="javascript">
 
     jQuery(function() {
-        jQuery("#password").focus();
-        jQuery("#saveButton").button({ icons: { primary: "ui-icon-disk"}});
-        jQuery("#cancelButton")
+        jQuery("#form_dataNFS #password").focus();
+        jQuery("#form_dataNFS #saveButton").button({ icons: { primary: "ui-icon-disk"}});
+        jQuery("#form_dataNFS #cancelButton")
             .button({ icons: { primary: "ui-icon-close"}})
-            .click( function(){ jQuery('#dialog-form').dialog('close'); });
+            .click( function(){ jQuery('#dialog-form2').dialog('close'); });
     });
 
     function restartStyle(){
-        jQuery("#form_data p span").css("color","black");
+        jQuery("#form_dataNFS p span").css("color","black");
         jQuery('#message').html("");
     }
 
-    function send(){
+    function sendNFS(){
 
         restartStyle();
-        jQuery.post('call/json/create_home_directory', jQuery("#form_data").serialize(), function(result) {
-            //var result = $.parseJSON(data);
+        jQuery.post('call/json/create_home_directory', jQuery("#form_dataNFS").serialize(), function(result) {
             switch(result.response){
                 case "OK":{
-                    jQuery('#message').html("Operación realizada correctamente").css("color","green").effect("highlight", {"color":"yellow"}, 1000);
-                    setTimeout("$('#dialog-form').dialog('close')",1000);
-                    jQuery("#list").trigger("reloadGrid");
-                    createHomeDirectory();
+                    jQuery('#form_dataNFS #message').html("Operación realizada correctamente").css("color","green").effect("highlight", {"color":"yellow"}, 1000);
+                    setTimeout("$('#dialog-form2').dialog('close')",1000);
                     break;
                 }
                 case "failServer":{
-                    jQuery('#message').html("Falló la conexión con el servidor").effect("highlight", {"color":"yellow"}, 1000);
+                    jQuery('#form_dataNFS #message').html("Falló la conexión con el servidor").effect("highlight", {"color":"yellow"}, 1000);
                     break;
                 }
                 case "failAuth":{
-                    jQuery('#message').html("Falló la autenticación").effect("highlight", {"color":"yellow"}, 1000);
+                    jQuery('#form_dataNFS #message').html("Falló la autenticación").effect("highlight", {"color":"yellow"}, 1000);
                     break;
                 }                
                 default:{
-                    jQuery('#'+result.response+"Tag").css("color","red");
-                    jQuery('#'+result.response).effect("highlight", {"color":"yellow"}, 1000).focus();
-                    jQuery('#message').html("Hay campos vacíos o incorrectos").effect("slide");
+                    jQuery('#form_dataNFS #'+result.response+"Tag").css("color","red");
+                    jQuery('#form_dataNFS #'+result.response).effect("highlight", {"color":"yellow"}, 1000).focus();
+                    jQuery('#form_dataNFS #message').html("Hay campos vacíos o incorrectos").effect("slide");
                     break;
                 }
             }
@@ -46,27 +43,17 @@
         return false;
     }
 
-	function createHomeDirectory(){
-        if(jQuery("#form_data #action").val()=="add"){
-			if(jQuery("#form_data #homeDirectory").is(':checked')){
-				jQuery.post('call/json/searchUsername','name='+jQuery("#form_data #name").val()+'&surname='+jQuery("#form_data #surname").val(), function(data) {
-					//var result = $.parseJSON(data);
-					jQuery("#form_data #user").val(result.response);
-				});
-			}
-		}
-	}
-
 </script>
  
-<form id="form_data" onsubmit="return send();">
+<form id="form_dataNFS" onsubmit="return sendNFS();">
     <input type="hidden" id="action" name="action"/>   
-    <input type="hidden" id="type" name="type"/>     
+    <input type="hidden" id="type" name="type"/>
+    <input type="hidden" id="username" name="username"/>    
     <div>
     	<h3 style="text-align:center;">Versión Beta</h3>
 		<p style="text-align:center;">Para crear el directorio personal en el Servidor NFS necesitaré las credenciales<p>
         <div>
-            <p><span id="usernameTag">Directorio personal de</span><br><input type="text" id="username" name="username" style="background-color:#DDD;" readonly="true"/></p>   
+            <p><span id="nameTag">Directorio personal de</span><br><input type="text" id="name" name="name" style="background-color:#DDD;" readonly="true"/></p>   
             <p><span id="hostTag">Servidor NFS</span><br><input type="text" id="host" name="host" value="servidor"/></p>                    
             <p><span id="userTag">Usuario</span><br><input type="text" id="user" name="user" value="root"/></p>
             <p><span id="passwordTag">Contraseña</span><br><input type="text" id="password" name="password"/></p>
Index: controlies/trunk/applications/controlies/views/usuarios/form.html
===================================================================
--- controlies/trunk/applications/controlies/views/usuarios/form.html	(revision 234)
+++ controlies/trunk/applications/controlies/views/usuarios/form.html	(revision 235)
@@ -27,7 +27,6 @@
 					else{
 						setTimeout("$('#dialog-form').dialog('close')",1000);
 						jQuery("#list").trigger("reloadGrid");
-						//setTimeout("createHomeDirectory()",1000);
 					}
                     break;
                 }
Index: controlies/trunk/applications/controlies/views/usuarios/index.html
===================================================================
--- controlies/trunk/applications/controlies/views/usuarios/index.html	(revision 234)
+++ controlies/trunk/applications/controlies/views/usuarios/index.html	(revision 235)
@@ -5,7 +5,6 @@
 {{#response.files.append(URL('static','css/helper.css'))}}
 {{#response.files.append(URL('static','css/dropdown.css'))}}
 {{#response.files.append(URL('static','css/default.advanced.css'))}}
-
  
 {{extend 'layout.html'}}
 
@@ -22,6 +21,7 @@
         </div>
 
         <div id="dialog-form"></div>
+        <div id="dialog-form2"></div>        
 
         <div id="dialog-confirm" title="¿Borrar el registro seleccionado?" style="display:none;">
             <p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>Este elemento quedará permanentemente eliminado. ¿Está seguro?</p>
@@ -248,14 +248,16 @@
             });             
     }
 
-	function createHomeDirectory(username,type){				
-		jQuery("#dialog-form").load("form_home_directory.html", function() {
-			jQuery("#form_data #username").val(username+" ("+typeUser(type)+")");
-			jQuery("#form_data #type").val(type);					
+	function createHomeDirectory(username,type){	
+		setTimeout("$('#dialog-form').dialog('close')",200);
+		jQuery("#dialog-form2").load("form_home_directory.html", function() {
+			jQuery("#form_dataNFS #username").val(username);			
+			jQuery("#form_dataNFS #name").val(username+" ("+typeUser(type)+")");
+			jQuery("#form_dataNFS #type").val(type);					
 			x = (jQuery(window).width()-350)/2;
 			y = (jQuery(window).height()-500)/2;			
 	
-			jQuery("#dialog-form").dialog({
+			jQuery("#dialog-form2").dialog({
 				resizable: false,
 				position: top,
 				modal: true,
@@ -273,7 +275,6 @@
 	}
 </script>
 
-
 <script type="text/javascript">
   jQuery(document).ready(function(){  print_grid();}); 
 </script>
Index: controlies/trunk/debian/changelog
===================================================================
--- controlies/trunk/debian/changelog	(revision 234)
+++ controlies/trunk/debian/changelog	(revision 235)
@@ -1,3 +1,11 @@
+controlies (0.5-2) unstable; urgency=low
+
+  * Creación del directorio personal en el NFS al crear un nuevo usuario
+  * Corregido un bug en la paginación
+  * Corregido un bug en la modificación de la MAC en el nodo DHCP Config
+
+ -- Manuel Mora Gordillo <manuito@gmail.com>  Thu, 13 Oct 2011 16:30:00 +0200
+ 
 controlies (0.5-1) unstable; urgency=low
 
   * Añade LTSP Servers y Workstations a la rama ARPA
