]> git.mxchange.org Git - friendica.git/blob - view/theme/frio/templates/contact_template.tpl
fix smarty PHP warnings
[friendica.git] / view / theme / frio / templates / contact_template.tpl
1
2 <div class="contact-wrapper media" id="contact-entry-wrapper-{{$contact.id}}">
3
4                 {{* This is a wrapper for the contact picture and the dropdown menu with contact relating actions *}}
5                 <div class="contact-photo-wrapper dropdown media-left">
6                         <div class="contact-entry-photo mframe" id="contact-entry-photo-{{$contact.id}}">
7
8                                 <button type="button" class="btn btn-link dropdown-toggle" id="contact-photo-menu-{{$contact.id}}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
9                                         <div class="contact-photo-image-wrapper hidden-xs">
10                                                 <img class="contact-photo media-object xl" src="{{$contact.thumb}}" {{$contact.sparkle}} alt="{{$contact.name}}" />
11
12                                                 {{* Overlay background on hover the avatar picture *}}
13                                                 <div class="contact-photo-overlay">
14                                                         <span class="contact-photo-overlay-content xl"><i class="fa fa-angle-down"></i></span>
15                                                 </div>
16                                         </div>
17
18                                         {{* use a smaller picture on very small displays (e.g. mobiles) *}}
19                                         <div class="contact-photo-image-wrapper hidden-lg hidden-md hidden-sm">
20                                                 <img class="contact-photo-xs media-object" src="{{$contact.thumb}}" {{$contact.sparkle}} alt="{{$contact.name}}" />
21
22                                                 {{* Overlay background on hover the avatar picture *}}
23                                                 <div class="contact-photo-overlay">
24                                                         <span class="contact-photo-overlay-content overlay-xs"><i class="fa fa-angle-down"></i></span>
25                                                 </div>
26                                         </div>
27                                 </button>
28
29
30                                 {{if $contact.photo_menu}}
31                                 <ul class="contact-photo-menu menu-popup dropdown-menu " id="contact-photo-menu-{{$contact.id}}" role="menu" aria-labelledby="contact-photo-menu-{{$contact.id}}">
32                                         {{foreach $contact.photo_menu as $c}}
33                                         {{if $c.2}}
34                                         <li role="menuitem"><a target="redir" href="{{$c.1}}">{{$c.0}}</a></li>
35                                         {{elseif $c.3}}
36                                         <li role="menuitem"><button type="button" class="btn-link" onclick="addToModal('{{$c.1}}')">{{$c.0}}</button></li>
37                                         {{else}}
38                                         <li role="menuitem"><a href="{{$c.1}}">{{$c.0}}</a></li>
39                                         {{/if}}
40                                         {{/foreach}}
41                                 </ul>
42
43                                 {{/if}}
44                         </div>
45                 </div>
46
47                 <div class="media-body">
48                         {{if $contact.photo_menu}}
49                         {{* The contact actions like private mail, delete contact, edit contact and so on *}}
50                         <div class="contact-actions pull-right nav-pills preferences hidden-xs">
51                                 {{if $contact.photo_menu.pm}}
52                                 <button type="button" class="contact-action-link btn-link" onclick="addToModal('{{$contact.photo_menu.pm.1}}'); retrurn false;" data-toggle="tooltip" title="{{$contact.photo_menu.pm.0}}">
53                                         <i class="fa fa-envelope" aria-hidden="true"></i>
54                                 </button>
55                                 {{/if}}
56                                 {{if $contact.photo_menu.poke}}
57                                 <button type="button" class="contact-action-link btn-link" onclick="addToModal('{{$contact.photo_menu.poke.1}}'); retrurn false;" data-toggle="tooltip" title="{{$contact.photo_menu.poke.0}}">
58                                         <i class="fa fa-heartbeat" aria-hidden="true"></i>
59                                 </button>
60                                 {{/if}}
61                                 {{if $contact.photo_menu.network}}
62                                 <a class="contact-action-link btn-link" href="{{$contact.photo_menu.network.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.network.0}}">
63                                         <i class="fa fa-cloud" aria-hidden="true"></i>
64                                 </a>
65                                 {{/if}}
66                                 {{if $contact.photo_menu.edit}}
67                                 <a class="contact-action-link btn-link" href="{{$contact.photo_menu.edit.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.edit.0}}">
68                                         <i class="fa fa-user" aria-hidden="true"></i>
69                                 </a>
70                                 {{/if}}
71                                 {{if $contact.photo_menu.drop}}
72                                 <button type="button" class="contact-action-link btn-link" onclick="addToModal('{{$contact.photo_menu.drop.1}}'); retrurn false;" data-toggle="tooltip" title="{{$contact.photo_menu.drop.0}}">
73                                         <i class="fa fa-user-times" aria-hidden="true"></i>
74                                 </button>
75                                 {{/if}}
76                                 {{if $contact.photo_menu.follow}}
77                                 <a class="contact-action-link btn-link" href="{{$contact.photo_menu.follow.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.follow.0}}">
78                                         <i class="fa fa-user-plus" aria-hidden="true"></i>
79                                 </a>
80                                 {{/if}}
81                                 {{if $contact.photo_menu.hide}}
82                                 <a class="contact-action-link btn-link" href="{{$contact.photo_menu.hide.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.hide.0}}">
83                                         <i class="fa fa-times" aria-hidden="true"></i>
84                                 </a>
85                                 {{/if}}
86                         </div>
87                         {{/if}}
88
89                         {{* The button to add or remove contacts from a contact group - group edit page *}}
90                         {{if $contact.change_member}}
91                         <div class="contact-group-actions pull-right nav-pills preferences">
92                                 <button type="button" class="contact-action-link btn-link" onclick="groupChangeMember({{$contact.change_member.gid}},{{$contact.change_member.cid}},'{{$contact.change_member.sec_token}}'); return true;" data-toggle="tooltip" title="{{$contact.change_member.title}}">
93                                         {{if $contact.label == "members"}}
94                                         <i class="fa fa-times-circle" aria-hidden="true"></i>
95                                         {{elseif $contact.label == "contacts"}}
96                                         <i class="fa fa-plus-circle" aria-hidden="true"></i>
97                                         {{/if}}
98                                 </button>
99                         </div>
100                         {{/if}}
101
102                         {{* The contact description (e.g. Name, Network, kind of connection and so on *}}
103                         <div class="contact-entry-desc">
104                                 <div class="contact-entry-name" id="contact-entry-name-{{$contact.id}}">
105                                         <h4 class="media-heading"><a href="{{$contact.url}}">{{$contact.name}}</a>
106                                         {{if $contact.account_type}} <small class="contact-entry-details" id="contact-entry-accounttype-{{$contact.id}}">({{$contact.account_type}})</small>{{/if}}
107                                         {{if $contact.account_type == 'Forum'}}<i class="fa fa-comments-o" aria-hidden="true"></i>{{/if}}
108                                         {{* @todo this needs some changing in core because $contact.account_type contains a translated string which may notbe the same in every language *}}
109                                         </h4>
110                                 </div>
111                                 {{if $contact.alt_text}}<div class="contact-entry-details contact-entry-rel" id="contact-entry-rel-{{$contact.id}}" >{{$contact.alt_text}}</div>{{/if}}
112                                 {{if $contact.itemurl}}<div class="contact-entry-details contact-entry-url" id="contact-entry-url-{{$contact.id}}" >{{$contact.itemurl}}</div>{{/if}}
113                                 {{if $contact.tags}}<div class="contact-entry-details" id="contact-entry-tags-{{$contact.id}}" >{{$contact.tags}}</div>{{/if}}
114                                 {{if $contact.details}}<div class="contact-entry-details contact-entry-tags" id="contact-entry-details-{{$contact.id}}" >{{$contact.details}}</div>{{/if}}
115                                 {{if $contact.network}}<div class="contact-entry-details contact-entry-network" id="contact-entry-network-{{$contact.id}}" >{{$contact.network}}</div>{{/if}}
116                         </div>
117
118                         {{* The checkbox to perform batch actions to these contacts (for batch actions have a look at contacts-template.tpl) *}}
119                         {{* if !$no_contacts_checkbox *}}
120                         {{if $multiselect}}
121                         <div class="checkbox contact-entry-checkbox pull-right">
122                                 <input id="checkbox-{{$contact.id}}" type="checkbox" class="contact-select pull-right" name="contact_batch[]" value="{{$contact.id}}">
123                                 <label for="checkbox-{{$contact.id}}"></label>
124                         </div>
125                         {{/if}}
126                 </div>
127
128 </div>
129
130
131 {{* the following part is a nearly a copy of the part above but it is modified for working with js.
132 We use this part to filter the contacts with jquery.textcomplete *}}
133 <div class="javascript-template" rel="contact-template" style="display: none">
134         <div class="contact-wrapper media" id="contact-entry-wrapper-{$id}">
135
136                         {{* This is a wrapper for the contact picture and the dropdown menu with contact relating actions *}}
137                         <div class="contact-photo-wrapper dropdown media-left">
138                                 <div class="contact-entry-photo mframe" id="contact-entry-photo-{$id}">
139
140                                         <button type="button" class="btn btn-link dropdown-toggle" id="contact-photo-menu-{$id}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
141                                                 <div class="contact-photo-image-wrapper hidden-xs">
142                                                         <img class="contact-photo media-object xl" src="{$thumb}" {11} alt="{$name}" />
143
144                                                         {{* Overlay background on hover the avatar picture *}}
145                                                         <div class="contact-photo-overlay">
146                                                                 <span class="contact-photo-overlay-content xl"><i class="fa fa-angle-down"></i></span>
147                                                         </div>
148                                                 </div>
149
150                                                 {{* use a smaller picture on very small displays (e.g. mobiles) *}}
151                                                 <div class="contact-photo-image-wrapper hidden-lg hidden-md hidden-sm">
152                                                         <img class="contact-photo-xs media-object" src="{$thumb}" {11} alt="{$name}" />
153
154                                                         {{* Overlay background on hover the avatar picture *}}
155                                                         <div class="contact-photo-overlay">
156                                                                 <span class="contact-photo-overlay-content overlay-xs"><i class="fa fa-angle-down"></i></span>
157                                                         </div>
158                                                 </div>
159                                         </button>
160
161
162                                         {if $photo_menu}
163                                         <ul class="contact-photo-menu menu-popup dropdown-menu " id="contact-photo-menu-{$id}" role="menu" aria-labelledby="contact-photo-menu-{$id}">
164                                                 {foreach $photo_menu as $c}
165                                                 {if $c.2}
166                                                 <li role="menuitem"><a target="redir" href="{$c.1}">{$c.0}</a></li>
167                                                 {elseif $c.3}
168                                                 <li role="menuitem"><button type="button" class="btn-link" onclick="addToModal('{$c.1}')">{$c.0}</button></li>
169                                                 {else}
170                                                 <li role="menuitem"><a href="{$c.1}">{$c.0}</a></li>
171                                                 {/if}
172                                                 {/foreach}
173                                         </ul>
174
175                                         {/if}
176                                 </div>
177
178                         </div>
179
180                         <div class="media-body">
181                                 {if $photo_menu}
182                                 {{* The contact actions like private mail, delete contact, edit contact and so on *}}
183                                 <div class="contact-actions pull-right nav-pills preferences hidden-xs">
184                                         {if $photo_menu.pm}
185                                         <button type="button" class="contact-action-link btn-link" onclick="addToModal('{$photo_menu.pm.1}')" data-toggle="tooltip" title="{$photo_menu.pm.0}">
186                                                 <i class="fa fa-envelope" aria-hidden="true"></i>
187                                         </button>
188                                         {/if}
189                                         {if $photo_menu.poke}
190                                         <button type="button" class="contact-action-link btn-link" onclick="addToModal('{$photo_menu.poke.1}')" data-toggle="tooltip" title="{$photo_menu.poke.0}">
191                                                 <i class="fa fa-heartbeat" aria-hidden="true"></i>
192                                         </button>
193                                         {/if}
194                                         {if $photo_menu.network}
195                                         <a class="contact-action-link btn-link" href="{$photo_menu.network.1}" data-toggle="tooltip" title="{$photo_menu.network.0}">
196                                                 <i class="fa fa-cloud" aria-hidden="true"></i>
197                                         </a>
198                                         {/if}
199                                         {if $photo_menu.edit}
200                                         <a class="contact-action-link btn-link" href="{$photo_menu.edit.1}" data-toggle="tooltip" title="{$photo_menu.edit.0}">
201                                                 <i class="fa fa-pencil" aria-hidden="true"></i>
202                                         </a>
203                                         {/if}
204                                         {if $photo_menu.drop}
205                                         <a class="contact-action-link btn-link" href="{$photo_menu.drop.1}" data-toggle="tooltip" title="{$photo_menu.drop.0}">
206                                                 <i class="fa fa-user-times" aria-hidden="true"></i>
207                                         </a>
208                                         {/if}
209                                         {if $photo_menu.follow}
210                                         <a class="contact-action-link btn-link" href="{$photo_menu.follow.1}" data-toggle="tooltip" title="{$photo_menu.follow.0}">
211                                                 <i class="fa fa-user-plus" aria-hidden="true"></i>
212                                         </a>
213                                         {/if}
214                                 </div>
215                                 {/if}
216
217                                 {{* The contact description (e.g. Name, Network, kind of connection and so on *}}
218                                 <div class="contact-entry-desc">
219                                         <div class="contact-entry-name" id="contact-entry-name-{$id}">
220                                                 <h4 class="media-heading"><a href="{$url}">{$name}</a>
221                                                 {if $account_type} <small class="contact-entry-details" id="contact-entry-accounttype-{$id}">({$account_type})</small>{/if}
222                                                 {if $account_type == 'Forum'}<i class="fa fa-comments-o" aria-hidden="true"></i>{/if}
223                                                 {{* @todo this needs some changing in core because $contact.account_type contains a translated string which may notbe the same in every language *}}
224                                                 </h4>
225                                         </div>
226                                         {if $alt_text}<div class="contact-entry-details" id="contact-entry-rel-{$id}" >{$alt_text}</div>{/if}
227                                         {if $itemurl}<div class="contact-entry-details" id="contact-entry-url-{$id}" >{$itemurl}</div>{/if}
228                                         {if $tags}<div class="contact-entry-details" id="contact-entry-tags-{$id}" >{$tags}</div>{/if}
229                                         {if $details}<div class="contact-entry-details" id="contact-entry-details-{$id}" >{$details}</div>{/if}
230                                         {if $network}<div class="contact-entry-details" id="contact-entry-network-{$id}" >{$network}</div>{/if}
231                                 </div>
232
233                                 {{* The checkbox to perform batch actions to these contacts (for batch actions have a look at contacts-template.tpl) *}}
234                                 {{* if !$no_contacts_checkbox *}}
235                                 {{if $multiselect}}
236                                 <div class="checkbox contact-entry-checkbox pull-right">
237                                         <input id="checkbox-{$id}" type="checkbox" class="contact-select pull-right" name="contact_batch[]" value="{$id}">
238                                         <label for="checkbox-{$id}"></label>
239                                 </div>
240                                 {{/if}}
241                         </div>
242
243         </div>
244 </div>