Added new SOGo configurable variable for which you can change the default display when adding a shared calendar or a shared addressBook
parent
c426afd7f2
commit
064565e1a9
|
@ -85,4 +85,6 @@
|
||||||
$label4 = ("To Do", "#3333FF");
|
$label4 = ("To Do", "#3333FF");
|
||||||
$label5 = ("Later", "#993399");
|
$label5 = ("Later", "#993399");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
SOGoSubscriptionFolderFormat = "%{FolderName} (%{UserName} <%{Email}>)";
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,6 +67,7 @@
|
||||||
- (NSArray *) calendarDefaultRoles;
|
- (NSArray *) calendarDefaultRoles;
|
||||||
- (NSArray *) contactsDefaultRoles;
|
- (NSArray *) contactsDefaultRoles;
|
||||||
- (NSArray *) mailPollingIntervals;
|
- (NSArray *) mailPollingIntervals;
|
||||||
|
- (NSString *) subscriptionFolderFormat;
|
||||||
|
|
||||||
- (NSString *) calendarDefaultCategoryColor;
|
- (NSString *) calendarDefaultCategoryColor;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* SOGoDomainDefaults.m - this file is part of SOGo
|
/* SOGoDomainDefaults.m - this file is part of SOGo
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009-2012 Inverse inc.
|
* Copyright (C) 2009-2014 Inverse inc.
|
||||||
*
|
*
|
||||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
*
|
*
|
||||||
|
@ -176,6 +176,11 @@
|
||||||
return [self stringArrayForKey: @"SOGoContactsDefaultRoles"];
|
return [self stringArrayForKey: @"SOGoContactsDefaultRoles"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSString *) subscriptionFolderFormat
|
||||||
|
{
|
||||||
|
return [self stringForKey: @"SOGoSubscriptionFolderFormat"];
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// In v2.0.4, SOGoForceIMAPLoginWithEmail was renamed to SOGoForceExternalLoginWithEmail
|
// In v2.0.4, SOGoForceIMAPLoginWithEmail was renamed to SOGoForceExternalLoginWithEmail
|
||||||
// but we keep backward compatbility for now with previous versions.
|
// but we keep backward compatbility for now with previous versions.
|
||||||
|
|
|
@ -53,6 +53,7 @@
|
||||||
NSString *ocsPath;
|
NSString *ocsPath;
|
||||||
GCSFolder *ocsFolder;
|
GCSFolder *ocsFolder;
|
||||||
NSMutableDictionary *childRecords;
|
NSMutableDictionary *childRecords;
|
||||||
|
NSMutableDictionary *folderSubscriptionValues;
|
||||||
BOOL userCanAccessAllObjects; /* i.e. user obtains 'Access Object' on
|
BOOL userCanAccessAllObjects; /* i.e. user obtains 'Access Object' on
|
||||||
subobjects */
|
subobjects */
|
||||||
}
|
}
|
||||||
|
|
|
@ -207,6 +207,7 @@ static NSArray *childRecordFields = nil;
|
||||||
[ocsFolder release];
|
[ocsFolder release];
|
||||||
[ocsPath release];
|
[ocsPath release];
|
||||||
[childRecords release];
|
[childRecords release];
|
||||||
|
[folderSubscriptionValues release];
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -275,6 +276,8 @@ static NSArray *childRecordFields = nil;
|
||||||
{
|
{
|
||||||
NSString *primaryDN;
|
NSString *primaryDN;
|
||||||
NSDictionary *ownerIdentity;
|
NSDictionary *ownerIdentity;
|
||||||
|
NSString *subjectFormat;
|
||||||
|
SOGoDomainDefaults *dd;
|
||||||
|
|
||||||
primaryDN = [row objectForKey: @"c_foldername"];
|
primaryDN = [row objectForKey: @"c_foldername"];
|
||||||
if ([primaryDN length])
|
if ([primaryDN length])
|
||||||
|
@ -294,8 +297,18 @@ static NSArray *childRecordFields = nil;
|
||||||
ownerIdentity = [[SOGoUserManager sharedUserManager]
|
ownerIdentity = [[SOGoUserManager sharedUserManager]
|
||||||
contactInfosForUserWithUIDorEmail: owner];
|
contactInfosForUserWithUIDorEmail: owner];
|
||||||
|
|
||||||
[displayName appendFormat: @" (%@ <%@>)", [ownerIdentity objectForKey: @"cn"],
|
folderSubscriptionValues = [[NSMutableDictionary alloc] initWithObjectsAndKeys: displayName, @"FolderName",
|
||||||
[ownerIdentity objectForKey: @"c_email"]];
|
[ownerIdentity objectForKey: @"cn"], @"UserName",
|
||||||
|
[ownerIdentity objectForKey: @"c_email"], @"Email", nil];
|
||||||
|
|
||||||
|
dd = [[context activeUser] domainDefaults];
|
||||||
|
subjectFormat = [dd subscriptionFolderFormat];
|
||||||
|
|
||||||
|
displayName = [folderSubscriptionValues keysWithFormat: subjectFormat];
|
||||||
|
[displayName retain];
|
||||||
|
|
||||||
|
/*[displayName appendFormat: @" (%@ <%@>)", [ownerIdentity objectForKey: @"cn"],
|
||||||
|
[ownerIdentity objectForKey: @"c_email"]];*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue