'location' => $location_e,
'indent' => $indent,
'shiny' => $shiny,
+ 'owner_self' => $item['author-link'] == defaults($_SESSION, 'my_url', null),
'owner_url' => $this->getOwnerUrl(),
'owner_photo' => $a->removeBaseURL(ProxyUtils::proxifyUrl($item['owner-avatar'], false, ProxyUtils::SIZE_THUMB)),
'owner_name' => $owner_name_e,
'commented' => $item['commented'],
'created_date' => $item['created'],
'return' => ($a->cmd) ? bin2hex($a->cmd) : '',
+ 'delivery' => [
+ 'queue_count' => $item['delivery_queue_count'],
+ 'queue_done' => $item['delivery_queue_done'],
+ 'notifier_pending' => L10n::t('Notifier task is pending'),
+ 'delivery_pending' => L10n::t('Delivery to remote servers is pending'),
+ 'delivery_underway' => L10n::t('Delivery to remote servers is underway'),
+ 'delivery_almost' => L10n::t('Delivery to remote servers is mostly done'),
+ ],
];
$arr = ['item' => $item, 'output' => $tmp_item];
--- /dev/null
+{{*\r
+ Please don't use this template as is, this is a placeholder that needs to be\r
+ overriden with specific icons to avoid taking too much visual space\r
+*}}\r
+{{if $delivery.queue_count == 0}}\r
+ {{$delivery.notifier_pending|escape}}\r
+{{elseif $delivery.queue_done == 0}}\r
+ {{$delivery.delivery_pending|escape}} {{$item.delivery.queue_done}}/{{$item.delivery.queue_count}}\r
+{{elseif $delivery.queue_done / $delivery.queue_count < 0.75}}\r
+ {{$delivery.delivery_underway|escape}} {{$item.delivery.queue_done}}/{{$item.delivery.queue_count}}\r
+{{else}}\r
+ {{$delivery.delivery_almost|escape}} {{$item.delivery.queue_done}}/{{$item.delivery.queue_count}}\r
+{{/if}}\r
--- /dev/null
+{{if $delivery.queue_count == 0}}\r
+ <i class="fa fa-hourglass-o" aria-hidden="true" title="{{$delivery.notifier_pending|escape}}"></i>\r
+ <span class="sr-only">{{$delivery.notifier_pending|escape}}</span>\r
+{{elseif $delivery.queue_done == 0}}\r
+ <i class="fa fa-hourglass" aria-hidden="true" title="{{$delivery.delivery_pending|escape}} {{$item.delivery.queue_done}}/{{$item.delivery.queue_count}}"></i>\r
+ <span class="sr-only">{{$delivery.delivery_pending|escape}}</span>\r
+{{elseif $delivery.queue_done / $delivery.queue_count < 0.75}}\r
+ <i class="fa fa-paper-plane-o" aria-hidden="true" title="{{$delivery.delivery_underway|escape}} {{$item.delivery.queue_done}}/{{$item.delivery.queue_count}}"></i>\r
+ <span class="sr-only">{{$delivery.delivery_underway|escape}}</span>\r
+{{else}}\r
+ <i class="fa fa-paper-plane" aria-hidden="true" title="{{$delivery.delivery_almost|escape}} {{$item.delivery.queue_done}}/{{$item.delivery.queue_count}}"></i>\r
+ <span class="sr-only">{{$delivery.delivery_almost|escape}}</span>\r
+{{/if}}\r
as the value of $top_child_total (this is done at the end of this file)
*}}
{{if $item.thread_level==1}}
- {{assign var="top_child_total" count($item.children)}}
- {{assign var="top_child_nr" 0}}
+ {{assign var="top_child_total" value=count($item.children)}}
+ {{assign var="top_child_nr" value=0}}
{{/if}}
{{if $item.thread_level==2}}
{{assign var="top_child_nr" value=$top_child_nr+1 scope=parent}}
{{/if}}
{{/if}}
-<!-- TODO => Unknow block -->
+{{* TODO => Unknown block *}}
<div class="wall-item-decor" style="display:none;">
{{if $item.star}}
<span class="icon s22 star {{$item.isstarred}}" id="starred-{{$item.id}}" title="{{$item.star.starred}}">{{$item.star.starred}}</span>
{{/if}}
{{if $item.lock}}<span class="navicon lock fakelink" onclick="lockview(event,{{$item.id}});" title="{{$item.lock}}"></span><span class="fa fa-lock"></span>{{/if}}
</div>
-<!-- ./TODO => Unknow block -->
-
+{{* /TODO => Unknown block *}}
{{* Use a different div container in dependence max thread-level = 7 *}}
<h5 class="media-heading">
<a href="{{$item.profile_url}}" title="{{$item.linktitle}}" class="wall-item-name-link userinfo"><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}} — ({{$item.location nofilter}}){{/if}}</small>
+ <small>
+ <a class="time" href="{{$item.plink.orig}}"><span class="wall-item-ago">{{$item.ago}}</span></a>
+ {{if $item.location}} — ({{$item.location nofilter}}){{/if}}
+ {{if $item.owner_self}}
+ •
+ {{include file="sub/delivery_count.tpl" delivery=$item.delivery}}
+ {{/if}}
+ </small>
</p>
</h5>
</div>
--- /dev/null
+{{if $delivery.queue_count == 0}}\r
+ <i class="icon-spinner" aria-hidden="true" title="{{$delivery.notifier_pending|escape}}"></i>\r
+ <span class="sr-only">{{$delivery.notifier_pending|escape}}</span>\r
+{{elseif $delivery.queue_done == 0}}\r
+ <i class="icon-spinner" aria-hidden="true" title="{{$delivery.delivery_pending|escape}} {{$item.delivery.queue_done}}/{{$item.delivery.queue_count}}"></i>\r
+ <span class="sr-only">{{$delivery.delivery_pending|escape}}</span>\r
+{{elseif $delivery.queue_done / $delivery.queue_count < 0.75}}\r
+ <i class="icon-plane" aria-hidden="true" title="{{$delivery.delivery_underway|escape}} {{$item.delivery.queue_done}}/{{$item.delivery.queue_count}}"></i>\r
+ <span class="sr-only">{{$delivery.delivery_underway|escape}}</span>\r
+{{else}}\r
+ <i class="icon-plane" aria-hidden="true" title="{{$delivery.delivery_almost|escape}} {{$item.delivery.queue_done}}/{{$item.delivery.queue_count}}"></i>\r
+ <span class="sr-only">{{$delivery.delivery_almost|escape}}</span>\r
+{{/if}}\r
{{if $item.owner_url}}{{$item.via}} <a href="{{$item.owner_url}}" target="redir" title="{{$item.olinktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.osparkle}}" id="wall-item-ownername-{{$item.id}}">{{$item.owner_name}}</span></a>{{/if}}
<span class="wall-item-ago">
{{if $item.plink}}<a title="{{$item.plink.title}}" href="{{$item.plink.href}}" class="u-url" style="color: #999"><time class="dt-published" datetime="{{$item.localtime}}">{{$item.created}}</time></a>{{else}} <time class="dt-published" datetime="{{$item.localtime}}">{{$item.created}}</time> {{/if}}
+ {{if $item.owner_self}}
+ •
+ {{include file="sub/delivery_count.tpl" delivery=$item.delivery}}
+ {{/if}}
</span>
{{if $item.lock}}<span class="icon s10 lock fakelink" onclick="lockview(event,{{$item.id}});" title="{{$item.lock}}">{{$item.lock}}</span>{{/if}}
<span class="wall-item-network" title="{{$item.app}}">