aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mod/connections.php8
-rw-r--r--mod/connedit.php4
-rwxr-xr-xview/tpl/abook_edit.tpl19
-rwxr-xr-xview/tpl/connection_template.tpl9
4 files changed, 11 insertions, 29 deletions
diff --git a/mod/connections.php b/mod/connections.php
index 08da4a790..3297ae8f8 100644
--- a/mod/connections.php
+++ b/mod/connections.php
@@ -251,15 +251,11 @@ function connections_content(&$a) {
'edit_hover' => t('Edit connection'),
'delete_hover' => t('Delete connection'),
'id' => $rr['abook_id'],
- 'alt_text' => $alt_text,
- 'dir_icon' => $dir_icon,
'thumb' => $rr['xchan_photo_m'],
'name' => $rr['xchan_name'],
- 'username' => $rr['xchan_name'],
'classes' => (intval($rr['abook_archived']) ? 'archived' : ''),
'link' => z_root() . '/connedit/' . $rr['abook_id'],
'deletelink' => z_root() . '/connedit/' . $rr['abook_id'] . '/drop',
- 'edit' => t('Edit'),
'delete' => t('Delete'),
'url' => chanlink_url($rr['xchan_url']),
'webbie_label' => t('Channel address'),
@@ -270,7 +266,9 @@ function connections_content(&$a) {
'status_label' => t('Status'),
'status' => $status_str,
'connected_label' => t('Connected'),
- 'connected' => datetime_convert('UTC',date_default_timezone_get(),$rr['abook_created'], 'c')
+ 'connected' => datetime_convert('UTC',date_default_timezone_get(),$rr['abook_created'], 'c'),
+ 'approve_hover' => t('Approve connection'),
+ 'approve' => (($rr['abook_pending']) ? t('Approve') : false)
);
}
}
diff --git a/mod/connedit.php b/mod/connedit.php
index bcf2d744b..cb785fc31 100644
--- a/mod/connedit.php
+++ b/mod/connedit.php
@@ -714,10 +714,6 @@ function connedit_content(&$a) {
'$slide' => $slide,
'$affinity' => $affinity,
'$pending_label' => t('Connection Pending Approval'),
- '$pending_modal_title' => t('Connection Request'),
- '$pending_modal_body' => sprintf(t('(%s) would like to connect with you. Please approve this connection to allow communication.'), $contact['xchan_addr']),
- '$pending_modal_approve' => t('Approve'),
- '$pending_modal_dismiss' => t('Approve Later'),
'$is_pending' => (intval($contact['abook_pending']) ? 1 : ''),
'$unapproved' => $unapproved,
'$inherited' => t('inherited'),
diff --git a/view/tpl/abook_edit.tpl b/view/tpl/abook_edit.tpl
index 255ed9cfa..4fa810cb4 100755
--- a/view/tpl/abook_edit.tpl
+++ b/view/tpl/abook_edit.tpl
@@ -73,25 +73,6 @@
</div>
</div>
</div>
- <div class="modal" id="abook-pending-modal" tabindex="-1" role="dialog">
- <div class="modal-dialog" role="document">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
- <h4 class="modal-title" id="myModalLabel">{{$pending_modal_title}}</h4>
- </div>
- <div class="modal-body">
- <strong>{{$name}}</strong> {{$pending_modal_body}}
- </div>
- <div class="modal-footer">
- <button class="btn btn-sm btn-danger pull-left" title="{{$buttons.delete.title}}" onclick="window.location.href='{{$buttons.delete.url}}'; return false;">{{$buttons.delete.label}}</button>
- <button type="button" class="btn btn-default" data-dismiss="modal">{{$pending_modal_dismiss}}</button>
- <button type="submit" class="btn btn-primary" name="pending" value="1">{{$pending_modal_approve}}</button>
- </div>
- </div>
- </div>
- </div>
- <script>$('#abook-pending-modal').modal('show');</script>
{{/if}}
{{if $affinity }}
diff --git a/view/tpl/connection_template.tpl b/view/tpl/connection_template.tpl
index a0bdf33aa..2629e5cf4 100755
--- a/view/tpl/connection_template.tpl
+++ b/view/tpl/connection_template.tpl
@@ -1,8 +1,15 @@
<div id="contact-entry-wrapper-{{$contact.id}}">
<div class="section-subtitle-wrapper">
<div class="pull-right">
+ {{if $contact.approve}}
+ <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>
+ {{/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-success btn-xs" title="{{$contact.edit_hover}}"><i class="icon-pencil"></i> {{$contact.edit}}</a>
+ <a href="{{$contact.link}}" class="btn btn-default btn-xs" title="{{$contact.edit_hover}}"><i class="icon-pencil"></i></a>
+ {{if $contact.approve}}
+ </form>
+ {{/if}}
</div>
<h3>{{if $contact.public_forum}}<i class="icon-comments-alt"></i>&nbsp;{{/if}}<a href="{{$contact.url}}" title="{{$contact.img_hover}}" >{{$contact.name}}</a></h3>
</div>