]> git.mxchange.org Git - friendica.git/commitdiff
Move actions dropdown in search item view
authorHypolite Petovan <hypolite@mrpetovan.com>
Mon, 24 Feb 2020 01:20:20 +0000 (20:20 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Mon, 24 Feb 2020 01:20:20 +0000 (20:20 -0500)
view/theme/frio/templates/search_item.tpl

index 6c2b8151618b5d3c5feaf7f9718b9771fc13784f..1cbd8451d45f434605684343e18d0b51cd6be9d5 100644 (file)
                <div class="media">
                        {{* Put additional actions in a top-right dropdown menu *}}
 
-                       <ul class="nav nav-pills preferences">
-                               {{if $item.network_icon != ""}}
-                               <li><span class="wall-item-network"><i class="fa fa-{{$item.network_icon}}" title="{{$item.network_name}}" aria-hidden="true"></i></span></li>
-                               {{else}}
-                               <li><span class="wall-item-network" title="{{$item.app}}">{{$item.network_name}}</span></li>
-                               {{/if}}
-
-                               {{if $item.plink || $item.star || $item.drop.dropping || $item.edpost || $item.subthread}}
-                               <li class="dropdown">
-                                       <button type="button" class="btn-link dropdown-toggle" data-toggle="dropdown" id="dropdownMenuTools-{{$item.id}}" aria-haspopup="true" aria-expanded="false"><i class="fa fa-angle-down" aria-hidden="true"></i></button>
-
-                                       <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="dropdownMenuTools-{{$item.id}}">
-                                               {{if $item.plink}}      {{*link to the original source of the item *}}
-                                               <li role="menuitem">
-                                                       <a title="{{$item.plink.title}}" href="{{$item.plink.href}}" class="navicon plink"><i class="fa fa-external-link" aria-hidden="true"></i> {{$item.plink.title}}</a>
-                                               </li>
-                                               {{/if}}
-
-                                               {{if $item.edpost}} {{* edit the posting *}}
-                                               <li role="menuitem">
-                                                       <button type="button" href="{{$item.edpost.0}}" title="{{$item.edpost.1}}" class="btn-link navicon pencil"><i class="fa fa-pencil" aria-hidden="true"></i> {{$item.edpost.1}}</button>
-                                               </li>
-                                               {{/if}}
-
-                                               {{if $item.tagger}} {{* tag the post *}}
-                                               <li role="menuitem">
-                                                       <button type="button" id="tagger-{{$item.id}}" onclick="itemTag({{$item.id}});" class="btn-link {{$item.tagger.class}}" title="{{$item.tagger.add}}"><i class="fa fa-tag" aria-hidden="true"></i> {{$item.tagger.add}}</button>
-                                               </li>
-                                               {{/if}}
-
-                                               {{if $item.filer}}
-                                               <li role="menuitem">
-                                                       <button type="button" id="filer-{{$item.id}}" onclick="itemFiler({{$item.id}});" class="btn-link filer-item filer-icon" title="{{$item.filer}}"><i class="fa fa-folder" aria-hidden="true"></i>&nbsp;{{$item.filer}}</button>
-                                               </li>
-                                               {{/if}}
-
-                                               {{if $item.star}}
-                                               <li role="menuitem">
-                                                       <button type="button" id="star-{{$item.id}}" onclick="dostar({{$item.id}});" class="btn-link {{$item.star.classdo}}" title="{{$item.star.do}}"><i class="fa fa-star-o" aria-hidden="true"></i>&nbsp;{{$item.star.do}}</button>
-                                                       <button type="button" id="unstar-{{$item.id}}" onclick="dostar({{$item.id}});" class="btn-link {{$item.star.classundo}}" title="{{$item.star.undo}}"><i class="fa fa-star" aria-hidden="true"></i>&nbsp;{{$item.star.undo}}</button>
-                                               </li>
-                                               {{/if}}
-
-                                               {{if $item.subthread}}
-                                               <li role="menuitem">
-                                                       <button type="button" id="subthread-{{$item.id}}" onclick="{{$item.subthread.action}}" class="btn-link" title="{{$item.subthread.title}}"><i class="fa fa-plus" aria-hidden="true"></i>&nbsp;{{$item.subthread.title}}</button>
-                                               </li>
-                                               {{/if}}
-
-                                               {{if $item.drop.dropping}}
-                                               <li role="separator" class="divider"></li>
-                                               <li role="menuitem">
-                                                       <button type="button" class="btn-link navicon delete" onclick="dropItem('item/drop/{{$item.id}}', 'item-{{$item.guid}}');" title="{{$item.drop.delete}}"><i class="fa fa-trash" aria-hidden="true"></i> {{$item.drop.delete}}</button>
-                                               </li>
-                                               {{/if}}
-                                       </ul>
-                               </li>
-                               {{/if}}
-                       </ul>
+                       <div class="preferences">
+                       {{if $item.network_icon != ""}}
+                               <span class="wall-item-network"><i class="fa fa-{{$item.network_icon}}" title="{{$item.network_name}}" aria-hidden="true"></i></span>
+                       {{else}}
+                               <span class="wall-item-network" title="{{$item.app}}">{{$item.network_name}}</span>
+                       {{/if}}
+                       {{if $item.plink}}      {{*link to the original source of the item *}}
+                               <a href="{{$item.plink.href}}" class="plink u-url" aria-label="{{$item.plink.title}}" title="{{$item.plink.title}}">
+                                       <i class="fa fa-external-link"></i>
+                               </a>
+                       {{/if}}
+                       </div>
 
                        {{* The avatar picture and the photo-menu *}}
                        <div class="dropdown pull-left"><!-- Dropdown -->
                                        <button type="button" class="btn btn-default" id="share-{{$item.id}}" title="{{$item.vote.share.0}}" onclick="jotShare({{$item.id}});"><i class="fa fa-retweet" aria-hidden="true"></i>&nbsp;{{$item.vote.share.0}}</button>
                                                {{/if}}
                                        {{/if}}
+
+
+                               {{* Put additional actions in a dropdown menu *}}
+                               {{if $item.edpost || $item.tagger || $item.filer || $item.pin || $item.star || $item.subthread || $item.ignore || $item.drop.dropping}}
+                                       <span role="presentation" class="separator"></span>
+                                       <span class="more-links btn-group{{if $item.thread_level > 1}} dropup{{/if}}">
+                                               <button type="button" class="btn-link dropdown-toggle" data-toggle="dropdown" id="dropdownMenuOptions-{{$item.id}}" aria-haspopup="true" aria-expanded="false" title="{{$item.menu}}"><i class="fa fa-ellipsis-h" aria-hidden="true"></i>&nbsp;{{$item.menu}}</button>
+                                               <ul class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="dropdownMenuOptions-{{$item.id}}">
+                                               {{if $item.edpost}} {{* edit the posting *}}
+                                                       <li role="menuitem">
+                                                               <a href="javascript:editpost('{{$item.edpost.0}}?mode=none');" title="{{$item.edpost.1}}" class="btn-link navicon pencil"><i class="fa fa-pencil" aria-hidden="true"></i> {{$item.edpost.1}}</a>
+                                                       </li>
+                                               {{/if}}
+
+                                               {{if $item.tagger}} {{* tag the post *}}
+                                                       <li role="menuitem">
+                                                               <a id="tagger-{{$item.id}}" href="javascript:itemTag({{$item.id}});" class="btn-link {{$item.tagger.class}}" title="{{$item.tagger.add}}"><i class="fa fa-tag" aria-hidden="true"></i> {{$item.tagger.add}}</a>
+                                                       </li>
+                                               {{/if}}
+
+                                               {{if $item.filer}}
+                                                       <li role="menuitem">
+                                                               <a id="filer-{{$item.id}}" href="javascript:itemFiler({{$item.id}});" class="btn-link filer-item filer-icon" title="{{$item.filer}}"><i class="fa fa-folder" aria-hidden="true"></i>&nbsp;{{$item.filer}}</a>
+                                                       </li>
+                                               {{/if}}
+
+                                               {{if $item.pin}}
+                                                       <li role="menuitem">
+                                                               <a id="pin-{{$item.id}}" href="javascript:dopin({{$item.id}});" class="btn-link {{$item.pin.classdo}}" title="{{$item.pin.do}}"><i class="fa fa-circle-o" aria-hidden="true"></i>&nbsp;{{$item.pin.do}}</a>
+                                                               <a id="unpin-{{$item.id}}" href="javascript:dopin({{$item.id}});" class="btn-link {{$item.pin.classundo}}" title="{{$item.pin.undo}}"><i class="fa fa-dot-circle-o" aria-hidden="true"></i>&nbsp;{{$item.pin.undo}}</a>
+                                                       </li>
+                                               {{/if}}
+
+                                               {{if $item.star}}
+                                                       <li role="menuitem">
+                                                               <a id="star-{{$item.id}}" href="javascript:dostar({{$item.id}});" class="btn-link {{$item.star.classdo}}" title="{{$item.star.do}}"><i class="fa fa-star-o" aria-hidden="true"></i>&nbsp;{{$item.star.do}}</a>
+                                                               <a id="unstar-{{$item.id}}" href="javascript:dostar({{$item.id}});" class="btn-link {{$item.star.classundo}}" title="{{$item.star.undo}}"><i class="fa fa-star" aria-hidden="true"></i>&nbsp;{{$item.star.undo}}</a>
+                                                       </li>
+                                               {{/if}}
+
+                                               {{if $item.subthread}}
+                                                       <li role="menuitem">
+                                                               <a id="subthread-{{$item.id}}" href="javascript:{{$item.subthread.action}}" class="btn-link" title="{{$item.subthread.title}}"><i class="fa fa-plus" aria-hidden="true"></i>&nbsp;{{$item.subthread.title}}</a>
+                                                       </li>
+                                               {{/if}}
+
+                                               {{if ($item.edpost || $item.tagger || $item.filer || $item.pin || $item.star || $item.subthread) && ($item.ignore || $item.drop.dropping)}}
+                                                       <li role="separator" class="divider"></li>
+                                               {{/if}}
+
+                                               {{if $item.ignore}}
+                                                       <li role="menuitem">
+                                                               <a id="ignore-{{$item.id}}" href="javascript:doignore({{$item.id}});" class="btn-link {{$item.ignore.classdo}}" title="{{$item.ignore.do}}"><i class="fa fa-eye-slash" aria-hidden="true"></i> {{$item.ignore.do}}</a>
+                                                       </li>
+                                                       <li role="menuitem">
+                                                               <a id="unignore-{{$item.id}}" href="javascript:doignore({{$item.id}});" class="btn-link {{$item.ignore.classundo}}"  title="{{$item.ignore.undo}}"><i class="fa fa-eye" aria-hidden="true"></i> {{$item.ignore.undo}}</a>
+                                                       </li>
+                                               {{/if}}
+
+                                               {{if $item.drop.dropping}}
+                                                       <li role="menuitem">
+                                                               <a class="btn-link navicon delete" href="javascript:dropItem('item/drop/{{$item.id}}/{{$item.return}}', 'item-{{$item.guid}}');" title="{{$item.drop.delete}}"><i class="fa fa-trash" aria-hidden="true"></i> {{$item.drop.delete}}</a>
+                                                       </li>
+                                                       {{/if}}
+                                               </ul>
+                                               <img id="like-rotator-{{$item.id}}" class="like-rotator" src="images/rotator.gif" alt="{{$item.wait}}" title="{{$item.wait}}" style="display: none;" />
+                                       </span>
+                               {{else}}
                                        <img id="like-rotator-{{$item.id}}" class="like-rotator" src="images/rotator.gif" alt="{{$item.wait}}" title="{{$item.wait}}" style="display: none;" />
+                               {{/if}}
                                </span>
 
 
                                </span>
                        </p><!--./wall-item-actions-->
 
-                                       {{* Display likes, dislike and attendance stats *}}
+                       {{* Display likes, dislike and attendance stats *}}
                        {{if $item.responses}}
                        <div class="wall-item-responses">
                                {{foreach $item.responses as $verb=>$response}}