Commit 7a5a3104 by Oláh István Gergely

dashboard: use arrowfilter in templates

parent 35881b87
{% load i18n %} {% load i18n %}
{% load hro %} {% load hro %}
{% load arrowfilter %}
<div id="activity-timeline" class="timeline"> <div id="activity-timeline" class="timeline">
{% for a in activities %} {% for a in activities %}
<div class="activity" data-activity-id="{{ a.pk }}"> <div class="activity" data-activity-id="{{ a.pk }}">
...@@ -10,7 +11,8 @@ ...@@ -10,7 +11,8 @@
{{ a.readable_name.get_admin_text|capfirst }} {{ a.readable_name.get_admin_text|capfirst }}
</strong> </strong>
{{ a.started|date:"Y-m-d H:i" }}{% if a.user %}, {{ a.user }}{% endif %} <span title="{{ a.started }}">{{ a.started|arrowfilter:LANGUAGE_CODE }}</span>{% if a.user %}, {{ a.user }}{% endif %}
{% if a.children.count > 0 %} {% if a.children.count > 0 %}
<div class="sub-timeline"> <div class="sub-timeline">
{% for s in a.children.all %} {% for s in a.children.all %}
...@@ -21,7 +23,9 @@ ...@@ -21,7 +23,9 @@
</span> </span>
&ndash; &ndash;
{% if s.finished %} {% if s.finished %}
{{ s.finished|time:"H:i:s" }} <span title="{{ s.finished }}">
{{ s.finished|arrowfilter:LANGUAGE_CODE }}
</span>
{% else %} {% else %}
<i class="fa fa-refresh fa-spin" class="sub-activity-loading-icon"></i> <i class="fa fa-refresh fa-spin" class="sub-activity-loading-icon"></i>
{% endif %} {% endif %}
......
{{ record.created|date }} {% load arrowfilter %}
<br /> <span title="{{ record.created }}">
{{ record.created|time }} {{ record.created|arrowfilter:LANGUAGE_CODE }}
</span>
{% load i18n %} {% load i18n %}
{% load hro %} {% load hro %}
{% load arrowfilter %}
<div id="activity-timeline" class="timeline"> <div id="activity-timeline" class="timeline">
{% for a in activities %} {% for a in activities %}
...@@ -18,10 +19,12 @@ ...@@ -18,10 +19,12 @@
- {{ a.percentage }}% - {{ a.percentage }}%
{% endif %} {% endif %}
</strong> </strong>
{% endspaceless %}{% if a.times < 2%} {{ a.started|date:"Y-m-d H:i" }}{% endif %}{% if a.user %}, {% endspaceless %}
<a class="no-style-link" href="{% url "dashboard.views.profile" username=a.user.username %}"> {% if a.times < 2 %}
{% include "dashboard/_display-name.html" with user=a.user show_org=True %} <span title="{{ a.started }}">{{ a.started|arrowfilter:LANGUAGE_CODE }}</span>{% endif %}{% if a.user %},
</a> <a class="no-style-link" href="{% url "dashboard.views.profile" username=a.user.username %}">
{% include "dashboard/_display-name.html" with user=a.user show_org=True %}
</a>
{% endif %} {% endif %}
{% if a.is_abortable_for_user %} {% if a.is_abortable_for_user %}
<form action="{{ a.instance.get_absolute_url }}" method="POST" class="pull-right"> <form action="{{ a.instance.get_absolute_url }}" method="POST" class="pull-right">
...@@ -40,7 +43,9 @@ ...@@ -40,7 +43,9 @@
<a href="{{ s.get_absolute_url }}"> <a href="{{ s.get_absolute_url }}">
{{ s.readable_name|get_text:user|capfirst }}</a></span> &ndash; {{ s.readable_name|get_text:user|capfirst }}</a></span> &ndash;
{% if s.finished %} {% if s.finished %}
{{ s.finished|time:"H:i:s" }} <span title="{{ s.finished }}">
{{ s.finished|arrowfilter:LANGUAGE_CODE }}
</span>
{% else %} {% else %}
<i class="fa fa-refresh fa-spin" class="sub-activity-loading-icon"></i> <i class="fa fa-refresh fa-spin" class="sub-activity-loading-icon"></i>
{% endif %} {% endif %}
......
{% load i18n %} {% load i18n %}
{% load arrowfilter %}
<div class="row"> <div class="row">
<div class="col-md-4"> <div class="col-md-4">
<dl id="home_name_and_description"> <dl id="home_name_and_description">
...@@ -69,13 +70,13 @@ ...@@ -69,13 +70,13 @@
<dt>{% trans "Suspended at:" %}</dt> <dt>{% trans "Suspended at:" %}</dt>
<dd> <dd>
<span title="{{ instance.time_of_suspend }}"> <span title="{{ instance.time_of_suspend }}">
<i class="fa fa-moon-o"></i> {{ instance.time_of_suspend|timeuntil }} <i class="fa fa-moon-o"></i> {{ instance.time_of_suspend|arrowfilter:LANGUAGE_CODE }}
</span> </span>
</dd> </dd>
<dt>{% trans "Destroyed at:" %}</dt> <dt>{% trans "Destroyed at:" %}</dt>
<dd> <dd>
<span title="{{ instance.time_of_delete }}"> <span title="{{ instance.time_of_delete }}">
<i class="fa fa-times"></i> {{ instance.time_of_delete|timeuntil }} <i class="fa fa-times"></i> {{ instance.time_of_delete|arrowfilter:LANGUAGE_CODE }}
</span> </span>
</dd> </dd>
</dl> </dl>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment