Files
habitica/website/views/shared/tasks/edit/dailies/repeat_options.jade
T
Keith Holliday ef02e59590 Repeatables (#8444)
* Added initial should do weekly tests

* Added support back in for days of the week and every x day

* Added better week day mapper

* Added initial monthly

* Added every x months

* Added yearlies

* Fixed every nth weekdy of month

* Fixed tests to check every x week on weekday

* Began combining x month with nth weekday

* Added every x month combined with date and weekday

* Fixed lint issues

* Saved moment-recurr to package.json

* Added new repeat fields

* Added UI for repeatables

* Ensured only dalies are affected by summary

* Added local strings

* Updated npm shrinkwrap

* Shared day map constant

* Updated shrinkwrap

* Added ui back

* Updated copy of test cases

* Added new translation strings

* Updated shrinkwrap

* Fixed broken test

* Made should do tests static for better consitency

* Fixed issue with no repeat

* Fixed line endings

* Added frequency enum values

* Fixed spacing
2017-02-27 15:41:21 -07:00

36 lines
1.4 KiB
Plaintext

//- .form-group
//- legend.option-title=env.t('repeat')
//- select.form-control(ng-model='task._edit.frequency', ng-disabled='!canEdit(task)')
//- option(value='weekly')=env.t('repeatWeek')
//- option(value='daily')=env.t('repeatDays')
legend.option-title
span.hint(popover-trigger='mouseenter', popover-title=env.t('repeatHelpTitle'),
popover='{{env.t(task._edit.frequency + "RepeatHelpContent")}}')=env.t('repeatEvery')
// If frequency is daily
ng-form.form-group(name='everyX')
.input-group
input.form-control(type='number', ng-model='task._edit.everyX', min='0', ng-disabled='!canEdit(task)', required)
span.input-group-addon {{repeatSuffix}}
// If frequency is weekly
.form-group(ng-if='task._edit.frequency=="weekly"')
legend.option-title=env.t('onDays')
ul.repeat-days
// note, does not use data-toggle="buttons-checkbox" - it would interfere with our own click binding
mixin dayOfWeek(day, num)
li
button(type='button', ng-class='{active: task._edit.repeat.#{day}}',
ng-disabled='!canEdit(task)', ng-click='task._edit.repeat.#{day} = !task._edit.repeat.#{day}',
tooltip='{{env.t((task._edit.repeat.#{day}) ? "due" : "notDue")}}')
| {{::moment.weekdaysMin(#{num})}}
+dayOfWeek('su', 0)
+dayOfWeek('m', 1)
+dayOfWeek('t', 2)
+dayOfWeek('w', 3)
+dayOfWeek('th', 4)
+dayOfWeek('f', 5)
+dayOfWeek('s', 6)