Merge pull request #9756 from MrPetovan/task/9698-frio-mobile-reshare-dropdown

[frio] Add share dropdown to mobile post view
This commit is contained in:
Michael Vogel 2021-01-07 22:28:38 +01:00 committed by GitHub
commit 31f0f4821f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7124 additions and 7106 deletions

View file

@ -351,10 +351,11 @@ class Post
$buttons['like'] = [DI::l10n()->t("I like this \x28toggle\x29") , DI::l10n()->t("like")]; $buttons['like'] = [DI::l10n()->t("I like this \x28toggle\x29") , DI::l10n()->t("like")];
$buttons['dislike'] = [DI::l10n()->t("I don't like this \x28toggle\x29"), DI::l10n()->t("dislike")]; $buttons['dislike'] = [DI::l10n()->t("I don't like this \x28toggle\x29"), DI::l10n()->t("dislike")];
if ($shareable) { if ($shareable) {
$buttons['share'] = [DI::l10n()->t('Quote and share this'), DI::l10n()->t('Quote Share')]; $buttons['share'] = [DI::l10n()->t('Quote share this'), DI::l10n()->t('Quote Share')];
} }
if ($announceable) { if ($announceable) {
$buttons['announce'] = [DI::l10n()->t('Share this'), DI::l10n()->t('Share')]; $buttons['announce'] = [DI::l10n()->t('Reshare this'), DI::l10n()->t('Reshare')];
$buttons['unannounce'] = [DI::l10n()->t('Cancel your Reshare'), DI::l10n()->t('Unshare')];
} }
} }

File diff suppressed because it is too large Load diff

View file

@ -440,17 +440,33 @@ as the value of $top_child_total (this is done at the end of this file)
</div> </div>
{{/if}} {{/if}}
{{* Button for announcing the item *}} {{if $item.vote.announce OR $item.vote.share}}
{{if $item.vote.announce}} <div class="share-links btn-group{{if $item.thread_level > 1}} dropup{{/if}}">
<div class="btn-group" role="group"> <button type="button" class="btn btn-sm dropdown-toggle{{if $item.responses.announce.self}} active{{/if}}" data-toggle="dropdown" id="shareMenuOptions-{{$item.id}}" aria-haspopup="true" aria-expanded="false" title="{{$item.menu}}">
<button type="button" class="btn btn-sm button-votes{{if $item.responses.announce.self}} active" aria-pressed="true{{/if}}" id="announce-{{$item.id}}" title="{{$item.vote.announce.0}}" onclick="doLikeAction({{$item.id}}, 'announce'{{if $item.responses.announce.self}}, true{{/if}});" data-toggle="button"><i class="fa fa-retweet" aria-hidden="true"></i></button> <i class="fa fa-share" aria-hidden="true"></i>
</div> </button>
{{/if}} <ul class="dropdown-menu dropdown-menu-left" role="menu" aria-labelledby="shareMenuOptions-{{$item.id}}">
{{if $item.vote.announce}} {{* edit the posting *}}
{{* Button for sharing the item *}} <li role="menuitem">
{{if $item.vote.share}} {{if $item.responses.announce.self}}
<div class="btn-group" role="group"> <a class="btn-link" id="announce-{{$item.id}}" href="javascript:doLikeAction({{$item.id}}, 'announce', true);" title="{{$item.vote.unannounce.0}}">
<button type="button" class="btn btn-sm button-votes" id="share-{{$item.id}}" title="{{$item.vote.share.0}}" onclick="jotShare({{$item.id}});"><i class="fa fa-share" aria-hidden="true"></i></button> <i class="fa fa-ban" aria-hidden="true"></i> {{$item.vote.unannounce.1}}
</a>
{{else}}
<a class="btn-link" id="announce-{{$item.id}}" href="javascript:doLikeAction({{$item.id}}, 'announce');" title="{{$item.vote.announce.0}}">
<i class="fa fa-retweet" aria-hidden="true"></i> {{$item.vote.announce.1}}
</a>
{{/if}}
</li>
{{/if}}
{{if $item.vote.share}}
<li role="menuitem">
<a class="btn-link" id="share-{{$item.id}}" href="javascript:jotShare({{$item.id}});" title="{{$item.vote.share.0}}">
<i class="fa fa-share" aria-hidden="true"></i> {{$item.vote.share.1}}
</a>
</li>
{{/if}}
</ul>
</div> </div>
{{/if}} {{/if}}