Merge pull request #9126 from MrPetovan/task/post-improvements

Various post display improvements
This commit is contained in:
Michael Vogel 2020-09-03 22:17:25 +02:00 committed by GitHub
commit abe6ecf820
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 5854 additions and 5848 deletions

View file

@ -733,7 +733,7 @@ function conversation_fetch_comments($thread_items, $pinned) {
if (!empty($parentlines) && empty($direction) && ($row['gravity'] == GRAVITY_COMMENT) if (!empty($parentlines) && empty($direction) && ($row['gravity'] == GRAVITY_COMMENT)
&& Contact::isSharing($row['author-id'], $row['uid'])) { && Contact::isSharing($row['author-id'], $row['uid'])) {
$direction = ['direction' => 2, 'title' => DI::l10n()->t('%s commented this.', $row['author-name'])]; $direction = ['direction' => 5, 'title' => DI::l10n()->t('%s commented on this.', $row['author-name'])];
} }
if (($row['gravity'] == GRAVITY_PARENT) && !$row['origin'] && ($row['author-id'] == $row['owner-id']) if (($row['gravity'] == GRAVITY_PARENT) && !$row['origin'] && ($row['author-id'] == $row['owner-id'])

File diff suppressed because it is too large Load diff

View file

@ -1499,14 +1499,14 @@ aside .panel-body {
} }
/* wall items action dropdown menu */ /* wall items action dropdown menu */
.media [role=heading] {
position: relative;
}
.preferences { .preferences {
position: absolute; position: absolute;
right: 15px; right: 0;
top: 10px; top: 0;
}
.comment .preferences {
right: 10px;
top: 5px;
} }
.wall-item-network { .wall-item-network {
font-size: 13px; font-size: 13px;
@ -3413,10 +3413,6 @@ section .profile-match-wrapper {
margin-top: 0; margin-top: 0;
} }
.preferences {
right: 10px;
}
.generic-page-wrapper, .videos-content-wrapper, .suggest-content-wrapper, .help-content-wrapper, .match-content-wrapper, .dirfind-content-wrapper, .directory-content-wrapper, .delegation-content-wrapper, .notes-content-wrapper, .message-content-wrapper, .apps-content-wrapper, #adminpage, .delegate-content-wrapper, .uexport-content-wrapper, .dfrn_request-content-wrapper, .friendica-content-wrapper, .credits-content-wrapper, .nogroup-content-wrapper, .profperm-content-wrapper, .invite-content-wrapper, .tos-content-wrapper, .fsuggest-content-wrapper { .generic-page-wrapper, .videos-content-wrapper, .suggest-content-wrapper, .help-content-wrapper, .match-content-wrapper, .dirfind-content-wrapper, .directory-content-wrapper, .delegation-content-wrapper, .notes-content-wrapper, .message-content-wrapper, .apps-content-wrapper, #adminpage, .delegate-content-wrapper, .uexport-content-wrapper, .dfrn_request-content-wrapper, .friendica-content-wrapper, .credits-content-wrapper, .nogroup-content-wrapper, .profperm-content-wrapper, .invite-content-wrapper, .tos-content-wrapper, .fsuggest-content-wrapper {
border-radius: 0; border-radius: 0;
padding: 10px; padding: 10px;

View file

@ -9,6 +9,8 @@
<i class="fa fa-share-alt" aria-hidden="true" title="{{$direction.title}}"></i> <i class="fa fa-share-alt" aria-hidden="true" title="{{$direction.title}}"></i>
{{elseif $direction.direction == 4}} {{elseif $direction.direction == 4}}
<i class="fa fa-hashtag" aria-hidden="true" title="{{$direction.title}}"></i> <i class="fa fa-hashtag" aria-hidden="true" title="{{$direction.title}}"></i>
{{elseif $direction.direction == 5}}
<i class="fa fa-comment-o" aria-hidden="true" title="{{$direction.title}}"></i>
{{/if}} {{/if}}
</span> </span>
{{/if}} {{/if}}

View file

@ -81,6 +81,9 @@ as the value of $top_child_total (this is done at the end of this file)
<span class="uriid" style="display: none;">{{$item.uriid}}</span> <span class="uriid" style="display: none;">{{$item.uriid}}</span>
{{/if}} {{/if}}
<div class="media {{$item.shiny}}"> <div class="media {{$item.shiny}}">
{{if $item.responses.announce && $mode != 'display'}}
<div class="wall-item-ammounce wall-item-responses" id="wall-item-ammounce-{{$item.id}}">{{$item.responses.announce.output nofilter}}</div>
{{/if}}
{{* The avatar picture and the photo-menu *}} {{* The avatar picture and the photo-menu *}}
<div class="dropdown pull-left"><!-- Dropdown --> <div class="dropdown pull-left"><!-- Dropdown -->
{{if $item.thread_level==1}} {{if $item.thread_level==1}}
@ -123,112 +126,113 @@ as the value of $top_child_total (this is done at the end of this file)
</div><!-- ./Dropdown --> </div><!-- ./Dropdown -->
{{if $item.thread_level!=1}}
<div class="media-body">{{*this is the media body for comments - this div must be closed at the end of the file *}}
{{/if}}
{{* contact info header*}} {{* contact info header*}}
{{if $item.thread_level==1}} <div role="heading" aria-level="{{$item.thread_level}}">
<div role="heading " aria-level="{{$item.thread_level}}" class="contact-info hidden-sm hidden-xs media-body"><!-- <= For computer --> <div class="preferences">
<h4 class="media-heading"> {{if $item.network_icon != ""}}
<a href="{{$item.profile_url}}" title="{{$item.linktitle}}" class="wall-item-name-link userinfo hover-card"> <span class="wall-item-network"><i class="fa fa-{{$item.network_icon}}" title="{{$item.network_name}}" aria-hidden="true"></i></span>
<span class="wall-item-name {{$item.sparkle}}">{{$item.name}}</span> {{else}}
</a> <span class="wall-item-network" title="{{$item.app}}">{{$item.network_name}}</span>
{{if $item.owner_url}} {{/if}}
{{$item.via}} {{if $item.plink}} {{*link to the original source of the item *}}
<a href="{{$item.owner_url}}" target="redir" title="{{$item.olinktitle}}" class="wall-item-name-link userinfo hover-card"> &nbsp;
<span class="wall-item-name {{$item.osparkle}}" id="wall-item-ownername-{{$item.id}}">{{$item.owner_name}}</span> <a href="{{$item.plink.href}}" class="plink u-url" aria-label="{{$item.plink.title}}" title="{{$item.plink.title}}">
</a> <i class="fa fa-external-link"></i>
{{/if}} </a>
{{if $item.lock}}
<span class="navicon lock fakelink" onClick="lockview(event, 'item', {{$item.id}});" title="{{$item.lock}}" data-toggle="tooltip">
&nbsp;<small><i class="fa fa-lock" aria-hidden="true"></i></small>
</span>
{{/if}}
</h4>
<div class="additional-info text-muted">
<div id="wall-item-ago-{{$item.id}}" class="wall-item-ago">
<small>
<a href="{{$item.plink.orig}}">
<span class="time" title="{{$item.localtime}}" data-toggle="tooltip">
<time class="dt-published" datetime="{{$item.localtime}}">{{$item.ago}}</time>
</span>
</a>
{{if $item.owner_self}}
{{include file="sub/delivery_count.tpl" delivery=$item.delivery}}
{{/if}}
{{if $item.direction}}
{{include file="sub/direction.tpl" direction=$item.direction}}
{{/if}}
{{if $item.pinned}}
&bull; <i class="fa fa-thumb-tack" aria-hidden="true" title="{{$item.pinned}}"></i>
<span class="sr-only">{{$item.pinned}}</span>
{{/if}}
</small>
</div>
{{if $item.location}}
<div id="wall-item-location-{{$item.id}}" class="wall-item-location">
<small><span class="location">({{$item.location nofilter}})</span></small>
</div>
{{/if}} {{/if}}
</div> </div>
{{* @todo $item.created have to be inserted *}} {{if $item.thread_level==1}}
</div> <div class="contact-info hidden-sm hidden-xs media-body"><!-- <= For computer -->
<h4 class="media-heading">
<a href="{{$item.profile_url}}" title="{{$item.linktitle}}" class="wall-item-name-link userinfo hover-card">
<span class="wall-item-name {{$item.sparkle}}">{{$item.name}}</span>
</a>
{{if $item.owner_url}}
{{$item.via}}
<a href="{{$item.owner_url}}" target="redir" title="{{$item.olinktitle}}" class="wall-item-name-link userinfo hover-card">
<span class="wall-item-name {{$item.osparkle}}" id="wall-item-ownername-{{$item.id}}">{{$item.owner_name}}</span>
</a>
{{/if}}
{{if $item.lock}}
<span class="navicon lock fakelink" onClick="lockview(event, 'item', {{$item.id}});" title="{{$item.lock}}" data-toggle="tooltip">
&nbsp;<small><i class="fa fa-lock" aria-hidden="true"></i></small>
</span>
{{/if}}
</h4>
{{* contact info header for smartphones *}} <div class="additional-info text-muted">
<div role="heading " aria-level="{{$item.thread_level}}" class="contact-info-xs hidden-lg hidden-md"><!-- <= For smartphone (responsive) --> <div id="wall-item-ago-{{$item.id}}" class="wall-item-ago">
<h5 class="media-heading"> <small>
<a href="{{$item.profile_url}}" title="{{$item.linktitle}}" class="wall-item-name-link userinfo hover-card"><span>{{$item.name}}</span></a> <a href="{{$item.plink.orig}}">
<p class="text-muted"> <span class="time" title="{{$item.localtime}}" data-toggle="tooltip">
<small> <time class="dt-published" datetime="{{$item.localtime}}">{{$item.ago}}</time>
<a class="time" href="{{$item.plink.orig}}"><span class="wall-item-ago">{{$item.ago}}</span></a> </span>
{{if $item.location}}&nbsp;&mdash;&nbsp;({{$item.location nofilter}}){{/if}} </a>
{{if $item.owner_self}} {{if $item.owner_self}}
{{include file="sub/delivery_count.tpl" delivery=$item.delivery}} {{include file="sub/delivery_count.tpl" delivery=$item.delivery}}
{{/if}} {{/if}}
{{if $item.direction}} {{if $item.direction}}
{{include file="sub/direction.tpl" direction=$item.direction}} {{include file="sub/direction.tpl" direction=$item.direction}}
{{/if}} {{/if}}
</small> {{if $item.pinned}}
</p> &bull; <i class="fa fa-thumb-tack" aria-hidden="true" title="{{$item.pinned}}"></i>
</h5> <span class="sr-only">{{$item.pinned}}</span>
</div> {{/if}}
{{/if}} {{* End of if $item.thread_level==1 *}}
{{* contact info header for comments *}} </small>
{{if $item.thread_level!=1}} </div>
<div class="media-body">{{*this is the media body for comments - this div must be closed at the end of the file *}}
<div role="heading " aria-level="{{$item.thread_level}}" class="contact-info-comment">
<h5 class="media-heading">
<a href="{{$item.profile_url}}" title="{{$item.linktitle}}" class="wall-item-name-link userinfo hover-card"><span class="fakelink">{{$item.name}}</span></a>
<span class="text-muted">
<small>
<a class="time" href="{{$item.plink.orig}}" title="{{$item.localtime}}" data-toggle="tooltip">{{$item.ago}}</a>
{{if $item.location}}&nbsp;&mdash;&nbsp;({{$item.location nofilter}}){{/if}}
{{if $item.owner_self}}
{{include file="sub/delivery_count.tpl" delivery=$item.delivery}}
{{/if}}
{{if $item.direction}}
{{include file="sub/direction.tpl" direction=$item.direction}}
{{/if}}
</small>
</span>
</h5>
</div>
{{/if}}
<div class="preferences"> {{if $item.location}}
{{if $item.network_icon != ""}} <div id="wall-item-location-{{$item.id}}" class="wall-item-location">
<span class="wall-item-network"><i class="fa fa-{{$item.network_icon}}" title="{{$item.network_name}}" aria-hidden="true"></i></span> <small><span class="location">({{$item.location nofilter}})</span></small>
{{else}} </div>
<span class="wall-item-network" title="{{$item.app}}">{{$item.network_name}}</span> {{/if}}
{{/if}} </div>
{{if $item.plink}} {{*link to the original source of the item *}} {{* @todo $item.created have to be inserted *}}
&nbsp; </div>
<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> {{* contact info header for smartphones *}}
</a> <div class="contact-info-xs hidden-lg hidden-md"><!-- <= For smartphone (responsive) -->
{{/if}} <h5 class="media-heading">
<a href="{{$item.profile_url}}" title="{{$item.linktitle}}" class="wall-item-name-link userinfo hover-card"><span>{{$item.name}}</span></a>
<p class="text-muted">
<small>
<a class="time" href="{{$item.plink.orig}}"><span class="wall-item-ago">{{$item.ago}}</span></a>
{{if $item.location}}&nbsp;&mdash;&nbsp;({{$item.location nofilter}}){{/if}}
{{if $item.owner_self}}
{{include file="sub/delivery_count.tpl" delivery=$item.delivery}}
{{/if}}
{{if $item.direction}}
{{include file="sub/direction.tpl" direction=$item.direction}}
{{/if}}
</small>
</p>
</h5>
</div>
{{else}} {{* End of if $item.thread_level == 1 *}}
{{* contact info header for comments *}}
<div class="contact-info-comment">
<h5 class="media-heading">
<a href="{{$item.profile_url}}" title="{{$item.linktitle}}" class="wall-item-name-link userinfo hover-card"><span class="fakelink">{{$item.name}}</span></a>
<span class="text-muted">
<small>
<a class="time" href="{{$item.plink.orig}}" title="{{$item.localtime}}" data-toggle="tooltip">{{$item.ago}}</a>
{{if $item.location}}&nbsp;&mdash;&nbsp;({{$item.location nofilter}}){{/if}}
{{if $item.owner_self}}
{{include file="sub/delivery_count.tpl" delivery=$item.delivery}}
{{/if}}
{{if $item.direction}}
{{include file="sub/direction.tpl" direction=$item.direction}}
{{/if}}
</small>
</span>
</h5>
</div>
{{/if}} {{* End of if $item.thread_level != 1 *}}
</div> </div>
<div class="clearfix"></div> <div class="clearfix"></div>
@ -523,13 +527,15 @@ as the value of $top_child_total (this is done at the end of this file)
<div class="wall-item-links"></div> <div class="wall-item-links"></div>
{{* Display likes, dislike and attendance stats *}} {{* Display likes, dislike and attendance stats *}}
{{if $item.responses}} {{if $item.responses}}
<div class="wall-item-responses"> <div class="wall-item-responses">
{{foreach $item.responses as $verb=>$response}} {{foreach $item.responses as $verb=>$response}}
<div class="wall-item-{{$verb}}" id="wall-item-{{$verb}}-{{$item.id}}">{{$response.output nofilter}}</div> {{if $verb != 'announce' || $mode == 'display'}}
{{/foreach}} <div class="wall-item-{{$verb}}" id="wall-item-{{$verb}}-{{$item.id}}">{{$response.output nofilter}}</div>
</div> {{/if}}
{{/if}} {{/foreach}}
</div>
{{/if}}
{{* Insert comment box of threaded children *}} {{* Insert comment box of threaded children *}}
{{if $item.threaded && $item.comment && $item.indent==comment}} {{if $item.threaded && $item.comment && $item.indent==comment}}

View file

@ -9,6 +9,8 @@
<i class="icon-share" aria-hidden="true" title="{{$direction.title}}"></i> <i class="icon-share" aria-hidden="true" title="{{$direction.title}}"></i>
{{elseif $direction.direction == 4}} {{elseif $direction.direction == 4}}
<i class="icon-tag" aria-hidden="true" title="{{$direction.title}}"></i> <i class="icon-tag" aria-hidden="true" title="{{$direction.title}}"></i>
{{elseif $direction.direction == 5}}
<i class="icon-commenting" aria-hidden="true" title="{{$direction.title}}"></i>
{{/if}} {{/if}}
</span> </span>
{{/if}} {{/if}}