mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-08 09:55:09 +00:00
Calendar+Addressbook export
Monotone-Parent: fb2522bcdcf167e7ba3e95a03948f9bfad2b7870 Monotone-Revision: 1e66868696d71db915497bde02848e689ed48c7a Monotone-Author: crobert@inverse.ca Monotone-Date: 2009-09-02T13:24:02 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -178,3 +178,5 @@
|
||||
"Contacts" = "Contacts";
|
||||
"Add" = "Add";
|
||||
"Lists can't be moved or copied." = "Lists can't be moved or copied.";
|
||||
|
||||
"Export" = "Export";
|
||||
|
||||
@@ -178,3 +178,5 @@
|
||||
"Contacts" = "Contacts";
|
||||
"Add" = "Add";
|
||||
"Lists can't be moved or copied." = "Lists can't be moved or copied.";
|
||||
|
||||
"Export" = "Export";
|
||||
|
||||
@@ -178,3 +178,5 @@
|
||||
"Contacts" = "Contacts";
|
||||
"Add" = "Add";
|
||||
"Lists can't be moved or copied." = "Lists can't be moved or copied.";
|
||||
|
||||
"Export" = "Export";
|
||||
|
||||
@@ -178,3 +178,5 @@
|
||||
"Contacts" = "Contacts";
|
||||
"Add" = "Add";
|
||||
"Lists can't be moved or copied." = "Lists can't be moved or copied.";
|
||||
|
||||
"Export" = "Export";
|
||||
|
||||
@@ -178,3 +178,5 @@
|
||||
"Contacts" = "Contacts";
|
||||
"Add" = "Ajouter";
|
||||
"Lists can't be moved or copied." = "Les listes ne peuvent pas être déplacées ou copiées.";
|
||||
|
||||
"Export" = "Exporter";
|
||||
|
||||
@@ -178,3 +178,5 @@
|
||||
"Contacts" = "Contacts";
|
||||
"Add" = "Add";
|
||||
"Lists can't be moved or copied." = "Lists can't be moved or copied.";
|
||||
|
||||
"Export" = "Export";
|
||||
|
||||
@@ -178,3 +178,5 @@
|
||||
"Contacts" = "Contacts";
|
||||
"Add" = "Add";
|
||||
"Lists can't be moved or copied." = "Lists can't be moved or copied.";
|
||||
|
||||
"Export" = "Export";
|
||||
|
||||
@@ -178,3 +178,5 @@
|
||||
"Contacts" = "Contacts";
|
||||
"Add" = "Add";
|
||||
"Lists can't be moved or copied." = "Lists can't be moved or copied.";
|
||||
|
||||
"Export" = "Export";
|
||||
|
||||
@@ -163,3 +163,5 @@
|
||||
"Contacts" = "Contacts";
|
||||
"Add" = "Add";
|
||||
"Lists can't be moved or copied." = "Lists can't be moved or copied.";
|
||||
|
||||
"Export" = "Export";
|
||||
|
||||
@@ -178,3 +178,5 @@
|
||||
"Contacts" = "Contacts";
|
||||
"Add" = "Add";
|
||||
"Lists can't be moved or copied." = "Lists can't be moved or copied.";
|
||||
|
||||
"Export" = "Export";
|
||||
|
||||
@@ -34,6 +34,11 @@
|
||||
#import <Contacts/SOGoContactFolder.h>
|
||||
#import <Contacts/SOGoContactFolders.h>
|
||||
|
||||
#import <NGCards/NGVCard.h>
|
||||
#import <NGCards/NGVList.h>
|
||||
#import <SoObjects/Contacts/SOGoContactGCSEntry.h>
|
||||
#import <SoObjects/Contacts/SOGoContactGCSList.h>
|
||||
|
||||
#import "UIxContactsListView.h"
|
||||
|
||||
@implementation UIxContactsListView
|
||||
@@ -178,4 +183,45 @@
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
||||
- (id <WOActionResults>) exportAction
|
||||
{
|
||||
WORequest *request;
|
||||
id <WOActionResults> response;
|
||||
NSArray *contactsId;
|
||||
NSEnumerator *uids;
|
||||
NSString *uid;
|
||||
id currentChild;
|
||||
id sourceFolder;
|
||||
NSMutableString *content;
|
||||
|
||||
content = [NSMutableString string];
|
||||
request = [context request];
|
||||
if ( (contactsId = [request formValuesForKey: @"uid"]) )
|
||||
{
|
||||
sourceFolder = [self clientObject];
|
||||
uids = [contactsId objectEnumerator];
|
||||
while ((uid = [uids nextObject]))
|
||||
{
|
||||
currentChild = [sourceFolder lookupName: uid
|
||||
inContext: [self context]
|
||||
acquire: NO];
|
||||
if ([currentChild respondsToSelector: @selector (vCard)])
|
||||
[content appendFormat: [[currentChild vCard] ldifString]];
|
||||
else if ([currentChild respondsToSelector: @selector (vList)])
|
||||
[content appendFormat: [[currentChild vList] ldifString]];
|
||||
}
|
||||
}
|
||||
response = [[WOResponse alloc] init];
|
||||
[response autorelease];
|
||||
[response setHeader: @"text/directory"
|
||||
forKey:@"content-type"];
|
||||
[response setHeader: @"attachment;filename=SavedContacts.ldif"
|
||||
forKey: @"Content-Disposition"];
|
||||
[response setContent: [content dataUsingEncoding: NSUTF8StringEncoding]];
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
@end /* UIxContactsListView */
|
||||
|
||||
@@ -162,3 +162,5 @@
|
||||
"Contacts" = "Contacts";
|
||||
"Add" = "Add";
|
||||
"Lists can't be moved or copied." = "Lists can't be moved or copied.";
|
||||
|
||||
"Export" = "Export";
|
||||
|
||||
@@ -98,6 +98,11 @@
|
||||
pageName = "UIxContactsListView";
|
||||
actionName = "mailerContacts";
|
||||
};
|
||||
export = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxContactsListView";
|
||||
actionName = "export";
|
||||
};
|
||||
userRights = {
|
||||
protectedBy = "ReadAcls";
|
||||
pageName = "UIxContactsUserRightsEditor";
|
||||
|
||||
Reference in New Issue
Block a user