summaryrefslogtreecommitdiffstats
path: root/client/components/users/userHeader.jade
blob: 946bdab18f2d0838c8e3bc8a5268425a6db143b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
template(name="headerUserBar")
  #header-user-bar
    a.header-user-bar-name.js-open-header-member-menu
      .header-user-bar-avatar
        +userAvatar(userId=currentUser._id)
      unless isMiniScreen
        unless isSandstorm
          if currentUser.profile.fullname
            = currentUser.profile.fullname
          else
            = currentUser.username

template(name="memberMenuPopup")
  ul.pop-over-list
    with currentUser
      li: a.js-edit-profile {{_ 'edit-profile'}}
      li: a.js-change-settings {{_ 'change-settings'}}
      li: a.js-change-avatar {{_ 'edit-avatar'}}
      unless isSandstorm
        li: a.js-change-password {{_ 'changePasswordPopup-title'}}
        li: a.js-change-language {{_ 'changeLanguagePopup-title'}}
    if currentUser.isAdmin
      li: a.js-go-setting(href="{{pathFor 'setting'}}") {{_ 'admin-panel'}}
  hr
  ul.pop-over-list
    li: a(href="{{pathFor 'board' id=templatesBoardId slug=templatesBoardSlug}}") {{_ 'templates'}}
  unless isSandstorm
    hr
    ul.pop-over-list
      li: a.js-logout {{_ 'log-out'}}

template(name="editProfilePopup")
  form
    label
      | {{_ 'fullname'}}
      input.js-profile-fullname(type="text" value=profile.fullname autofocus)
    label
      | {{_ 'username'}}
      span.error.hide.username-taken
        | {{_ 'error-username-taken'}}
      if allowUserNameChange
        input.js-profile-username(type="text" value=username)
      else
        input.js-profile-username(type="text" value=username readonly)
    label
      | {{_ 'initials'}}
      input.js-profile-initials(type="text" value=profile.initials)
    label
      | {{_ 'email'}}
      span.error.hide.email-taken
        | {{_ 'error-email-taken'}}
      if allowEmailChange
        input.js-profile-email(type="email" value="{{emails.[0].address}}")
      else
        input.js-profile-email(type="email" value="{{emails.[0].address}}" readonly)
    div.buttonsContainer
      input.primary.wide(type="submit" value="{{_ 'save'}}")
      if allowUserDelete
        div
        input#deleteButton.primary.wide(type="button" value="{{_ 'delete'}}")

template(name="changePasswordPopup")
  +atForm(state='changePwd')

template(name="changeLanguagePopup")
  ul.pop-over-list
    each languages
      li(class="{{# if isCurrentLanguage}}active{{/if}}")
        a.js-set-language
          = name
          if isCurrentLanguage
            i.fa.fa-check

template(name="changeSettingsPopup")
  ul.pop-over-list
    li
      a.js-toggle-system-messages
        | {{_ 'hide-system-messages'}}
        if hiddenSystemMessages
          i.fa.fa-check
    li
      label.bold
        | {{_ 'show-cards-minimum-count'}}
      input#show-cards-count-at.inline-input.left(type="number" value="#{showCardsCountAt}" min="0" max="99" onkeydown="return false")
      input.js-apply-show-cards-at.left(type="submit" value="{{_ 'apply'}}")


template(name="userDeletePopup")
  p {{_ 'delete-user-confirm-popup'}}
  button.js-confirm.negate.full(type="submit") {{_ 'delete'}}