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