merge of 'a343f74f4a124ecd3e0d422d0fc2b88a22459e97'

and 'dab4ee4d9a35331ab917eaf590b5318395be4a43'

Monotone-Parent: a343f74f4a124ecd3e0d422d0fc2b88a22459e97
Monotone-Parent: dab4ee4d9a35331ab917eaf590b5318395be4a43
Monotone-Revision: 149c53aba731f158240e0887a26fa6309fc3694a

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2010-01-22T20:16:52
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle 2010-01-22 20:16:52 +00:00
commit 05aa300146
4 changed files with 21 additions and 4 deletions

View file

@ -1,3 +1,11 @@
2010-01-22 Francis Lachapelle <flachapelle@inverse.ca>
* UI/Contacts/UIxListEditor.m (-references): avoid printing the
email address between brackets if not defined.
* UI/Contacts/UIxListView.m (-itemHasEmail): new method that
returns YES if the current list item has an email address.
2010-01-22 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* Tools/SOGoToolRestore.m (+initialize): we need to invoke

View file

@ -79,8 +79,12 @@
{
ref = [[list cardReferences] objectAtIndex: i];
row = [NSMutableDictionary dictionary];
[row setObject: [NSString stringWithFormat: @"%@ <%@>", [ref fn], [ref email]]
forKey: @"name"];
if ([[ref email] length] > 0)
[row setObject: [NSString stringWithFormat: @"%@ <%@>", [ref fn], [ref email]]
forKey: @"name"];
else
[row setObject: [ref fn]
forKey: @"name"];
[row setObject: [ref reference] forKey: @"id"];
[rc addObject: row];
}

View file

@ -61,6 +61,11 @@
return [list cardReferences];
}
- (BOOL) itemHasEmail
{
return [[item email] length] > 0;
}
- (NSString *) itemHref
{
return [NSString stringWithFormat: @"mailto:%@",

View file

@ -20,8 +20,8 @@
<ul class="listComponents">
<var:foreach list="components" item="item">
<li><var:string var:value="itemName"/>
<a var:href="itemHref" var:onclick="itemOnclick">
&lt;<var:string var:value="itemEmail"/>&gt;</a>
<var:if condition="itemHasEmail"><a var:href="itemHref" var:onclick="itemOnclick">
&lt;<var:string var:value="itemEmail"/>&gt;</a></var:if>
</li>
</var:foreach>
</ul>