Changed template for direction
This commit is contained in:
parent
0e0de5fcad
commit
d63e903d9f
|
@ -406,6 +406,15 @@ class Post
|
|||
$remote_comment = '';
|
||||
}
|
||||
|
||||
$direction = [];
|
||||
if (DI::config()->get('debug', 'show_direction')) {
|
||||
$conversation = DBA::selectFirst('conversation', ['direction'], ['item-uri' => $item['uri']]);
|
||||
if (!empty($conversation['direction']) && in_array($conversation['direction'], [1, 2])) {
|
||||
$title = [1 => DI::l10n()->t('Pushed'), 2 => DI::l10n()->t('Pulled')];
|
||||
$direction = ['direction' => $conversation['direction'], 'title' => $title[$conversation['direction']]];
|
||||
}
|
||||
}
|
||||
|
||||
$tmp_item = [
|
||||
'template' => $this->getTemplate(),
|
||||
'type' => implode("", array_slice(explode("/", $item['verb']), -1)),
|
||||
|
@ -482,6 +491,7 @@ class Post
|
|||
'commented' => $item['commented'],
|
||||
'created_date' => $item['created'],
|
||||
'return' => (DI::args()->getCommand()) ? bin2hex(DI::args()->getCommand()) : '',
|
||||
'direction' => $direction,
|
||||
'delivery' => [
|
||||
'queue_count' => $item['delivery_queue_count'],
|
||||
'queue_done' => $item['delivery_queue_done'] + $item['delivery_queue_failed'], /// @todo Possibly display it separately in the future
|
||||
|
|
|
@ -496,6 +496,10 @@ return [
|
|||
// Logs every call to /inbox as a JSON file in Friendica's temporary directory
|
||||
'ap_inbox_log' => false,
|
||||
|
||||
// show_direction (Boolean)
|
||||
// Display if a post had been fetched or had been pushed towards our server
|
||||
'show_direction' => false,
|
||||
|
||||
// total_ap_delivery (Boolean)
|
||||
// Deliver via AP to every possible receiver and we suppress the delivery to these contacts with other protocols
|
||||
'total_ap_delivery' => false,
|
||||
|
|
|
@ -155,6 +155,9 @@ as the value of $top_child_total (this is done at the end of this file)
|
|||
{{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}}
|
||||
• <i class="fa fa-thumb-tack" aria-hidden="true" title="{{$item.pinned}}"></i>
|
||||
<span class="sr-only">{{$item.pinned}}</span>
|
||||
|
@ -183,6 +186,9 @@ as the value of $top_child_total (this is done at the end of this file)
|
|||
{{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>
|
||||
|
@ -202,6 +208,9 @@ as the value of $top_child_total (this is done at the end of this file)
|
|||
{{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>
|
||||
|
|
|
@ -60,6 +60,9 @@
|
|||
{{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}}
|
||||
<span class="pinned">{{$item.pinned}}</span>
|
||||
</span>
|
||||
{{if $item.lock}}<span class="icon s10 lock fakelink" onclick="lockview(event,{{$item.id}});" title="{{$item.lock}}">{{$item.lock}}</span>{{/if}}
|
||||
|
|
Loading…
Reference in New Issue
Block a user