Expand view to include weekend responses.

This commit is contained in:
James Cole
2018-06-27 18:30:53 +02:00
parent 7b46339a5d
commit a8e666db34
6 changed files with 37 additions and 15 deletions

View File

@@ -21,6 +21,7 @@
{{ ExpandedForm.date('first_date',array.first_date, {helpText: trans('firefly.help_first_date_no_past')}) }}
{{ ExpandedForm.select('repetition_type', [], null, {helpText: trans('firefly.change_date_other_options')}) }}
{{ ExpandedForm.number('skip', array.recurrence_repetitions[0].repetition_skip) }}
{{ ExpandedForm.select('weekend', weekendResponses, array.recurrence_repetitions[0].weekend, {helpText: trans('firefly.help_weekend')}) }}
{{ ExpandedForm.select('repetition_end', repetitionEnds, repetitionEnd) }}
{{ ExpandedForm.date('repeat_until',array.repeat_until) }}
{{ ExpandedForm.number('repetitions', array.repetitions) }}

View File

@@ -87,26 +87,34 @@
{% for rep in rt.recurrence_repetitions %}
<li>{{ rep.description }}
{% if rep.repetition_skip == 1 %}
({{ trans('firefly.recurring_skips_one')|lower }})
({{ trans('firefly.recurring_skips_one')|lower }}).
{% endif %}
{% if rep.repetition_skip > 1 %}
({{ trans('firefly.recurring_skips_more', {count: rep.repetition_skip})|lower }})
({{ trans('firefly.recurring_skips_more', {count: rep.repetition_skip})|lower }}).
{% endif %}
{% if rep.weekend == 3 %}
{{ 'will_jump_friday'|_ }}
{% endif %}
{% if rep.weekend == 4 %}
{{ 'will_jump_monday'|_ }}
{% endif %}
{% if rep.weekend == 2 %}
{{ 'except_weekends'|_ }}
{% endif %}
</li>
{% endfor %}
</ul>
<p>
{% if null == rt.repeat_until and rt.repetitions == 0 %}
{{ 'recurring_repeats_forever'|_ }}
{{ 'recurring_repeats_forever'|_ }}.
{% endif %}
{% if null != rt.repeat_until and rt.repetitions == 0 %}
{{ trans('firefly.recurring_repeats_until', {date: rt.repeat_until.formatLocalized(monthAndDayFormat)}) }}
{{ trans('firefly.recurring_repeats_until', {date: rt.repeat_until.formatLocalized(monthAndDayFormat)}) }}.
{% endif %}
{% if null == rt.repeat_until and rt.repetitions != 0 %}
{{ trans('firefly.recurring_repeats_x_times', {count: rt.repetitions}) }}
{{ trans('firefly.recurring_repeats_x_times', {count: rt.repetitions}) }}.
{% endif %}
</p>
</td>
</tr>