]> git.mxchange.org Git - friendica.git/blob - view/theme/frio/templates/contact_template.tpl
Merge pull request #10907 from annando/notice
[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                                         <a href="{{$contact.url}}">
10                                                 <img class="contact-photo media-object xl" src="{{$contact.thumb}}" {{$contact.sparkle}} alt="{{$contact.name}}" />
11                                         </a>
12                                 </div>
13
14                                 {{* For very small displays we use a dropdown menu for contact relating actions *}}
15                                 <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">
16                                         {{* use a smaller picture on very small displays (e.g. mobiles) *}}
17                                         <div class="contact-photo-image-wrapper visible-xs">
18                                                 <img class="contact-photo-xs media-object" src="{{$contact.thumb}}" {{$contact.sparkle}} alt="{{$contact.name}}" />
19
20                                                 {{* Overlay background on hover the avatar picture *}}
21                                                 <div class="contact-photo-overlay">
22                                                         <span class="contact-photo-overlay-content overlay-xs"><i class="fa fa-angle-down" aria-hidden="true"></i></span>
23                                                 </div>
24                                         </div>
25                                 </button>
26
27                                 {{if $contact.photo_menu}}
28                                 <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}}">
29                                         {{foreach $contact.photo_menu as $c}}
30                                         {{if $c.2}}
31                                         <li role="presentation"><a role="menuitem" target="redir" href="{{$c.1}}">{{$c.0}}</a></li>
32                                         {{elseif $c.3}}
33                                         <li role="presentation"><button role="menuitem" type="button" class="btn-link" onclick="addToModal('{{$c.1}}')">{{$c.0}}</button></li>
34                                         {{else}}
35                                         <li role="presentation"><a role="menuitem" href="{{$c.1}}">{{$c.0}}</a></li>
36                                         {{/if}}
37                                         {{/foreach}}
38                                 </ul>
39
40                                 {{/if}}
41                         </div>
42                 </div>
43
44                 <div class="media-body">
45                         {{if $contact.photo_menu}}
46                         {{* The contact actions like private mail, delete contact, edit contact and so on *}}
47                         <div class="contact-actions pull-right nav-pills preferences hidden-xs">
48                                 {{if $contact.photo_menu.pm}}
49                                 <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}}">
50                                         <i class="fa fa-envelope" aria-hidden="true"></i>
51                                 </button>
52                                 {{/if}}
53                                 {{if $contact.photo_menu.poke}}
54                                 <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}}">
55                                         <i class="fa fa-heartbeat" aria-hidden="true"></i>
56                                 </button>
57                                 {{/if}}
58                                 {{if $contact.photo_menu.network}}
59                                 <a class="contact-action-link btn-link" href="{{$contact.photo_menu.network.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.network.0}}">
60                                         <i class="fa fa-cloud" aria-hidden="true"></i>
61                                 </a>
62                                 {{/if}}
63                                 {{if $contact.photo_menu.edit}}
64                                 <a class="contact-action-link btn-link" href="{{$contact.photo_menu.edit.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.edit.0}}">
65                                         <i class="fa fa-user" aria-hidden="true"></i>
66                                 </a>
67                                 {{/if}}
68                                 {{if $contact.photo_menu.follow}}
69                                 <a class="contact-action-link btn-link" href="{{$contact.photo_menu.follow.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.follow.0}}">
70                                         <i class="fa fa-user-plus" aria-hidden="true"></i>
71                                 </a>
72                                 {{/if}}
73                                 {{if $contact.photo_menu.unfollow}}
74                                 <a class="contact-action-link btn-link" href="{{$contact.photo_menu.unfollow.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.unfollow.0}}">
75                                         <i class="fa fa-user-times" aria-hidden="true"></i>
76                                 </a>
77                                 {{/if}}
78                                 {{if $contact.photo_menu.hide}}
79                                 <a class="contact-action-link btn-link" href="{{$contact.photo_menu.hide.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.hide.0}}">
80                                         <i class="fa fa-times" aria-hidden="true"></i>
81                                 </a>
82                                 {{/if}}
83                         </div>
84                         {{/if}}
85
86                         {{* The button to add or remove contacts from a contact group - group edit page *}}
87                         {{if $contact.change_member}}
88                         <div class="contact-group-actions pull-right nav-pills preferences">
89                                 <button type="button" class="contact-action-link contact-group-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}}">
90                                         {{if $contact.label == "members"}}
91                                         <i class="fa fa-times-circle" aria-hidden="true"></i>
92                                         {{elseif $contact.label == "contacts"}}
93                                         <i class="fa fa-plus-circle" aria-hidden="true"></i>
94                                         {{/if}}
95                                 </button>
96                         </div>
97                         {{/if}}
98
99                         {{* The contact description (e.g. Name, Network, kind of connection and so on *}}
100                         <div class="contact-entry-desc">
101                                 <div class="contact-entry-name" id="contact-entry-name-{{$contact.id}}">
102                                         <h4 class="media-heading"><a href="{{$contact.url}}">{{$contact.name}}</a>
103                                         {{if $contact.account_type}} <small class="contact-entry-details" id="contact-entry-accounttype-{{$contact.id}}">({{$contact.account_type}})</small>{{/if}}
104                                         {{if $contact.account_type == 'Forum'}}<i class="fa fa-comments-o" aria-hidden="true"></i>{{/if}}
105                                         {{* @todo this needs some changing in core because $contact.account_type contains a translated string which may notbe the same in every language *}}
106                                         </h4>
107                                 </div>
108                                 {{if $contact.alt_text}}<div class="contact-entry-details contact-entry-rel" id="contact-entry-rel-{{$contact.id}}">{{$contact.alt_text}}</div>{{/if}}
109                                 {{if $contact.itemurl}}<div class="contact-entry-details contact-entry-url" id="contact-entry-url-{{$contact.id}}">{{$contact.itemurl}}</div>{{/if}}
110                                 {{if $contact.tags}}<div class="contact-entry-details" id="contact-entry-tags-{{$contact.id}}">{{$contact.tags}}</div>{{/if}}
111                                 {{if $contact.details}}<div class="contact-entry-details contact-entry-tags" id="contact-entry-details-{{$contact.id}}">{{$contact.details}}</div>{{/if}}
112                                 {{if $contact.network}}<div class="contact-entry-details contact-entry-network" id="contact-entry-network-{{$contact.id}}">{{$contact.network}}</div>{{/if}}
113                         </div>
114
115                         {{* The checkbox to perform batch actions to these contacts (for batch actions have a look at contacts-template.tpl) *}}
116                         {{* if !$no_contacts_checkbox *}}
117                         {{if $multiselect}}
118                         <div class="checkbox contact-entry-checkbox pull-right">
119                                 <input id="checkbox-{{$contact.id}}" type="checkbox" class="contact-select pull-right" name="contact_batch[]" value="{{$contact.id}}">
120                                 <label for="checkbox-{{$contact.id}}"></label>
121                         </div>
122                         {{/if}}
123                 </div>
124
125 </div>
126
127
128 {{* the following part is a nearly a copy of the part above but it is modified for working with js.
129 We use this part to filter the contacts with jquery.textcomplete *}}
130 <template class="javascript-template" rel="contact-template" style="display: none">
131         <div class="contact-wrapper media" id="contact-entry-wrapper-{$id}">
132
133                 {{* This is a wrapper for the contact picture *}}
134                 <div class="contact-photo-wrapper dropdown media-left">
135                         <div class="contact-entry-photo mframe" id="contact-entry-photo-{$id}">
136
137                                 <div class="contact-photo-image-wrapper hidden-xs">
138                                         <img class="contact-photo media-object xl" src="{$thumb}" {11} alt="{$name}" />
139                                 </div>
140
141                                 {{* For very small displays we use a drobdown menu for contact relating actions *}}
142                                 <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">
143                                         {{* use a smaller picture on very small displays (e.g. mobiles) *}}
144                                         <div class="contact-photo-image-wrapper visible-xs">
145                                                 <img class="contact-photo-xs media-object" src="{$thumb}" {11} alt="{$name}" />
146
147                                                 {{* Overlay background on hover the avatar picture *}}
148                                                 <div class="contact-photo-overlay">
149                                                         <span class="contact-photo-overlay-content overlay-xs"><i class="fa fa-angle-down" aria-hidden="true"></i></span>
150                                                 </div>
151                                         </div>
152                                 </button>
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-user" aria-hidden="true"></i>
194                                 </a>
195                                 {/if}
196                                 {if $photo_menu.follow}
197                                 <a class="contact-action-link btn-link" href="{$photo_menu.follow.1}" data-toggle="tooltip" title="{$photo_menu.follow.0}">
198                                         <i class="fa fa-user-plus" aria-hidden="true"></i>
199                                 </a>
200                                 {/if}
201                         </div>
202                         {/if}
203
204                         {{* The button to add or remove contacts from a contact group - group edit page *}}
205                         {if $contact.change_member}
206                         <div class="contact-group-actions pull-right nav-pills preferences">
207                                 <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}">
208                                         {if $contact.label == "members"}
209                                         <i class="fa fa-times-circle" aria-hidden="true"></i>
210                                         {elseif $contact.label == "contacts"}
211                                         <i class="fa fa-plus-circle" aria-hidden="true"></i>
212                                         {/if}
213                                 </button>
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         </div>
243 </template>