]> git.mxchange.org Git - friendica.git/commitdiff
sugest.php: themeable as whole page
authorrabuzarus <>
Sat, 17 Oct 2015 19:25:21 +0000 (21:25 +0200)
committerrabuzarus <>
Sat, 17 Oct 2015 19:25:21 +0000 (21:25 +0200)
mod/suggest.php
view/templates/suggest_friends.tpl
view/theme/frost-mobile/templates/suggest_friends.tpl
view/theme/frost/templates/suggest_friends.tpl

index 8bf31ca8e591bf449d489064ad5ec84fa33c0d28..760bbf06ae5868166ffce247523cc25d7136c15f 100644 (file)
@@ -65,11 +65,6 @@ function suggest_content(&$a) {
        $a->page['aside'] .= findpeople_widget();
 
 
-       $o .= replace_macros(get_markup_template("section_title.tpl"),array(
-               '$title' => t('Friend Suggestions')
-       ));
-
-
        $r = suggestion_query(local_user());
 
        if(! count($r)) {
@@ -77,25 +72,31 @@ function suggest_content(&$a) {
                return $o;
        }
 
-       $tpl = get_markup_template('suggest_friends.tpl');
-
        foreach($r as $rr) {
 
                $connlnk = $a->get_baseurl() . '/follow/?url=' . (($rr['connect']) ? $rr['connect'] : $rr['url']);
 
-               $o .= replace_macros($tpl,array(
-                       '$url' => zrl($rr['url']),
-                       '$name' => $rr['name'],
-                       '$photo' => proxy_url($rr['photo'], false, PROXY_SIZE_THUMB),
-                       '$ignlnk' => $a->get_baseurl() . '/suggest?ignore=' . $rr['id'],
-                       '$ignid' => $rr['id'],
-                       '$conntxt' => t('Connect'),
-                       '$connlnk' => $connlnk,
-                       '$ignore' => t('Ignore/Hide')
-               ));
+               $entry = array(
+                       'url' => zrl($rr['url']),
+                       'url_clean' => $rr['url'],
+                       'name' => $rr['name'],
+                       'photo' => proxy_url($rr['photo'], false, PROXY_SIZE_THUMB),
+                       'ignlnk' => $a->get_baseurl() . '/suggest?ignore=' . $rr['id'],
+                       'ignid' => $rr['id'],
+                       'conntxt' => t('Connect'),
+                       'connlnk' => $connlnk,
+                       'ignore' => t('Ignore/Hide')
+               );
+               $entries[] = $entry;
        }
 
-       $o .= cleardiv();
+       $tpl = get_markup_template('suggest_friends.tpl');
+
+       $o .= replace_macros($tpl,array(
+               '$title' => t('Friend Suggestions'),
+               '$entries' => $entries,
+       ));
+
 //     $o .= paginate($a);
        return $o;
 }
index a64c05dd83c186a4b5bb688d317293d1c250b2c4..e7c9c1ac00470bcb252406c07f4cd9c1971464b5 100644 (file)
@@ -1,17 +1,23 @@
 
-<div class="profile-match-wrapper">
-       <a href="{{$ignlnk}}" title="{{$ignore}}" class="icon drophide profile-match-ignore" onmouseout="imgdull(this);" onmouseover="imgbright(this);" onclick="return confirmDelete();" ></a>
-       <div class="profile-match-photo">
-               <a href="{{$url}}">
-                       <img src="{{$photo}}" alt="{{$name}}" width="80" height="80" title="{{$name}} [{{$url}}]" />
-               </a>
-       </div>
-       <div class="profile-match-break"></div>
-       <div class="profile-match-name">
-               <a href="{{$url}}" title="{{$name}}">{{$name}}</a>
+{{include file="section_title.tpl"}}
+
+{{foreach $entries as $entry}}
+       <div class="profile-match-wrapper">
+               <a href="{{$entry.ignlnk}}" title="{{$entry.ignore}}" class="icon drophide profile-match-ignore" onmouseout="imgdull(this);" onmouseover="imgbright(this);" onclick="return confirmDelete();" ></a>
+               <div class="profile-match-photo">
+                       <a href="{{$entry.url}}">
+                               <img src="{{$entry.photo}}" alt="{{$entry.name}}" width="80" height="80" title="{{$entry.name}} [{{$entry.url_clean}}]" />
+                       </a>
+               </div>
+               <div class="profile-match-break"></div>
+               <div class="profile-match-name">
+                       <a href="{{$entry.url}}" title="{{$entry.name}}">{{$entry.name}}</a>
+               </div>
+               <div class="profile-match-end"></div>
+               {{if $entry.connlnk}}
+               <div class="profile-match-connect"><a href="{{$entry.connlnk}}" title="{{$entry.conntxt}}">{{$entry.conntxt}}</a></div>
+               {{/if}}
        </div>
-       <div class="profile-match-end"></div>
-       {{if $connlnk}}
-       <div class="profile-match-connect"><a href="{{$connlnk}}" title="{{$conntxt}}">{{$conntxt}}</a></div>
-       {{/if}}
-</div>
\ No newline at end of file
+{{/foreach}}
+
+<div class="clear"></div>
index e39cca6e59e7317732f02b50a944107c5dd7d915..a386f30d00888c43da93a8cfc677ef517f92a891 100644 (file)
@@ -1,17 +1,23 @@
 
-<div class="profile-match-wrapper">
-       <div class="profile-match-photo">
-               <a href="{{$url}}">
-                       <img src="{{$photo}}" alt="{{$name}}" width="80" height="80" title="{{$name}} [{{$url}}]" onError="this.src='../../../images/person-48.jpg';" />
-               </a>
-       </div>
-       <div class="profile-match-break"></div>
-       <div class="profile-match-name">
-               <a href="{{$url}}" title="{{$name}}">{{$name}}</a>
+{{include file="section_title.tpl"}}
+
+{{foreach $entries as $entry}}
+       <div class="profile-match-wrapper">
+               <div class="profile-match-photo">
+                       <a href="{{$entry.url}}">
+                               <img src="{{$entry.photo}}" alt="{{$entry.name}}" width="80" height="80" title="{{$entry.name}} [{{$entry.url_clean}}]" onError="this.src='../../../images/person-48.jpg';" />
+                       </a>
+               </div>
+               <div class="profile-match-break"></div>
+               <div class="profile-match-name">
+                       <a href="{{$entry.url}}" title="{{$entry.name}}">{{$entry.name}}</a>
+               </div>
+               <div class="profile-match-end"></div>
+               {{if $entry.connlnk}}
+               <div class="profile-match-connect"><a href="{{$entry.connlnk}}" title="{{$entry.conntxt}}">{{$entry.conntxt}}</a></div>
+               {{/if}}
+               <a href="{{$entry.ignlnk}}" title="{{$entry.ignore}}" class="icon drophide profile-match-ignore" {{*onmouseout="imgdull(this);" onmouseover="imgbright(this);" *}}onclick="return confirmDelete();" ></a>
        </div>
-       <div class="profile-match-end"></div>
-       {{if $connlnk}}
-       <div class="profile-match-connect"><a href="{{$connlnk}}" title="{{$conntxt}}">{{$conntxt}}</a></div>
-       {{/if}}
-       <a href="{{$ignlnk}}" title="{{$ignore}}" class="icon drophide profile-match-ignore" {{*onmouseout="imgdull(this);" onmouseover="imgbright(this);" *}}onclick="return confirmDelete();" ></a>
-</div>
+{{/foreach}}
+
+<div class="clear"></div>
index e39cca6e59e7317732f02b50a944107c5dd7d915..a386f30d00888c43da93a8cfc677ef517f92a891 100644 (file)
@@ -1,17 +1,23 @@
 
-<div class="profile-match-wrapper">
-       <div class="profile-match-photo">
-               <a href="{{$url}}">
-                       <img src="{{$photo}}" alt="{{$name}}" width="80" height="80" title="{{$name}} [{{$url}}]" onError="this.src='../../../images/person-48.jpg';" />
-               </a>
-       </div>
-       <div class="profile-match-break"></div>
-       <div class="profile-match-name">
-               <a href="{{$url}}" title="{{$name}}">{{$name}}</a>
+{{include file="section_title.tpl"}}
+
+{{foreach $entries as $entry}}
+       <div class="profile-match-wrapper">
+               <div class="profile-match-photo">
+                       <a href="{{$entry.url}}">
+                               <img src="{{$entry.photo}}" alt="{{$entry.name}}" width="80" height="80" title="{{$entry.name}} [{{$entry.url_clean}}]" onError="this.src='../../../images/person-48.jpg';" />
+                       </a>
+               </div>
+               <div class="profile-match-break"></div>
+               <div class="profile-match-name">
+                       <a href="{{$entry.url}}" title="{{$entry.name}}">{{$entry.name}}</a>
+               </div>
+               <div class="profile-match-end"></div>
+               {{if $entry.connlnk}}
+               <div class="profile-match-connect"><a href="{{$entry.connlnk}}" title="{{$entry.conntxt}}">{{$entry.conntxt}}</a></div>
+               {{/if}}
+               <a href="{{$entry.ignlnk}}" title="{{$entry.ignore}}" class="icon drophide profile-match-ignore" {{*onmouseout="imgdull(this);" onmouseover="imgbright(this);" *}}onclick="return confirmDelete();" ></a>
        </div>
-       <div class="profile-match-end"></div>
-       {{if $connlnk}}
-       <div class="profile-match-connect"><a href="{{$connlnk}}" title="{{$conntxt}}">{{$conntxt}}</a></div>
-       {{/if}}
-       <a href="{{$ignlnk}}" title="{{$ignore}}" class="icon drophide profile-match-ignore" {{*onmouseout="imgdull(this);" onmouseover="imgbright(this);" *}}onclick="return confirmDelete();" ></a>
-</div>
+{{/foreach}}
+
+<div class="clear"></div>