mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-19 21:53:19 +00:00
Monotone-Parent: efb15318c83fe427840ce7814c65d5a7c2518a07
Monotone-Revision: 08fdc5d0a9471051564e0739b2dd3367c1e5143a Monotone-Author: crobert@inverse.ca Monotone-Date: 2009-08-21T14:25:42 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -20,8 +20,66 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <NGObjWeb/NSException+HTTP.h>
|
||||
#import <NGObjWeb/WOResponse.h>
|
||||
#import <NGCards/NGVList.h>
|
||||
#import <NGCards/NGVCard.h>
|
||||
|
||||
#import "UIxListView.h"
|
||||
|
||||
@implementation UIxListView
|
||||
|
||||
|
||||
- (NSString *) listName
|
||||
{
|
||||
return [list fn];
|
||||
}
|
||||
|
||||
- (BOOL) hasNickname
|
||||
{
|
||||
return [list nickname] != nil;
|
||||
}
|
||||
- (NSString *) listNickname
|
||||
{
|
||||
return [list nickname];
|
||||
}
|
||||
|
||||
- (BOOL) hasDescription
|
||||
{
|
||||
return [list description] != nil;
|
||||
}
|
||||
- (NSString *) listDescription
|
||||
{
|
||||
return [list description];
|
||||
}
|
||||
|
||||
- (NSArray *) components
|
||||
{
|
||||
return [list cardReferences];
|
||||
}
|
||||
- (NSString *) itemText
|
||||
{
|
||||
NSString *rc;
|
||||
|
||||
rc = [NSString stringWithFormat: @"%@ <%@>", [item fn], [item email]];
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (id <WOActionResults>) defaultAction
|
||||
{
|
||||
id rc;
|
||||
|
||||
list = [[self clientObject] vList];
|
||||
//TODO: make sure references are valid
|
||||
|
||||
if (list)
|
||||
rc = self;
|
||||
else
|
||||
rc = [NSException exceptionWithHTTPStatus: 404 /* Not Found */
|
||||
reason: @"could not locate contact"];
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user