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

170 lines
8.8 KiB
HTML

{% if is_blank_row %}
<tr class="{{ model.FLAG_ROW_NEW }} {{ model.FLAG_ASSESSMENT_COMMAND_LINK }}" {{ model.ATTR_ID_ASSESSMENT_COMMAND_LINK }}>
<td class="{{ model.FLAG_COMMAND_CATEGORY }} {{ model.FLAG_DDL_PREVIEW }}">
{% include 'components/dog/_preview_DDL_command_category.html' %}
</td>
<td class="{{ model.FLAG_COMMAND }} {{ model.FLAG_DDL_PREVIEW }}">
{% include 'components/dog/_preview_DDL_command.html' %}
</td>
<td class="{{ model.FLAG_REINFORCEMENT_SCHEDULE }} {{ model.FLAG_DDL_PREVIEW }}">
{% include 'components/dog/_preview_DDL_reinforcement_schedule.html' %}
</td>
{#
<td class="{{ model.FLAG_COMMAND_MODALITY }} {{ model.FLAG_DDL_PREVIEW }}">
{% include 'components/dog/_preview_DDL_command_modality.html' %}
</td>
<td class="{{ model.FLAG_BRIBE }} {{ model.FLAG_DDL_PREVIEW }}">
{% include 'components/dog/_preview_DDL_bribe.html' %}
</td>
#}
<td class="{{ model.FLAG_DISTANCE_FROM_HANDLER_METRES }}">
<input type="number" min="0" step="0.01"
class="{{ model.FLAG_DISTANCE_FROM_HANDLER_METRES }}"
{{ model.ATTR_VALUE_CURRENT }}="0" {{ model.ATTR_VALUE_PREVIOUS }}="0"
value="0" />
</td>
<td class="{{ model.FLAG_IS_IN_HEARING_RANGE_OF_HANDLER }}">
<input type="checkbox"
class="{{ model.FLAG_IS_IN_HEARING_RANGE_OF_HANDLER }}"
{{ model.ATTR_VALUE_CURRENT }}="true" {{ model.ATTR_VALUE_PREVIOUS }}="true"
checked />
</td>
<td class="{{ model.FLAG_IS_IN_SCENT_RANGE_OF_HANDLER }}">
<input type="checkbox"
class="{{ model.FLAG_IS_IN_SCENT_RANGE_OF_HANDLER }}"
{{ model.ATTR_VALUE_CURRENT }}="true" {{ model.ATTR_VALUE_PREVIOUS }}="true"
checked />
</td>
<td class="{{ model.FLAG_IS_IN_SIGHT_OF_HANDLER }}">
<input type="checkbox"
class="{{ model.FLAG_IS_IN_SIGHT_OF_HANDLER }}"
{{ model.ATTR_VALUE_CURRENT }}="true" {{ model.ATTR_VALUE_PREVIOUS }}="true"
checked />
</td>
<td class="{{ model.FLAG_IS_ON_LEAD }}">
<input type="checkbox"
class="{{ model.FLAG_IS_ON_LEAD }}"
{{ model.ATTR_VALUE_CURRENT }}="true" {{ model.ATTR_VALUE_PREVIOUS }}="true"
checked />
</td>
<td class="{{ model.FLAG_ASSESSMENT_COMMAND_MODALITY_LINK }}">
{% include 'components/dog/_preview_table_assessment_command_modality_link.html' %}
</td>
<td class="{{ model.FLAG_ASSESSMENT_COMMAND_TECHNIQUE_LINK }}">
{% include 'components/dog/_preview_table_assessment_command_technique_link.html' %}
</td>
<td class="{{ model.FLAG_DISTRACTION }}">
{% include 'components/dog/_preview_table_distraction.html' %}
</td>
<td class="{{ model.FLAG_TRIAL_COUNT }}">
<!--
<input type="number" min="0" step="1"
class="{{ model.FLAG_TRIAL_COUNT }}"
{{ model.ATTR_VALUE_CURRENT }}="0" {{ model.ATTR_VALUE_PREVIOUS }}="0"
value="0" />
-->
<div class="{{ model.FLAG_TRIAL_COUNT }}" {{ model.ATTR_VALUE_CURRENT }}="0" {{ model.ATTR_VALUE_PREVIOUS }}="0">0</div>
</td>
<td class="{{ model.FLAG_ASSESSMENT_RESPONSE }} {{ model.FLAG_DDL_PREVIEW }}">
{% include 'components/dog/_preview_table_assessment_response.html' %}
</td>
{% include 'components/dog/_td_notes.html' %}
{% set active = True %}
{% include 'components/dog/_td_active.html' %}
</tr>
{% else %}
<tr class="{{ model.FLAG_ASSESSMENT_COMMAND_LINK }}" {{ model.ATTR_ID_ASSESSMENT_COMMAND_LINK }}="{{ link.id_link }}">
{% set command_preview = link.command %}
{% set command_category_preview = command_preview.command_category %}
<td class="{{ model.FLAG_COMMAND_CATEGORY }} {{ model.FLAG_DDL_PREVIEW }}">
{% include 'components/dog/_preview_DDL_command_category.html' %}
</td>
<td class="{{ model.FLAG_COMMAND }} {{ model.FLAG_DDL_PREVIEW }}">
{% include 'components/dog/_preview_DDL_command.html' %}
</td>
{% set reinforcement_schedule_preview = link.reinforcement_schedule %}
<td class="{{ model.FLAG_REINFORCEMENT_SCHEDULE }} {{ model.FLAG_DDL_PREVIEW }}">
{% include 'components/dog/_preview_DDL_reinforcement_schedule.html' %}
</td>
{#
{% set command_modality_preview = link.command_modality %}
<td class="{{ model.FLAG_COMMAND_MODALITY }} {{ model.FLAG_DDL_PREVIEW }}">
{% include 'components/dog/_preview_DDL_command_modality.html' %}
</td>
{% set bribe_preview = link.bribe %}
<td class="{{ model.FLAG_BRIBE }} {{ model.FLAG_DDL_PREVIEW }}">
{% include 'components/dog/_preview_DDL_bribe.html' %}
</td>
#}
<td class="{{ model.FLAG_DISTANCE_FROM_HANDLER_METRES }}">
<input type="number" min="0" step="0.01"
class="{{ model.FLAG_DISTANCE_FROM_HANDLER_METRES }}"
{{ model.ATTR_VALUE_CURRENT }}="{{ link.distance_from_handler_metres }}"
{{ model.ATTR_VALUE_PREVIOUS }}="{{ link.distance_from_handler_metres }}"
value="{{ link.distance_from_handler_metres }}" />
</td>
<td class="{{ model.FLAG_IS_IN_HEARING_RANGE_OF_HANDLER }}">
<input type="checkbox"
class="{{ model.FLAG_IS_IN_HEARING_RANGE_OF_HANDLER }}"
{{ model.ATTR_VALUE_CURRENT }}="{{ link.active | lower }}"
{{ model.ATTR_VALUE_PREVIOUS }}="{{ link.active | lower }}"
{% if link.active %}checked{% endif %} />
</td>
<td class="{{ model.FLAG_IS_IN_SCENT_RANGE_OF_HANDLER }}">
<input type="checkbox"
class="{{ model.FLAG_IS_IN_SCENT_RANGE_OF_HANDLER }}"
{{ model.ATTR_VALUE_CURRENT }}="{{ link.active | lower }}"
{{ model.ATTR_VALUE_PREVIOUS }}="{{ link.active | lower }}"
{% if link.active %}checked{% endif %} />
</td>
<td class="{{ model.FLAG_IS_IN_SIGHT_OF_HANDLER }}">
<input type="checkbox"
class="{{ model.FLAG_IS_IN_SIGHT_OF_HANDLER }}"
{{ model.ATTR_VALUE_CURRENT }}="{{ link.active | lower }}"
{{ model.ATTR_VALUE_PREVIOUS }}="{{ link.active | lower }}"
{% if link.active %}checked{% endif %} />
</td>
<td class="{{ model.FLAG_IS_ON_LEAD }}">
<input type="checkbox"
class="{{ model.FLAG_IS_ON_LEAD }}"
{{ model.ATTR_VALUE_CURRENT }}="{{ link.active | lower }}"
{{ model.ATTR_VALUE_PREVIOUS }}="{{ link.active | lower }}"
{% if link.active %}checked{% endif %} />
</td>
<td class="{{ model.FLAG_ASSESSMENT_COMMAND_MODALITY_LINK }}">
{% set assessment_command_modality_link_previews = link.assessment_command_modality_links %}
{% include 'components/dog/_preview_table_assessment_command_modality_link.html' %}
</td>
<td class="{{ model.FLAG_ASSESSMENT_COMMAND_TECHNIQUE_LINK }}">
{% set assessment_command_modality_link_previews = link.assessment_command_technique_links %}
{% include 'components/dog/_preview_table_assessment_command_technique_link.html' %}
</td>
<td class="{{ model.FLAG_DISTRACTION }}">
{% set distraction_previews = link.distractions %}
{% include 'components/dog/_preview_table_distraction.html' %}
</td>
<td class="{{ model.FLAG_TRIAL_COUNT }}">
<!--
<input type="number" min="0" step="1"
class="{{ model.FLAG_TRIAL_COUNT }}"
{{ model.ATTR_VALUE_CURRENT }}="{{ link.trial_count }}"
{{ model.ATTR_VALUE_PREVIOUS }}="{{ link.trial_count }}"
value="{{ link.trial_count }}" />
-->
<div class="{{ model.FLAG_TRIAL_COUNT }}"
{{ model.ATTR_VALUE_CURRENT }}="{{ link.trial_count }}"
{{ model.ATTR_VALUE_PREVIOUS }}="{{ link.trial_count }}"
>{{ link.trial_count }}</div>
</td>
<td class="{{ model.FLAG_ASSESSMENT_RESPONSE }} {{ model.FLAG_DDL_PREVIEW }}">
{% set assessment_response_previews = link.assessment_responses %}
{% include 'components/dog/_preview_table_assessment_response.html' %}
</td>
{% set notes = link.notes %}
{% include 'components/dog/_td_notes.html' %}
{% set active = link.active %}
{% include 'components/dog/_td_active.html' %}
</tr>
{% endif %}