add notice if waiting time has exceeded one month (bug 818969)
This commit is contained in:
Родитель
0c9e69ee86
Коммит
e9acaf3706
|
@ -353,14 +353,14 @@ def get_position(addon):
|
|||
nomination_date = nomination
|
||||
break
|
||||
total = qs.count()
|
||||
days = 0
|
||||
days = 1
|
||||
if nomination_date:
|
||||
# Estimated waiting time is calculated from the rolling average of
|
||||
# the queue waiting time in the past 30 days but subtracting from
|
||||
# it the number of days this app has already spent in the queue.
|
||||
days_in_queue = datetime.datetime.now() - nomination_date
|
||||
days = get_avg_app_waiting_time() - days_in_queue.days
|
||||
return {'days': max(0, days), 'pos': position, 'total': total}
|
||||
return {'days': days, 'pos': position, 'total': total}
|
||||
else:
|
||||
version = addon.latest_version
|
||||
|
||||
|
|
|
@ -334,6 +334,10 @@
|
|||
}
|
||||
}
|
||||
|
||||
.item-details .hint {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.html-rtl .listing .item {
|
||||
.info {
|
||||
padding: 20px 10px 20px 102px;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{% from 'developers/apps/listing/macros.html' import dev_heading %}
|
||||
{% from 'developers/includes/macros.html' import queue_position %}
|
||||
{% from 'developers/includes/macros.html' import queue_position with context %}
|
||||
{% from 'addons/macros.html' import price %}
|
||||
{% for addon in addons %}
|
||||
<div class="item addon" data-addonid="{{ addon.id }}">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{% extends 'developers/base_impala.html' %}
|
||||
{% from 'developers/includes/macros.html' import queue_position %}
|
||||
{% from 'developers/includes/macros.html' import queue_position with context %}
|
||||
|
||||
{% if addon.is_packaged %}
|
||||
{% set title = _('Manage Status & Versions') %}
|
||||
|
|
|
@ -103,15 +103,16 @@
|
|||
</{{ tag }}>
|
||||
{% endif %}
|
||||
<{{ tag }} class="queue-days">
|
||||
{% if position.days %}
|
||||
{% if position.days > 0 %}
|
||||
{% trans cnt=position.days, num=position.days|numberfmt %}
|
||||
<b>Estimated waiting time:</b> {{ num }} working day
|
||||
{% pluralize %}
|
||||
<b>Estimated waiting time:</b> {{ num }} working days
|
||||
{% endtrans %}
|
||||
{% else %}
|
||||
{% trans %}
|
||||
<b>Estimated waiting time:</b> 3-5 working days
|
||||
{% trans email=emaillink(settings.MKT_REVIEWERS_EMAIL) %}
|
||||
<b>Estimated waiting time:</b> Unknown
|
||||
<span class="hint">(Please email {{ email }} for more information.)</span>
|
||||
{% endtrans %}
|
||||
{% endif %}
|
||||
</{{ tag }}>
|
||||
|
|
Загрузка…
Ссылка в новой задаче