Index: controlies/trunk/applications/controlies/models/menu.py
===================================================================
--- controlies/trunk/applications/controlies/models/menu.py	(revision 218)
+++ controlies/trunk/applications/controlies/models/menu.py	(revision 219)
@@ -32,7 +32,7 @@
             ('Usuarios', False, URL( 'usuarios', 'index' )),
             ('Grupos', False,URL( 'grupos', 'index' )),
             ('Servidores LTSP',False, URL( 'hosts', 'ltspservers' )),
-            ('Workstations', False,URL( 'workstations', 'index' )),
+            ('Workstations', False,URL( 'hosts', 'workstations' )),
             ('Clientes Ligeros', False,URL( 'thinclients', 'index' )),         
             #('Parámetros DHCP', False,URL( 'dhcpd', 'index' )),
 
Index: controlies/trunk/applications/controlies/controllers/hosts.py
===================================================================
--- controlies/trunk/applications/controlies/controllers/hosts.py	(revision 218)
+++ controlies/trunk/applications/controlies/controllers/hosts.py	(revision 219)
@@ -5,15 +5,6 @@
 #equivalente a list
     return dict(message="hello from hosts.py")
     
-@service.json    
-def getThinclientGroups():
-    l=conecta()
-    h = Hosts (l,"","","","")
-    response = h.getThinclientGroups()
-    l.close()
-    return dict(response=response)
-
-
 @service.json
 def getHostData():
     l=conecta()
@@ -36,7 +27,7 @@
 @auth.requires_login()
 def list():
     l=conecta()
-    h = Hosts (l,"","","","")
+    h = Hosts (l,"","","",request.vars['type_host'])
     a=request.vars
     response = h.list(a)    
     l.close()
@@ -46,9 +37,7 @@
 @auth.requires_login()
 def modify():
     l=conecta()
-    ip=''
-    if request.vars['type_host']!='thinclient':ip=request.vars['ip']
-    h = Hosts(l,request.vars['name'],ip,request.vars['mac'],request.vars['type_host'])
+    h = Hosts(l,request.vars['name'],request.vars['ip'],request.vars['mac'],request.vars['type_host'])
     response=h.process(request.vars['action'])
     l.close()
     return dict(response=response)
@@ -69,12 +58,6 @@
 def workstations():
     return dict()    
 
-def thinclients():
-    return dict()  
-    
-def form_thinclient():
-    return dict()
-
 def form_ltspserver():
     return dict()
 
Index: controlies/trunk/applications/controlies/modules/Hosts.py
===================================================================
--- controlies/trunk/applications/controlies/modules/Hosts.py	(revision 218)
+++ controlies/trunk/applications/controlies/modules/Hosts.py	(revision 219)
@@ -138,7 +138,7 @@
         type_host = args['type_host']
         
                         
-        if type_host == "ltsp":
+        if type_host == "ltsp-server-hosts":
             # Obtengo todos los elementos del nodo hosts
             #search = l.search("ou=hosts","cn=*",["cn","ipHostNumber","macAddress"])
             #filter = self.buildFilter(args)        
@@ -177,7 +177,7 @@
             result = sorted(rows, key=itemgetter(sortBy), reverse=reverseSort)
             return { "page":page, "total":totalPages, "records":len(rows), "rows":result[start:finish]  }       
         
-        elif type_host == "workstation":
+        elif type_host == "workstation-hosts":
             # Obtengo todos los elementos del nodo hosts
             #search = l.search("ou=hosts","cn=*",["cn","ipHostNumber","macAddress"])
             search = self.ldap.search("ou=hosts","cn=*",["cn","ipHostNumber","macAddress"])                 
@@ -257,7 +257,7 @@
         triplets.sort()
 		
         attr = [(ldap.MOD_REPLACE, 'nisNetgroupTriple', triplets )]
-        self.ldap.modify("cn=ltsp-server-hosts,ou=Netgroup", attr)
+        self.ldap.modify("cn="+self.type_host+",ou=Netgroup", attr)
             
         return "OK"
         
@@ -290,7 +290,7 @@
         triplets.sort()
             
         attr = [(ldap.MOD_REPLACE, 'nisNetgroupTriple', triplets )]
-        self.ldap.modify("cn=ltsp-server-hosts,ou=Netgroup", attr)
+        self.ldap.modify("cn="+self.type_host+",ou=Netgroup", attr)
 
         return "OK"     
 
@@ -359,7 +359,8 @@
         return { "groups":groups }      
 
     def getTriplets(self):
-        triplets = self.ldap.search("ou=Netgroup","cn=ltsp-server-hosts",["nisNetgroupTriple"])
+        triplets = self.ldap.search("ou=Netgroup","cn="+self.type_host+"",["nisNetgroupTriple"])
+        print triplets
         triplets = triplets [0][0][1]["nisNetgroupTriple"]
         return triplets
             
@@ -374,7 +375,7 @@
         return dataHost     
         
     def getLTSPServers (self):
-        triplets = self.ldap.search("ou=Netgroup","cn=ltsp-server-hosts",["nisNetgroupTriple"])
+        triplets = self.ldap.search("ou=Netgroup","cn="+self.type_host+"",["nisNetgroupTriple"])
         triplets = triplets [0][0][1]["nisNetgroupTriple"]
         hostnames=list()
             
Index: controlies/trunk/applications/controlies/views/hosts/workstations.html
===================================================================
--- controlies/trunk/applications/controlies/views/hosts/workstations.html	(revision 218)
+++ controlies/trunk/applications/controlies/views/hosts/workstations.html	(revision 219)
@@ -1,16 +1,15 @@
 {{extend 'layout_hosts.html'}}
 
+
 {{block camposgrid}}
-            colNames:['Nombre','IP','mac'],
-            colModel:[ 
-                {name:'cn',index:'cn', width:80, align:"center"},
-                {name:'ipHostNumber',index:'ipHostNumber', width:60, align:"center"},
-                {name:'macAddress',index:'macAddress', width:60, align:"center"}
-            ], 
-
-            postData:{type:'workstation'}, 
+            postData:{type_host:'workstation-hosts'}, 
             caption:"Workstations",
 {{end}}
+
+{{block edit2_form}}
+             jQuery.post('call/json/getHostData',{ cn:hid,type_host:'workstation-hosts' }, function(result) {
+{{end}}
+
 {{block edit3_form}}                                                          
                             title: "Modificar Workstation"
 {{end}}
@@ -18,6 +17,7 @@
 {{block add_host}}
             title: "Añadir Workstation"
 {{end}}
+
 {{block delete_host}}
-            jQuery.post("call/json/delete",{cn:cn,action:'delete',group:grupo,type:'workstation'}, function(data){
+            jQuery.post("call/json/delete",{cn:cn,action:'delete',type:'workstation-hosts'}, function(data){
 {{end}}
Index: controlies/trunk/applications/controlies/views/layout_hosts.html
===================================================================
--- controlies/trunk/applications/controlies/views/layout_hosts.html	(revision 218)
+++ controlies/trunk/applications/controlies/views/layout_hosts.html	(revision 219)
@@ -26,6 +26,11 @@
 
 
 <script type="text/javascript">  
+
+{{block vars_definition}} 
+
+{{end}}
+
     jQuery(function() {
         jQuery("#dialog-confirm").dialog({ autoOpen: false });
         jQuery("#dialog-alert").dialog({ autoOpen: false });
@@ -37,8 +42,7 @@
             data: "{}",
             datatype: 'json',
             mtype: 'GET',           
-            
-{{block camposgrid}}                               
+                                      
             colNames:['Nombre','IP','mac'],
             colModel:[ 
                 {name:'cn',index:'cn', width:80, align:"center"},
@@ -45,8 +49,9 @@
                 {name:'ipHostNumber',index:'ipHostNumber', width:60, align:"center"},
                 {name:'macAddress',index:'macAddress', width:60, align:"center"}
             ], 
-
-            postData:{type_host:'ltsp'}, 
+            
+{{block camposgrid}}    
+            postData:{type_host:'ltsp-server-hosts'}, 
             caption:"Servidores de Aula (LTSP)",
 {{end}} 
             rowNum:25,
@@ -104,84 +109,43 @@
             }
             return id;
     }        
-                
-                
-    function getCell (column) {
-        var rowid = jQuery("#list").jqGrid('getGridParam', 'selrow');
-        
-        if( rowid == null ){
-            jQuery( "#dialog-alert" ).dialog({
-                resizable: false,
-                height:150,
-                width:290,
-                modal: true,
-                buttons: { "Aceptar": function() { $( this ).dialog( "close" ); }}
-            }).dialog('open');
-            return false;
-        }
-        
-        var Cell = jQuery("#list").jqGrid('getCell', rowid, column);
-        
-        
-        return Cell;
-    }
-            
-    function getThinClientGroups(selected) {
-        jQuery.post('call/json/getThinclientGroups', function(result) {
+                                     
+	function modifyRecord(){
 
-                var selectGrupos = document.getElementById("group");                
-    
-                for (i=0;i<result.response.groups.length;i++) {
-                    var optn = document.createElement("option");
-                    optn.text = result.response.groups[i];
-                    optn.value = result.response.groups[i];
-                    if (selected==optn.text) 
-                        optn.selected = true;
-                    selectGrupos.options.add (optn);
-                }
-        });
-    }                
+		jQuery("#messageLoading").show();
+		
+		var hid = rowSelected();
+		if(hid==false)
+			return false;
 
-
-            function modifyRecord(){
-                var hid;
-                var group; 
-                jQuery("#messageLoading").show();
-                
-                var hid = rowSelected();
-                var group = getCell("groupName"); 
-                if(hid==false)
-                    return false;
-
-                jQuery("#dialog-form").html("").css("display","none");
-{{block edit_form}}                   
-                jQuery("#dialog-form").load("form_ltspserver.html", function() {
-{{end}}                     
-                    jQuery("#form_data #action").val("modify");
-                    jQuery("#form_data #name").attr("readonly","true");
-                    jQuery("#form_data #name").css("background-color","#DDD");
+		jQuery("#dialog-form").html("").css("display","none");   
+		jQuery("#dialog-form").load("form_ltspserver.html", function() {
+			jQuery("#form_data #action").val("modify");
+			jQuery("#form_data #name").attr("readonly","true");
+			jQuery("#form_data #name").css("background-color","#DDD");
 {{block edit2_form}}                       
-                    jQuery.post('call/json/getHostData',{ cn:hid,type_host:'ltsp' }, function(result) {
-                        jQuery("#form_data #name").val(result.response['cn']);
-                        jQuery("#form_data #ip").val(result.response['ip']);                        
-                        jQuery("#form_data #mac").val(result.response['mac']);                           
-{{end}}                        
-                        x = (jQuery(window).width()-300)/2;
-                        y = (jQuery(window).height()-500)/2;
-                        
-                        jQuery("#messageLoading").hide();
-                        
-                        jQuery("#dialog-form").dialog({
-                            resizable: false,
-                            modal: true,
-                            width: 300,
+			jQuery.post('call/json/getHostData',{ cn:hid,type_host:'ltsp-server-hosts' }, function(result) {
+{{end}}    						
+				jQuery("#form_data #name").val(result.response['cn']);
+				jQuery("#form_data #ip").val(result.response['ip']);                        
+				jQuery("#form_data #mac").val(result.response['mac']);                           
+			
+				x = (jQuery(window).width()-300)/2;
+				y = (jQuery(window).height()-500)/2;
+				
+				jQuery("#messageLoading").hide();
+				
+				jQuery("#dialog-form").dialog({
+					resizable: false,
+					modal: true,
+					width: 300,
 {{block edit3_form}}                                                          
-                            title: "Modificar Servidor de aula"
+					title: "Modificar Servidor de aula"
 {{end}}
-                        }).dialog('option', 'position', [x, y]);                        
-                    });            
-                });
-            }
+				}).dialog('option', 'position', [x, y]);                        
+			});            
+		});
+	}
 
 
 
@@ -188,9 +152,7 @@
     function addRecord(){
     
         jQuery("#dialog-form").html("");
-{{block edit_form}}        
         jQuery("#dialog-form").load("form_ltspserver.html", function() {
-{{end}}        
             jQuery("#form_data #action").val("add");
             jQuery("#form_data #messageForm").html("Todos los campos son obligatorios");                 
         });
@@ -213,12 +175,9 @@
 function deleteRecord(){
     
         var cn = rowSelected();
-        var grupo = getCell("groupName");
-
         if(cn==false)
             return false;    
     
-    
         jQuery( "#dialog-confirm" ).dialog({
             resizable: false,
             height:160,
@@ -227,7 +186,7 @@
             buttons: {
                 "Borrar": function() {
 {{block delete_host}}                
-                    jQuery.post("call/json/delete",{cn:cn,action:'delete',group:grupo,type_host:'ltsp'}, function(data){
+                    jQuery.post("call/json/delete",{cn:cn,action:'delete',type_host:'ltsp-server-hosts'}, function(data){
 {{end}}                    
                         jQuery("#dialog-confirm").dialog( "close" );
                         jQuery("#list").trigger("reloadGrid");
Index: controlies/trunk/applications/controlies/views/layout_form_hosts.html
===================================================================
--- controlies/trunk/applications/controlies/views/layout_form_hosts.html	(revision 218)
+++ controlies/trunk/applications/controlies/views/layout_form_hosts.html	(revision 219)
@@ -22,7 +22,6 @@
 {{block controlador}}               
         jQuery.post('call/json/modify', jQuery("#form_data").serialize(), function(result) {
 {{end}}        
-            //var result = $.parseJSON(data);
             switch(result.response){
                 case "OK":{
                     jQuery('#message').html("Operación realizada correctamente").css("color","green").effect("highlight", {"color":"yellow"}, 1000);
@@ -77,7 +76,7 @@
     <input type="hidden" id="action" name="action"/>
 {{block form_table}}    
    <input type="hidden" id="type_host" name="type_host" value="ltsp"/>
-    <p><span id="nameTag">Nombre del equipo:</span><br><input type="text" id="name" name="name" maxlength="20" onChange="searchUsername();"/></p>
+    <p><span id="nameTag">Nombre del equipo:</span><br><input type="text" id="name" name="name" maxlength="20"/></p>
     <p><span id="ipTag">Ip</span><br><input type="text" id="ip" name="ip" maxlength="15"/></p> 
     <p><span id="macTag">MAC</span><br><input type="text" id="mac" name="mac" maxlength="17"/></p>
 
