]> git.mxchange.org Git - friendica.git/blob - view/theme/frio/templates/contact_template.tpl
Don't show "delete contact" when there is a follow or unfollow option
[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 dropdown 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.unfollow}}
77                                 <a class="contact-action-link btn-link" href="{{$contact.photo_menu.unfollow.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.unfollow.0}}">
78                                         <i class="fa fa-user-times" 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 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}}">
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 <template 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 *}}
137                 <div class="contact-photo-wrapper dropdown media-left">
138                         <div class="contact-entry-photo mframe" id="contact-entry-photo-{$id}">
139
140                                 <div class="contact-photo-image-wrapper hidden-xs">
141                                         <img class="contact-photo media-object xl" src="{$thumb}" {11} alt="{$name}" />
142                                 </div>
143
144                                 {{* For very small displays we use a drobdown menu for contact relating actions *}}
145                                 <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">
146                                         {{* use a smaller picture on very small displays (e.g. mobiles) *}}
147                                         <div class="contact-photo-image-wrapper visible-xs">
148                                                 <img class="contact-photo-xs media-object" src="{$thumb}" {11} alt="{$name}" />
149
150                                                 {{* Overlay background on hover the avatar picture *}}
151                                                 <div class="contact-photo-overlay">
152                                                         <span class="contact-photo-overlay-content overlay-xs"><i class="fa fa-angle-down" aria-hidden="true"></i></span>
153                                                 </div>
154                                         </div>
155                                 </button>
156
157                                 {if $photo_menu}
158                                 <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}">
159                                         {foreach $photo_menu as $c}
160                                         {if $c.2}
161                                         <li role="presentation"><a role="menuitem" target="redir" href="{$c.1}">{$c.0}</a></li>
162                                         {elseif $c.3}
163                                         <li role="presentation"><button role="menuitem" type="button" class="btn-link" onclick="addToModal('{$c.1}')">{$c.0}</button></li>
164                                         {else}
165                                         <li role="presentation"><a role="menuitem" href="{$c.1}">{$c.0}</a></li>
166                                         {/if}
167                                         {/foreach}
168                                 </ul>
169
170                                 {/if}
171                         </div>
172
173                 </div>
174
175                 <div class="media-body">
176                         {if $photo_menu}
177                         {{* The contact actions like private mail, delete contact, edit contact and so on *}}
178                         <div class="contact-actions pull-right nav-pills preferences hidden-xs">
179                                 {if $photo_menu.pm}
180                                 <button type="button" class="contact-action-link btn-link" onclick="addToModal('{$photo_menu.pm.1}')" data-toggle="tooltip" title="{$photo_menu.pm.0}">
181                                         <i class="fa fa-envelope" aria-hidden="true"></i>
182                                 </button>
183                                 {/if}
184                                 {if $photo_menu.poke}
185                                 <button type="button" class="contact-action-link btn-link" onclick="addToModal('{$photo_menu.poke.1}')" data-toggle="tooltip" title="{$photo_menu.poke.0}">
186                                         <i class="fa fa-heartbeat" aria-hidden="true"></i>
187                                 </button>
188                                 {/if}
189                                 {if $photo_menu.network}
190                                 <a class="contact-action-link btn-link" href="{$photo_menu.network.1}" data-toggle="tooltip" title="{$photo_menu.network.0}">
191                                         <i class="fa fa-cloud" aria-hidden="true"></i>
192                                 </a>
193                                 {/if}
194                                 {if $photo_menu.edit}
195                                 <a class="contact-action-link btn-link" href="{$photo_menu.edit.1}" data-toggle="tooltip" title="{$photo_menu.edit.0}">
196                                         <i class="fa fa-user" aria-hidden="true"></i>
197                                 </a>
198                                 {/if}
199                                 {if $photo_menu.drop}
200                                 <a class="contact-action-link btn-link" href="{$photo_menu.drop.1}" data-toggle="tooltip" title="{$photo_menu.drop.0}">
201                                         <i class="fa fa-user-times" aria-hidden="true"></i>
202                                 </a>
203                                 {/if}
204                                 {if $photo_menu.follow}
205                                 <a class="contact-action-link btn-link" href="{$photo_menu.follow.1}" data-toggle="tooltip" title="{$photo_menu.follow.0}">
206                                         <i class="fa fa-user-plus" aria-hidden="true"></i>
207                                 </a>
208                                 {/if}
209                         </div>
210                         {/if}
211
212                         {{* The button to add or remove contacts from a contact group - group edit page *}}
213                         {if $contact.change_member}
214                         <div class="contact-group-actions pull-right nav-pills preferences">
215                                 <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}">
216                                         {if $contact.label == "members"}
217                                         <i class="fa fa-times-circle" aria-hidden="true"></i>
218                                         {elseif $contact.label == "contacts"}
219                                         <i class="fa fa-plus-circle" aria-hidden="true"></i>
220                                         {/if}
221                                 </button>
222                         </div>
223                         {/if}
224
225                         {{* The contact description (e.g. Name, Network, kind of connection and so on *}}
226                         <div class="contact-entry-desc">
227                                 <div class="contact-entry-name" id="contact-entry-name-{$id}">
228                                         <h4 class="media-heading"><a href="{$url}">{$name}</a>
229                                         {if $account_type} <small class="contact-entry-details" id="contact-entry-accounttype-{$id}">({$account_type})</small>{/if}
230                                         {if $account_type == 'Forum'}<i class="fa fa-comments-o" aria-hidden="true"></i>{/if}
231                                         {{* @todo this needs some changing in core because $contact.account_type contains a translated string which may notbe the same in every language *}}
232                                         </h4>
233                                 </div>
234                                 {if $alt_text}<div class="contact-entry-details" id="contact-entry-rel-{$id}" >{$alt_text}</div>{/if}
235                                 {if $itemurl}<div class="contact-entry-details" id="contact-entry-url-{$id}" >{$itemurl}</div>{/if}
236                                 {if $tags}<div class="contact-entry-details" id="contact-entry-tags-{$id}" >{$tags}</div>{/if}
237                                 {if $details}<div class="contact-entry-details" id="contact-entry-details-{$id}" >{$details}</div>{/if}
238                                 {if $network}<div class="contact-entry-details" id="contact-entry-network-{$id}" >{$network}</div>{/if}
239                         </div>
240
241                         {{* The checkbox to perform batch actions to these contacts (for batch actions have a look at contacts-template.tpl) *}}
242                         {{* if !$no_contacts_checkbox *}}
243                         {{if $multiselect}}
244                         <div class="checkbox contact-entry-checkbox pull-right">
245                                 <input id="checkbox-{$id}" type="checkbox" class="contact-select pull-right" name="contact_batch[]" value="{$id}">
246                                 <label for="checkbox-{$id}"></label>
247                         </div>
248                         {{/if}}
249                 </div>
250         </div>
251 </template>