user.tpl 4.45 KB
Newer Older
1
<div class="{if $user->pending || $user->requestedfriendship}pending card bg-warning{else}card{/if} card card-half myfriend">
2
    <h3 class="card-header profile-block">
3
        <a href="{profile_url($user)}" class="username">
4
5
            {$user->display_name}
            {if $user->pending}
6
            <em class="text-small pendingfriend">
7
8
            - {str tag='pendingsince' section='group' arg1=$user->pending_time}
            </em>
9
10
11
12
            {elseif $user->requestedfriendship}
            <em class="text-small requestedfriend">
            - {str tag='requestedsince' section='group' arg1=$user->requested_time}
            </em>
13
            {elseif $user->friend && $page == 'find'}
14
            <em class="text-small existingfriend">
15
16
            - {str tag='existingfriend' section='group'}
            </em>
17
18
            {/if}
        </a>
19
20
        <span id="friendinfo_{$user->id}">
            <img class="user-icon" src="{profile_icon_url user=$user maxwidth=60 maxheight=60}" alt="{str tag=profileimagetext arg1=$user|display_default_name}">
21
        </span>
22
    </h3>
Liam's avatar
Liam committed
23
    <div class="card-body">
24
        {if $user->institutions}
25
        <div class="memberof detail with-user-icon-lg">
26
            <span class="icon icon-university left" role="presentation" aria-hidden="true"></span>
27
            {$user->institutions|safe}
28
        </div>
29
        {/if}
30
        <div class="user-content content-text">
31
            {if $user->introduction}
32
            <p class="intro">
33
34
35
                {$user->introduction|str_shorten_html:100:true|safe}
            </p>
            {/if}
36

37
38
            {if $user->friend && $page == 'myfriends' && $user->views}
            <p class="viewlist">
39
                <strong>
40
                    {str tag='Views' section='group'}:
41
                </strong>
42
43
44
45
46
47
48
                {foreach from=$user->views item=view}
                <span>
                    <a href="{$view->fullurl}">{$view->title}</a>
                </span>
                {/foreach}
            </p>
            {/if}
49

50
51
            {if $user->pending}
            <div class="whymakemeyourfriend">
52
                <strong>
53
                    {str tag='whymakemeyourfriend' section='group'}
54
                </strong>
55
56
57
58
                <p>{$user->message|format_whitespace|safe}</p>
            </div>
            {/if}
        </div>
59
60
61
62
63
64
65
66
        {if $user->requestedfriendship}
        <div class="requested text-small">
            <span class="icon icon-lg text-success icon-check left" role="presentation" aria-hidden="true"></span>
            <span>
                {str tag='friendshiprequested' section='group'}
            </span>
        </div>
        {/if}
67
        {if $user->messages}
68
        <div class="sendmessage text-small">
69
            <span class="icon icon-envelope left" role="presentation" aria-hidden="true"></span>
70
            <a href="{$WWWROOT}{if $mrmoduleactive}module/multirecipientnotification{else}user{/if}/sendmessage.php?id={$user->id}&amp;returnto={$page}&amp;offset={$offset}" class="text-right" title="{str tag='sendmessage' section='group'}">
71
72
            {str tag='sendmessage' section='group'}
            </a>
73
74
75
        </div>
        {/if}
        {if $admingroups}
76
        <div class="editgroup text-small">
77
            <span class="icon icon-pencil left" role="presentation" aria-hidden="true"></span>
78
79
80
            <a href="" id="editgroup-link-{$user->id}" class="js-edit-group" data-userid="{$user->id}">
                {str tag='editgroupmembership' section='group'}
            </a>
81
        </div>
82
        {/if}
83
84
85
    </div>

    {if $user->pending}
Liam's avatar
Liam committed
86
    <div class="has-form text-small card-footer btn-toggle">
87
        <div class="btn">
88
            <span class="icon icon-check icon-lg text-success left" role="presentation" aria-hidden="true"></span>
89
            {$user->accept|safe}
Naomi Guyer's avatar
Naomi Guyer committed
90
        </div>
91
92

        <a href="{$WWWROOT}user/denyrequest.php?id={$user->id}&amp;returnto={$page}&amp;offset={$offset}" class="btn">
93
            <span class="icon icon-ban left icon-lg text-danger" role="presentation" aria-hidden="true"></span>
94
95
            <span class="link-unstyled">{str tag='denyrequest' section='group'}</span>
        </a>
Naomi Guyer's avatar
Naomi Guyer committed
96
    </div>
97
98
    {/if}
    {if $user->friend}
Liam's avatar
Liam committed
99
        <a href="{$WWWROOT}user/removefriend.php?id={$user->id}&amp;returnto={$page}&amp;offset={$offset}" class="card-footer">
100
            <span class="icon icon-remove left icon-lg text-danger" role="presentation" aria-hidden="true"></span>
101
102
103
104
            {str tag='removefromfriendslist' section='group'}
        </a>
    {/if}

105
</div>