summaryrefslogtreecommitdiffstats
path: root/client/components/cards/cardTime.jade
blob: 177b689f89401276d7613f58ceef96a0765fee5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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.getSpentTime}}" placeholder=timeFormat autofocus)
        .check-div
          a.flex.js-toggle-overtime
            .materialCheckBox#overtime(class="{{#if getIsOvertime}}is-checked{{/if}}" name="overtime")
            span {{_ '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 getIsOvertime}}card-label-red{{else}}card-label-green{{/if}}")
      | {{showTime}}
  else
    a.card-time(title="{{showTitle}}" class="{{#if getIsOvertime}}card-label-red{{else}}card-label-green{{/if}}")
      | {{showTime}}