friends.blade.php
2.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
@extends('layouts.profile')
@section('title', 'Profile Friends')
@section('profile')
<div id="friends_list_filter_menu">
<ul>
<li class="friends_list_filter_item" id="filter_all">All Friends</li>
@if ($isVisitorProfile)
|<li class="friends_list_filter_item" id="filter_pending">Pending Requests</li>
@endif
</ul>
</div>
<ul id="all_friends" class="friend_list {{ $filter === 'pending'? 'displayno' : '' }}" ng-controller="FriendsPaginationCtrl" ng-init="init('accepted');">
<li class="friend_list_row clearfix" ng-repeat="friend in friends" ng-show="friend" ng-cloak>
<div class="friend_list_pic">
<img ng-src="@{{friend.image}}" height="50" width="50" class="avatar">
</div>
<div class="friend_list_name">
<a ng-href="/profile/@{{friend.username}}">@{{friend.username}}</a>
</div>
@if ($isVisitorProfile)
<div class="friend_list_buttons_area">
<button class="friend_list_button btn btn-danger" ng-click="removeFriend(friend.user_id)">x</button>
</div>
@endif
</li>
<div class="friend_list_pagination">
<pagination items-per-page="itemsPerPage" total-items="totalItems" ng-model="currentPage" ng-change="pageChanged()" ng-show="totalItems > 0" max-size="10" boundary-links="true"></pagination>
</div>
</ul>
@if ($isVisitorProfile)
<ul id="pending_friends" class="friend_list {{ $filter === 'pending'? '' : 'displayno' }}" ng-controller="FriendsPaginationCtrl" ng-init="init('pending')">
<li class="friend_list_row clearfix" ng-repeat="friend in friends" ng-show="friend" ng-cloak>
<div class="friend_list_pic">
<img ng-src="@{{friend.image}}" height="50" width="50" class="avatar">
</div>
<div class="friend_list_name">
<a ng-href="/profile/@{{friend.username}}">@{{friend.username}}</a>
</div>
<div class="friend_list_buttons_area">
<button class="friend_list_button btn btn-primary" ng-click="acceptFriend(friend.user_id)">Confirm</button>
<button class="friend_list_button btn btn-warning" ng-click="ignoreFriend(friend.user_id)">Ignore</button>
</div>
</li>
<div class="friend_list_pagination">
<pagination items-per-page="itemsPerPage" total-items="totalItems" ng-model="currentPage" ng-change="pageChanged()" ng-show="totalItems > 0" max-size="5" boundary-links="true"></pagination>
</div>
</ul>
@endif
@endsection