]> git.mxchange.org Git - friendica.git/commitdiff
Useless links removed / Item menu is moved to the item actions bar
authorMichael <heluecht@pirati.ca>
Thu, 6 Feb 2020 22:06:24 +0000 (22:06 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 6 Feb 2020 22:06:24 +0000 (22:06 +0000)
src/Model/Profile.php
src/Object/Post.php
view/templates/settings/profile/link.tpl [deleted file]
view/theme/frio/css/style.css
view/theme/frio/templates/nav.tpl
view/theme/frio/templates/profile/vcard.tpl
view/theme/frio/templates/wall_thread.tpl
view/theme/vier/templates/profile/vcard.tpl

index caf0b0869d3fa1aab60312bfdeb782cbbd83577d..28491fb5f04ad1e3170c68a63521cc52e82c800e 100644 (file)
@@ -184,16 +184,6 @@ class Profile
                        require_once $theme_info_file;
                }
 
-               if (local_user() && local_user() == $a->profile['uid'] && $profiledata) {
-                       DI::page()['aside'] .= Renderer::replaceMacros(
-                               Renderer::getMarkupTemplate('settings/profile/link.tpl'),
-                               [
-                                       '$editprofile' => DI::l10n()->t('Edit profile'),
-                                       '$profid' => $a->profile['id']
-                               ]
-                       );
-               }
-
                $block = ((DI::config()->get('system', 'block_public') && !Session::isAuthenticated()) ? true : false);
 
                /**
index d7624205512eed7aab78896efa9a0f8754bdfcef..8ebc6e265b10a032e2676a1da8069536dba681f5 100644 (file)
@@ -440,6 +440,7 @@ class Post
                        'switchcomment'   => DI::l10n()->t('Comment'),
                        'reply_label'     => DI::l10n()->t('Reply to %s', $name_e),
                        'comment'         => $comment,
+                       'menu'            => DI::l10n()->t('More'),
                        'previewing'      => $conv->isPreview() ? ' preview ' : '',
                        'wait'            => DI::l10n()->t('Please wait'),
                        'thread_level'    => $thread_level,
diff --git a/view/templates/settings/profile/link.tpl b/view/templates/settings/profile/link.tpl
deleted file mode 100644 (file)
index d387ea6..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-<div class="profile-edit-side-div"><a class="profile-edit-side-link icon edit" title="{{$editprofile}}" href="settings/profile"></a></div>
-<div class="clear"></div>
index 337817553a2ca4bf939927c36dbca2e31633b2a9..12a961108d627aa8f78b9c6dfc70459c50bb8f50 100644 (file)
@@ -1950,7 +1950,7 @@ code > .hl-main {
 .wall-item-container:hover .wall-item-links,
 .wall-item-container:hover .wall-item-actions,
 .wall-item-container:hover .body-attach > a {
-    opacity: 0.6;
+    opacity: 1;
     -webkit-transition: all 0.25s ease-in-out;
     -moz-transition: all 0.25s ease-in-out;
     -o-transition: all 0.25s ease-in-out;
index 0fa56352fc3a722280f3f976f7313c852dfd4a77..cc661b3d50c1d7520183aa47771ccccf38a83c47 100644 (file)
                                                        {{/if}}
                                                        <li role="presentation" class="divider"></li>
                                                        {{if $nav.contacts}}
-                                                       <li role="presentation"><a role="menuitem" id="nav-menu-contacts-link" class="nav-link {{$nav.contacts.2}}" href="{{$nav.contacts.0}}" title="{{$nav.contacts.3}}"><i class="fa fa-users fa-fw" aria-hidden="true"></i> {{$nav.contacts.1}}</a><span id="intro-update-li" class="nav-intro-badge badge nav-notification"></span></li>
+                                                       <li role="presentation"><a role="menuitem" id="nav-menu-contacts-link" class="nav-link {{$nav.contacts.2}}" href="{{$nav.contacts.0}}" title="{{$nav.contacts.3}}"><i class="fa fa-users fa-fw" aria-hidden="true"></i> {{$nav.contacts.1}}</a></li>
                                                        {{/if}}
                                                        {{if $nav.delegation}}
                                                        <li role="presentation"><a role="menuitem" id="nav-delegation-link" class="nav-commlink {{$nav.delegation.2}} {{$sel.delegation}}" href="{{$nav.delegation.0}}" title="{{$nav.delegation.3}}"><i class="fa fa-flag fa-fw" aria-hidden="true"></i> {{$nav.delegation.1}}</a></li>
index 5ac982fa253a30aa8c43848a65b526b5cefead99..95c89bd07b19144997c03f58fd89237322ecb2bb 100644 (file)
                        <div class="action">
                                <a class="" href="{{$profile.edit.0}}" title="{{$profile.edit.3}}"><i class="fa fa-pencil-square-o"></i></a>
                        </div>
-                       {{else}}
-                               {{if $profile.menu}}
-                               <div class="profile-edit-side-div"><a class="profile-edit-side-link icon edit" title="{{$editprofile}}" href="profiles" ></a></div>
-                               {{/if}}
                        {{/if}}
                </div>
 
index 3e8a2faea737bea616a4baa1bf11fcfc7f516ab2..d5e20ae25c8e8e2b5b40e498b38b0e57c6c41bf2 100644 (file)
@@ -81,87 +81,6 @@ as the value of $top_child_total (this is done at the end of this file)
 <span class="id" style="display: none;">{{$item.id}}</span>
 {{/if}}
        <div class="media {{$item.shiny}}">
-               {{* Put addional 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.drop.dropping || $item.edpost || $item.ignore || $item.tagger || $item.star || $item.filer || $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 u-url"><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" onclick="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}}</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.pin}}
-                                       <li role="menuitem">
-                                               <button type="button" id="pin-{{$item.id}}" onclick="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}}</button>
-                                               <button type="button" id="unpin-{{$item.id}}" onclick="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}}</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.ignore || $item.drop.dropping}}
-                                       <li role="separator" class="divider"></li>
-                                       {{/if}}
-
-                                       {{if $item.ignore}}
-                                               <li role="menuitem">
-                                                       <button type="button" id="ignore-{{$item.id}}" onclick="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}}</button>
-                                               </li>
-                                               <li role="menuitem">
-                                                       <button type="button" id="unignore-{{$item.id}}" onclick="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}}</button>
-                                               </li>
-                                       {{/if}}
-
-                                       {{if $item.drop.dropping}}
-                                       <li role="menuitem">
-                                               <button type="button" class="btn-link navicon delete" onclick="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}}</button>
-                                       </li>
-                                       {{/if}}
-                               </ul>
-                       </li>
-                       {{/if}}
-               </ul>
-
-
                {{* The avatar picture and the photo-menu *}}
                <div class="dropdown pull-left"><!-- Dropdown -->
                        {{if $item.thread_level==1}}
@@ -289,6 +208,14 @@ as the value of $top_child_total (this is done at the end of this file)
                </div>
                {{/if}}
 
+               <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}}
+               </ul>
+
                <div class="clearfix"></div>
 
                {{* Insert Line to seperate item header and item content visually *}}
@@ -333,7 +260,7 @@ as the value of $top_child_total (this is done at the end of this file)
                <!-- ./TODO -->
 
                <!-- <hr /> -->
-               <p class="wall-item-actions">
+               <div class="wall-item-actions">
                        {{* Action buttons to interact with the item (like: like, dislike, share and so on *}}
                        <span class="wall-item-actions-left">
                                <!--comment this out to try something different {{if $item.threaded}}{{if $item.comment}}
@@ -350,14 +277,14 @@ as the value of $top_child_total (this is done at the end of this file)
                                        <button type="button" class="btn-link button-likes{{if $item.responses.like.self}} active" aria-pressed="true{{/if}}" id="like-{{$item.id}}" title="{{$item.vote.like.0}}" onclick="doLikeAction({{$item.id}},'like');" data-toggle="button"><i class="fa fa-thumbs-up" aria-hidden="true"></i>&nbsp;{{$item.vote.like.1}}</button>
                                        {{/if}}
                                        {{if $item.vote.like AND $item.vote.dislike}}
-                                       <span role="presentation" class="separator"></span>
+                                       <span role="presentation" class="separator"></span>
                                        {{/if}}
                                        {{if $item.vote.dislike}}
                                        <button type="button" class="btn-link button-likes{{if $item.responses.dislike.self}} active" aria-pressed="true{{/if}}" id="dislike-{{$item.id}}" title="{{$item.vote.dislike.0}}" onclick="doLikeAction({{$item.id}},'dislike');" data-toggle="button"><i class="fa fa-thumbs-down" aria-hidden="true"></i>&nbsp;{{$item.vote.dislike.1}}</button>
                                        {{/if}}
 
                                        {{if ($item.vote.like OR $item.vote.dislike) AND $item.comment}}
-                                       <span role="presentation" class="separator"></span>
+                                       <span role="presentation" class="separator"></span>
                                        {{/if}}
                                {{/if}}
 
@@ -370,11 +297,83 @@ as the value of $top_child_total (this is done at the end of this file)
                                {{if $item.vote}}
                                        {{if $item.vote.share}}
                                                {{if $item.vote.like OR $item.vote.dislike OR $item.comment}}
-                                       <span role="presentation" class="separator"></span>
+                                       <span role="presentation" class="separator"></span>
                                                {{/if}}
                                        <button type="button" class="btn-link button-votes" 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.1}}</button>
                                        {{/if}}
                                {{/if}}
+
+                               {{* Put additional actions in a dropdown menu *}}
+                               {{if $item.plink || $item.drop.dropping || $item.edpost || $item.ignore || $item.tagger || $item.star || $item.filer || $item.subthread}}
+                               <span role="presentation" class="separator"></span>
+                               <span class="btn-group dropup">
+                               <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 pull-right" role="menu" aria-labelledby="dropdownMenuOptions-{{$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 u-url"><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">
+                                               <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.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>
+                               </span>
+                               {{/if}}
                                <img id="like-rotator-{{$item.id}}" class="like-rotator" src="images/rotator.gif" alt="{{$item.wait}}" title="{{$item.wait}}" style="display: none;" />
                        </span>
 
@@ -395,7 +394,7 @@ as the value of $top_child_total (this is done at the end of this file)
                        {{/if}}
                                </span>
                        </span>
-               </p><!--./wall-item-actions-->
+               </div><!--./wall-item-actions-->
 
                <div class="wall-item-links"></div>
 
index 7511988cba661fc6a7f892bb2fb37a6ed30c8fc4..9a0394facfb073447e6f620a2af649c0b90cb0dc 100644 (file)
@@ -6,10 +6,6 @@
                        <div class="action">
                                <a class="icon s16 edit ttright" href="{{$profile.edit.0}}" title="{{$profile.edit.3}}"><span>{{$profile.edit.1}}</span></a>
                        </div>
-               {{else}}
-                       {{if $profile.menu}}
-                               <div class="profile-edit-side-div"><a class="profile-edit-side-link icon edit" title="{{$editprofile}}" href="profiles" ></a></div>
-                       {{/if}}
                {{/if}}
        </div>