Rework commonFriendsVisitor widget

- Use new Contact\Relation method to fetch common contacts
- Replace reference to /common by /{nickname}/contacts/common
This commit is contained in:
Hypolite Petovan 2020-08-04 23:06:11 -04:00
parent 71db6ab613
commit c26b72a426
3 changed files with 38 additions and 64 deletions

View file

@ -1,22 +1,18 @@
<div id="remote-friends-in-common" class="bigwidget">
<div id="rfic-desc">{{$desc nofilter}} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{if $linkmore}}<a href="{{$base}}/common/rem/{{$uid}}/{{$cid}}">{{$more}}</a>{{/if}}</div>
{{if $items}}
{{foreach $items as $item}}
<div id="rfic-desc">{{$desc nofilter}} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{if $linkmore}}<a href="profile/{{$nickname}}/contacts/common">{{$more}}</a>{{/if}}</div>
{{foreach $contacts as $contact}}
<div class="profile-match-wrapper">
<div class="profile-match-photo">
<a href="{{$item.url}}">
<img src="{{$item.photo}}" width="80" height="80" alt="{{$item.name}}" title="{{$item.name}}" />
<a href="{{$contact.url}}">
<img src="{{$contact.photo}}" width="80" height="80" alt="{{$contact.name}}" title="{{$contact.name}}" />
</a>
</div>
<div class="profile-match-break"></div>
<div class="profile-match-name">
<a href="{{$item.url}}" title="{{$item.name}}">{{$item.name}}</a>
<a href="{{$contact.url}}" title="{{$contact.name}}">{{$contact.name}}</a>
</div>
<div class="profile-match-end"></div>
</div>
{{/foreach}}
{{/if}}
<div id="rfic-end" class="clear"></div>
</div>