}
$a->page['aside'] = '';
- return replace_macros(get_markup_template('confirm.tpl'), array(
+
+ return replace_macros(get_markup_template('contact_drop_confirm.tpl'), array(
+ '$contact' => _contact_detail_for_template($orig_record[0]),
'$method' => 'get',
'$message' => t('Do you really want to delete this contact?'),
'$extra_inputs' => $inputs,
$contacts = array();
if(count($r)) {
-
foreach($r as $rr) {
-
- switch($rr['rel']) {
- case CONTACT_IS_FRIEND:
- $dir_icon = 'images/lrarrow.gif';
- $alt_text = t('Mutual Friendship');
- break;
- case CONTACT_IS_FOLLOWER;
- $dir_icon = 'images/larrow.gif';
- $alt_text = t('is a fan of yours');
- break;
- case CONTACT_IS_SHARING;
- $dir_icon = 'images/rarrow.gif';
- $alt_text = t('you are a fan of');
- break;
- default:
- break;
- }
- if(($rr['network'] === NETWORK_DFRN) && ($rr['rel'])) {
- $url = "redir/{$rr['id']}";
- $sparkle = ' class="sparkle" ';
- }
- else {
- $url = $rr['url'];
- $sparkle = '';
- }
-
-
- $contacts[] = array(
- 'img_hover' => sprintf( t('Visit %s\'s profile [%s]'),$rr['name'],$rr['url']),
- 'edit_hover' => t('Edit contact'),
- 'photo_menu' => contact_photo_menu($rr),
- 'id' => $rr['id'],
- 'alt_text' => $alt_text,
- 'dir_icon' => $dir_icon,
- 'thumb' => proxy_url($rr['thumb']),
- 'name' => $rr['name'],
- 'username' => $rr['name'],
- 'sparkle' => $sparkle,
- 'itemurl' => $rr['url'],
- 'url' => $url,
- 'network' => network_to_name($rr['network']),
- );
+ $contacts[] = _contact_detail_for_template($rr);
}
-
-
-
}
$tpl = get_markup_template("contacts-template.tpl");
return $o;
}
+
+function _contact_detail_for_template($rr){
+ switch($rr['rel']) {
+ case CONTACT_IS_FRIEND:
+ $dir_icon = 'images/lrarrow.gif';
+ $alt_text = t('Mutual Friendship');
+ break;
+ case CONTACT_IS_FOLLOWER;
+ $dir_icon = 'images/larrow.gif';
+ $alt_text = t('is a fan of yours');
+ break;
+ case CONTACT_IS_SHARING;
+ $dir_icon = 'images/rarrow.gif';
+ $alt_text = t('you are a fan of');
+ break;
+ default:
+ break;
+ }
+ if(($rr['network'] === NETWORK_DFRN) && ($rr['rel'])) {
+ $url = "redir/{$rr['id']}";
+ $sparkle = ' class="sparkle" ';
+ }
+ else {
+ $url = $rr['url'];
+ $sparkle = '';
+ }
+
+
+ return array(
+ 'img_hover' => sprintf( t('Visit %s\'s profile [%s]'),$rr['name'],$rr['url']),
+ 'edit_hover' => t('Edit contact'),
+ 'photo_menu' => contact_photo_menu($rr),
+ 'id' => $rr['id'],
+ 'alt_text' => $alt_text,
+ 'dir_icon' => $dir_icon,
+ 'thumb' => proxy_url($rr['thumb']),
+ 'name' => $rr['name'],
+ 'username' => $rr['name'],
+ 'sparkle' => $sparkle,
+ 'itemurl' => $rr['url'],
+ 'url' => $url,
+ 'network' => network_to_name($rr['network']),
+ );
+
+}
\ No newline at end of file
<a href="{{$contact.url}}" title="{{$contact.img_hover}}" /><img src="{{$contact.thumb}}" {{$contact.sparkle}} alt="{{$contact.name}}" /></a>
+ {{if !$no_contacts_checkbox}}
<input type="checkbox" class="contact-select" name="contact_batch[]" value="{{$contact.id}}">
+ {{/if}}
{{if $contact.photo_menu}}
<span onclick="openClose('contact-photo-menu-{{$contact.id}}');" class="fakelink contact-photo-menu-button" id="contact-photo-menu-button-{{$contact.id}}">menu</span>
- <div class="contact-photo-menu" id="contact-photo-menu-{{$contact.id}}">
- <ul>
- {{foreach $contact.photo_menu as $k=>$c}}
- {{if $c.2}}
- <li><a class="{{$k}}" target="redir" href="{{$c.1}}">{{$c.0}}</a></li>
- {{else}}
- <li><a class="{{$k}}" href="{{$c.1}}">{{$c.0}}</a></li>
- {{/if}}
- {{/foreach}}
- </ul>
- </div>
+ <div class="contact-photo-menu" id="contact-photo-menu-{{$contact.id}}">
+ <ul>
+ {{foreach $contact.photo_menu as $k=>$c}}
+ {{if $c.2}}
+ <li><a class="{{$k}}" target="redir" href="{{$c.1}}">{{$c.0}}</a></li>
+ {{else}}
+ <li><a class="{{$k}}" href="{{$c.1}}">{{$c.0}}</a></li>
+ {{/if}}
+ {{/foreach}}
+ </ul>
+ </div>
{{/if}}
</div>
</div>
<div class="contact-entry-photo-end" ></div>
- <div class="contact-entry-name" id="contact-entry-name-{{$contact.id}}" >{{$contact.name}}</div>
+ <div class="contact-entry-name" id="contact-entry-name-{{$contact.id}}" >{{$contact.name}}</div>
<div class="contact-entry-end" ></div>
</div>