diff --git a/ChangeLog b/ChangeLog index 96d4ecfee..42e45b227 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2009-07-29 Francis Lachapelle + * UI/Scheduler/UIxComponentEditor.m ([UIxComponentEditor + -hasAttendees]): new method used to show organizer only if the event + has attenddes (read-only view). + * UI/Scheduler/UIxTaskEditor.m ([UIxTaskEditor -taskStartDateTimeText]): new method to return a localized description of the start date and time. diff --git a/UI/Scheduler/UIxComponentEditor.h b/UI/Scheduler/UIxComponentEditor.h index 2fdb1b28d..4886ee918 100644 --- a/UI/Scheduler/UIxComponentEditor.h +++ b/UI/Scheduler/UIxComponentEditor.h @@ -140,6 +140,8 @@ - (void) setAttach: (NSString *) _attachUrl; - (NSString *) attach; +- (BOOL) hasAttendees; + - (void) setAttendeesNames: (NSString *) newAttendeesNames; - (NSString *) attendeesNames; diff --git a/UI/Scheduler/UIxComponentEditor.m b/UI/Scheduler/UIxComponentEditor.m index 7985adf25..3e6fa16b5 100644 --- a/UI/Scheduler/UIxComponentEditor.m +++ b/UI/Scheduler/UIxComponentEditor.m @@ -744,6 +744,11 @@ iRANGE(2); // return [item keysWithFormat: @"%{fullName} <%{email}>"]; //} +- (BOOL) hasAttendees +{ + return ([[component attendees] count] > 0); +} + - (void) setAttendeesNames: (NSString *) newAttendeesNames { ASSIGN (attendeesNames, newAttendeesNames); @@ -1536,7 +1541,7 @@ RANGE(2); owner = [componentCalendar ownerInContext: context]; login = [[context activeUser] login]; isOwner = [owner isEqualToString: login]; - hasAttendees = ([[component attendees] count] > 0); + hasAttendees = [self hasAttendees]; organizerEmail = [[component organizer] email]; hasOrganizer = ([organizerEmail length] > 0); diff --git a/UI/Templates/SchedulerUI/UIxComponentEditor.wox b/UI/Templates/SchedulerUI/UIxComponentEditor.wox index c683960f1..6b085ed51 100644 --- a/UI/Templates/SchedulerUI/UIxComponentEditor.wox +++ b/UI/Templates/SchedulerUI/UIxComponentEditor.wox @@ -203,9 +203,11 @@ - +