Monotone-Parent: b2bfdd5b59fed2950707131eca171b4758bcd635
Monotone-Revision: 57b39725f8c002b9b6cb9b05ad3fa2e2401cd46b Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-02-13T14:50:00 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
499c4d1efb
commit
f93e9b5b9d
|
@ -1,3 +1,8 @@
|
|||
2012-02-13 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/Contacts/UIxContactView.m (-photoURL, -hasPhoto): copied code
|
||||
from UIxContactEditor, thereby replacing "photosURL".
|
||||
|
||||
2012-02-08 Francis Lachapelle <flachapelle@inverse.ca>
|
||||
|
||||
* SoObjects/SOGo/SOGoGCSFolder.m (+webdavAclManager): must include
|
||||
|
|
|
@ -664,34 +664,18 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (NSArray *) photosURL
|
||||
- (BOOL) hasPhoto
|
||||
{
|
||||
return [[self clientObject] hasPhoto];
|
||||
}
|
||||
|
||||
- (NSString *) photoURL
|
||||
{
|
||||
NSArray *photoElements;
|
||||
NSURL *soURL;
|
||||
NSString *baseInlineURL, *photoURL;
|
||||
NGVCardPhoto *photo;
|
||||
int count, max;
|
||||
|
||||
if (!photosURL)
|
||||
{
|
||||
soURL = [[self clientObject] soURL];
|
||||
baseInlineURL = [soURL absoluteString];
|
||||
photoElements = [card childrenWithTag: @"photo"];
|
||||
max = [photoElements count];
|
||||
photosURL = [[NSMutableArray alloc] initWithCapacity: max];
|
||||
for (count = 0; count < max; count++)
|
||||
{
|
||||
photo = [photoElements objectAtIndex: count];
|
||||
if ([photo isInline])
|
||||
photoURL = [NSString stringWithFormat: @"%@/photo%d",
|
||||
baseInlineURL, count];
|
||||
else
|
||||
photoURL = [photo flattenedValuesForKey: @""];
|
||||
[photosURL addObject: photoURL];
|
||||
}
|
||||
}
|
||||
soURL = [[self clientObject] soURL];
|
||||
|
||||
return photosURL;
|
||||
return [NSString stringWithFormat: @"%@/photo", [soURL absoluteString]];
|
||||
}
|
||||
|
||||
@end /* UIxContactView */
|
||||
|
|
|
@ -19,8 +19,9 @@
|
|||
/><var:string value="screenName" escapeHTML="NO"
|
||||
/><var:string value="preferredAddress" escapeHTML="NO"
|
||||
/><var:string value="categories" escapeHTML="NO"
|
||||
/><var:foreach list="photosURL" item="currentPhotoURL"
|
||||
><br/><img var:src="currentPhotoURL" class="contactPhoto"/>
|
||||
/><var:if condition="hasPhoto"
|
||||
><img var:src="photoURL" class="contactPhoto"
|
||||
/></var:if>
|
||||
</var:foreach></div
|
||||
|
||||
><var:if condition="hasHomeInfos"
|
||||
|
|
Loading…
Reference in New Issue