Index: trunk/contactcenter/inc/class.so_main.inc.php
===================================================================
--- trunk/contactcenter/inc/class.so_main.inc.php	(revision 2)
+++ trunk/contactcenter/inc/class.so_main.inc.php	(revision 503)
@@ -205,44 +205,40 @@
 				}
 			}
-
-			$query = $query_main_select . $query_main_from . $query_main_where;
-
+			
+			if($table_main!='') { //Quando faço checkout e não incluo a tabela principal, a função precisa funcionar...
+				$query = $query_main_select . $query_main_from . $query_main_where;
+	
 //			echo 'Query in SO_Main CheckOut: "'.$query.'"<br>';
-			
-			if (!$this->db->query($query,__LINE__, __FILE__))
-			{
-				return false;
-			}
-			
-			if (!$this->db->next_record())
-			{
-				return false;
-			}
-			
-			reset($this->db_tables[$table_main]['fields']);
-
-			while (list(,$field_info) = each($this->db_tables[$table_main]['fields']))
-			{
-				$this->db_tables[$table_main]['fields'][$field_info['name']]['value'] = $this->db->f($field_info['name']);
-				$this->manage_fields($this->db_tables[$table_main]['fields'][$field_info['name']], 'sync');
-			}
-
+				
+				if ($this->db->query($query,__LINE__, __FILE__)) {
+					if ($this->db->next_record()) {
+						reset($this->db_tables[$table_main]['fields']);
+			
+						while (list(,$field_info) = each($this->db_tables[$table_main]['fields']))
+						{
+							$this->db_tables[$table_main]['fields'][$field_info['name']]['value'] = $this->db->f($field_info['name']);
+							$this->manage_fields($this->db_tables[$table_main]['fields'][$field_info['name']], 'sync');
+						}
+					}
+				}
+			}
+			//echo "\n\n\n".$query_multi_select;
 			foreach($query_multi_select as $table => $query)
 			{
+				
 				$query = $query_multi_select[$table] . $query_multi_from[$table] . $query_multi_where[$table];
 
-				if (!$this->db->query($query, __LINE__, __FILE__))
-				{
-					return false;
-				}
-				
-				$pos = 0;
-				while($this->db->next_record())
-				{
-					reset($this->db_tables[$table]['fields']);					
-					while (list(,$field_info) = each($this->db_tables[$table]['fields']))
-					{
-						$this->db_tables[$table]['fields'][$field_info['name']]['values'][$pos] = $this->db->f($field_info['name']);
-						$this->manage_fields($this->db_tables[$table]['fields'][$field_info['name']], 'sync', 'new');
+				//echo 'Query in SO_Main CheckOut: "'.$query.'"<br>';
+				if ($this->db->query($query, __LINE__, __FILE__)) {
+					$pos = 0;
+					while($this->db->next_record())
+					{
+						reset($this->db_tables[$table]['fields']);					
+						while (list(,$field_info) = each($this->db_tables[$table]['fields']))
+						{
+							$this->db_tables[$table]['fields'][$field_info['name']]['values'][$pos] = $this->db->f($field_info['name']);
+							$this->manage_fields($this->db_tables[$table]['fields'][$field_info['name']], 'sync', 'new');
+						}
+						$pos++;
 					}
 					$pos++;
Index: trunk/contactcenter/inc/class.so_contact.inc.php
===================================================================
--- trunk/contactcenter/inc/class.so_contact.inc.php	(revision 285)
+++ trunk/contactcenter/inc/class.so_contact.inc.php	(revision 503)
@@ -256,4 +256,36 @@
 				)
 			);
+			$this->relateds	= array(
+					'id_related'	=> array(
+						'name'			=> 'id_related',
+						'type'			=> array('foreign', 'primary'),
+						'association'	=> array(
+							'table'			=> 'phpgw_cc_contact',
+							'field'			=> 'id_contact'
+						),
+						'states' 		=>	array(),
+						'values'	=> array()
+					),
+					'id_contact'	=> array(
+						'name'			=> 'id_contact',
+						'type'			=> array('foreign', 'primary'),
+						'association'	=> array(
+							'table'			=> 'phpgw_cc_contact',
+							'field'			=> 'id_contact'
+						),
+						'states' 		=>	array(),
+						'values'	=> array()
+					),
+					'id_typeof_contact_relation'	=> array(
+						'name'			=> 'id_typeof_contact_relation',
+						'type'			=> array('foreign', 'primary'),
+						'association'	=> array(
+							'table'			=> 'phpgw_cc_typeof_ct_rels',
+							'field'			=> 'id_typeof_contact_relation'
+						),
+						'states' 		=>	array(),
+						'values'	=> array()
+					)
+				);
 				
 
@@ -320,4 +352,23 @@
 					$this->state = 'new';
 				}
+				$temp = $this->db_tables;
+			
+				$this->db_tables = array(); //Limpo o array para fazer checkout apenas dos contatos relacionados
+				$this->db_tables['phpgw_cc_contact_rels'] =  array(
+						'type'		=> 'multi',
+						'keys'		=> array(
+							'primary' => array(
+								&$this->relateds['id_related']),
+								&$this->relateds['id_contact'],
+							'foreign' => array(
+								&$this->relateds['id_related'])),
+								&$this->relateds['id_contact'],
+						'fields' 	=> & $this->relateds);
+				if (!$this->checkout($id_contact))
+				{
+					$this->reset_values();
+					$this->state = 'new';
+				}
+				$this->db_tables = $temp; //Coloco o valor do array antigo.
 			}
 			else
@@ -500,4 +551,17 @@
 			}
 			
+			return $return;
+		}
+	
+		function get_relateds() {
+			$return = array();
+			
+			reset($this->relateds['id_contact']['values']);
+			reset($this->relateds['id_typeof_contact_relation']['values']);
+			while(list(,$id_relation) = each($this->relateds['id_contact']['values']) and
+				list(,$id_relation_type) = each($this->relateds['id_typeof_contact_relation']['values']))
+			{
+				$return[$id_relation] = $id_relation_type;
+			}
 			return $return;
 		}
@@ -806,4 +870,33 @@
 	
 		/*!
+			@function set_related
+			@abstract Sets the Contact's related
+			@author Raphael Derosso Pereira
+			@param integer $id_related The new Contact's Relation type ID
+			@param integer $id_type The new Contact's Relation ID 
+
+		*/
+		function set_relateds ( $relations , $id_type )
+		{
+			$id = $this->id;
+			$db = $GLOBALS['phpgw']->db;
+
+			//Remove todos os contatos relacionados
+			$query = "delete from phpgw_cc_contact_rels where id_related=$id and id_typeof_contact_relation=1";
+			
+			if (!$db->query($query, __LINE__, __FILE__)) {
+				return false;
+			}
+			foreach($relations as $id_relation) {
+				$query = "insert into phpgw_cc_contact_rels (id_contact,id_related,id_typeof_contact_relation) values ($id_relation,$id,$id_type)";
+				
+				if (!$db->query($query, __LINE__, __FILE__)) {
+					return false;
+				}
+			}
+			return true;
+		}
+	
+		/*!
 		
 			@function set_address
@@ -831,4 +924,5 @@
 			$this->manage_fields($this->addresses['id_address'], 'new', 'new');
 			$this->manage_fields($this->addresses['id_contact'], 'new', 'new');
+			
 		}
 	
Index: trunk/contactcenter/inc/class.ui_data.inc.php
===================================================================
--- trunk/contactcenter/inc/class.ui_data.inc.php	(revision 418)
+++ trunk/contactcenter/inc/class.ui_data.inc.php	(revision 503)
@@ -70,4 +70,6 @@
 			if($this->page_info['actual_catalog']['class'] == 'bo_group_manager')
 				$this -> typeContact = 'groups';
+			else if($this->page_info['actual_catalog']['class'] == 'bo_shared_catalog_manager')
+				$this -> typeContact = 'shared';
 			else
 				$this -> typeContact = 'contacts';
@@ -147,4 +149,5 @@
 			
 			/* Messages */
+			$GLOBALS['phpgw']->template->set_var('cc_msg_not_allowed',lang('Not Allowed'));
 			$GLOBALS['phpgw']->template->set_var('cc_msg_no_cards',lang('No Cards'));
 			$GLOBALS['phpgw']->template->set_var('cc_msg_err_no_room',lang('No Room for Cards! Increase your browser area.'));
@@ -299,5 +302,5 @@
 				/* Full Add Methods */
 				case 'get_full_data':
-					return $this->get_full_data($_GET['id']);
+					return $this->get_full_data($_GET['id'],$_GET['catalog']);
 				
 				case 'get_group':
@@ -577,7 +580,89 @@
 				unset($ids);
 				$this->page_info['changed'] = false;
-				 
+
 				switch ($this->page_info['actual_catalog']['class'])
 				{
+					case 'bo_shared_catalog_manager':
+						$field_name = 'id_contact';
+
+						if ($letter !== 'number')
+						{
+							$find_restric[0] = array(
+								0 => array(
+									'field' => 'contact.names_ordered',
+									'type'  => 'iLIKE',
+									'value' => $letter !== 'all' ? $letter.'%' : '%'
+								)
+							);
+						}
+						else
+						{
+							$find_restric[0] = array(
+								0 => array(
+									'type'  => 'branch',
+									'value' => 'OR',
+									'sub_branch' => array(
+										0 => array(
+											'field' => 'contact.names_ordered',
+											'type'  => 'LIKE',
+											'value' => '0%'
+										),
+										1 => array(
+											'field' => 'contact.names_ordered',
+											'type'  => 'LIKE',
+											'value' => '1%'
+										),
+										2 => array(
+											'field' => 'contact.names_ordered',
+											'type'  => 'LIKE',
+											'value' => '2%'
+										),
+										3 => array(
+											'field' => 'contact.names_ordered',
+											'type'  => 'LIKE',
+											'value' => '3%'
+										),
+										4 => array(
+											'field' => 'contact.names_ordered',
+											'type'  => 'LIKE',
+											'value' => '4%'
+										),
+										5 => array(
+											'field' => 'contact.names_ordered',
+											'type'  => 'LIKE',
+											'value' => '5%'
+										),
+										6 => array(
+											'field' => 'contact.names_ordered',
+											'type'  => 'LIKE',
+											'value' => '6%'
+										),
+										7 => array(
+											'field' => 'contact.names_ordered',
+											'type'  => 'LIKE',
+											'value' => '7%'
+										),
+										8 => array(
+											'field' => 'contact.names_ordered',
+											'type'  => 'LIKE',
+											'value' => '8%'
+										),
+										9 => array(
+											'field' => 'contact.names_ordered',
+											'type'  => 'LIKE',
+											'value' => '9%'
+										)
+									)
+								)
+							);
+						}
+						
+						$find_field[0] = array('contact.id_contact','contact.names_ordered');
+						
+						$find_other[0] = array(
+							'order'  => 'contact.names_ordered'
+						);
+						
+						break;
 					case 'bo_people_catalog':
 						$field_name = 'id_contact';
@@ -983,5 +1068,8 @@
 					foreach ($result as $id => $value)
 					{
-						$this->page_info['actual_entries'][] = $value[$field_name];
+						if($this->page_info['actual_catalog']['class'] != 'bo_shared_catalog_manager')
+							$this->page_info['actual_entries'][] = $value[$field_name];
+						else
+							$this->page_info['actual_entries'][] = array(0=>$value[$field_name],1=>$value['perms']);
 					} 
 					//print_r($this->page_info['actual_entries']);
@@ -1061,13 +1149,20 @@
 				///---------------- Correção Temporária PHP5 -----------------------///
 				$ids = array();
+				$perms = array();
 				$array_temp = array();			
 								
 				foreach($this->page_info['actual_entries'] as $key=>$tmp){
-					$array_temp[] = $tmp;				
+						$array_temp[] = $tmp;				
 				}	
 				
 				for($i = $id_i; $i < $id_f and $i < $n_entries; $i++)
 				{
-					$ids[] = $array_temp[$i];
+					if($this->page_info['actual_catalog']['class'] != 'bo_shared_catalog_manager')
+						$ids[] = $array_temp[$i];
+					else {
+						$ids[] = $array_temp[$i][0];
+						$perms[] = $array_temp[$i][1];
+					}
+					//$perms[] = $array_temp[$i];
 				}
 				
@@ -1121,4 +1216,5 @@
 					return;					
 				}
+				$final[10] = $this -> typeContact;
 				
 				$fields['photo'] = true;
@@ -1202,6 +1298,10 @@
 
 					//	If contact is a public list, then load the forwarding addresses.
-						if($contact['account_type'][0] == 'l' || $contact['account_type'][0] == 'i')
+						if($contact['account_type'][0] == 'l')
 							$final[3][$i][7] = array();
+							
+						if($this->page_info['actual_catalog']['class']=='bo_shared_catalog_manager') {
+							$final[3][$i][8] = $perms[$i];
+						}
 
 						$final[4][$i] = $contact['photo'] ? 1  : 0;
@@ -1287,8 +1387,8 @@
 		
 		*/
-		function get_full_data($id)
+		function get_full_data($id,$catalog='bo_people_catalog')
 		{
 			$dateformat = $GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
-			$this->bo->catalog = CreateObject('contactcenter.bo_people_catalog');		
+			$this->bo->catalog = CreateObject('contactcenter.'.$catalog);		
 			$fields = $this->bo->catalog->get_fields(true);
 			$fields['photo'] = false;
@@ -2214,5 +2314,6 @@
 			// Support search parameters with accentuation
 			if ($this->page_info['actual_catalog']['class'] != 'bo_people_catalog' &&
-				$this->page_info['actual_catalog']['class'] != 'bo_group_manager')
+				$this->page_info['actual_catalog']['class'] != 'bo_group_manager' &&
+				$this->page_info['actual_catalog']['class'] != 'bo_shared_catalog_manager')
 			{
 
@@ -2247,5 +2348,6 @@
 
 				if (!$external && $this->page_info['actual_catalog']['class'] != 'bo_people_catalog' &&
-					$this->page_info['actual_catalog']['class'] != 'bo_group_manager')
+					$this->page_info['actual_catalog']['class'] != 'bo_group_manager' &&
+					$this->page_info['actual_catalog']['class'] != 'bo_shared_catalog_manager')
 				{
 					/*
@@ -2292,5 +2394,6 @@
 
 			if ($external || $this->page_info['actual_catalog']['class'] == 'bo_people_catalog' ||
-				$this->page_info['actual_catalog']['class'] == 'bo_group_manager')
+				$this->page_info['actual_catalog']['class'] == 'bo_group_manager' ||
+				$this->page_info['actual_catalog']['class'] == 'bo_shared_catalog_manager')
 			{
 				// Get only this attributes: dn, cn for external catalogs,
@@ -2324,5 +2427,8 @@
             foreach ($ids as $e_info)
             {
-                $ids_f[] = $e_info[$id_field];
+				if($this->page_info['actual_catalog']['class'] != 'bo_shared_catalog_manager')
+                	$ids_f[] = $e_info[$id_field];
+                else
+                	$ids_f[] = array(0=>$e_info[$id_field],1=>$e_info['perms']);
             }
 
Index: trunk/contactcenter/js/cc.js
===================================================================
--- trunk/contactcenter/js/cc.js	(revision 294)
+++ trunk/contactcenter/js/cc.js	(revision 503)
@@ -184,5 +184,9 @@
 function editContact (id){
 	openFullAdd();
-	populateFullEdit(id);
+	populateFullEdit(id,'bo_people_catalog');
+}
+function editSharedContact (id){
+	openFullAdd();
+	populateFullEdit(id,'bo_shared_catalog_manager');
 }
 /************ Edit Group *************/
@@ -277,5 +281,5 @@
 }
 
-function populateFullEdit (id)
+function populateFullEdit (id,catalog)
 {
 	var handler = function(responseText)
@@ -298,5 +302,5 @@
 	};
 
-	Connector.newRequest('populateFullEdit', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=get_full_data&id=' + id, 'GET', handler);
+	Connector.newRequest('populateFullEdit', '../index.php?menuaction=contactcenter.ui_data.data_manager&method=get_full_data&id=' + id + "&catalog="+catalog, 'GET', handler);
 }
 
@@ -1970,5 +1974,18 @@
 					}
 				}
-	
+				if (type == "shared") {
+					if (data[3][pos][8] & 4) 
+						eval("document.getElementById(id + ':cc_card_edit').onclick = function(){editSharedContact(Element('"+id+"' + ':cc_id').value);};");
+					else 
+						document.getElementById(id + ':cc_card_edit').onclick = function(){
+							alert(Element('cc_msg_not_allowed').value);
+						};
+					if (data[3][pos][8] & 8) 
+						eval("document.getElementById(id + ':cc_card_remove').onclick = function(){removeEntry(Element('" + id + "' + ':cc_id').value);};");
+					else 
+						document.getElementById(id + ':cc_card_remove').onclick = function(){
+							alert(Element('cc_msg_not_allowed').value);
+						};
+				}
 				if (--ncards == 0)
 				{
@@ -2122,6 +2139,18 @@
 function getCardHTML (id, type)
 {
-		if(type != 'groups') {
-		
+		if(type == 'groups') {
+			html_card = '<td id="' + id + '" style="width: ' + CC_card_image_width + 'px; height: ' + CC_card_image_height + '">' +
+            '<div style="border: 0px solid #999; position: relative;">' + 
+				'<img src="templates/default/images/card.png" border="0" width="' + CC_card_image_width +'" height="' + CC_card_image_height + '"i ondblclick="editContact(Element(\'' + id + ':cc_id\').value);">' +
+				'<img title="'+Element('cc_msg_group_edit').value+'" id="' + id + ':cc_card_edit" style="position: absolute; top: 35px; left: 222px; width: 18px; height: 18px; cursor: pointer; cursor: hand; z-index: 1" onclick="editGroup(Element(\'' + id + ':cc_id\').value);" onmouseover="resizeIcon(\''+id+':cc_card_edit\',0)" onmouseout="resizeIcon(\''+id+':cc_card_edit\',1)" src="templates/default/images/cc_card_edit.png">' +
+				'<img title="'+Element('cc_msg_group_remove').value+'" id="' + id + ':cc_card_remove" style="position: absolute; top: 78px; left: 223px; width: 15px; height: 14px; cursor: pointer; cursor: hand; z-index: 1" onclick="removeEntry(Element(\'' + id + ':cc_id\').value,\'groups\');" onmouseover="resizeIcon(\''+id+':cc_card_remove\',0)" onmouseout="resizeIcon(\''+id+':cc_card_remove\',1)" src="templates/default/images/cc_x.png">' + 
+				'<span id="' + id + ':cc_title" style="position: absolute; top: 30px; left: 75px; width: 135px; border: 0px solid #999; font-weight: bold; font-size: 10px; text-align: center; height: 10px;" onmouseover="//Element(\''+id+':cc_name_full\').style.visibility=\'visible\'" onmouseout="//Element(\''+id+':cc_name_full\').style.visibility=\'hidden\'"></span>' +
+				'<span id="' + id + ':cc_participantes" style="cursor: pointer; cursor: hand; z-index: 1;position: absolute; top: 15px; left: 15px"></span>' +
+				'<span onMouseOver="this.title = \''+Element('cc_send_mail').value+' => '+'\'+document.getElementById(\''+id + ':cc_title\').innerHTML" id="' + id + ':cc_short_name" style="position: absolute; top: 105px; left: 75px; width: 135px; border: 0px solid #999; font-weight: normal; font-size: 10px; text-align: center; height: 10px;"></span>' +
+				'<input id="' + id + ':cc_id" type="hidden">' +
+			'</div>' + '</td>';
+		
+		}
+		else {
 			html_card = '<td id="' + id + '" style="width: ' + CC_card_image_width + 'px; height: ' + CC_card_image_height + '">' +
 				'<div style="border: 0px solid #999; position: relative;">' +
@@ -2142,16 +2171,4 @@
 					'<input id="' + id + ':cc_id" type="hidden">' +
 				'</div>' + '</td>';
-		
-		} else {
-			html_card = '<td id="' + id + '" style="width: ' + CC_card_image_width + 'px; height: ' + CC_card_image_height + '">' +
-            '<div style="border: 0px solid #999; position: relative;">' + 
-				'<img src="templates/default/images/card.png" border="0" width="' + CC_card_image_width +'" height="' + CC_card_image_height + '"i ondblclick="editContact(Element(\'' + id + ':cc_id\').value);">' +
-				'<img title="'+Element('cc_msg_group_edit').value+'" id="' + id + ':cc_card_edit" style="position: absolute; top: 35px; left: 222px; width: 18px; height: 18px; cursor: pointer; cursor: hand; z-index: 1" onclick="editGroup(Element(\'' + id + ':cc_id\').value);" onmouseover="resizeIcon(\''+id+':cc_card_edit\',0)" onmouseout="resizeIcon(\''+id+':cc_card_edit\',1)" src="templates/default/images/cc_card_edit.png">' +
-				'<img title="'+Element('cc_msg_group_remove').value+'" id="' + id + ':cc_card_remove" style="position: absolute; top: 78px; left: 223px; width: 15px; height: 14px; cursor: pointer; cursor: hand; z-index: 1" onclick="removeEntry(Element(\'' + id + ':cc_id\').value,\'groups\');" onmouseover="resizeIcon(\''+id+':cc_card_remove\',0)" onmouseout="resizeIcon(\''+id+':cc_card_remove\',1)" src="templates/default/images/cc_x.png">' + 
-				'<span id="' + id + ':cc_title" style="position: absolute; top: 30px; left: 75px; width: 135px; border: 0px solid #999; font-weight: bold; font-size: 10px; text-align: center; height: 10px;" onmouseover="//Element(\''+id+':cc_name_full\').style.visibility=\'visible\'" onmouseout="//Element(\''+id+':cc_name_full\').style.visibility=\'hidden\'"></span>' +
-				'<span id="' + id + ':cc_participantes" style="cursor: pointer; cursor: hand; z-index: 1;position: absolute; top: 15px; left: 15px"></span>' +
-				'<span onMouseOver="this.title = \''+Element('cc_send_mail').value+' => '+'\'+document.getElementById(\''+id + ':cc_title\').innerHTML" id="' + id + ':cc_short_name" style="position: absolute; top: 105px; left: 75px; width: 135px; border: 0px solid #999; font-weight: normal; font-size: 10px; text-align: center; height: 10px;"></span>' +
-				'<input id="' + id + ':cc_id" type="hidden">' +
-			'</div>' + '</td>';
 		}
 	
@@ -2167,7 +2184,19 @@
 			else
 				bg = "this.style.background=\'#EEEEEE\'";
+			if(type == 'groups') {
+				html_card = '<tr width="40%" id="' + id + '" onmouseout="'+bg+'" onmouseover="this.style.background=\'LIGHTYELLOW\'" bgcolor="EEEEEE"><td width="auto" style="font-weight: normal; font-size: 10px; text-align: left; height: 10px;">' +
+					'<span id="' + id + ':cc_participantes" style="cursor: pointer; cursor: hand; z-index: 1"></span>' +
+					'<span id="' + id + ':cc_title"></span></td>' +
+					'<td width="40%" style="solid #999; font-weight: normal; font-size: 10px; text-align: left; height: 10px"><span onMouseOver="this.title = \''+Element('cc_send_mail').value+' => '+'\'+document.getElementById(\''+id + ':cc_title\').innerHTML"  id="' + id + ':cc_short_name"></span></td>' +
+					'<td align="left" width="55px">'+
+					'<img  title="'+Element('cc_msg_group_edit').value+'" id="' + id + ':cc_card_edit" style=" cursor: pointer; cursor: hand; z-index: 1;width: 18px; height: 18px;"  onclick="editGroup(Element(\'' + id + ':cc_id\').value);" src="templates/default/images/cc_card_edit.png">' +
+					'&nbsp;&nbsp;|&nbsp;&nbsp;'+
+					'<img  title="'+Element('cc_msg_group_remove').value+'" id="' + id + ':cc_card_remove" style="width: 15px; height: 14px; cursor: pointer; cursor: hand; z-index: 1" onclick="removeEntry(Element(\'' + id + ':cc_id\').value,\'groups\');" src="templates/default/images/cc_x.png">'  +
+					'<input id="' + id + ':cc_id" type="hidden">'+										
+					'</td></tr>';
 						
-			if(type != 'groups') {
 			
+			}
+			else {
 				html_card = '<tr  style="height:20px" id="' + id + '" onmouseout="'+bg+'" onmouseover="this.style.background=\'LIGHTYELLOW\'" bgcolor="EEEEEE"><td width="auto" style="font-weight: normal; font-size: 10px; text-align: left; height: 10px;">' +					
 					'<span valign="bottom" id="' + id + ':cc_icon_group">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span id="' + id + ':cc_name"></span></td>' +
@@ -2189,16 +2218,4 @@
 					'</td></tr>';
 			}
-			else {
-				html_card = '<tr width="40%" id="' + id + '" onmouseout="'+bg+'" onmouseover="this.style.background=\'LIGHTYELLOW\'" bgcolor="EEEEEE"><td width="auto" style="font-weight: normal; font-size: 10px; text-align: left; height: 10px;">' +
-					'<span id="' + id + ':cc_participantes" style="cursor: pointer; cursor: hand; z-index: 1"></span>' +
-					'<span id="' + id + ':cc_title"></span></td>' +
-					'<td width="40%" style="solid #999; font-weight: normal; font-size: 10px; text-align: left; height: 10px"><span onMouseOver="this.title = \''+Element('cc_send_mail').value+' => '+'\'+document.getElementById(\''+id + ':cc_title\').innerHTML"  id="' + id + ':cc_short_name"></span></td>' +
-					'<td align="left" width="55px">'+
-					'<img  title="'+Element('cc_msg_group_edit').value+'" id="' + id + ':cc_card_edit" style=" cursor: pointer; cursor: hand; z-index: 1;width: 18px; height: 18px;"  onclick="editGroup(Element(\'' + id + ':cc_id\').value);" src="templates/default/images/cc_card_edit.png">' +
-					'&nbsp;&nbsp;|&nbsp;&nbsp;'+
-					'<img  title="'+Element('cc_msg_group_remove').value+'" id="' + id + ':cc_card_remove" style="width: 15px; height: 14px; cursor: pointer; cursor: hand; z-index: 1" onclick="removeEntry(Element(\'' + id + ':cc_id\').value,\'groups\');" src="templates/default/images/cc_x.png">'  +
-					'<input id="' + id + ':cc_id" type="hidden">'+										
-					'</td></tr>';
-			}
 
 	return html_card;
@@ -2228,5 +2245,5 @@
 			html_cards += '';
 		}
-		if((ccTree.catalog_perms & 2) && type != 'groups')
+		if((ccTree.catalog_perms & 2) && type != 'groups' && type!='shared')
 			html_cards += '<tr><td colspan=4 align="right"><button id="cc_button_tools" value="" type="button" onclick="javascript:removeAllEntries()">Remover Todos</button></td></tr>';
 	}	
@@ -2267,5 +2284,5 @@
 			html_cards += '</tr>';
 		}
-		if((ccTree.catalog_perms & 2) && type != 'groups')
+		if((ccTree.catalog_perms & 2) && type != 'groups' && type!='shared')
 			html_cards += '<tr><td colspan=3 align="right"><button id="cc_button_tools" value="" type="button" onclick="javascript:removeAllEntries()">Remover Todos</button></td></tr>';
 	}	
