Mantis 2040: Calendar - Creation d'un calendrier avec un nom existant

Monotone-Parent: 92b5fc52a3736b8120b0011dacbf4f2aa73c71f9
Monotone-Revision: 7f0d410fd526f1879ea158593030d6d7b46be292

Monotone-Author: crobert@inverse.ca
Monotone-Date: 2009-08-20T13:02:51
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
C Robert
2009-08-20 13:02:51 +00:00
parent a9af949ef6
commit 4b4a31796b
15 changed files with 70 additions and 22 deletions

View File

@@ -1,3 +1,10 @@
2009-08-20 Cyril Robert <crobert@inverse.ca>
* UI/Common/UIxParentFolderActions.m (createFolderAction): Mantis 2040:
return a 409 code when a folder with the same name exists.
* SoObjects/SOGo/SOGoParentFolder.m (hasLocalSubFolderNamed): Added for
Mantis 2040.
2009-08-19 Cyril Robert <crobert@inverse.ca>
* UI/MainUI/SOGoUserHomePage.m (defaultAction): Added support for SOGoUIxDefaultModule

View File

@@ -448,6 +448,27 @@ static SoSecurityManager *sm = nil;
return [ma sortedArrayUsingSelector: @selector (compare:)];
}
- (BOOL) hasLocalSubFolderNamed: (NSString *) name
{
NSArray *subs;
NSException *error;
int i, count;
BOOL rc = NO;
error = [self initSubFolders];
if (error)
[error raise];
subs = [subFolders allValues];
count = [subs count];
for (i = 0; i < count; i++)
if ([name isEqualToString: [[subs objectAtIndex: i] displayName]])
rc = YES;
return rc;
}
- (NSArray *) toManyRelationshipKeys
{
NSEnumerator *sortedSubFolders;

View File

@@ -43,6 +43,7 @@
= "Você já se inscreveu nesta pasta!";
"The user rights cannot be edited for this object!"
= "Os direitos do usuário não podem ser editados para este objeto!";
"A folder by that name already exists." = "A folder by that name already exists.";
"You are not allowed to access this module or this system. Please contact your system administrator."
= "Você não está liberado para acessar este módulo ou este sistema. Por favor, contate seu administrador de sistemas.";
@@ -53,4 +54,4 @@
"Reminder:" = "Lembrete:";
"Start:" = "Inicio:";
"Due Date:" = "Data:";
"Location:" = "Localização:";
"Location:" = "Localização:";

View File

@@ -43,6 +43,7 @@
= "Již jste přihlášeni k odběru této složky!";
"The user rights cannot be edited for this object!"
= "Uživatelská práva pro tento objekt nemohou být upravena!";
"A folder by that name already exists." = "A folder by that name already exists.";
"You are not allowed to access this module or this system. Please contact your system administrator."
= "Nemáte oprávnění pro přístup k tomuto modulu nebo systému. Kontaktujte prosím svého systémového administrátora.";
@@ -53,4 +54,4 @@
"Reminder:" = "Upomínka:";
"Start:" = "Začátek:";
"Due Date:" = "Do dne:";
"Location:" = "Místo:";
"Location:" = "Místo:";

View File

@@ -43,6 +43,7 @@
= "U bent al op deze map geabonneerd!";
"The user rights cannot be edited for this object!"
= "De machtigingen kunnen niet worden aangepast voor dit object!";
"A folder by that name already exists." = "A folder by that name already exists.";
"You are not allowed to access this module or this system. Please contact your system administrator."
= "U hebt geen toegang tot deze module of dit systeem. Neem contact op met uw systeem beheerder.";
@@ -53,4 +54,4 @@
"Reminder:" = "Alarm:";
"Start:" = "Begin:";
"Due Date:" = "Verloopdatum:";
"Location:" = "Plaats:";
"Location:" = "Plaats:";

View File

@@ -43,6 +43,7 @@
= "You have already subscribed to that folder!";
"The user rights cannot be edited for this object!"
= "The user rights cannot be edited for this object!";
"A folder by that name already exists." = "A folder by that name already exists.";
"You are not allowed to access this module or this system. Please contact your system administrator."
= "You are not allowed to access this module or this system. Please contact your system administrator.";
@@ -53,4 +54,4 @@
"Reminder:" = "Reminder:";
"Start:" = "Start:";
"Due Date:" = "Due Date:";
"Location:" = "Location:";
"Location:" = "Location:";

View File

@@ -43,6 +43,7 @@
= "Vous êtes déja abonné à ce dossier.";
"The user rights cannot be edited for this object!"
= "Les droits sur cet objet ne peuvent pas être édités.";
"A folder by that name already exists." = "Un dossier du même nom existe déjà.";
"You are not allowed to access this module or this system. Please contact your system administrator."
= "Vous n'êtes pas autorisé à accéder à ce module ou ce système. Veuillez contacter votre administrateur système.";
@@ -53,4 +54,4 @@
"Reminder:" = "Rappel :";
"Start:" = "Début :";
"Due Date:" = "Échéance :";
"Location:" = "Lieu :";
"Location:" = "Lieu :";

View File

@@ -43,6 +43,7 @@
= "Sie haben diesen Ordner bereits abonniert!";
"The user rights cannot be edited for this object!"
= "Die Benutzerrechte können für dieses Objekt nicht verändert werden!";
"A folder by that name already exists." = "A folder by that name already exists.";
"You are not allowed to access this module or this system. Please contact your system administrator."
= "You are not allowed to access this module or this system. Please contact your system administrator.";
@@ -53,4 +54,4 @@
"Reminder:" = "Alarm:";
"Start:" = "Beginn:";
"Due Date:" = "Fällig:";
"Location:" = "Ort:";
"Location:" = "Ort:";

View File

@@ -43,6 +43,7 @@
= "Erre a mappára már feliratkozott!";
"The user rights cannot be edited for this object!"
= "Ezen az objektumon nem szerkeszthetőek a felhasználói jogosultságok!";
"A folder by that name already exists." = "A folder by that name already exists.";
"You are not allowed to access this module or this system. Please contact your system administrator."
= "Önnek nem engedélyezett a hozzáférés ehhez a modulhoz vagy rendszerhez. Kérem lépjen kapcsolatba a rendszergazdával.";
@@ -53,4 +54,4 @@
"Reminder:" = "Emlékeztető:";
"Start:" = "Kezdés:";
"Due Date:" = "Lejárat dátuma:";
"Location:" = "Hely:";
"Location:" = "Hely:";

View File

@@ -43,6 +43,7 @@
= "Hai già sottoscritto la cartella!";
"The user rights cannot be edited for this object!"
= "I permessi di questo oggetto non possono essere modificati!";
"A folder by that name already exists." = "A folder by that name already exists.";
"You are not allowed to access this module or this system. Please contact your system administrator."
= "Non sei abilitato ad accedere a questo modulo. Contatta il tuo amministratore di sistema.";
@@ -53,4 +54,4 @@
"Reminder:" = "Promemoria:";
"Start:" = "Inizio:";
"Due Date:" = "Scadenza:";
"Location:" = "Luogo:";
"Location:" = "Luogo:";

View File

@@ -43,6 +43,7 @@
= "Вы уже подписались на эту папку!";
"The user rights cannot be edited for this object!"
= "Извините, для данного объекта невозможно настроить права доступа!";
"A folder by that name already exists." = "A folder by that name already exists.";
"You are not allowed to access this module or this system. Please contact your system administrator."
= "Вам не предоставлено право доступа к этому модулю/системе. Пожалуйста, свяжитесь с администратором.";
@@ -53,4 +54,4 @@
"Reminder:" = "Напоминание:";
"Start:" = "Начало:";
"Due Date:" = "Дата начала:";
"Location:" = "Место:";
"Location:" = "Место:";

View File

@@ -43,6 +43,7 @@
= "Ya se ha suscrito a esta carpeta.";
"The user rights cannot be edited for this object!"
= "No es posible modificar los permisos de acceso a este objeto.";
"A folder by that name already exists." = "A folder by that name already exists.";
"You are not allowed to access this module or this system. Please contact your system administrator."
= "You are not allowed to access this module or this system. Please contact your system administrator.";
@@ -53,4 +54,4 @@
"Reminder:" = "Recordatorio:";
"Start:" = "Desde:";
"Due Date:" = "Vencimiento:";
"Location:" = "Lugar:";
"Location:" = "Lugar:";

View File

@@ -42,20 +42,26 @@
name = [[context request] formValueForKey: @"name"];
if ([name length] > 0)
{
response = (WOResponse *) [[self clientObject] newFolderWithName: name
nameInContainer: &nameInContainer];
if (!response)
{
response = [self responseWithStatus: 201];
[response setHeader: @"text/plain; charset=us-ascii"
forKey: @"content-type"];
[response appendContentString: nameInContainer];
}
if (![[self clientObject] hasLocalSubFolderNamed: name])
{
response = (WOResponse *) [[self clientObject] newFolderWithName: name
nameInContainer: &nameInContainer];
if (!response)
{
response = [self responseWithStatus: 201];
[response setHeader: @"text/plain; charset=us-ascii"
forKey: @"content-type"];
[response appendContentString: nameInContainer];
}
}
else
response = [NSException exceptionWithHTTPStatus: 409
reason: @"That name already exists"];
}
else
response = [NSException exceptionWithHTTPStatus: 400
reason: @"The name is missing"];
reason: @"The name is missing"];
return response;
}

View File

@@ -43,6 +43,7 @@
= "Yr ydych wedi tanysgrifio eisoes i'r ffolder yna!";
"The user rights cannot be edited for this object!"
= "Ni all hawliau'r defnyddiwr cael eu golygu ar gyfer y gwrthrych hwn!";
"A folder by that name already exists." = "A folder by that name already exists.";
"You are not allowed to access this module or this system. Please contact your system administrator."
= "Nid oes gennych caniatad mynediad i'r modiwl hwn na'r system hwn. Cysylltwch a'r Gweinyddwr Systemau os gwelwch yn dda.";
@@ -53,4 +54,4 @@
"Reminder:" = "Atgoffa:";
"Start:" = "Dechrau:";
"Due Date:" = "Dyddiad dyledus:";
"Location:" = "Lleoliad:";
"Location:" = "Lleoliad:";

View File

@@ -1636,6 +1636,9 @@ function createFolderCallback(http) {
if (data.okCB)
data.okCB(data.name, "/" + http.responseText, UserLogin);
}
else if (http.status == 409) {
alert (clabels["A folder by that name already exists."]);
}
else {
if (data.notOkCB)
data.notOkCB(name);