mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
account-display is now configurable via the prefs:
- Firstname Lastname (default) - Lastname, Firstname - username - <username> Lastname, Firstname
This commit is contained in:
parent
3f24159bfd
commit
1a01f33308
@ -410,35 +410,36 @@
|
|||||||
$lastname = $GLOBALS['phpgw_info']['user']['lastname'];
|
$lastname = $GLOBALS['phpgw_info']['user']['lastname'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($firstname)
|
$display = $GLOBALS['phpgw_info']['user']['preferences']['common']['account_display'];
|
||||||
{
|
|
||||||
$a[] = $firstname;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (!$firstname && !$lastname || $display == 'username')
|
||||||
|
{
|
||||||
|
return $lid;
|
||||||
|
}
|
||||||
if ($lastname)
|
if ($lastname)
|
||||||
{
|
{
|
||||||
$a[] = $lastname;
|
$a[] = $lastname;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($a))
|
if ($firstname)
|
||||||
{
|
{
|
||||||
switch(count($a))
|
$a[] = $firstname;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch($display)
|
||||||
{
|
{
|
||||||
case 0:
|
case 'all':
|
||||||
return $lid;
|
$name = "<$lid> ";
|
||||||
|
// fall-through
|
||||||
|
case 'lastname':
|
||||||
|
$name .= implode(', ',$a);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 'firstname':
|
||||||
return $a[0] . ' <' . $lid . '>';
|
default:
|
||||||
break;
|
$name = $firstname . ' ' . $lastname;
|
||||||
case 2:
|
|
||||||
return $a[0] . ' ' . $a[1] .' <' . $lid . '>'; //implode(', ',$a);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
return $name;
|
||||||
else
|
|
||||||
{
|
|
||||||
return $lid;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -124,5 +124,14 @@
|
|||||||
create_select_box('How do you like to select accounts','account_selection',$account_sels,
|
create_select_box('How do you like to select accounts','account_selection',$account_sels,
|
||||||
'The selectbox shows all available users (can be very slow on big installs with many users). The popup can search users by name or group.');
|
'The selectbox shows all available users (can be very slow on big installs with many users). The popup can search users by name or group.');
|
||||||
|
|
||||||
|
$account_display = array(
|
||||||
|
'firstname' => lang('Firstname'). ' '.lang('Lastname'),
|
||||||
|
'lastname' => lang('Lastname').', '.lang('Firstname'),
|
||||||
|
'username' => lang('username'),
|
||||||
|
'all' => '<'.lang('username').'> '.lang('Lastname').', '.lang('Firstname')
|
||||||
|
);
|
||||||
|
create_select_box('How do you like to display accounts','account_display',$account_display,
|
||||||
|
'Set this to your convenience. For security reasons, you might not want to show your Loginname in public.');
|
||||||
|
|
||||||
create_check_box('Show helpmessages by default','show_help',
|
create_check_box('Show helpmessages by default','show_help',
|
||||||
'Should this help messages shown up always, when you enter the preferences or only on request.');
|
'Should this help messages shown up always, when you enter the preferences or only on request.');
|
||||||
|
@ -24,6 +24,7 @@ error: there was a problem finding the preference file for %1 in %2 preferences
|
|||||||
forced preferences preferences de Erzwungene Einstellungen
|
forced preferences preferences de Erzwungene Einstellungen
|
||||||
help off preferences de Keine Hilfe
|
help off preferences de Keine Hilfe
|
||||||
hours preferences de Stunden
|
hours preferences de Stunden
|
||||||
|
how do you like to display accounts preferences de Wie sollen Benutzer angezeigt werden
|
||||||
how do you like to select accounts preferences de Wie sollen Benutzer ausgewählt werden
|
how do you like to select accounts preferences de Wie sollen Benutzer ausgewählt werden
|
||||||
how many hours are you in front or after the timezone of the server.<br>if you are in the same time zone as the server select 0 hours, else select your locale date and time. preferences de Wieviele Stunden sind sie vor der Zeitzone des Servers.<br>Wenn sie in der gleichen Zeitzone wie der Server sind, wählen sie 0 Stunden, ansonsten wählen sie ihr lokales Datum und die Uhrzeit.
|
how many hours are you in front or after the timezone of the server.<br>if you are in the same time zone as the server select 0 hours, else select your locale date and time. preferences de Wieviele Stunden sind sie vor der Zeitzone des Servers.<br>Wenn sie in der gleichen Zeitzone wie der Server sind, wählen sie 0 Stunden, ansonsten wählen sie ihr lokales Datum und die Uhrzeit.
|
||||||
how should phpgroupware display dates for you. preferences de Wie soll phpGroupWare das Datum für sie anzeigen?
|
how should phpgroupware display dates for you. preferences de Wie soll phpGroupWare das Datum für sie anzeigen?
|
||||||
@ -43,6 +44,7 @@ select different theme preferences de anderes Schema w
|
|||||||
select one preferences de Bitte wählen
|
select one preferences de Bitte wählen
|
||||||
select the language of texts and messages within phpgroupware.<br>some languages may not contain all messages, in that case you will see an english message. preferences de Wählen sie die Sprache der Texte und Mitteilungen innerhalb der phpGroupWare.<br>Machne Sprachen enthalten evtl. nicht alle Texte, in diesem Fall wird der Englische Text angezeigt.
|
select the language of texts and messages within phpgroupware.<br>some languages may not contain all messages, in that case you will see an english message. preferences de Wählen sie die Sprache der Texte und Mitteilungen innerhalb der phpGroupWare.<br>Machne Sprachen enthalten evtl. nicht alle Texte, in diesem Fall wird der Englische Text angezeigt.
|
||||||
selectbox preferences de Auswahlfeld
|
selectbox preferences de Auswahlfeld
|
||||||
|
set this to your convenience. for security reasons, you might not want to show your loginname in public. preferences de Stellen sie das nach ihren Vorlieben ein. Aus Sicherheitsgründen sollte der Benutzername nicht in der Öffentlichkeit gezeigt werden.
|
||||||
should the number of active sessions be displayed for you all the time. preferences de Soll die Anzahl aktiver Sitzungen permanent für sie angezeigt werden.
|
should the number of active sessions be displayed for you all the time. preferences de Soll die Anzahl aktiver Sitzungen permanent für sie angezeigt werden.
|
||||||
should this help messages shown up always, when you enter the preferences or only on request. preferences de Sollen die Hilfetexte immer angezeigt werden, wenn sie die Einstellungen aufrufen oder nur auf Anforderung.
|
should this help messages shown up always, when you enter the preferences or only on request. preferences de Sollen die Hilfetexte immer angezeigt werden, wenn sie die Einstellungen aufrufen oder nur auf Anforderung.
|
||||||
show helpmessages by default preferences de Hilfetexte standardmässig anzeigen
|
show helpmessages by default preferences de Hilfetexte standardmässig anzeigen
|
||||||
|
@ -24,6 +24,7 @@ error: there was a problem finding the preference file for %1 in %2 preferences
|
|||||||
forced preferences preferences en Forced Preferences
|
forced preferences preferences en Forced Preferences
|
||||||
help off preferences en Help off
|
help off preferences en Help off
|
||||||
hours preferences en hours
|
hours preferences en hours
|
||||||
|
how do you like to display accounts preferences en How do you like to display accounts
|
||||||
how do you like to select accounts preferences en How do you like to select accounts
|
how do you like to select accounts preferences en How do you like to select accounts
|
||||||
how many hours are you in front or after the timezone of the server.<br>if you are in the same time zone as the server select 0 hours, else select your locale date and time. preferences en How many hours are you in front or after the timezone of the server.<br>If you are in the same time zone as the server select 0 hours, else select your locale date and time.
|
how many hours are you in front or after the timezone of the server.<br>if you are in the same time zone as the server select 0 hours, else select your locale date and time. preferences en How many hours are you in front or after the timezone of the server.<br>If you are in the same time zone as the server select 0 hours, else select your locale date and time.
|
||||||
how should phpgroupware display dates for you. preferences en How should phpGroupWare display dates for you.
|
how should phpgroupware display dates for you. preferences en How should phpGroupWare display dates for you.
|
||||||
@ -42,6 +43,7 @@ select different theme preferences en Select different Theme
|
|||||||
select one preferences en Select one
|
select one preferences en Select one
|
||||||
select the language of texts and messages within phpgroupware.<br>some languages may not contain all messages, in that case you will see an english message. preferences en Select the language of texts and messages within phpGroupWare.<br>Some languages may not contain all messages, in that case you will see an english message.
|
select the language of texts and messages within phpgroupware.<br>some languages may not contain all messages, in that case you will see an english message. preferences en Select the language of texts and messages within phpGroupWare.<br>Some languages may not contain all messages, in that case you will see an english message.
|
||||||
selectbox preferences en Selectbox
|
selectbox preferences en Selectbox
|
||||||
|
set this to your convenience. for security reasons, you might not want to show your loginname in public. preferences en Set this to your convenience. For security reasons, you might not want to show your Loginname in public.
|
||||||
should the number of active sessions be displayed for you all the time. preferences en Should the number of active sessions be displayed for you all the time.
|
should the number of active sessions be displayed for you all the time. preferences en Should the number of active sessions be displayed for you all the time.
|
||||||
should this help messages shown up always, when you enter the preferences or only on request. preferences en Should this help messages shown up always, when you enter the preferences or only on request.
|
should this help messages shown up always, when you enter the preferences or only on request. preferences en Should this help messages shown up always, when you enter the preferences or only on request.
|
||||||
show helpmessages by default preferences en Show helpmessages by default
|
show helpmessages by default preferences en Show helpmessages by default
|
||||||
|
Loading…
Reference in New Issue
Block a user