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