aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mod/connections.php25
-rw-r--r--view/css/mod_connections.css17
-rw-r--r--view/js/autocomplete.js2
-rw-r--r--view/js/mod_connections.js7
-rwxr-xr-xview/tpl/connection_template.tpl17
5 files changed, 61 insertions, 7 deletions
diff --git a/mod/connections.php b/mod/connections.php
index 915d14b77..1635dcee0 100644
--- a/mod/connections.php
+++ b/mod/connections.php
@@ -228,6 +228,24 @@ function connections_content(&$a) {
foreach($r as $rr) {
if($rr['xchan_url']) {
+
+ $status_str = '';
+ $status = array(
+ ((intval($rr['abook_pending'])) ? t('Pending') : ''),
+ ((intval($rr['abook_archived'])) ? t('Archived') : ''),
+ ((intval($rr['abook_hidden'])) ? t('Hidden') : ''),
+ ((intval($rr['abook_ignored'])) ? t('Ignored') : ''),
+ ((intval($rr['abook_blocked'])) ? t('Blocked') : '')
+ );
+
+ foreach($status as $str) {
+ if(!$str)
+ continue;
+ $status_str .= $str;
+ $status_str .= ', ';
+ }
+ $status_str = rtrim($status_str, ', ');
+
$contacts[] = array(
'img_hover' => sprintf( t('%1$s [%2$s]'),$rr['xchan_name'],$rr['xchan_url']),
'edit_hover' => t('Edit connection'),
@@ -244,7 +262,12 @@ function connections_content(&$a) {
'edit' => t('Edit'),
'delete' => t('Delete'),
'url' => chanlink_url($rr['xchan_url']),
- 'network' => network_to_name($rr['network']),
+ 'network' => network_to_name($rr['xchan_network']),
+ 'public_forum' => ((intval($rr['xchan_pubforum'])) ? true : false),
+ 'status_label' => t('Status'),
+ 'status' => $status_str,
+ 'connected_label' => t('Connected'),
+ 'connected' => datetime_convert('UTC',date_default_timezone_get(),$rr['abook_created'], 'c')
);
}
}
diff --git a/view/css/mod_connections.css b/view/css/mod_connections.css
index 0f35c5dbf..a33430e48 100644
--- a/view/css/mod_connections.css
+++ b/view/css/mod_connections.css
@@ -16,3 +16,20 @@
opacity: 0.3;
filter:alpha(opacity=30);
}
+
+.contact-photo-wrapper {
+ display: table-cell;
+ table-layout: fixed;
+ vertical-align: top;
+}
+
+.contact-info {
+ display: table-cell;
+ table-layout: fixed;
+ vertical-align: top;
+ padding-left: 10px;
+}
+
+.contact-info-label {
+ font-weight: bold;
+}
diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js
index 511a7f815..437425a0e 100644
--- a/view/js/autocomplete.js
+++ b/view/js/autocomplete.js
@@ -196,4 +196,4 @@ function submit_form(e) {
if(typeof onselect !== 'undefined')
a.on('textComplete:select', function(e, value, strategy) { onselect(value); });
};
-})( jQuery ); \ No newline at end of file
+})( jQuery );
diff --git a/view/js/mod_connections.js b/view/js/mod_connections.js
index f29d96729..112204a5a 100644
--- a/view/js/mod_connections.js
+++ b/view/js/mod_connections.js
@@ -1,15 +1,16 @@
-$(document).ready(function() {
+$(document).ready(function() {
$("#contacts-search").contact_autocomplete(baseurl + '/acl', 'a', true);
+ $(".autotime").timeago();
});
$("#contacts-search").keyup(function(event){
if(event.keyCode == 13){
- $("#contacts-search-submit").click();
+ $("#contacts-search").click();
}
});
$(".autocomplete-w1 .selected").keyup(function(event){
if(event.keyCode == 13){
- $("#contacts-search-submit").click();
+ $("#contacts-search").click();
}
});
diff --git a/view/tpl/connection_template.tpl b/view/tpl/connection_template.tpl
index aca6aa991..9813b83e2 100755
--- a/view/tpl/connection_template.tpl
+++ b/view/tpl/connection_template.tpl
@@ -4,12 +4,25 @@
<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>
</div>
- <h3><a href="{{$contact.url}}" title="{{$contact.img_hover}}" >{{$contact.name}}</a></h3>
+ <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>
<div class="section-content-tools-wrapper">
- <div class="contact-entry-photo-wrapper" >
+ <div class="contact-photo-wrapper" >
<a href="{{$contact.url}}" title="{{$contact.img_hover}}" ><img class="directory-photo-img {{if $contact.classes}}{{$contact.classes}}{{/if}}" src="{{$contact.thumb}}" alt="{{$contact.name}}" /></a>
</div>
+ <div class="contact-info">
+ {{if $contact.status}}
+ <div class="contact-info-element">
+ <span class="contact-info-label">{{$contact.status_label}}:</span> {{$contact.status}}
+ </div>
+ {{/if}}
+ {{if $contact.connected}}
+ <div class="contact-info-element">
+ <span class="contact-info-label">{{$contact.connected_label}}:</span> <span class="autotime" title="{{$contact.connected}}"></span>
+ </div>
+ {{/if}}
+ </div>
+
</div>
</div>