]> git.mxchange.org Git - friendica.git/commitdiff
The contact page now shows the connection status.
authorMichael Vogel <icarus@dabo.de>
Tue, 27 Oct 2015 22:10:52 +0000 (23:10 +0100)
committerMichael Vogel <icarus@dabo.de>
Tue, 27 Oct 2015 22:10:52 +0000 (23:10 +0100)
mod/dirfind.php
view/global.css
view/theme/vier/templates/contact_template.tpl

index 492f39d5a60a7d9e832ac498c03f4d8e88a7ec43..c2b18e3e24143d036d21545c3e3b9664d7f1b7cb 100644 (file)
@@ -3,6 +3,7 @@ require_once('include/contact_widgets.php');
 require_once('include/socgraph.php');
 require_once('include/Contact.php');
 require_once('include/contact_selectors.php');
+require_once('mod/contacts.php');
 
 function dirfind_init(&$a) {
 
@@ -77,7 +78,7 @@ function dirfind_content(&$a, $prefix = "") {
                        $j = new stdClass();
                        $j->total = $count[0]["total"];
                        $j->items_page = $perpage;
-                       $j->page = $a->pager['page'];                   
+                       $j->page = $a->pager['page'];
                        foreach ($results AS $result) {
                                if (poco_alternate_ostatus_url($result["url"]))
                                         continue;
@@ -121,15 +122,21 @@ function dirfind_content(&$a, $prefix = "") {
 
                        foreach($j->results as $jj) {
 
+                               $alt_text = "";
+
+                               $itemurl = $jj->url;
+
                                // If We already know this contact then don't show the "connect" button
                                if ($jj->cid > 0) {
                                        $connlnk = "";
                                        $conntxt = "";
                                        $contact = q("SELECT * FROM `contact` WHERE `id` = %d",
                                                        intval($jj->cid));
-                                       if ($contact)
+                                       if ($contact) {
                                                $photo_menu = contact_photo_menu($contact[0]);
-                                       else
+                                               $details = _contact_detail_for_template($contact[0]);
+                                               $alt_text = $details['alt_text'];
+                                       } else
                                                $photo_menu = array();
                                } else {
                                        $connlnk = $a->get_baseurl().'/follow/?url='.(($jj->connect) ? $jj->connect : $jj->url);
@@ -141,8 +148,9 @@ function dirfind_content(&$a, $prefix = "") {
                                $jj->photo = str_replace("http:///photo/", get_server()."/photo/", $jj->photo);
 
                                $entry = array(
+                                       'alt_text' => $alt_text,
                                        'url' => zrl($jj->url),
-                                       'itemurl' => $jj->url,
+                                       'itemurl' => $itemurl,
                                        'name' => htmlentities($jj->name),
                                        'thumb' => proxy_url($jj->photo, false, PROXY_SIZE_THUMB),
                                        'img_hover' => $jj->tags,
index e1ccd8b920f4af46aee777fa7abfde968de62311..6b1c0bfc3a7166fe2c681d9b022d34825ad95249 100644 (file)
@@ -274,3 +274,8 @@ a {
 #poke-recip-label, #poke-action-label, #prvmail-message-label {
        margin: 10px 0 10px;
 }
+
+.contact-entry-photo img {
+  max-width: 96px;
+  max-height: 96px;
+}
index add2eff5c19f5e2a32cea5937323aee42e22a926..2993bb92cb038ba4005495adb00d56f0dce9e134 100644 (file)
@@ -5,7 +5,8 @@
                <!-- onmouseover="if (typeof t{{$contact.id}} != 'undefined') clearTimeout(t{{$contact.id}}); openMenu('contact-photo-menu-button-{{$contact.id}}')" 
                onmouseout="t{{$contact.id}}=setTimeout('closeMenu(\'contact-photo-menu-button-{{$contact.id}}\'); closeMenu(\'contact-photo-menu-{{$contact.id}}\');',200)" > -->
 
-                       <a href="{{$contact.url}}" title="{{$contact.img_hover}}" /><img src="{{$contact.thumb}}" {{$contact.sparkle}} alt="{{$contact.name}}" /></a>
+                       <!-- <a href="{{$contact.url}}" title="{{$contact.img_hover}}" /></a> -->
+                       <img src="{{$contact.thumb}}" {{$contact.sparkle}} alt="{{$contact.name}}" />
 
                        {{if $multiselect}}
                        <input type="checkbox" class="contact-select" name="contact_batch[]" value="{{$contact.id}}">