Projeto

Geral

Perfil

ajuste_lista_usuarios_compartilhamento_agenda.diff

Anderson Tadayuki Saikawa, 19/06/2020 12:00 h

Baixar (6,14 KB)

Ver diferenças:

phpgwapi/inc/class.accounts.inc.php
664 664
			return $account_type[$account_id] = accounts_::get_type($account_id);
665 665
		}
666 666

  
667
		function get_account_name($accountid,&$lid,&$fname,&$lname)
667
		function get_account_name($accountid,&$lid,&$fname,&$lname,&$mail)
668 668
		{
669 669
			$this->setup_cache();
670 670
			$account_name = &$this->cache['account_name'];
......
677 677
				$lname = $account_name[$account_id]['lname'];
678 678
				return $account_name[$account_id] !== False;
679 679
			}
680
			$Ok = accounts_::get_account_name($accountid,$lid,$fname,$lname);
680
			$Ok = accounts_::get_account_name($accountid,$lid,$fname,$lname,$mail);
681 681

  
682 682
			$account_name[$account_id] = array(
683 683
				'lid' => $lid,
684 684
				'fname' => $fname,
685 685
				'lname' => $lname,
686
				'mail' => $mail,
686 687
			);
687 688
			return $Ok;
688 689
		}
phpgwapi/inc/class.accounts_ldap.inc.php
1102 1102
			return $accountid;
1103 1103
		} /* end auto_add() */
1104 1104

  
1105
		function get_account_name($account_id,&$lid,&$fname,&$lname)
1105
		function get_account_name($account_id,&$lid,&$fname,&$lname,&$mail)
1106 1106
		{
1107 1107
			$acct_type = $this->get_type($account_id);
1108 1108

  
1109 1109
			/* jakjr: using justthese with ldap_search */
1110
			$justthese = array("cn","uid","givenname","sn");
1110
			$justthese = array("cn","uid","givenname","sn","mail");
1111 1111

  
1112 1112
			/* search the dn for the given uid */
1113 1113
			if(($acct_type == 'g') && $this->group_context)
......
1133 1133
				$lid   = $GLOBALS['phpgw']->translation->convert($allValues[0]['uid'][0],'utf-8');
1134 1134
				$fname = $GLOBALS['phpgw']->translation->convert($allValues[0]['givenname'][0],'utf-8');
1135 1135
				$lname = $GLOBALS['phpgw']->translation->convert($allValues[0]['sn'][0],'utf-8');
1136
				$mail  = $GLOBALS['phpgw']->translation->convert($allValues[0]['mail'][0],'utf-8');
1136 1137
			}
1137 1138
			return !empty($lid);
1138 1139
		}
phpgwapi/templates/default/js/listUsers.js
200 200
		}
201 201
		selectOpener.options[selectOpener.options.length-1].selected = true;
202 202
		execAction('LOAD');
203
 	} 	
203
 	} 	
phpgwapi/templates/default/listUsers.php
114 114
	// Monta lista de Grupos e Usu?rios
115 115
	$users = Array();
116 116
	$groups = Array();
117
	$justthese = array("phpgwaccountvisible","uidNumber","cn","phpgwaccounttype","gidnumber");
117
	$justthese = array("phpgwaccountvisible","uidNumber","cn","phpgwaccounttype","gidnumber","mail");
118 118
	
119 119
	$typeAccount = 'u';
120 120
	
......
134 134
					if ($info[$i]["phpgwaccountvisible"][0] == '-1')
135 135
						continue;
136 136
					if( $info[$i]["phpgwaccounttype"][0] == 'u')
137
						$users[$uids=$info[$i]["uidnumber"][0]] = Array('name'	=>	$uids=$info[$i]["cn"][0], 'type'	=>	u );
137
						$users[$uids=$info[$i]["uidnumber"][0]] = Array('name'	=>	$uids=$info[$i]["cn"][0] .' ('.$info[$i]["mail"][0].')', 'type'	=>	u );
138 138
					else
139 139
						$groups[$uids=$info[$i]["gidnumber"][0]] = Array('name'	=>	$uids=$info[$i]["cn"][0], 'type'	=>	g ); 
140 140
				}
phpgwapi/templates/default/listUsers.tpl
20 20
				<tr><td colspan="2"><center>{lang_to_Search}:&nbsp;<input type="text" name="search_users"></center></td></tr>
21 21
				<tr>
22 22
				 <td colspan="2">
23
				  <select name="user_values" multiple style="width:250px" size="18" id="user_list_in">
23
				  <select name="user_values" multiple style="min-width:250px;max-width:400px;" size="18" id="user_list_in">
24 24
				  {options}
25 25
				  </select>					
26 26
				 </td>
preferences/inc/class.uiaclprefs.inc.php
229 229
			foreach($just_owner_array as $just_owner_array) {
230 230
				$id = $just_owner_array['location'];
231 231
				$rights = $this->acl->get_rights($id,$GLOBALS['phpgw_info']['flags']['currentapp']);
232
				$acct->get_account_name($id, $lid, $fname, $lname);
232
				$acct->get_account_name($id, $lid, $fname, $lname, $mail);
233 233
				
234 234
				if (($acct->get_type($id) == 'u') && ($owner != $id && $rights)) 
235 235
				{
236 236
					$user_array['name'] = $fname . ' ' . $lname;
237
					if (!empty($mail))
238
						$user_array['name'] .= ' ('.$mail.')';
237 239
					$this->display_option('u_',$id,$user_array['name'],$is_group);
238 240
					$processed[] = $id;
239 241
				}	
preferences/templates/default/preference_acl.tpl
16 16
		<td></td>
17 17
		<td>
18 18
			<center>
19
				<select id="user_list" name="user_values" style="width:250px" size="10" onChange="javascript:execAction('LOAD')" onClick="javascript:execAction('LOAD')">{row}</select>
19
				<select id="user_list" name="user_values" style="min-width:250px;max-width:400px;" size="10" onChange="javascript:execAction('LOAD')" onClick="javascript:execAction('LOAD')">{row}</select>
20 20
			</center>
21 21
		</td>			
22 22
		<td valign = 'top'> 
......
62 62
 			<input type="hidden" name="processed" value="{processed}">
63 63
 		<center>
64 64
 			<input type="submit" name="submit" value="{submit_lang}">
65
			<input type="button" value="Adicionar" onclick="openListUsers(340,533,'preferences')">
65
			<input type="button" value="Adicionar" onclick="openListUsers(420,420,'preferences')">
66 66
			<input type="button" value="Remover" onclick="javascript:remUserAcl()">
67 67
			<input type="button" value="Cancelar" onclick="javascript:history.back()">
68 68
 		</center>