t('Saadetud palved'), 'received_requests' => t('Vastuvõetud palved') ); foreach ($sections as $column => $section) { if (!$$section) { continue; } $rows = array(); $rows[] = array( array('data' => $section_headings[$section], 'header' => TRUE, 'colspan' => 2) ); foreach ($$section as $relationship) { $links = array(); if ($section == 'sent_requests') { $links[] = theme('user_relationships_pending_request_cancel_link', $account->uid, $relationship->rid); } else { $links[] = theme('user_relationships_pending_request_approve_link', $account->uid, $relationship->rid); $links[] = theme('user_relationships_pending_request_disapprove_link', $account->uid, $relationship->rid); } $links = implode(' | ', $links); if ($relationship->requester_id == $account->uid) { $rows[] = array(t('@rel_name to !requestee', array('@rel_name' => $relationship->name, '!requestee' => theme('username', $relationship->requestee))), $links); } else { $rows[] = array(t('@rel_name from !requester', array('@rel_name' => $relationship->name, '!requester' => theme('username', $relationship->requester))), $links); } } $output .= theme('table', array(), $rows, array('class' => 'user-relationships-pending-listing-table')). theme('pager', NULL, $relationships_per_page, $pager_id++); } if ($output == '') { $output = t('Ootel sõpru ei leitud.'); } print $output; ?>