]> git.mxchange.org Git - friendica.git/blob - view/theme/frio/templates/contact_template.tpl
Merge pull request #2567 from rabuzarus/0606-photo-menu
[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 pull-left" >
6                         <div class="contact-entry-photo mframe" id="contact-entry-photo-{{$contact.id}}" >
7
8                                 <a class="dropdown-toggle" id="contact-photo-menu-{{$contact.id}}" type="button"  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                                 </a>
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"><a onclick="addToModal('{{$c.1}}')">{{$c.0}}</a></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
46                 </div>
47
48                 <div class="media-body">
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}}<a class="contact-action-link" onclick="addToModal('{{$contact.photo_menu.pm.1}}')" data-toggle="tooltip" title="{{$contact.photo_menu.pm.0}}"><i class="fa fa-envelope" aria-hidden="true"></i></a>{{/if}}
52                                 {{if $contact.photo_menu.poke}}<a class="contact-action-link" onclick="addToModal('{{$contact.photo_menu.poke.1}}')" data-toggle="tooltip" title="{{$contact.photo_menu.poke.0}}"><i class="fa fa-heartbeat" aria-hidden="true"></i></a>{{/if}}
53                                 {{if $contact.photo_menu.network}}<a class="contact-action-link" href="{{$contact.photo_menu.network.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.network.0}}"><i class="fa fa-cloud" aria-hidden="true"></i></a>{{/if}}
54                                 {{if $contact.photo_menu.edit}}<a class="contact-action-link" href="{{$contact.photo_menu.edit.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.edit.0}}"><i class="fa fa-pencil" aria-hidden="true"></i></a>{{/if}}
55                                 {{if $contact.photo_menu.drop}}<a class="contact-action-link" href="{{$contact.photo_menu.drop.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.drop.0}}"><i class="fa fa-user-times" aria-hidden="true"></i></a>{{/if}}
56                                 {{if $contact.photo_menu.follow}}<a class="contact-action-link" href="{{$contact.photo_menu.follow.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.follow.0}}"><i class="fa fa-user-plus" aria-hidden="true"></i></a>{{/if}}
57                                 {{if $contact.photo_menu.hide}}<a class="contact-action-link" href="{{$contact.photo_menu.hide.1}}" data-toggle="tooltip" title="{{$contact.photo_menu.hide.0}}"><i class="fa fa-times" aria-hidden="true"></i></a>{{/if}}
58                         </div>
59
60                         {{* The contact description (e.g. Name, Network, kind of connection and so on *}}
61                         <div class="contact-entry-desc">
62                                 <div class="contact-entry-name" id="contact-entry-name-{{$contact.id}}" >
63                                         <h4 class="media-heading"><a href="{{$contact.url}}">{{$contact.name}}</a>
64                                         {{if $contact.account_type}} <small class="contact-entry-details" id="contact-entry-accounttype-{{$contact.id}}">({{$contact.account_type}})</small>{{/if}}
65                                         {{if $contact.account_type == 'Forum'}}<i class="fa fa-comments-o" aria-hidden="true"></i>{{/if}}
66                                         {{* @todo this needs some changing in core because $contact.account_type contains a translated string which may notbe the same in every language *}}
67                                         </h4>
68                                 </div>
69                                 {{if $contact.alt_text}}<div class="contact-entry-details" id="contact-entry-rel-{{$contact.id}}" >{{$contact.alt_text}}</div>{{/if}}
70                                 {{if $contact.itemurl}}<div class="contact-entry-details" id="contact-entry-url-{{$contact.id}}" >{{$contact.itemurl}}</div>{{/if}}
71                                 {{if $contact.tags}}<div class="contact-entry-details" id="contact-entry-tags-{{$contact.id}}" >{{$contact.tags}}</div>{{/if}}
72                                 {{if $contact.details}}<div class="contact-entry-details" id="contact-entry-details-{{$contact.id}}" >{{$contact.details}}</div>{{/if}}
73                                 {{if $contact.network}}<div class="contact-entry-details" id="contact-entry-network-{{$contact.id}}" >{{$contact.network}}</div>{{/if}}
74                         </div>
75
76                         {{* The checkbox to perform batch actions to these contacts (for batch actions have a look at contacts-template.tpl) *}}
77                         {{* if !$no_contacts_checkbox *}}
78                         {{if $multiselect}}
79                         <div class="checkbox contact-entry-checkbox pull-right">
80                                 <input id="checkbox-{{$contact.id}}" type="checkbox" class="contact-select pull-right" name="contact_batch[]" value="{{$contact.id}}">
81                                 <label for="checkbox-{{$contact.id}}"></label>
82                         </div>
83                         {{/if}}
84                 </div>
85
86 </div>
87
88                 
89 {{* the following part is a nearly a copy of the part above but it is modyfied for working with js.
90 We use this part to filter the contacts with jquery.textcomplete *}}
91 <div class="javascript-template" rel="contact-template" style="display: none">
92         <div class="contact-wrapper media" id="contact-entry-wrapper-{$id}" >
93
94                         {{* This is a wrapper for the contact picture and the dropdown menu with contact relating actions *}}
95                         <div class="contact-photo-wrapper dropdown pull-left" >
96                                 <div class="contact-entry-photo mframe" id="contact-entry-photo-{$id}" >
97
98                                         <a class="dropdown-toggle" id="contact-photo-menu-{$id}" type="button"  data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" >
99                                                 <div class="contact-photo-image-wrapper hidden-xs">
100                                                         <img class="contact-photo media-object xl" src="{$thumb}" {11} alt="{$name}" />
101
102                                                         {{* Overlay background on hover the avatar picture *}}
103                                                         <div class="contact-photo-overlay">
104                                                                 <span class="contact-photo-overlay-content xl"><i class="fa fa-angle-down"></i></span>
105                                                         </div>
106                                                 </div>
107
108                                                 {{* use a smaller picture on very small displays (e.g. mobiles) *}}
109                                                 <div class="contact-photo-image-wrapper hidden-lg hidden-md hidden-sm">
110                                                         <img class="contact-photo-xs media-object" src="{$thumb}" {11} alt="{$name}" />
111
112                                                         {{* Overlay background on hover the avatar picture *}}
113                                                         <div class="contact-photo-overlay">
114                                                                 <span class="contact-photo-overlay-content overlay-xs"><i class="fa fa-angle-down"></i></span>
115                                                         </div>
116                                                 </div>
117                                         </a>
118
119
120                                         {if $photo_menu}
121                                         <ul class="contact-photo-menu menu-popup dropdown-menu " id="contact-photo-menu-{$id}" role="menu" aria-labelledby="contact-photo-menu-{$id}">
122                                                 {foreach $photo_menu as $c}
123                                                 {if $c.2}
124                                                 <li role="menuitem"><a target="redir" href="{$c.1}">{$c.0}</a></li>
125                                                 {elseif $c.3}
126                                                 <li role="menuitem"><a onclick="addToModal('{$c.1}')">{$c.0}</a></li>
127                                                 {else}
128                                                 <li role="menuitem"><a href="{$c.1}">{$c.0}</a></li>
129                                                 {/if}
130                                                 {/foreach}
131                                         </ul>
132
133                                         {/if}
134                                 </div>
135
136                         </div>
137
138                         <div class="media-body">
139                                 {{* The contact actions like private mail, delete contact, edit contact and so on *}}
140                                 <div class="contact-actions pull-right nav-pills preferences hidden-xs">
141                                         {if $photo_menu.pm}<a class="contact-action-link" onclick="addToModal('{$photo_menu.pm.1}')" data-toggle="tooltip" title="{$photo_menu.pm.0}"><i class="fa fa-envelope" aria-hidden="true"></i></a>{/if}
142                                         {if $photo_menu.poke}<a class="contact-action-link" onclick="addToModal('{$photo_menu.poke.1}')" data-toggle="tooltip" title="{$photo_menu.poke.0}"><i class="fa fa-heartbeat" aria-hidden="true"></i></a>{/if}
143                                         {if $photo_menu.network}<a class="contact-action-link" href="{$photo_menu.network.1}" data-toggle="tooltip" title="{$photo_menu.network.0}"><i class="fa fa-cloud" aria-hidden="true"></i></a>{/if}
144                                         {if $photo_menu.edit}<a class="contact-action-link" href="{$photo_menu.edit.1}" data-toggle="tooltip" title="{$photo_menu.edit.0}"><i class="fa fa-pencil" aria-hidden="true"></i></a>{/if}
145                                         {if $photo_menu.drop}<a class="contact-action-link" href="{$photo_menu.drop.1}" data-toggle="tooltip" title="{$photo_menu.drop.0}"><i class="fa fa-user-times" aria-hidden="true"></i></a>{/if}
146                                         {if $photo_menu.follow}<a class="contact-action-link" href="{$photo_menu.follow.1}" data-toggle="tooltip" title="{$photo_menu.follow.0}"><i class="fa fa-user-plus" aria-hidden="true"></i></a>{/if}
147                                 </div>
148
149                                 {{* The contact description (e.g. Name, Network, kind of connection and so on *}}
150                                 <div class="contact-entry-desc">
151                                         <div class="contact-entry-name" id="contact-entry-name-{$id}" >
152                                                 <h4 class="media-heading"><a href="{url}">{$name}</a>
153                                                 {if $account_type} <small class="contact-entry-details" id="contact-entry-accounttype-{$id}">({$account_type})</small>{/if}
154                                                 {if $account_type == 'Forum'}<i class="fa fa-comments-o" aria-hidden="true"></i>{/if}
155                                                 {{* @todo this needs some changing in core because $contact.account_type contains a translated string which may notbe the same in every language *}}
156                                                 </h4>
157                                         </div>
158                                         {if $alt_text}<div class="contact-entry-details" id="contact-entry-rel-{$id}" >{$alt_text}</div>{/if}
159                                         {if $itemurl}<div class="contact-entry-details" id="contact-entry-url-{$id}" >{$itemurl}</div>{/if}
160                                         {if $tags}<div class="contact-entry-details" id="contact-entry-tags-{$id}" >{$tags}</div>{/if}
161                                         {if $details}<div class="contact-entry-details" id="contact-entry-details-{$id}" >{$details}</div>{/if}
162                                         {if $network}<div class="contact-entry-details" id="contact-entry-network-{$id}" >{$network}</div>{/if}
163                                 </div>
164
165                                 {{* The checkbox to perform batch actions to these contacts (for batch actions have a look at contacts-template.tpl) *}}
166                                 {{* if !$no_contacts_checkbox *}}
167                                 {{if $multiselect}}
168                                 <div class="checkbox contact-entry-checkbox pull-right">
169                                         <input id="checkbox-{$id}" type="checkbox" class="contact-select pull-right" name="contact_batch[]" value="{$id}">
170                                         <label for="checkbox-{$id}"></label>
171                                 </div>
172                                 {{/if}}
173                         </div>
174
175         </div>
176 </div>