You are here

function theme_user_relationship_block_empty in User Relationships 5.2

Generate the content of an empty My/User Relationships block

File

plugins/user_relationship_blocks/user_relationship_blocks.module, line 322

Code

function theme_user_relationship_block_empty($account, $rtid) {
  if (!$account) {
    return;
  }
  global $user;
  if ($rtid == UR_BLOCK_ALL_TYPES) {
    $rtype_name = 'relationships';
  }
  else {
    $rtype = user_relationships_type_load($rtid);
    $rtype_name = $rtype->plural_name;
  }
  if ($account->uid == $user->uid) {
    return t('You have no @rels', array(
      '@rels' => $rtype_name,
    ));
  }
  else {
    return t('!name has no @rels', array(
      '!name' => theme('username', $account),
      '@rels' => $rtype_name,
    ));
  }
}