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