mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-23 04:15:26 +00:00
Monotone-Parent: 649a1187cf216e088818ea020c5b497e84dd0fa4
Monotone-Revision: 2ce562acf878ad1f7c91a19309985a2f48a7cd2d Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-08-28T17:22:36 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2008-08-28 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/MailPartViewers/UIxMailPartICalViewer.m
|
||||
([UIxMailPartICalViewer -hasCalendarAccess]): new method that
|
||||
returns whether the current user has access to the calendar
|
||||
module, so that buttons can be hidden.
|
||||
|
||||
2008-08-27 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/Mailer/SOGoMailBodyPart.m ([SOGoMailBodyPart
|
||||
|
||||
@@ -215,29 +215,37 @@
|
||||
return [folder lookupName: @"personal" inContext: context acquire: NO];
|
||||
}
|
||||
|
||||
- (BOOL) hasCalendarAccess
|
||||
{
|
||||
return [[context activeUser] canAccessModule: @"Calendar"];
|
||||
}
|
||||
|
||||
- (SOGoAppointmentObject *) storedEventObject
|
||||
{
|
||||
/* lookup object in the users Calendar */
|
||||
SOGoAppointmentFolder *calendar;
|
||||
NSString *filename;
|
||||
|
||||
if (!storedEventObject)
|
||||
if ([self hasCalendarAccess])
|
||||
{
|
||||
calendar = [self calendarFolder];
|
||||
if ([calendar isKindOfClass: [NSException class]])
|
||||
[self errorWithFormat:@"Did not find Calendar folder: %@", calendar];
|
||||
else
|
||||
if (!storedEventObject)
|
||||
{
|
||||
filename = [calendar resourceNameForEventUID:[[self inEvent] uid]];
|
||||
if (filename)
|
||||
calendar = [self calendarFolder];
|
||||
if ([calendar isKindOfClass: [NSException class]])
|
||||
[self errorWithFormat:@"Did not find Calendar folder: %@", calendar];
|
||||
else
|
||||
{
|
||||
storedEventObject = [calendar lookupName: filename
|
||||
inContext: [self context]
|
||||
acquire: NO];
|
||||
if ([storedEventObject isKindOfClass: [NSException class]])
|
||||
storedEventObject = nil;
|
||||
else
|
||||
[storedEventObject retain];
|
||||
filename = [calendar resourceNameForEventUID:[[self inEvent] uid]];
|
||||
if (filename)
|
||||
{
|
||||
storedEventObject = [calendar lookupName: filename
|
||||
inContext: [self context]
|
||||
acquire: NO];
|
||||
if ([storedEventObject isKindOfClass: [NSException class]])
|
||||
storedEventObject = nil;
|
||||
else
|
||||
[storedEventObject retain];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -418,7 +426,8 @@
|
||||
|
||||
- (BOOL) canOriginalEventBeUpdated
|
||||
{
|
||||
return ([self hasSenderStatusChanged]
|
||||
return ([self hasCalendarAccess]
|
||||
&& [self hasSenderStatusChanged]
|
||||
&& ([[inEvent sequence] compare: [storedEvent sequence]]
|
||||
!= NSOrderedAscending));
|
||||
}
|
||||
|
||||
@@ -39,24 +39,26 @@
|
||||
<var:if condition="inCalendar.method.uppercaseString" const:value="REQUEST">
|
||||
<!-- sent to attendees to propose or update a meeting -->
|
||||
<var:if condition="isLoggedInUserAnAttendee">
|
||||
<p class="uix_ical_toolbar" id="iCalendarToolbar">
|
||||
<var:if condition="currentUserAttendee.partStatWithDefault"
|
||||
const:value="ACCEPTED" const:negate="YES">
|
||||
<input id="iCalendarAccept" class="button"
|
||||
type="button" label:value="Accept"/>
|
||||
</var:if>
|
||||
<var:if condition="currentUserAttendee.partStatWithDefault"
|
||||
const:value="DECLINED" const:negate="YES">
|
||||
<input id="iCalendarDecline" class="button"
|
||||
type="button" label:value="Decline"/>
|
||||
</var:if>
|
||||
<!-- <input id="iCalendarTentative" class="button"
|
||||
type="button" label:value="Tentative"/> -->
|
||||
<var:if condition="isEventStoredInCalendar" const:negate="YES">
|
||||
| <input id="iCalendarAddToCalendar" class="button"
|
||||
type="button" label:value="Add to calendar"/>
|
||||
</var:if>
|
||||
</p>
|
||||
<var:if condition="hasCalendarAccess">
|
||||
<p class="uix_ical_toolbar" id="iCalendarToolbar">
|
||||
<var:if condition="currentUserAttendee.partStatWithDefault"
|
||||
const:value="ACCEPTED" const:negate="YES">
|
||||
<input id="iCalendarAccept" class="button"
|
||||
type="button" label:value="Accept"/>
|
||||
</var:if>
|
||||
<var:if condition="currentUserAttendee.partStatWithDefault"
|
||||
const:value="DECLINED" const:negate="YES">
|
||||
<input id="iCalendarDecline" class="button"
|
||||
type="button" label:value="Decline"/>
|
||||
</var:if>
|
||||
<!-- <input id="iCalendarTentative" class="button"
|
||||
type="button" label:value="Tentative"/> -->
|
||||
<var:if condition="isEventStoredInCalendar" const:negate="YES">
|
||||
| <input id="iCalendarAddToCalendar" class="button"
|
||||
type="button" label:value="Add to calendar"/>
|
||||
</var:if>
|
||||
</p>
|
||||
</var:if>
|
||||
|
||||
<p>
|
||||
<var:string label:value="Organizer" />
|
||||
@@ -76,7 +78,7 @@
|
||||
</var:if>
|
||||
</var:if>
|
||||
|
||||
|
||||
|
||||
<var:if condition="inCalendar.method.uppercaseString" const:value="REPLY">
|
||||
<!-- sent to organizer to update the status of the participant -->
|
||||
<var:if condition="isReplySenderAnAttendee" const:negate="1">
|
||||
@@ -89,8 +91,8 @@
|
||||
<input id="iCalendarUpdateUserStatus" class="button"
|
||||
type="button" label:value="Update status"/>
|
||||
</p>
|
||||
|
||||
<!-- TODO: replies to events not in the calendar? -->
|
||||
|
||||
<!-- TODO: replies to events not in the calendar? -->
|
||||
|
||||
<p>
|
||||
Status Update:
|
||||
|
||||
Reference in New Issue
Block a user