- fixed wrongly selected "None" Kategorie on first ever start of addressbook

- added pref for the addressbook selected on adding new contacts, if you dont have add rights for the current addressbook (eg. "All" selected as filter)
This commit is contained in:
Ralf Becker 2006-10-07 09:17:30 +00:00
parent 5cfe53bc7d
commit 91480e8acc
4 changed files with 38 additions and 3 deletions

View File

@ -118,6 +118,15 @@ class contacts_admin_prefs
*/ */
function settings() function settings()
{ {
$GLOBALS['settings']['add_default'] = array(
'type' => 'select',
'label' => 'Default addressbook for adding contacts',
'name' => 'add_default',
'help' => 'Which addressbook should be selected when adding a contact AND you have no add rights to the current addressbook.',
'values' => ExecMethod('addressbook.uicontacts.get_addressbooks',EGW_ACL_ADD),
'xmlrpc' => True,
'admin' => False,
);
$GLOBALS['settings']['mainscreen_showbirthdays'] = array( $GLOBALS['settings']['mainscreen_showbirthdays'] = array(
'type' => 'select', 'type' => 'select',
'label' => 'Show birthday reminders on main screen', 'label' => 'Show birthday reminders on main screen',

View File

@ -33,9 +33,16 @@ class uicontacts extends bocontacts
'emailpopup'=> True, 'emailpopup'=> True,
'migrate2ldap' => True, 'migrate2ldap' => True,
); );
/**
* Addressbook preferences of the user
*
* @var array
*/
var $prefs; var $prefs;
/** /**
* var boolean $private_addressbook use a separate private addressbook (former private flag), for contacts not shareable via regular read acl * use a separate private addressbook (former private flag), for contacts not shareable via regular read acl
*
* @var boolean
*/ */
var $private_addressbook = false; var $private_addressbook = false;
var $org_views; var $org_views;
@ -135,7 +142,7 @@ class uicontacts extends bocontacts
'bottom_too' => false, // I show the nextmatch-line (arrows, filters, search, ...) again after the rows 'bottom_too' => false, // I show the nextmatch-line (arrows, filters, search, ...) again after the rows
'never_hide' => True, // I never hide the nextmatch-line if less then maxmatch entrie 'never_hide' => True, // I never hide the nextmatch-line if less then maxmatch entrie
'start' => 0, // IO position in list 'start' => 0, // IO position in list
'cat_id' => 0, // IO category, if not 'no_cat' => True 'cat_id' => '', // IO category, if not 'no_cat' => True
'options-cat_id' => array(lang('none')), 'options-cat_id' => array(lang('none')),
'search' => '', // IO search pattern 'search' => '', // IO search pattern
'order' => 'n_family', // IO name of the column to sort after (optional for the sortheaders) 'order' => 'n_family', // IO name of the column to sort after (optional for the sortheaders)
@ -881,7 +888,14 @@ class uicontacts extends bocontacts
$content['private'] = (int) ($content['owner'] && substr($content['owner'],-1) == 'p'); $content['private'] = (int) ($content['owner'] && substr($content['owner'],-1) == 'p');
if (!($this->grants[$content['owner'] = (string) (int) $content['owner']] & EGW_ACL_ADD)) if (!($this->grants[$content['owner'] = (string) (int) $content['owner']] & EGW_ACL_ADD))
{ {
$content['owner'] = (string) $this->user; $content['owner'] = $this->prefs['add_default'];
$content['private'] = (int) ($content['owner'] && substr($content['owner'],-1) == 'p');
if (!($this->grants[$content['owner'] = (string) (int) $content['owner']] & EGW_ACL_ADD))
{
$content['owner'] = (string) $this->user;
$content['private'] = 0;
}
} }
$new_type = array_keys($this->content_types); $new_type = array_keys($this->content_types);
$content['tid'] = $_GET['typeid'] ? $_GET['typeid'] : $new_type[0]; $content['tid'] = $_GET['typeid'] ? $_GET['typeid'] : $new_type[0];

View File

@ -28,6 +28,7 @@ addressbook-fieldname addressbook de Adressbuch Feldname
addvcard addressbook de VCard hinzufügen addvcard addressbook de VCard hinzufügen
advanced search addressbook de Erweiterte Suche advanced search addressbook de Erweiterte Suche
all contacts addressbook de Alle Kontakte all contacts addressbook de Alle Kontakte
allow users to maintain their own account-data admin de Erlaube Benutzern ihre eigenen Benutzerdaten zu verwalten
alt. csv import addressbook de Alt. CSV Import alt. csv import addressbook de Alt. CSV Import
always addressbook de immer always addressbook de immer
apply changes to all members, whose fields have the same previous content addressbook de Wendet die Änderungen auf alle Mitglieder an, deren Felder gleichen vorherigen Inhalt haben apply changes to all members, whose fields have the same previous content addressbook de Wendet die Änderungen auf alle Mitglieder an, deren Felder gleichen vorherigen Inhalt haben
@ -84,6 +85,7 @@ csv-filename addressbook de CSV-Dateiname
custom addressbook de Benutzerdefiniert custom addressbook de Benutzerdefiniert
custom fields addressbook de Benutzerdefinierte Felder custom fields addressbook de Benutzerdefinierte Felder
debug output in browser addressbook de Debugausgaben in Browser debug output in browser addressbook de Debugausgaben in Browser
default addressbook for adding contacts addressbook de Vorgabe Adressbuch beim Hinzufügen von Kontakten
default filter addressbook de Standardfilter default filter addressbook de Standardfilter
delete a single entry by passing the id. addressbook de Löscht einen einzelnen Eintrag durch Übergabe seiner ID. delete a single entry by passing the id. addressbook de Löscht einen einzelnen Eintrag durch Übergabe seiner ID.
delete this contact addressbook de Diesen Kontakt löschen delete this contact addressbook de Diesen Kontakt löschen
@ -126,6 +128,7 @@ field %1 has been added ! addressbook de Feld %1 wurde hinzugef
field %1 has been updated ! addressbook de Feld %1 wurde aktualisiert ! field %1 has been updated ! addressbook de Feld %1 wurde aktualisiert !
field name addressbook de Feldname field name addressbook de Feldname
fields for the csv export addressbook de Felder für den CSV Export fields for the csv export addressbook de Felder für den CSV Export
fields the user is allowed to edit himself admin de Felder die der Benutzer selbst bearbeiten darf
fields to show in address list addressbook de Felder, die in der Adressliste angezeigt werden sollen fields to show in address list addressbook de Felder, die in der Adressliste angezeigt werden sollen
fieldseparator addressbook de Feldtrenner fieldseparator addressbook de Feldtrenner
for read only ldap admin de für nur lesendes LDAP for read only ldap admin de für nur lesendes LDAP
@ -196,6 +199,7 @@ other phone addressbook de anderes Telefon
own sorting addressbook de eigene Sortierung own sorting addressbook de eigene Sortierung
pager common de Pager pager common de Pager
parcel addressbook de Lieferadresse parcel addressbook de Lieferadresse
permission denied !!! addressbook de Zugriff verweigert !!!
phone number common de Telefonnummer phone number common de Telefonnummer
phone numbers common de Telefonnummern phone numbers common de Telefonnummern
photo addressbook de Foto photo addressbook de Foto
@ -249,6 +253,7 @@ to many might exceed your execution-time-limit addressbook de zu viel k
today is %1's birthday! common de Heute ist der Geburtstag von %1! today is %1's birthday! common de Heute ist der Geburtstag von %1!
tomorrow is %1's birthday. common de Morgen ist der Geburtstag von %1. tomorrow is %1's birthday. common de Morgen ist der Geburtstag von %1.
translation addressbook de Übersetzung translation addressbook de Übersetzung
type addressbook de Typ
update a single entry by passing the fields. addressbook de Aktualisiert einen einzelnen Eintrag durch Übergabe seiner Felder. update a single entry by passing the fields. addressbook de Aktualisiert einen einzelnen Eintrag durch Übergabe seiner Felder.
upload or delete the photo addressbook de Foto hochladen oder löschen upload or delete the photo addressbook de Foto hochladen oder löschen
url to link telephone numbers to (use %1 for the number) admin de URL mit denen Telefonnummern verlinkt werden sollen (%1 für die Nummber verwenden) url to link telephone numbers to (use %1 for the number) admin de URL mit denen Telefonnummern verlinkt werden sollen (%1 für die Nummber verwenden)
@ -261,6 +266,7 @@ vcards require a last name entry. addressbook de VCards ben
warning!! ldap is valid only if you are not using contacts for accounts storage! admin de WARNUNG!! LDAP darf nur verwendet werden, wenn sie die Benutzerkonten nicht im Adressbuch speichern! warning!! ldap is valid only if you are not using contacts for accounts storage! admin de WARNUNG!! LDAP darf nur verwendet werden, wenn sie die Benutzerkonten nicht im Adressbuch speichern!
warning: all contacts found will be deleted! addressbook de WARNUNG: Alle gefundenen Kontakte werden gelöscht! warning: all contacts found will be deleted! addressbook de WARNUNG: Alle gefundenen Kontakte werden gelöscht!
when should the contacts list display that colum. "only if there is content" hides the column, unless there is some content in the view. addressbook de Wann soll die Adressliste diese Spalte anzeigen. "Nur wenn etwas angezeigt wird" blendet die Spalte aus, wenn Sie in dieser Anzeige leer wäre. when should the contacts list display that colum. "only if there is content" hides the column, unless there is some content in the view. addressbook de Wann soll die Adressliste diese Spalte anzeigen. "Nur wenn etwas angezeigt wird" blendet die Spalte aus, wenn Sie in dieser Anzeige leer wäre.
which addressbook should be selected when adding a contact and you have no add rights to the current addressbook. addressbook de Welches Adressbuch soll ausgewählt sein beim Hinzfügen von Kontakten, wenn Sie keine Hinzufügen Rechte zum aktuellen Adressbuch haben.
which charset should be used for the csv export. the system default is the charset of this egroupware installation. addressbook de Welcher Zeichensatz soll für den CSV Export verwendet werden. Die systemweite Vorgabe ist der Zeichensatz der eGroupWare Installation. which charset should be used for the csv export. the system default is the charset of this egroupware installation. addressbook de Welcher Zeichensatz soll für den CSV Export verwendet werden. Die systemweite Vorgabe ist der Zeichensatz der eGroupWare Installation.
which fields should be exported. all means every field stored in the addressbook incl. the custom fields. the business or home address only contains name, company and the selected address. addressbook de Welche Felder sollen exportiert werden. Alle bedeutet jedes Feld das im Adressbuch gespeichert ist einschl. der benutzerdefinierten Felder. Die Geschäfts- oder Privatadresse enthält nur Name, Firma und die ausgewählte Adresse. which fields should be exported. all means every field stored in the addressbook incl. the custom fields. the business or home address only contains name, company and the selected address. addressbook de Welche Felder sollen exportiert werden. Alle bedeutet jedes Feld das im Adressbuch gespeichert ist einschl. der benutzerdefinierten Felder. Die Geschäfts- oder Privatadresse enthält nur Name, Firma und die ausgewählte Adresse.
whole query addressbook de gesamte Abfrage whole query addressbook de gesamte Abfrage

View File

@ -28,6 +28,7 @@ addressbook-fieldname addressbook en Addressbook-Fieldname
addvcard addressbook en Add VCard addvcard addressbook en Add VCard
advanced search addressbook en Advanced search advanced search addressbook en Advanced search
all contacts addressbook en All contacts all contacts addressbook en All contacts
allow users to maintain their own account-data admin en Allow users to maintain their own account-data
alt. csv import addressbook en Alt. CSV Import alt. csv import addressbook en Alt. CSV Import
always addressbook en always always addressbook en always
apply changes to all members, whose fields have the same previous content addressbook en Apply changes to all members, whose fields have the same previous content apply changes to all members, whose fields have the same previous content addressbook en Apply changes to all members, whose fields have the same previous content
@ -84,6 +85,7 @@ csv-filename addressbook en CSV-Filename
custom addressbook en Custom custom addressbook en Custom
custom fields addressbook en Custom Fields custom fields addressbook en Custom Fields
debug output in browser addressbook en Debug output in browser debug output in browser addressbook en Debug output in browser
default addressbook for adding contacts addressbook en Default addressbook for adding contacts
default filter addressbook en Default Filter default filter addressbook en Default Filter
delete a single entry by passing the id. addressbook en Delete a single entry by passing the id. delete a single entry by passing the id. addressbook en Delete a single entry by passing the id.
delete this contact addressbook en Delete this contact delete this contact addressbook en Delete this contact
@ -126,6 +128,7 @@ field %1 has been added ! addressbook en Field %1 has been added !
field %1 has been updated ! addressbook en Field %1 has been updated ! field %1 has been updated ! addressbook en Field %1 has been updated !
field name addressbook en Field Name field name addressbook en Field Name
fields for the csv export addressbook en Fields for the CSV export fields for the csv export addressbook en Fields for the CSV export
fields the user is allowed to edit himself admin en Fields the user is allowed to edit himself
fields to show in address list addressbook en Fields to show in address list fields to show in address list addressbook en Fields to show in address list
fieldseparator addressbook en Fieldseparator fieldseparator addressbook en Fieldseparator
for read only ldap admin en for read only LDAP for read only ldap admin en for read only LDAP
@ -196,6 +199,7 @@ other phone addressbook en Other Phone
own sorting addressbook en own sorting own sorting addressbook en own sorting
pager common en Pager pager common en Pager
parcel addressbook en Parcel parcel addressbook en Parcel
permission denied !!! addressbook en Permission denied !!!
phone number common en Phone Number phone number common en Phone Number
phone numbers common en Phone Numbers phone numbers common en Phone Numbers
photo addressbook en Photo photo addressbook en Photo
@ -249,6 +253,7 @@ to many might exceed your execution-time-limit addressbook en to many might exce
today is %1's birthday! common en Today is %1's birthday! today is %1's birthday! common en Today is %1's birthday!
tomorrow is %1's birthday. common en Tomorrow is %1's birthday. tomorrow is %1's birthday. common en Tomorrow is %1's birthday.
translation addressbook en Translation translation addressbook en Translation
type addressbook en Type
update a single entry by passing the fields. addressbook en Update a single entry by passing the fields. update a single entry by passing the fields. addressbook en Update a single entry by passing the fields.
upload or delete the photo addressbook en Upload or delete the photo upload or delete the photo addressbook en Upload or delete the photo
url to link telephone numbers to (use %1 for the number) admin en URL to link telephone numbers to (use %1 for the number) url to link telephone numbers to (use %1 for the number) admin en URL to link telephone numbers to (use %1 for the number)
@ -261,6 +266,7 @@ vcards require a last name entry. addressbook en Vcards require a last name entr
warning!! ldap is valid only if you are not using contacts for accounts storage! admin en WARNING!! LDAP is valid only if you are NOT using contacts for accounts storage! warning!! ldap is valid only if you are not using contacts for accounts storage! admin en WARNING!! LDAP is valid only if you are NOT using contacts for accounts storage!
warning: all contacts found will be deleted! addressbook en WARNING: All contacts found will be deleted! warning: all contacts found will be deleted! addressbook en WARNING: All contacts found will be deleted!
when should the contacts list display that colum. "only if there is content" hides the column, unless there is some content in the view. addressbook en When should the contacts list display that colum. "Only if there is content" hides the column, unless there is some content in the view. when should the contacts list display that colum. "only if there is content" hides the column, unless there is some content in the view. addressbook en When should the contacts list display that colum. "Only if there is content" hides the column, unless there is some content in the view.
which addressbook should be selected when adding a contact and you have no add rights to the current addressbook. addressbook en Which addressbook should be selected when adding a contact AND you have no add rights to the current addressbook.
which charset should be used for the csv export. the system default is the charset of this egroupware installation. addressbook en Which charset should be used for the CSV export. The system default is the charset of this eGroupWare installation. which charset should be used for the csv export. the system default is the charset of this egroupware installation. addressbook en Which charset should be used for the CSV export. The system default is the charset of this eGroupWare installation.
which fields should be exported. all means every field stored in the addressbook incl. the custom fields. the business or home address only contains name, company and the selected address. addressbook en Which fields should be exported. All means every field stored in the addressbook incl. the custom fields. The business or home address only contains name, company and the selected address. which fields should be exported. all means every field stored in the addressbook incl. the custom fields. the business or home address only contains name, company and the selected address. addressbook en Which fields should be exported. All means every field stored in the addressbook incl. the custom fields. The business or home address only contains name, company and the selected address.
whole query addressbook en whole query whole query addressbook en whole query