(fix) show only the URL of web calendars, when asked

This commit is contained in:
Ludovic Marcotte
2015-06-15 12:03:38 -04:00
parent f7f83ae1c7
commit a49032a6bd
2 changed files with 52 additions and 28 deletions
@@ -18,8 +18,11 @@
* Boston, MA 02111-1307, USA.
*/
#import <Foundation/NSURL.h>
#import <SOGo/SOGoSystemDefaults.h>
#import <Appointments/SOGoAppointmentFolder.h>
#import <Appointments/SOGoWebAppointmentFolder.h>
#import "UIxCalendarFolderLinksTemplate.h"
@@ -115,4 +118,14 @@
enablePublicAccess];
}
- (BOOL) isWebCalendar
{
return ([calendar isKindOfClass: [SOGoWebAppointmentFolder class]]);
}
- (NSString *) webCalendarURL
{
return [calendar folderPropertyValueInCategory: @"WebCalendars"];
}
@end
@@ -12,40 +12,51 @@
<div layout="column" layout-padding="layout-padding">
<div layout="column" layout-padding="layout-padding">
<span><var:string label:value="Authenticated User Access"/></span>
<md-input-container>
<label><var:string label:value="CalDAV URL"/></label>
<input var:value="calDavURL" ng-readonly="true"/>
</md-input-container>
<md-input-container>
<label><var:string label:value="WebDAV ICS URL"/></label>
<input var:value="webDavICSURL" ng-readonly="true"/>
</md-input-container>
<md-input-container>
<label><var:string label:value="WebDAV XML URL"/></label>
<input var:value="webDavXMLURL" ng-readonly="true"/>
</md-input-container>
<var:if condition="isWebCalendar">
<md-input-container>
<label><var:string label:value="URL:"/></label>
<input var:value="webCalendarURL" ng-readonly="true"/>
</md-input-container>
</var:if>
<var:if condition="isWebCalendar" const:negate="YES">
<span><var:string label:value="Authenticated User Access"/></span>
<md-input-container>
<label><var:string label:value="CalDAV URL"/></label>
<input var:value="calDavURL" ng-readonly="true"/>
</md-input-container>
<md-input-container>
<label><var:string label:value="WebDAV ICS URL"/></label>
<input var:value="webDavICSURL" ng-readonly="true"/>
</md-input-container>
<md-input-container>
<label><var:string label:value="WebDAV XML URL"/></label>
<input var:value="webDavXMLURL" ng-readonly="true"/>
</md-input-container>
</var:if>
</div>
<var:if condition="isPublicAccessEnabled">
<div layout="column" layout-padding="layout-padding">
<span><var:string label:value="Public Access"/></span>
<var:if condition="isWebCalendar" const:negate="YES">
<div layout="column" layout-padding="layout-padding">
<span><var:string label:value="Public Access"/></span>
<md-input-container>
<label><var:string label:value="CalDAV URL: "/></label>
<input var:value="publicCalDavURL" ng-readonly="true"/>
</md-input-container>
</div>
<md-input-container>
<label><var:string label:value="CalDAV URL: "/></label>
<input var:value="publicCalDavURL" ng-readonly="true"/>
<label><var:string label:value="WebDAV ICS URL"/></label>
<input var:value="publicWebDavICSURL" ng-readonly="true"/>
</md-input-container>
</div>
<md-input-container>
<label><var:string label:value="WebDAV ICS URL"/></label>
<input var:value="publicWebDavICSURL" ng-readonly="true"/>
</md-input-container>
<md-input-container>
<label><var:string label:value="WebDAV XML URL"/></label>
<input var:value="publicWebDavXMLURL" ng-readonly="true"/>
</md-input-container>
<md-input-container>
<label><var:string label:value="WebDAV XML URL"/></label>
<input var:value="publicWebDavXMLURL" ng-readonly="true"/>
</md-input-container>
</var:if>
</var:if>
</div>