language specific money and date display (#180)

* improved date translation
* language specific date and money display
This commit is contained in:
Kevin Papst
2018-06-25 16:41:12 +02:00
committed by Simon Schaufelberger
parent f563e0703d
commit d4a46cf257
14 changed files with 308 additions and 37 deletions

View File

@@ -2,7 +2,7 @@
<div class="col-xs-12">
<h2 class="page-header">
<i class="fa fa-globe"></i> <span contenteditable="true">{{ model.template.title }}</span>
<small class="pull-right">{{ 'label.date'|trans }}: {{ model.invoiceDate|date(kimai_context.date_1) }}</small>
<small class="pull-right">{{ 'label.date'|trans }}: {{ model.invoiceDate|date_short }}</small>
</h2>
</div>
</div>
@@ -36,7 +36,7 @@
<b>{{ 'invoice.number'|trans }}: {{ model.numberGenerator.invoiceNumber }}</b>
</p>
<p contenteditable="true">
<b>{{ 'invoice.due_days'|trans }}:</b> {{ model.dueDate|date(kimai_context.date_1) }}
<b>{{ 'invoice.due_days'|trans }}:</b> {{ model.dueDate|date_short }}
{% if model.customer.number is not empty %}
<br><b>{{ 'label.customer_number'|trans }}:</b> {{ model.customer.number }}
{% endif %}
@@ -61,7 +61,7 @@
<tbody>
{% for entry in model.calculator.entries %}
<tr>
<td>{{ entry.begin|date(kimai_context.date_1) }}</td>
<td>{{ entry.begin|date_short }}</td>
<td>{{ entry.activity.name }} / {{ entry.activity.project.name }}</td>
<td>{{ entry.duration|duration }}</td>
<td>{{ entry.rate|money(model.calculator.currency) }}</td>
@@ -84,7 +84,7 @@
</div>
<div class="col-xs-6">
<p class="lead" contenteditable="true">{{ 'invoice.due_days'|trans }} {{ model.dueDate|date(kimai_context.date_1) }}</p>
<p class="lead" contenteditable="true">{{ 'invoice.due_days'|trans }} {{ model.dueDate|date_short }}</p>
<div class="table-responsive">
<table class="table">

View File

@@ -23,7 +23,7 @@
</tr>
<tr>
<th style="width:50%">{{ 'label.date'|trans }}</th>
<td contenteditable="true">{{ model.invoiceDate|date('F Y') }}</td>
<td contenteditable="true">{{ model.invoiceDate|month_name|trans }} {{ model.invoiceDate|date('Y') }}</td>
</tr>
<tr>
<th>{{ 'label.customer'|trans }}</th>
@@ -57,7 +57,7 @@
<tbody>
{% for entry in model.calculator.entries %}
<tr>
<td>{{ entry.begin|date(kimai_context.date_1) }}</td>
<td>{{ entry.begin|date_short }}</td>
<td>{{ entry.activity.name }} / {{ entry.activity.project.name }}</td>
<td>{{ entry.duration|duration }}</td>
</tr>