Browse Source

Update delivery count display

- Hide display when item is preceding the feature
- Wrap the display in its own span
- Remove delivery bullet from wall_thread.tpl
- [frio] Make delivery icon fainter
pull/6497/head
Hypolite Petovan 2 years ago
parent
commit
e2d32caa78
6 changed files with 48 additions and 36 deletions
  1. +13
    -8
      view/templates/sub/delivery_count.tpl
  2. +1
    -0
      view/theme/frio/css/style.css
  3. +17
    -12
      view/theme/frio/templates/sub/delivery_count.tpl
  4. +0
    -3
      view/theme/frio/templates/wall_thread.tpl
  5. +17
    -12
      view/theme/vier/templates/sub/delivery_count.tpl
  6. +0
    -1
      view/theme/vier/templates/wall_thread.tpl

+ 13
- 8
view/templates/sub/delivery_count.tpl View File

@ -2,12 +2,17 @@
Please don't use this template as is, this is a placeholder that needs to be
overriden with specific icons to avoid taking too much visual space
*}}
{{if $delivery.queue_count == 0}}
{{$delivery.notifier_pending|escape}}
{{elseif $delivery.queue_done == 0}}
{{$delivery.delivery_pending|escape}} {{$item.delivery.queue_done}}/{{$item.delivery.queue_count}}
{{elseif $delivery.queue_done / $delivery.queue_count < 0.75}}
{{$delivery.delivery_underway|escape}} {{$item.delivery.queue_done}}/{{$item.delivery.queue_count}}
{{else}}
{{$delivery.delivery_almost|escape}} {{$item.delivery.queue_done}}/{{$item.delivery.queue_count}}
{{if $delivery.queue_count >= -1 && $delivery.queue_count !== '' && $delivery.queue_count !== null}}
<span class="delivery">
&bullet;
{{if $delivery.queue_count == 0}}
{{$delivery.notifier_pending}}
{{elseif $delivery.queue_done == 0}}
{{$delivery.delivery_pending}} {{$item.delivery.queue_done}}/{{$item.delivery.queue_count}}
{{elseif $delivery.queue_done / $delivery.queue_count < 0.75}}
{{$delivery.delivery_underway}} {{$item.delivery.queue_done}}/{{$item.delivery.queue_count}}
{{else}}
{{$delivery.delivery_almost}} {{$item.delivery.queue_done}}/{{$item.delivery.queue_count}}
{{/if}}
</span>
{{/if}}

+ 1
- 0
view/theme/frio/css/style.css View File

@ -2094,6 +2094,7 @@ ul.dropdown-menu li:hover {
/* Media Classes */
.media .time,
.media .shared-time,
.media .delivery,
.media .location,
.media .location a {
font-size: 11px;


+ 17
- 12
view/theme/frio/templates/sub/delivery_count.tpl View File

@ -1,13 +1,18 @@
{{if $delivery.queue_count == 0}}
<i class="fa fa-hourglass-o" aria-hidden="true" title="{{$delivery.notifier_pending|escape}}"></i>
<span class="sr-only">{{$delivery.notifier_pending|escape}}</span>
{{elseif $delivery.queue_done == 0}}
<i class="fa fa-hourglass" aria-hidden="true" title="{{$delivery.delivery_pending|escape}} {{$item.delivery.queue_done}}/{{$item.delivery.queue_count}}"></i>
<span class="sr-only">{{$delivery.delivery_pending|escape}}</span>
{{elseif $delivery.queue_done / $delivery.queue_count < 0.75}}
<i class="fa fa-paper-plane-o" aria-hidden="true" title="{{$delivery.delivery_underway|escape}} {{$item.delivery.queue_done}}/{{$item.delivery.queue_count}}"></i>
<span class="sr-only">{{$delivery.delivery_underway|escape}}</span>
{{else}}
<i class="fa fa-paper-plane" aria-hidden="true" title="{{$delivery.delivery_almost|escape}} {{$item.delivery.queue_done}}/{{$item.delivery.queue_count}}"></i>
<span class="sr-only">{{$delivery.delivery_almost|escape}}</span>
{{if $delivery.queue_count >= -1 && $delivery.queue_count !== '' && $delivery.queue_count !== null}}
<span class="delivery">
&bullet;
{{if $delivery.queue_count == 0}}
<i class="fa fa-hourglass-o" aria-hidden="true" title="{{$delivery.notifier_pending}}"></i>
<span class="sr-only">{{$delivery.notifier_pending}}</span>
{{elseif $delivery.queue_done == 0}}
<i class="fa fa-hourglass" aria-hidden="true" title="{{$delivery.delivery_pending}} {{$item.delivery.queue_done}}/{{$item.delivery.queue_count}}"></i>
<span class="sr-only">{{$delivery.delivery_pending}}</span>
{{elseif $delivery.queue_done / $delivery.queue_count < 0.75}}
<i class="fa fa-paper-plane-o" aria-hidden="true" title="{{$delivery.delivery_underway}} {{$item.delivery.queue_done}}/{{$item.delivery.queue_count}}"></i>
<span class="sr-only">{{$delivery.delivery_underway}}</span>
{{else}}
<i class="fa fa-paper-plane" aria-hidden="true" title="{{$delivery.delivery_almost}} {{$item.delivery.queue_done}}/{{$item.delivery.queue_count}}"></i>
<span class="sr-only">{{$delivery.delivery_almost}}</span>
{{/if}}
</span>
{{/if}}

+ 0
- 3
view/theme/frio/templates/wall_thread.tpl View File

@ -209,7 +209,6 @@ as the value of $top_child_total (this is done at the end of this file)
</span>
</a>
{{if $item.owner_self}}
&bullet;
{{include file="sub/delivery_count.tpl" delivery=$item.delivery}}
{{/if}}
</small>
@ -233,7 +232,6 @@ as the value of $top_child_total (this is done at the end of this file)
<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}}
&bullet;
{{include file="sub/delivery_count.tpl" delivery=$item.delivery}}
{{/if}}
</small>
@ -253,7 +251,6 @@ as the value of $top_child_total (this is done at the end of this file)
<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}}
&bullet;
{{include file="sub/delivery_count.tpl" delivery=$item.delivery}}
{{/if}}
</small>


+ 17
- 12
view/theme/vier/templates/sub/delivery_count.tpl View File

@ -1,13 +1,18 @@
{{if $delivery.queue_count == 0}}
<i class="icon-spinner" aria-hidden="true" title="{{$delivery.notifier_pending|escape}}"></i>
<span class="sr-only">{{$delivery.notifier_pending|escape}}</span>
{{elseif $delivery.queue_done == 0}}
<i class="icon-spinner" aria-hidden="true" title="{{$delivery.delivery_pending|escape}} {{$item.delivery.queue_done}}/{{$item.delivery.queue_count}}"></i>
<span class="sr-only">{{$delivery.delivery_pending|escape}}</span>
{{elseif $delivery.queue_done / $delivery.queue_count < 0.75}}
<i class="icon-plane" aria-hidden="true" title="{{$delivery.delivery_underway|escape}} {{$item.delivery.queue_done}}/{{$item.delivery.queue_count}}"></i>
<span class="sr-only">{{$delivery.delivery_underway|escape}}</span>
{{else}}
<i class="icon-plane" aria-hidden="true" title="{{$delivery.delivery_almost|escape}} {{$item.delivery.queue_done}}/{{$item.delivery.queue_count}}"></i>
<span class="sr-only">{{$delivery.delivery_almost|escape}}</span>
{{if $delivery.queue_count >= -1 && $delivery.queue_count !== '' && $delivery.queue_count !== null}}
<span class="delivery">
&bullet;
{{if $delivery.queue_count == 0}}
<i class="icon-spinner" aria-hidden="true" title="{{$delivery.notifier_pending}}"></i>
<span class="sr-only">{{$delivery.notifier_pending}}</span>
{{elseif $delivery.queue_done == 0}}
<i class="icon-spinner" aria-hidden="true" title="{{$delivery.delivery_pending}} {{$item.delivery.queue_done}}/{{$item.delivery.queue_count}}"></i>
<span class="sr-only">{{$delivery.delivery_pending}}</span>
{{elseif $delivery.queue_done / $delivery.queue_count < 0.75}}
<i class="icon-plane" aria-hidden="true" title="{{$delivery.delivery_underway}} {{$item.delivery.queue_done}}/{{$item.delivery.queue_count}}"></i>
<span class="sr-only">{{$delivery.delivery_underway}}</span>
{{else}}
<i class="icon-plane" aria-hidden="true" title="{{$delivery.delivery_almost}} {{$item.delivery.queue_done}}/{{$item.delivery.queue_count}}"></i>
<span class="sr-only">{{$delivery.delivery_almost}}</span>
{{/if}}
</span>
{{/if}}

+ 0
- 1
view/theme/vier/templates/wall_thread.tpl View File

@ -57,7 +57,6 @@
<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}}
&bullet;
{{include file="sub/delivery_count.tpl" delivery=$item.delivery}}
{{/if}}
</span>


Loading…
Cancel
Save