]> git.mxchange.org Git - friendica.git/blob - templates/search_item.tpl
contacts page: change the contact-photo size according to display size
[friendica.git] / templates / search_item.tpl
1 <!-- TODO => Unknow block -->
2 <div class="wall-item-decor" style="display:none;">
3         <span class="icon s22 star {{$item.isstarred}}" id="starred-{{$item.id}}" title="{{$item.star.starred}}">{{$item.star.starred}}</span>
4         {{if $item.lock}}<span class="navicon lock fakelink" onclick="lockview(event,{{$item.id}});" title="{{$item.lock}}"></span><span class="fa fa-lock"></span>{{/if}}
5         <img id="like-rotator-{{$item.id}}" class="like-rotator" src="images/rotator.gif" alt="{{$item.wait}}" title="{{$item.wait}}" style="display: none;" />
6 </div>
7 <!-- ./TODO => Unknow block -->
8
9
10 <div class="panel">     
11         <div class="wall-item-container panel-body{{$item.indent}} {{$item.shiny}} {{$item.previewing}}" >
12                 <div class="media">
13                         {{* Put addional actions in a top-right dorpdown menu *}}
14                         {{if $item.star || $item.drop.dropping || $item.edpost}}
15                         <ul class="nav nav-pills preferences">
16                                 <li class="dropdown">
17                                         <a class="dropdown-toggle" data-toggle="dropdown"  href="#" id="dropdownMenuTools-{{$item.id}}" role="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-angle-down"></i></a>
18
19                                         <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="dropdownMenuTools-{{$item.id}}">
20                                                 {{if $item.drop.dropping}}
21                                                 <li role="presentation">
22                                                         <a role="menuitem" tabindex="-1" href="item/drop/{{$item.id}}" class="navicon delete" onclick="return confirmDelete();" title="{{$item.drop.delete}}"><i class="fa fa-trash"></i> {{$item.drop.delete}}</a>
23                                                 </li>
24                                                 {{/if}}
25
26                                                 {{if $item.edpost}}
27                                                 <li role="presentation">
28                                                         <a role="menuitem" tabindex="-1" href="{{$item.edpost.0}}" title="{{$item.edpost.1}}" class="navicon delete"><i class="fa fa-pencil"></i> {{$item.edpost.1}}</a>
29                                                 </li>
30                                                 {{/if}}
31
32                                                 {{if $item.tagger}}
33                                                 <li role="presentation">
34                                                         <a role="menuitem" tabindex="-1" href="#" id="tagger-{{$item.id}}" onclick="itemTag({{$item.id}}); return false;" class="{{$item.tagger.class}}" title="{{$item.tagger.add}}"><i class="fa fa-tag"></i> {{$item.tagger.add}}</a>
35                                                 </li>
36                                                 {{/if}}
37
38                                                 {{if $item.star}}
39                                                 <li role="presentation">
40                                                         <a role="menuitem" href="#" id="star-{{$item.id}}" onclick="dostar({{$item.id}}); return false;" class="{{$item.star.classdo}}" title="{{$item.star.do}}"><i class="fa fa-star-o"></i>&nbsp;{{$item.star.do}}</a>
41                                                         <a role="menuitem" href="#" id="unstar-{{$item.id}}" onclick="dostar({{$item.id}}); return false;" class="{{$item.star.classundo}}" title="{{$item.star.undo}}"><i class="fa fa-star"></i>&nbsp;{{$item.star.undo}}</a>
42                                                 </li>
43                                                 {{/if}}
44
45                                                 {{if $item.filer}}
46                                                 <li role="presentation">
47                                                         <a role="menuitem" href="#" id="filer-{{$item.id}}" onclick="itemFiler({{$item.id}}); return false;" class="filer-item filer-icon" title="{{$item.filer}}"><i class="fa fa-folder"></i>&nbsp;{{$item.filer}}</a>
48                                                 </li>
49                                                 {{/if}}
50                                         </ul>
51                                 </li>
52                         </ul>
53                         {{/if}}
54
55                         {{* The avatar picture and the photo-menu *}}
56                         <div class="dropdown pull-left"><!-- Dropdown -->
57                                 <div class="hidden-sm hidden-xs contact-photo-wrapper mframe{{if $item.owner_url}} wwfrom{{/if}}">
58                                         <a class="dropdown-toggle" type="button" id="wall-item-photo-menu-{{$item.id}}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
59                                                 <div class="contact-photo-image-wrapper">
60                                                         <img src="{{$item.thumb}}" class="contact-photo media-object {{$item.sparkle}}" id="wall-item-photo-{{$item.id}}" alt="{{$item.name}}" />
61
62                                                         {{* Overlay background on hover the avatar picture *}}
63                                                         <div class="contact-photo-overlay">
64                                                                 <span class="contact-photo-overlay-content"><i class="fa fa-angle-down"></i></span>
65                                                         </div>
66                                                 </div>
67                                         </a>
68                                         <ul class="dropdown-menu contact-menu-lg contact-menu menu-popup" role="menu" aria-labelledby="wall-item-photo-menu-{{$item.id}}">
69                                                 {{$item.item_photo_menu}}
70                                         </ul>
71                                 </div>
72                                 <div class="hidden-lg hidden-md contact-photo-wrapper mframe{{if $item.owner_url}} wwfrom{{/if}}">
73                                         <a class="dropdown-toggle" type="button" id="wall-item-photo-menu-{{$item.id}}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
74                                                 <div class="contact-photo-image-wrapper">
75                                                         <img src="{{$item.thumb}}" class="contact-photo-xs media-object {{$item.sparkle}}" id="wall-item-photo-{{$item.id}}" alt="{{$item.name}}" />
76
77                                                         {{* Overlay background on hover the avatar picture *}}
78                                                         <div class="contact-photo-overlay">
79                                                                 <span class="contact-photo-overlay-content"><i class="fa fa-angle-down"></i></span>
80                                                         </div>
81                                                 </div>
82                                         </a>
83                                         <ul class="dropdown-menu contact-menu-xs contact-menu menu-popup" role="menu" aria-labelledby="wall-item-photo-menu-{{$item.id}}">
84                                                 {{$item.item_photo_menu}}
85                                         </ul>
86                                 </div>
87                         </div><!-- ./Dropdown -->
88
89
90                         {{* contact info header*}}
91                         <div role="heading " class="contact-info hidden-sm hidden-xs media-body"><!-- <= For computer -->
92                                 <h4 class="media-heading"><a href="{{$item.profile_url}}" target="redir" title="{{$item.linktitle}}" class="wall-item-name-link"><span class="wall-item-name btn-link {{$item.sparkle}}">{{$item.name}}</span></a>
93                                 {{if $item.owner_url}}{{$item.via}} <a href="{{$item.owner_url}}" target="redir" title="{{$item.olinktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.osparkle}} btn-link" id="wall-item-ownername-{{$item.id}}">{{$item.owner_name}}</span></a>{{/if}}
94                                 {{if $item.lock}}<span class="navicon lock fakelink" onClick="lockview(event,{{$item.id}});" title="{{$item.lock}}">&nbsp<small><i class="fa fa-lock"></i></small></span>{{/if}}
95
96                                 {{if $item.plink}}
97                                 <a title="{{$item.plink.orig_title}}" href="{{$item.plink.orig}}"><span class="sr-only">{{$item.plink.orig_title}}</span>
98                                         <p class="text-muted">
99                                                 <small><span class="time wall-item-ago">{{$item.ago}}</span>
100                                                         {{if $item.location}}&nbsp;&mdash;&nbsp;(<i>{{$item.location}}</i>){{/if}}
101                                                 </small>
102                                         </p>
103                                 </a>
104                                 {{* @todo $item.created have to be inserted *}}
105                                 {{/if}}</h4>
106                         </div>
107
108                         {{* @todo work for mobile have to be done *}}
109                         <div role="heading " class="contact-info-xs hidden-lg hidden-md"><!-- <= For smartphone (responsive) -->
110                                 <h5 class="media-heading"><a href="{{$item.profile_url}}" target="redir" title="{{$item.linktitle}}" class="wall-item-name-link"><strong>{{$item.name}}</strong></a>
111                                 {{if $item.plink}}
112                                 <a title="{{$item.plink.title}}" href="{{$item.plink.href}}"><p class="text-muted"><small>{{$item.ago}} {{if $item.location}}&nbsp;&mdash;&nbsp;(<i>{{$item.location}}</i>){{/if}}</small></p></a>
113                                 {{/if}}</h5>
114                         </div>
115
116                         <div class="clearfix"></div>
117
118                         <hr />
119
120
121                         {{* item content *}}
122                         <div itemprop="description" class="wall-item-content {{$item.type}}" id="wall-item-content-{{$item.id}}">
123                                 {{* insert some space if it's an top-level post *}}
124                                 {{if $item.thread_level==1}}
125                                 <div style="height:10px;">&nbsp;</div> <!-- use padding/margin instead-->
126                                 {{/if}}
127
128                                 {{if $item.title}}
129                                 <span class="wall-item-title" id="wall-item-title-{{$item.id}}"><h4 class="media-heading"><a href="{{$item.plink.href}}" class="{{$item.sparkle}}">{{$item.title}}</a></h4><br /></span>
130                                 {{/if}}
131
132                                 <div class="wall-item-body" id="wall-item-body-{{$item.id}}">{{$item.body}}</div>
133                         </div>
134
135                         <!-- TODO -->
136                         <div class="wall-item-bottom">
137                                 <div class="wall-item-links">
138                                 </div>
139                                 <div class="wall-item-tags">
140                                         {{foreach $item.hashtags as $tag}}
141                                                 <span class='tag label btn-info sm'>{{$tag}} <i class="fa fa-bolt"></i></span>
142                                         {{/foreach}}
143
144                                         {{foreach $item.mentions as $tag}}
145                                                 <span class='mention label btn-warning sm'>{{$tag}} <i class="fa fa-user"></i></span>
146                                         {{/foreach}}
147
148                                         {{foreach $item.folders as $cat}}
149                                                 <span class='folder label btn-danger sm'>{{$cat.name}}</a>{{if $cat.removeurl}} (<a href="{{$cat.removeurl}}" title="{{$remove}}">x</a>) {{/if}} </span>
150                                         {{/foreach}}
151
152                                         {{foreach $item.categories as $cat}}
153                                                 <span class='category label btn-success sm'>{{$cat.name}}</a>{{if $cat.removeurl}} (<a href="{{$cat.removeurl}}" title="{{$remove}}">x</a>) {{/if}} </span>
154                                         {{/foreach}}
155                                 </div>
156                                         {{if $item.edited}}<div class="itemedited text-muted">{{$item.edited['label']}} (<span title="{{$item.edited['date']}}">{{$item.edited['relative']}}</span>)</div>{{/if}}
157                         </div>
158                         <!-- ./TODO -->
159
160                         <div class="wall-item-actions">
161                                 {{* Action buttons to interact with the item (like: like, dislike, share and so on *}}
162                                 <div class="wall-item-actions-left pull-left">
163                                         <!--comment this out to try something different {{if $item.threaded}}{{if $item.comment}}
164                                         <div id="button-reply" class="pull-left">
165                                                 <span class="btn-link" id="comment-{{$item.id}}" onclick="openClose('item-comments-{{$item.id}}'); commentExpand({{$item.id}});"><i class="fa fa-reply" title="{{$item.switchcomment}}"></i> </span>
166                                         </div>
167                                         {{/if}}{{/if}}-->
168
169                                         {{if $item.threaded}}{{/if}}
170
171                                         {{* Buttons for like and dislike *}}
172                                         {{if $item.vote}}
173                                         <div class="vote-like pull-left">
174                                                 <a role="button" href="#" class="button-likes" id="like-{{$item.id}}" title="{{$item.vote.like.0}}" onclick="dolike({{$item.id}},'like'); return false;">{{$item.vote.like.0}}</a>
175
176                                                 {{if $item.vote.dislike}}
177                                                 <span role="presentation" class="seperator">&nbsp;•&nbsp;</span>
178                                                 <a role="button" href="#" class="button-likes" id="dislike-{{$item.id}}" title="{{$item.vote.dislike.0}}" onclick="dolike({{$item.id}},'dislike'); return false;">{{$item.vote.dislike.0}}</a>
179                                                 {{/if}}
180
181                                                 {{if $item.comment}}<span role="presentation" class="seperator">&nbsp;•&nbsp;</span>{{/if}}
182                                         </div>
183                                         {{/if}}
184
185                                         {{* Butten to open the comment text field *}}
186                                         {{if $item.comment}}
187                                         <div id="button-reply" class="pull-left">
188                                                 <a role="button" class="" id="comment-{{$item.id}}" title="{{$item.switchcomment}}" onclick="openClose('item-comments-{{$item.id}}'); commentExpand({{$item.id}});">{{$item.switchcomment}} </a>
189                                         </div>
190                                         {{/if}}
191
192                                         {{* Button for sharing the item *}}
193                                         {{if $item.vote}}
194                                                 {{if $item.vote.share}}
195                                                 <span role="presentation" class="seperator">&nbsp;•&nbsp;</span>
196                                                 <a role="button" href="#" class="" id="share-{{$item.id}}" title="{{$item.vote.share.0}}" onclick="jotShare({{$item.id}}); return false;"><i class="fa fa-retweet"></i>&nbsp;{{$item.vote.share.0}}</a>
197                                                 {{/if}}
198                                         {{/if}}
199                                 </div>
200
201
202                                 <div class="wall-item-actions-right pull-right">
203                                         {{* Event attendance buttons *}}
204                                         {{if $item.isevent}}
205                                         <div class="vote-event">
206                                                 <a role="button" href="#" class="button-event" id="attendyes-{{$item.id}}" title="{{$item.attend.0}}" onclick="dolike({{$item.id}},'attendyes'); return false;"><i class="fa fa-check"><span class="sr-only">{{$item.attend.0}}</span></i></a>
207                                                 <a role="button" href="#" class="button-event" id="attendno-{{$item.id}}" title="{{$item.attend.1}}" onclick="dolike({{$item.id}},'attendno'); return false;"><i class="fa fa-times"><span class="sr-only">{{$item.attend.1}}</span></i></a>
208                                                 <a role="button" href="#" class="button-event" id="attendmaybe-{{$item.id}}" title="{{$item.attend.2}}" onclick="dolike({{$item.id}},'attendmaybe'); return false;"><i class="fa fa-question"><span class="sr-only">{{$item.attend.2}}</span></i></a>
209                                         </div>
210                                         {{/if}}
211
212                                         <div class="pull-right checkbox">
213                                                 {{if $item.drop.pagedrop}}
214                                                 <input type="checkbox" title="{{$item.drop.select}}" name="itemselected[]" id="checkbox-{{$item.id}}" class="item-select" value="{{$item.id}}" />
215                                                 <label for="checkbox-{{$item.id}}"></label>
216                                                 {{/if}}
217                                         </div>
218                                 </div>
219                                 <div class="clearfix"></div>
220                         </div><!--./wall-item-actions-->
221
222                                         {{* Display likes, dislike and attendance stats *}}
223                         {{if $item.responses}}
224                                 <div class="wall-item-responses">
225                                         {{foreach $item.responses as $verb=>$response}}
226                                         <div class="wall-item-{{$verb}}" id="wall-item-{{$verb}}-{{$item.id}}">{{$response.output}}</div>
227                                         {{/foreach}}
228                                 </div>
229                         {{/if}}
230
231                         <div class="wall-item-conv" id="wall-item-conv-{{$item.id}}" >
232                         {{if $item.conv}}
233                                         <a href='{{$item.conv.href}}' id='context-{{$item.id}}' title='{{$item.conv.title}}'>{{$item.conv.title}}</a>
234                         {{/if}}
235                         </div>
236                 </div><!--./media>-->
237         </div><!-- ./panel-body -->
238 </div><!--./panel-->
239
240 <script>
241 // Note this is the same script like in wall_thread.tpl
242 $(document).ready(function() {
243   // put shared content in an own wrapper div
244   $('#wall-item-content-{{$item.id}} > #wall-item-body-{{$item.id}} > .shared_content').after('<div class="shared-content-wrapper content-card"></div>');
245   $("#wall-item-content-{{$item.id}} > #wall-item-body-{{$item.id}} > .shared_header, #wall-item-content-{{$item.id}} > #wall-item-body-{{$item.id}} > .shared_content").appendTo("#wall-item-content-{{$item.id}} .shared-content-wrapper");
246
247   // put shared content in an own wrapper (with showmore addon)
248   $('#wall-item-content-{{$item.id}} .showmore-content > .shared_content').parent().after('<div class="shared-content-wrapper content-card"></div>');
249   $("#wall-item-content-{{$item.id}} .showmore-teaser > .shared_header, #wall-item-content-{{$item.id}} .showmore-content > .shared_header").parent().appendTo("#wall-item-content-{{$item.id}} .shared-content-wrapper");
250 });
251 </script>