[#138] Add data attributes to support timezone conversion

This commit is contained in:
Stefan Oderbolz 2015-07-09 22:35:54 +02:00
parent ce0aedd5b9
commit 83dd0b4b68
2 changed files with 23 additions and 5 deletions

View File

@ -50,15 +50,27 @@ Example:
</tr>
<tr>
<th>{{ _('Created') }}</th>
<td>{{ h.render_datetime(job.created, with_hours=True) }}</td>
<td>
<span class="datetime" data-datetime="{{ h.render_datetime(job.created, date_format='%Y-%m-%dT%H:%M:%S%z') }}">
{{ h.render_datetime(job.created, with_hours=True) }}
</span>
</td>
</tr>
<tr>
<th>{{ _('Started') }}</th>
<td>{{ h.render_datetime(job.gather_started, with_hours=True) }}</td>
<td>
<span class="datetime" data-datetime="{{ h.render_datetime(job.gather_started, date_format='%Y-%m-%dT%H:%M:%S%z') }}">
{{ h.render_datetime(job.gather_started, with_hours=True) }}
</span>
</td>
</tr>
<tr>
<th>{{ _('Finished') }}</th>
<td>{{ h.render_datetime(job.finished, with_hours=True) }}</td>
<td>
<span class="datetime" data-datetime="{{ h.render_datetime(job.finished, date_format='%Y-%m-%dT%H:%M:%S%z') }}">
{{ h.render_datetime(job.finished, with_hours=True) }}
</span>
</td>
</tr>
<tr>
<th>{{ _('Status') }}</th>

View File

@ -25,9 +25,15 @@
{% endif %}
</h3>
<p>
{{ _('Started:') }} {{ h.render_datetime(job.gather_started, with_hours=True) or _('Not yet') }}
{{ _('Started:') }}
<span class="datetime" data-datetime="{{ h.render_datetime(job.gather_started, date_format='%Y-%m-%dT%H:%M:%S%z') }}">
{{ h.render_datetime(job.gather_started, with_hours=True) or _('Not yet') }}
</span>
&mdash;
{{ _('Finished:') }} {{ h.render_datetime(job.finished, with_hours=True) or _('Not yet') }}
{{ _('Finished:') }}
<span class="datetime" data-datetime="{{ h.render_datetime(job.finished, date_format='%Y-%m-%dT%H:%M:%S%z') }}">
{{ h.render_datetime(job.finished, with_hours=True) or _('Not yet') }}
</span>
</p>
</div>
{% if job.status == 'Finished' %}