From ab09c2001bd9384c4e3c2964c5d1a39a0e91b013 Mon Sep 17 00:00:00 2001 From: Sem Date: Thu, 8 Dec 2011 21:19:02 +0100 Subject: Arranged page to see friend requests. --- views/default/friendrequest/requests.php | 47 ++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 views/default/friendrequest/requests.php (limited to 'views/default/friendrequest/requests.php') diff --git a/views/default/friendrequest/requests.php b/views/default/friendrequest/requests.php new file mode 100644 index 000000000..1680bdc4e --- /dev/null +++ b/views/default/friendrequest/requests.php @@ -0,0 +1,47 @@ +'; + foreach ($vars['requests'] as $user) { + $icon = elgg_view_entity_icon($user, 'tiny', array('use_hover' => 'true')); + + $user_title = elgg_view('output/url', array( + 'href' => $user->getURL(), + 'text' => $user->name, + 'is_trusted' => true, + )); + + $url = "action/friends/add?friend={$user->guid}"; + $accept_button = elgg_view('output/url', array( + 'href' => $url, + 'text' => elgg_echo('accept'), + 'class' => 'elgg-button elgg-button-submit', + 'is_action' => true, + 'is_trusted' => true, + )); + + $url = "action/friendrequest/decline?guid={$user->guid}"; + $delete_button = elgg_view('output/confirmlink', array( + 'href' => $url, + 'confirm' => elgg_echo('friendrequest:remove:check'), + 'text' => elgg_echo('delete'), + 'class' => 'elgg-button elgg-button-delete mlm', + )); + + $body = "

$user_title

"; + $alt = $accept_button . $delete_button; + + echo '
  • '; + echo elgg_view_image_block($icon, $body, array('image_alt' => $alt)); + echo '
  • '; + } + echo ''; +} else { + echo '

    ' . elgg_echo('friendrequest:none') . "

    "; +} -- cgit v1.2.3