summaryrefslogtreecommitdiffstats
path: root/client/components/cards/cardTime.jade
blob: dcfc92f01d912dc471e0e41da5a305a5e07e24df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
template(name="editCardSpentTime")
  .edit-card-time
    form.edit-time
      .fields
        label(for="time") {{_ 'time'}}
        input.js-time-field#time(type="number" step="0.01" name="time" value="{{card.spentTime}}" placeholder=timeFormat autofocus)
        label(for="overtime") {{_ 'overtime'}}
        a.js-toggle-overtime
          .materialCheckBox#overtime(class="{{#if card.isOvertime}}is-checked{{/if}}" name="overtime")

      if error.get
        .warning {{_ error.get}}
      button.primary.wide.left.js-submit-time(type="submit") {{_ 'save'}}
      button.js-delete-time.negate.wide.right {{_ 'delete'}}

template(name="timeBadge")
  if canModifyCard
    a.js-edit-time.card-time(title="{{showTitle}}" class="{{#if isOvertime}}card-label-red{{else}}card-label-green{{/if}}")
      | {{showTime}}
  else
    a.card-time(title="{{showTitle}}" class="{{#if isOvertime}}card-label-red{{else}}card-label-green{{/if}}")
      | {{showTime}}