summaryrefslogtreecommitdiffstats
path: root/client/components/settings/peopleBody.jade
diff options
context:
space:
mode:
authorThuan Pham Quoc <thuanpq.io@gmail.com>2017-11-07 22:26:21 +0700
committerThuan Pham Quoc <thuanpq.io@gmail.com>2017-11-07 22:26:21 +0700
commit1f6545e411fbe98fc1a0b1d5361c7a2bcc74056a (patch)
tree27ffa086405f5ea168422406559952926ed51287 /client/components/settings/peopleBody.jade
parent29d54f46aa79a5f3fe067717fa418092e150eb47 (diff)
downloadwekan-1f6545e411fbe98fc1a0b1d5361c7a2bcc74056a.tar.gz
wekan-1f6545e411fbe98fc1a0b1d5361c7a2bcc74056a.tar.bz2
wekan-1f6545e411fbe98fc1a0b1d5361c7a2bcc74056a.zip
Added edit user from admin panel
Diffstat (limited to 'client/components/settings/peopleBody.jade')
-rw-r--r--client/components/settings/peopleBody.jade76
1 files changed, 62 insertions, 14 deletions
diff --git a/client/components/settings/peopleBody.jade b/client/components/settings/peopleBody.jade
index 726cc5ed..3ed2e4c8 100644
--- a/client/components/settings/peopleBody.jade
+++ b/client/components/settings/peopleBody.jade
@@ -19,18 +19,66 @@ template(name="people")
template(name="peopleGeneral")
table
tbody
+ tr
+ th {{_ 'username'}}
+ th {{_ 'fullname'}}
+ th {{_ 'isAdmin'}}
+ th {{_ 'email'}}
+ th {{_ 'verified'}}
+ th {{_ 'createdAt'}}
+ th {{_ 'active'}}
+ th
each user in peopleList
- tr
- th {{_ 'username'}}
- th {{_ 'fullname'}}
- th {{_ 'isAdmin'}}
- th {{_ 'email'}}
- th {{_ 'verified'}}
- th {{_ 'createdAt'}}
- tr
- td {{ user.username }}
- td {{ user.profile.fullname }}
- td {{ user.isAdmin }}
- td {{ user.emails.[0].address }}
- td {{ user.emails.[0].verified }}
- td {{ user.createdAt }}
+ +peopleRow(userId=user._id)
+
+template(name="peopleRow")
+ tr
+ td.username {{ userData.username }}
+ td {{ userData.profile.fullname }}
+ td
+ if userData.isAdmin
+ | true
+ else
+ | false
+ td {{ userData.emails.[0].address }}
+ td
+ if userData.emails.[0].verified
+ | true
+ else
+ | false
+ td {{ userData.createdAt }}
+ td
+ if userData.active
+ | true
+ else
+ | false
+ td
+ a.edit-user
+ | edit
+
+template(name="editUserPopup")
+ form
+ label.hide.userId(type="text" value=user._id)
+ label
+ | {{_ 'fullname'}}
+ input.js-profile-fullname(type="text" value=user.profile.fullname autofocus)
+ label
+ | {{_ 'username'}}
+ span.error.hide.username-taken
+ | {{_ 'error-username-taken'}}
+ input.js-profile-username(type="text" value=user.username)
+ label
+ | {{_ 'initials'}}
+ input.js-profile-initials(type="text" value=user.profile.initials)
+ label
+ | {{_ 'email'}}
+ span.error.hide.email-taken
+ | {{_ 'error-email-taken'}}
+ input.js-profile-email(type="email" value="{{user.emails.[0].address}}")
+ label
+ | {{_ 'isAdmin'}}
+ select.select-role.js-profile-isadmin
+ option(value="false") No
+ option(value="true" selected="{{user.isAdmin}}") Yes
+
+ input.primary.wide(type="submit" value="{{_ 'save'}}")