Files
dog_training/templates/components/dog/_row_calendar_entry.html

73 lines
3.4 KiB
HTML

{% if is_blank_row %}
<tr class="{{ model.FLAG_ROW_NEW }} {{ model.FLAG_CALENDAR_ENTRY }}" {{ model.ATTR_ID_CALENDAR_ENTRY }}>
<td class="{{ model.FLAG_DATE_FROM }} {{ model.FLAG_DATE_TO }} {{ model.FLAG_DATE_PREVIEW }}">
<div class="{{ model.FLAG_DATE_FROM }}"></div>
{#
<div>-</div>
<div class="{{ model.FLAG_DATE_TO }}"></div>
#}
</td>
<td class="{{ model.FLAG_NAME }}">
<input type="text"
class="{{ model.FLAG_NAME }}"
{{ model.ATTR_VALUE_CURRENT }} {{ model.ATTR_VALUE_PREVIOUS }} />
</td>
<td class="{{ model.FLAG_IS_CALENDAR_ENTRY_TYPE_BILL }}">
<input type="checkbox"
class="{{ model.FLAG_IS_CALENDAR_ENTRY_TYPE_BILL }}"
{{ model.ATTR_VALUE_CURRENT }}="true" {{ model.ATTR_VALUE_PREVIOUS }}="true"
checked />
</td>
<td class="{{ model.FLAG_PRICE }}">
<input type="number" min="0" step="0.01"
class="{{ model.FLAG_PRICE }}"
{{ model.ATTR_VALUE_CURRENT }}="0" {{ model.ATTR_VALUE_PREVIOUS }}="0"
value="0" />
</td>
{#
{% set active = True %}
{% include 'components/dog/_td_active.html' %}
#}
</tr>
{% else %}
<tr class="{{ model.FLAG_CALENDAR_ENTRY }}" {{ model.ATTR_ID_CALENDAR_ENTRY }}="{{ calendar_entry.id_calendar_entry }}">
<td class="{{ model.FLAG_DATE_FROM }} {{ model.FLAG_DATE_TO }} {{ model.FLAG_DATE_PREVIEW }}">
<div class="{{ model.FLAG_DATE_FROM }}">{{ model.format_datetime_text(calendar_entry.start_on) }}</div>
{#
<div>-</div>
<div class="{{ model.FLAG_DATE_TO }}">{{ model.format_datetime_text(calendar_entry.start_on) }}</div>
#}
</td>
<td class="{{ model.FLAG_NAME }}">
<input type="text"
class="{{ model.FLAG_NAME }}"
{{ model.ATTR_VALUE_CURRENT }}="{{ model.format_null_string_as_blank(calendar_entry.name)|escape }}"
{{ model.ATTR_VALUE_PREVIOUS }}="{{ model.format_null_string_as_blank(calendar_entry.name)|escape }}"
value="{{ model.format_null_string_as_blank(calendar_entry.name) }}" />
</td>
<td class="{{ model.FLAG_IS_CALENDAR_ENTRY_TYPE_BILL }}">
<input type="checkbox"
class="{{ model.FLAG_IS_CALENDAR_ENTRY_TYPE_BILL }}"
{{ model.ATTR_VALUE_CURRENT }}="{{ calendar_entry.is_bill_calendar_entry_type | lower }}"
{{ model.ATTR_VALUE_PREVIOUS }}="{{ calendar_entry.is_bill_calendar_entry_type | lower }}"
{% if calendar_entry.is_bill_calendar_entry_type %}checked{% endif %} />
</td>
<td class="{{ model.FLAG_PRICE }}">
{#
<input type="number" min="0" step="0.01"
class="{{ model.FLAG_PRICE }}"
{{ model.ATTR_VALUE_CURRENT }}="{{ calendar_entry.price }}"
{{ model.ATTR_VALUE_PREVIOUS }}="{{ calendar_entry.price }}"
value="{{ calendar_entry.price }}" />
#}
<div class="{{ model.FLAG_PRICE }}">£{{ calendar_entry.price }}</div>
</td>
{#
{% set active = calendar_entry.active %}
{% include 'components/dog/_td_active.html' %}
#}
</tr>
{% endif %}