Logo Search packages:      
Sourcecode: davical version File versions  Download package

RSCDSUser::RenderRelationshipsFrom ( ef,
title = null 
)

Render the user's relationships to other users & resources

Returns:
string The string of html to be output

Definition at line 108 of file RSCDSUser.php.

Referenced by Render().

                                                         {
    global $session, $c;

    if ( $title == null ) $title = i18n("Relationships from this user");

    $browser = new Browser("");

    $browser->AddHidden( 'user_link', "'<a href=\"$c->base_url/usr.php?user_no=' || user_no || '\">' || fullname || '</a>'" );
    $browser->AddColumn( 'rt_name', translate('Relationship') );
    $browser->AddColumn( 'fullname', translate('Linked To'), 'left', '##user_link##' );
    $browser->AddHidden( 'confers' );
    $browser->AddColumn( 'email', translate('EMail') );

    $browser->SetJoins( 'relationship NATURAL JOIN relationship_type rt LEFT JOIN usr ON (to_user = user_no)' );
    $browser->SetWhere( "from_user = $this->user_no" );

    if ( isset( $_GET['o']) && isset($_GET['d']) ) {
      $browser->AddOrder( $_GET['o'], $_GET['d'] );
      if ( $_GET['o'][0] != 'fullname' ) $browser->AddOrder( 'fullname', 'A', 0, 1 );
    }
    else {
      $browser->AddOrder( 'rt_name', 'A' );
      $browser->AddOrder( 'fullname', 'A', 0, 1 );
    }

    if ( $c->enable_row_linking ) {
      $browser->RowFormat( "<tr onMouseover=\"LinkHref(this,1);\" title=\"".translate("Click to display that user")."\" class=\"r%d\">\n", "</tr>\n", '#even' );
    }
    else {
      $browser->RowFormat( "<tr class=\"r%d\">\n", "</tr>\n", '#even' );
    }
    $browser->SetTranslatable( array('rt_name') );
    $browser->DoQuery();


    $html = ( $title == "" ? "" : $ef->BreakLine(translate($title)) );
    $html .= "<tr><td>&nbsp;</td><td>\n";
    $html .= $browser->Render();
    $html .= "</td></tr>\n";

    return $html;
  }

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index