You are here

function theme_user_relationships_relationships_block_empty in User Relationships 5

Generate the content of an empty My/User Relationships block

1 theme call to theme_user_relationships_relationships_block_empty()
user_relationships_block in ./user_relationships_hooks.inc

File

./user_relationships_theme.inc, line 270

Code

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