bring back the ability to ignore a pending connection request without deleting it and without always having it in your face and without jumping through hoops.

This commit is contained in:
redmatrix 2016-01-26 16:57:36 -08:00
parent 9c71b74d37
commit 9b08051703
4 changed files with 8 additions and 3 deletions

View File

@ -2,7 +2,7 @@
require_once('include/menu.php');
function import_channel($channel, $account_id) {
function import_channel($channel, $account_id, $seize) {
if(! array_key_exists('channel_system',$channel)) {
$channel['channel_system'] = (($channel['channel_pageflags'] & 0x1000) ? 1 : 0);

View File

@ -269,6 +269,8 @@ function connections_content(&$a) {
'connected' => datetime_convert('UTC',date_default_timezone_get(),$rr['abook_created'], 'c'),
'approve_hover' => t('Approve connection'),
'approve' => (($rr['abook_pending']) ? t('Approve') : false),
'ignore_hover' => t('Ignore connection'),
'ignore' => ((! $rr['abook_ignored']) ? t('Ignore') : false),
'recent_label' => t('Recent activity'),
'recentlink' => z_root() . '/network/?f=&cid=' . intval($rr['abook_id'])
);

View File

@ -123,7 +123,7 @@ function import_account(&$a, $account_id) {
if(array_key_exists('channel',$data)) {
if($completed < 1) {
$channel = import_channel($data['channel'], $account_id);
$channel = import_channel($data['channel'], $account_id, $seize);
}
else {

View File

@ -1,9 +1,12 @@
<div id="contact-entry-wrapper-{{$contact.id}}">
<div class="section-subtitle-wrapper">
<div class="pull-right">
{{if $contact.approve}}
{{if $contact.approve && $contact.ignore}}
<form action="connedit/{{$contact.id}}" method="post" >
<button type="submit" class="btn btn-success btn-xs" name="pending" value="1" title="{{$contact.approve_hover}}"><i class="icon-ok"></i> {{$contact.approve}}</button>
<a href="connedit/{{$contact.id}}/ignore" class="btn btn-danger btn-xs" title={{$contact.ignore_hover}}><i class="icon-ban-circle"></i> {{$contact.ignore}}</a>
{{/if}}
<a href="#" class="btn btn-danger btn-xs" title="{{$contact.delete_hover}}" onclick="dropItem('{{$contact.deletelink}}', '#contact-entry-wrapper-{{$contact.id}}'); return false;"><i class="icon-trash"></i> {{$contact.delete}}</a>
<a href="{{$contact.link}}" class="btn btn-default btn-xs" title="{{$contact.edit_hover}}"><i class="icon-pencil"></i></a>