From def43f133d4a065d841e6961a558c007fd9cfb60 Mon Sep 17 00:00:00 2001 From: Ilias Trichopoulos Date: Fri, 21 Nov 2014 17:26:09 +0100 Subject: [PATCH] LiveSync: Add info message when no agents --- .../templates/plugin_details_extra.html | 104 +++++++++--------- 1 file changed, 55 insertions(+), 49 deletions(-) diff --git a/livesync/indico_livesync/templates/plugin_details_extra.html b/livesync/indico_livesync/templates/plugin_details_extra.html index 5665bd9..6d61d44 100644 --- a/livesync/indico_livesync/templates/plugin_details_extra.html +++ b/livesync/indico_livesync/templates/plugin_details_extra.html @@ -1,56 +1,62 @@

{% trans %}LiveSync Agents{% endtrans %}

-
- - - - - - - - - - - - - - {% for agent in agents %} +
+ {% if agents %} +
{% trans %}ID{% endtrans %}{% trans %}Name{% endtrans %}{% trans %}Backend{% endtrans %}{% trans %}Last Run{% endtrans %}{% trans %}Initial Export{% endtrans %}{% trans %}Queue{% endtrans %}{% trans %}Actions{% endtrans %}
+ - - - - - - - + + + + + + + - {% endfor %} - -
{{ agent.id }}{{ agent.name }} - {% if agent.backend %} - {{ agent.backend.title }} - {% else %} - {% trans name=agent.backend_name %}Not loaded: {{ name }}{% endtrans %} - {% endif %} - - {%- if agent.last_run -%} - {{ agent.last_run | format_datetime('short') }} - {%- else -%} - {% trans %}Never{% endtrans %} - {%- endif -%} - - {% if agent.initial_data_exported %} - {% trans %}Done{% endtrans %} - {% else %} - {% trans %}Pending{% endtrans %} - {% endif %} - {{ agent.queue.filter_by(processed=false).count() }} - - {%- if agent.backend -%} - - {%- endif -%} - {% trans %}ID{% endtrans %}{% trans %}Name{% endtrans %}{% trans %}Backend{% endtrans %}{% trans %}Last Run{% endtrans %}{% trans %}Initial Export{% endtrans %}{% trans %}Queue{% endtrans %}{% trans %}Actions{% endtrans %}
+ + + {% for agent in agents %} + + {{ agent.id }} + {{ agent.name }} + + {% if agent.backend %} + {{ agent.backend.title }} + {% else %} + {% trans name=agent.backend_name %}Not loaded: {{ name }}{% endtrans %} + {% endif %} + + + {%- if agent.last_run -%} + {{ agent.last_run | format_datetime('short') }} + {%- else -%} + {% trans %}Never{% endtrans %} + {%- endif -%} + + + {% if agent.initial_data_exported %} + {% trans %}Done{% endtrans %} + {% else %} + {% trans %}Pending{% endtrans %} + {% endif %} + + {{ agent.queue.filter_by(processed=false).count() }} + + + {%- if agent.backend -%} + + {%- endif -%} + + + {% endfor %} + + + {% else %} +
+
{% trans %}No agents have been added yet.{% endtrans %}
+
+ {% endif %} {% for name, backend in backends.items() | sort(attribute='1.title') %} {% trans backend=backend.title %}Add {{ backend }} agent{% endtrans %}