]> git.mxchange.org Git - friendica.git/commitdiff
template rework: use viewcontact_template.tpl for contact dealing pages
authorrabuzarus <>
Sun, 18 Oct 2015 15:12:48 +0000 (17:12 +0200)
committerrabuzarus <>
Sun, 18 Oct 2015 15:12:48 +0000 (17:12 +0200)
21 files changed:
mod/contacts.php
mod/dirfind.php
mod/match.php
mod/suggest.php
mod/viewcontacts.php
view/templates/contact_template.tpl
view/templates/contacts-template.tpl
view/theme/duepuntozero/style.css
view/theme/frost-mobile/style.css
view/theme/frost-mobile/templates/contact_template.tpl
view/theme/frost-mobile/templates/viewcontact_template.tpl [new file with mode: 0644]
view/theme/frost/style.css
view/theme/frost/templates/contact_template.tpl
view/theme/quattro/dark/style.css
view/theme/quattro/green/style.css
view/theme/quattro/lilac/style.css
view/theme/quattro/quattro.less
view/theme/quattro/templates/contact_template.tpl
view/theme/smoothly/style.css
view/theme/vier/style.css
view/theme/vier/templates/contact_template.tpl

index c562c9822da0f0664476ab42567e11b222666986..bdb25b022b90eb2bec1ee7646cc759089a40b423 100644 (file)
@@ -799,6 +799,7 @@ function contacts_content(&$a) {
                '$cmd' => $a->cmd,
                '$contacts' => $contacts,
                '$contact_drop_confirm' => t('Do you really want to delete this contact?'),
+               'multiselect' => 1,
                '$batch_actions' => array(
                        'contacts_batch_update' => t('Update'),
                        'contacts_batch_block' => t('Block')."/".t("Unblock"),
index 9e02a47e2075e98421c526f026440e345ebe3a6b..77e86c5db3056f469c7c2b34af88bfbf0f9fd55b 100644 (file)
@@ -141,8 +141,8 @@ function dirfind_content(&$a, $prefix = "") {
                                $entry = array(
                                        'url' => zrl($jj->url),
                                        'name' => htmlentities($jj->name),
-                                       'photo' => proxy_url($jj->photo, false, PROXY_SIZE_THUMB),
-                                       'tags' => $jj->tags,
+                                       'thumb' => proxy_url($jj->photo, false, PROXY_SIZE_THUMB),
+                                       'img_hover' => $jj->tags,
                                        'conntxt' => $conntxt,
                                        'connlnk' => $connlnk,
                                        'photo_menu' => $photo_menu,
@@ -151,11 +151,11 @@ function dirfind_content(&$a, $prefix = "") {
                                $entries[] = $entry;
                        }
 
-               $tpl = get_markup_template('match.tpl');
+               $tpl = get_markup_template('viewcontact_template.tpl');
 
                $o .= replace_macros($tpl,array(
                        'title' => sprintf( t('People Search - %s'), $search),
-                       '$entries' => $entries,
+                       '$contacts' => $entries,
                        '$paginate' => paginate($a),
                ));
 
index 380f6e74a44e58cc95ea168444af91c2f44c63c6..f6174da66cd919d9c6e02effda70bf438e973e2e 100644 (file)
@@ -56,32 +56,40 @@ function match_content(&$a) {
 
                if(count($j->results)) {
 
+                       $id = 0;
+
                        foreach($j->results as $jj) {
                                $match_nurl = normalise_link($jj->url);
                                $match = q("SELECT `nurl` FROM `contact` WHERE `uid` = '%d' AND nurl='%s' LIMIT 1",
                                        intval(local_user()),
                                        dbesc($match_nurl));
+
                                if (!count($match)) {
                                        $jj->photo = str_replace("http:///photo/", get_server()."/photo/", $jj->photo);
                                        $connlnk = $a->get_baseurl() . '/follow/?url=' . $jj->url;
+                                       $photo_menu = array(array(t("View Profile"), zrl($jj->url)));
+                                       $photo_menu[] = array(t("Connect/Follow"), $connlnk);
+
                                        $entry = array(
                                                'url' => zrl($jj->url),
                                                'name' => $jj->name,
-                                               'photo' => proxy_url($jj->photo, false, PROXY_SIZE_THUMB),
+                                               'thumb' => proxy_url($jj->photo, false, PROXY_SIZE_THUMB),
                                                'inttxt' => ' ' . t('is interested in:'),
                                                'conntxt' => t('Connect'),
                                                'connlnk' => $connlnk,
-                                               'tags' => $jj->tags
+                                               'img_hover' => $jj->tags,
+                                               'photo_menu' => $photo_menu,
+                                               'id' => ++$id,
                                        );
-                                       $entries[] = $entry;
                                }
+                               $entries[] = $entry;
                        }
 
-               $tpl = get_markup_template('match.tpl');
+               $tpl = get_markup_template('viewcontact_template.tpl');
 
                $o .= replace_macros($tpl,array(
                        '$title' => t('Profile Match'),
-                       'entries' => $entries,
+                       '$contacts' => $entries,
                        '$paginate' => paginate($a),
                ));
 
index 760bbf06ae5868166ffce247523cc25d7136c15f..5241e485ee66af0e40d936a890ff492e9a49eff7 100644 (file)
@@ -72,31 +72,41 @@ function suggest_content(&$a) {
                return $o;
        }
 
+       require_once 'include/contact_selectors.php';
+
        foreach($r as $rr) {
 
                $connlnk = $a->get_baseurl() . '/follow/?url=' . (($rr['connect']) ? $rr['connect'] : $rr['url']);
+               $ignlnk = $a->get_baseurl() . '/suggest?ignore=' . $rr['id'];
+               $photo_menu = array(array(t("View Profile"), zrl($jj->url)));
+               $photo_menu[] = array(t("Connect/Follow"), $connlnk);
+               $photo_menu[] = array(t('Ignore/Hide'), $ignlnk);
 
                $entry = array(
                        'url' => zrl($rr['url']),
-                       'url_clean' => $rr['url'],
+                       'itemurl' => $rr['url'],
+                       'img_hover' => $rr['url'],
                        'name' => $rr['name'],
-                       'photo' => proxy_url($rr['photo'], false, PROXY_SIZE_THUMB),
-                       'ignlnk' => $a->get_baseurl() . '/suggest?ignore=' . $rr['id'],
+                       'thumb' => proxy_url($rr['photo'], false, PROXY_SIZE_THUMB),
+                       'ignlnk' => $ignlnk,
                        'ignid' => $rr['id'],
                        'conntxt' => t('Connect'),
                        'connlnk' => $connlnk,
-                       'ignore' => t('Ignore/Hide')
+                       'photo_menu' => $photo_menu,
+                       'ignore' => t('Ignore/Hide'),
+                       'network' => network_to_name($rr['network'], $rr['url']),
+                       'id' => ++$id,
                );
                $entries[] = $entry;
        }
 
-       $tpl = get_markup_template('suggest_friends.tpl');
+       $tpl = get_markup_template('viewcontact_template.tpl');
 
        $o .= replace_macros($tpl,array(
                '$title' => t('Friend Suggestions'),
-               '$entries' => $entries,
+               '$contacts' => $entries,
+               
        ));
 
-//     $o .= paginate($a);
        return $o;
 }
index a6bf74b2885df20042a8de26186029a12db00917..927a597524adaa7b17565aea86e629e75b4a1128 100644 (file)
@@ -48,7 +48,7 @@ function viewcontacts_content(&$a) {
                if($rr['self'])
                        continue;
 
-           $url = $rr['url'];
+               $url = $rr['url'];
 
                // route DFRN profiles through the redirect
 
index d4f65f70f91c77c51c3a0ece4555e528f7bee513..4e8c04297d0d2eac46d6270ee6fa959d0901859f 100644 (file)
@@ -7,9 +7,10 @@
 
                        <a href="{{$contact.url}}" title="{{$contact.img_hover}}" /><img src="{{$contact.thumb}}" {{$contact.sparkle}} alt="{{$contact.name}}" /></a>
 
-                       {{if !$no_contacts_checkbox}}
+                       {{if $multiselect}}
                        <input type="checkbox" class="contact-select" name="contact_batch[]" value="{{$contact.id}}">
                        {{/if}}
+
                        {{if $contact.photo_menu}}
                        <span onclick="openClose('contact-photo-menu-{{$contact.id}}');" class="fakelink contact-photo-menu-button" id="contact-photo-menu-button-{{$contact.id}}">menu</span>
                        <div class="contact-photo-menu" id="contact-photo-menu-{{$contact.id}}">
index 896f9af4c9f9d7f5fd7714d72556e06451a008a8..bec295924ee51952fca8fe2761367e72a8127fb8 100644 (file)
@@ -1,5 +1,5 @@
 
-<h1>{{$header}}{{if $total}} ({{$total}}){{/if}}</h1>
+<h2>{{$header}}{{if $total}} ({{$total}}){{/if}}</h2>
 
 {{if $finding}}<h4>{{$finding}}</h4>{{/if}}
 
index ae2530b6a2a683dc581117f9845b302397a58271..7220b4c47fcbb5052ab7648422f255815bfe9171 100644 (file)
@@ -891,6 +891,10 @@ input#dfrn-url {
 .contact-entry-photo img {
        border: none;
 }
+.contact-entry-photo a img {
+       width: 80px;
+       height: 80px;
+}
 .contact-entry-photo-end {
        clear: both;
 }
index f4b46fed84519e42135f58c62c9c9c4e4e66b98f..ef030c5f3a87ead20e57f0ea36edf5fa54a12dc3 100644 (file)
@@ -1124,6 +1124,8 @@ input#dfrn-url {
 \r
 .contact-entry-photo img {\r
        border: none;\r
+       width: 80px;\r
+       height: 80px;\r
 }\r
 .contact-entry-photo-end {\r
        clear: both;\r
index a2506fc17e83c667b34fd012c98cbef11829037a..42f4b7372a3f7afb4e29ba47624497e6fe450206 100644 (file)
@@ -29,8 +29,8 @@
                        
        </div>
        <div class="contact-entry-photo-end" ></div>
-               <div class="contact-entry-name" id="contact-entry-name-{{$contact.id}}" >{{$contact.name}}</div><br />
-{{if $contact.alt_text}}<div class="contact-entry-details" id="contact-entry-rel-{{$contact.id}}" >{{$contact.alt_text}}</div>{{/if}}
+       <div class="contact-entry-name" id="contact-entry-name-{{$contact.id}}" >{{$contact.name}}</div><br />
+       {{if $contact.alt_text}}<div class="contact-entry-details" id="contact-entry-rel-{{$contact.id}}" >{{$contact.alt_text}}</div>{{/if}}
        <div class="contact-entry-network" id="contact-entry-network-{{$contact.id}}" >{{$contact.network}}</div>
 
        <div class="contact-entry-end" ></div>
diff --git a/view/theme/frost-mobile/templates/viewcontact_template.tpl b/view/theme/frost-mobile/templates/viewcontact_template.tpl
new file mode 100644 (file)
index 0000000..3b68410
--- /dev/null
@@ -0,0 +1,12 @@
+
+{{include file="section_title.tpl"}}
+
+<div id="contacts-display-wrapper">
+{{foreach $contacts as $contact}}
+       {{include file="contact_template.tpl"}}
+{{/foreach}}
+</div>
+
+<div id="view-contact-end"></div>
+
+{{$paginate}}
index 8b87c3bd42549e5f9a40350b04ce96fa1b69a2e4..66121baf3457646a4b3722853eac52468452abd9 100644 (file)
@@ -1093,15 +1093,19 @@ input#dfrn-url {
 .contact-entry-photo img {
        border: none;
 }
+.contact-entry-photo a img {
+       width: 80px;
+       height: 80px;
+}
 .contact-entry-photo-end {
        clear: both;
 }
 .contact-entry-name {
-       float: left;
+       /*float: left;*/
        margin-left: 0px;
        margin-right: 10px;
        padding-bottom: 5px;
-       width: 120px;
+       /*width: 120px;*/
        font-weight: 600;
        overflow: hidden;
 }
index 7a29bd0455bfd4cb17dfac304098dc9e28873b07..1ed1471a6e231de6d8cb49d7ac2ca06de44cbd76 100644 (file)
@@ -10,8 +10,8 @@
 
                        {{if $contact.photo_menu}}
                        <span onclick="openClose('contact-photo-menu-{{$contact.id}}');" class="fakelink contact-photo-menu-button" id="contact-photo-menu-button-{{$contact.id}}">menu</span>
-                <div class="contact-photo-menu" id="contact-photo-menu-{{$contact.id}}">
-                    <ul>
+               <div class="contact-photo-menu" id="contact-photo-menu-{{$contact.id}}">
+                       <ul>
                                                {{foreach $contact.photo_menu as $c}}
                                                {{if $c.2}}
                                                <li><a target="redir" href="{{$c.1}}">{{$c.0}}</a></li>
                                                <li><a href="{{$c.1}}">{{$c.0}}</a></li>
                                                {{/if}}
                                                {{/foreach}}
-                    </ul>
-                </div>
+                       </ul>
+               </div>
                        {{/if}}
                </div>
                        
        </div>
        <div class="contact-entry-photo-end" ></div>
-               <div class="contact-entry-name" id="contact-entry-name-{{$contact.id}}" >{{$contact.name}}</div><br />
-{{if $contact.alt_text}}<div class="contact-entry-details" id="contact-entry-rel-{{$contact.id}}" >{{$contact.alt_text}}</div>{{/if}}
+       <div class="contact-entry-name" id="contact-entry-name-{{$contact.id}}" >{{$contact.name}}</div>
+       {{if $contact.alt_text}}<div class="contact-entry-details" id="contact-entry-rel-{{$contact.id}}" >{{$contact.alt_text}}</div>{{/if}}
        <div class="contact-entry-network" id="contact-entry-network-{{$contact.id}}" >{{$contact.network}}</div>
 
        <div class="contact-entry-end" ></div>
index 1eda67de13a7343325f7759811fa891284532251..b0489af80838a3222d666f88db12324fb9d3e5b7 100644 (file)
@@ -1543,6 +1543,31 @@ span[id^="showmore-wrap"] {
   left: 0px;
   top: 63px;
 }
+.contact-wrapper .drop {
+  background-image: url('../../../images/icons/22/delete.png');
+  display: block;
+  width: 22px;
+  height: 22px;
+  position: relative;
+  top: 10px;
+  left: -10px;
+  z-index: 99;
+}
+.contact-wrapper .drophide {
+  background-image: url('../../../images/icons/22/delete.png');
+  display: block;
+  width: 22px;
+  height: 22px;
+  opacity: 0.3;
+  position: relative;
+  top: 10px;
+  left: -10px;
+  z-index: 99;
+}
+.contact-wrapper .contact-entry-connect {
+  padding-top: 5px;
+  font-weight: bold;
+}
 .directory-item {
   float: left;
   width: 200px;
index 71569971e5ac6b2ea50068e7dd6820fbc29b3285..0c7050045d0d1d254b6c6726b6daf0eecfddbc1c 100644 (file)
@@ -1543,6 +1543,31 @@ span[id^="showmore-wrap"] {
   left: 0px;
   top: 63px;
 }
+.contact-wrapper .drop {
+  background-image: url('../../../images/icons/22/delete.png');
+  display: block;
+  width: 22px;
+  height: 22px;
+  position: relative;
+  top: 10px;
+  left: -10px;
+  z-index: 99;
+}
+.contact-wrapper .drophide {
+  background-image: url('../../../images/icons/22/delete.png');
+  display: block;
+  width: 22px;
+  height: 22px;
+  opacity: 0.3;
+  position: relative;
+  top: 10px;
+  left: -10px;
+  z-index: 99;
+}
+.contact-wrapper .contact-entry-connect {
+  padding-top: 5px;
+  font-weight: bold;
+}
 .directory-item {
   float: left;
   width: 200px;
index 55b81e5dafaad6e60c413cdc2cad54373d32468b..c5f655427ad9e010382f137cf4a695f5750309aa 100644 (file)
@@ -1543,6 +1543,31 @@ span[id^="showmore-wrap"] {
   left: 0px;
   top: 63px;
 }
+.contact-wrapper .drop {
+  background-image: url('../../../images/icons/22/delete.png');
+  display: block;
+  width: 22px;
+  height: 22px;
+  position: relative;
+  top: 10px;
+  left: -10px;
+  z-index: 99;
+}
+.contact-wrapper .drophide {
+  background-image: url('../../../images/icons/22/delete.png');
+  display: block;
+  width: 22px;
+  height: 22px;
+  opacity: 0.3;
+  position: relative;
+  top: 10px;
+  left: -10px;
+  z-index: 99;
+}
+.contact-wrapper .contact-entry-connect {
+  padding-top: 5px;
+  font-weight: bold;
+}
 .directory-item {
   float: left;
   width: 200px;
index 3c9915576f6b671cc6e8df659bc52599072e8739..cd604b656a42bbdc4772cf16c966b378e3c214ae 100644 (file)
@@ -877,6 +877,27 @@ span[id^="showmore-wrap"] {
                left: 0px;
                top: 63px;
        }
+       .drop {
+               background-image: url('../../../images/icons/22/delete.png');
+               display: block; width: 22px; height: 22px;
+               position: relative;
+               top: 10px;
+               left: -10px;
+               z-index: 99;
+       }
+       .drophide {
+               background-image: url('../../../images/icons/22/delete.png');
+               display: block; width: 22px; height: 22px;
+               opacity: 0.3;
+               position: relative;
+               top: 10px;
+               left: -10px;
+               z-index: 99;
+       }
+       .contact-entry-connect {
+               padding-top: 5px;
+               font-weight: bold;
+       }
 }
 .directory-item {
        float: left;
index 0f0207b2bf602aecc3a6a6fc8c24e4fc0310579c..634630d9ab1d04f36abddace09038c4fe6e09397 100644 (file)
@@ -1,5 +1,6 @@
 
 <div class="contact-wrapper" id="contact-entry-wrapper-{{$id}}" >
+       {{if $contact.ignlnk}}<a href="{{$contact.ignlnk}}" title="{{$contact.ignore}}" class="icon drophide profile-match-ignore" onmouseout="imgdull(this);" onmouseover="imgbright(this);" onclick="return confirmDelete();" ></a>{{/if}}
        <div class="contact-photo-wrapper" >
                <div class="contact-photo mframe" id="contact-entry-photo-{{$contact.id}}"
                onmouseover="if (typeof t{{$contact.id}} != 'undefined') clearTimeout(t{{$contact.id}}); openMenu('contact-photo-menu-button-{{$contact.id}}')" 
@@ -7,7 +8,7 @@
 
                        <a href="{{$contact.url}}" title="{{$contact.img_hover}}" /><img src="{{$contact.thumb}}" {{$contact.sparkle}} alt="{{$contact.name}}" /></a>
 
-                       {{if !$no_contacts_checkbox}}
+                       {{if $multiselect}}
                        <input type="checkbox" class="contact-select" name="contact_batch[]" value="{{$contact.id}}">
                        {{/if}}
                        {{if $contact.photo_menu}}
        <div class="contact-details" id="contact-entry-url-{{$contact.id}}" >{{$contact.itemurl}}</div>
        <div class="contact-details" id="contact-entry-network-{{$contact.id}}" >{{$contact.network}}</div>
 
+       {{if $contact.connlnk}}
+       <div class="contact-entry-connect"><a href="{{$contact.connlnk}}" title="{{$contact.conntxt}}">{{$contact.conntxt}}</a></div>
+       {{/if}}
+
 
 </div>
 
index 46d8902aebd9efc51ad76fe8a961fce5684e5b67..3fe04c06491e8f7d8b63900760af0a399d5e1b63 100644 (file)
@@ -291,7 +291,7 @@ section {
        margin: 10px 0 0 230px;
 }
 
-.login-form,
+.login-form {
        margin-top: 10px;
 }
 
@@ -2784,7 +2784,7 @@ margin-left: 0px;
        font-weight: bold;
 }
 
-.contact-entry-name {
+.contact-entry-name, .contact-entry-connect {
        width: 100px;
        overflow: hidden;
        font: #999;
@@ -2805,6 +2805,11 @@ margin-left: 0px;
                -webkit-box-shadow: 0 0 8px #BDBDBD;*/
 }
 
+.contact-entry-photo a img {
+       width: 80px;
+       height: 80px;
+}
+
 .contact-entry-edit-links .icon {      
        border: 1px solid #babdb6;
        border-radius: 3px;
index 1c03edc6bfbce09d10a962e2a3de3d84bb07327a..d914d944a262b882274ee5b0778338420af4c1b6 100644 (file)
@@ -2282,6 +2282,10 @@ aside #id_password {
   float: left;
   margin: 0px 10px 10px 0px;
 }
+.contact-entry-photo a img {
+  width: 80px;
+  height: 80px;
+}
 /* profile match wrapper */
 .profile-match-wrapper {
   float: left;
index 5271112d834480daf37988abf550aed490ed10c6..a065b8fbf44d7b311e88b8f633fbf939acd84e65 100644 (file)
@@ -7,7 +7,7 @@
 
                        <a href="{{$contact.url}}" title="{{$contact.img_hover}}" /><img src="{{$contact.thumb}}" {{$contact.sparkle}} alt="{{$contact.name}}" /></a>
 
-                       {{if !$no_contacts_checkbox}}
+                       {{if $multiselect}}
                        <input type="checkbox" class="contact-select" name="contact_batch[]" value="{{$contact.id}}">
                        {{/if}}
                        {{if $contact.photo_menu}}