123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202 |
- template(name="people")
- .setting-content
- unless currentUser.isAdmin
- | {{_ 'error-notAuthorized'}}
- else
- .content-title.ext-box
- .ext-box-left
- span
- i.fa.fa-users
- | {{_ 'people'}}
- input#searchInput(placeholder="{{_ 'search'}}")
- button#searchButton
- i.fa.fa-search
- | {{_ 'search'}}
- .ext-box-right
- span {{_ 'people-number'}} #{peopleNumber}
- .content-body
- .side-menu
- ul
- li.active
- a.js-setting-menu(data-id="people-setting")
- i.fa.fa-users
- | {{_ 'people'}}
- .main-body
- if loading.get
- +spinner
- else if people.get
- +peopleGeneral
- template(name="peopleGeneral")
- table
- tbody
- tr
- th {{_ 'username'}}
- th {{_ 'fullname'}}
- th {{_ 'admin'}}
- th {{_ 'email'}}
- th {{_ 'verified'}}
- th {{_ 'createdAt'}}
- th {{_ 'active'}}
- th {{_ 'authentication-method'}}
- th
- +newUserRow
- each user in peopleList
- +peopleRow(userId=user._id)
- template(name="newUserRow")
- a.new-user
- i.fa.fa-edit
- | {{_ 'new'}}
- template(name="peopleRow")
- tr
- if userData.loginDisabled
- td.username <s>{{ userData.username }}</s>
- else
- td.username {{ userData.username }}
- if userData.loginDisabled
- td <s>{{ userData.profile.fullname }}</s>
- else
- td {{ userData.profile.fullname }}
- if userData.loginDisabled
- td
- if userData.isAdmin
- | <s>{{_ 'yes'}}</s>
- else
- | <s>{{_ 'no'}}</s>
- else
- td
- if userData.isAdmin
- | {{_ 'yes'}}
- else
- | {{_ 'no'}}
- if userData.loginDisabled
- td <s>{{ userData.emails.[0].address }}</s>
- else
- td {{ userData.emails.[0].address }}
- if userData.loginDisabled
- td
- if userData.emails.[0].verified
- | <s>{{_ 'yes'}}</s>
- else
- | <s>{{_ 'no'}}</s>
- else
- td
- if userData.emails.[0].verified
- | {{_ 'yes'}}
- else
- | {{_ 'no'}}
- if userData.loginDisabled
- td <s>{{ moment userData.createdAt 'LLL' }}</s>
- else
- td {{ moment userData.createdAt 'LLL' }}
- td
- if userData.loginDisabled
- | {{_ 'no'}}
- else
- | {{_ 'yes'}}
- if userData.loginDisabled
- td <s>{{_ userData.authenticationMethod }}</s>
- else
- td {{_ userData.authenticationMethod }}
- td
- a.edit-user
- i.fa.fa-edit
- | {{_ '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)
- label
- | {{_ 'username'}}
- span.error.hide.username-taken
- | {{_ 'error-username-taken'}}
- if isLdap
- input.js-profile-username(type="text" value=user.username readonly)
- else
- input.js-profile-username(type="text" value=user.username)
- label
- | {{_ 'email'}}
- span.error.hide.email-taken
- | {{_ 'error-email-taken'}}
- if isLdap
- input.js-profile-email(type="email" value="{{user.emails.[0].address}}" readonly)
- else
- input.js-profile-email(type="email" value="{{user.emails.[0].address}}")
- label
- | {{_ 'admin'}}
- select.select-role.js-profile-isadmin
- option(value="false") {{_ 'no'}}
- option(value="true" selected="{{user.isAdmin}}") {{_ 'yes'}}
- label
- | {{_ 'active'}}
- select.select-active.js-profile-isactive
- option(value="false") {{_ 'yes'}}
- option(value="true" selected="{{user.loginDisabled}}") {{_ 'no'}}
- label
- | {{_ 'authentication-type'}}
- select.select-authenticationMethod.js-authenticationMethod
- each authentications
- if isSelected value
- option(value="{{value}}" selected) {{_ value}}
- else
- option(value="{{value}}") {{_ value}}
- hr
- label
- | {{_ 'password'}}
- input.js-profile-password(type="password")
- div.buttonsContainer
- input.primary.wide(type="submit" value="{{_ 'save'}}")
- // div
- // input#deleteButton.primary.wide(type="button" value="{{_ 'delete'}}")
- template(name="newUserPopup")
- form
- //label.hide.userId(type="text" value=user._id)
- label
- | {{_ 'fullname'}}
- input.js-profile-fullname(type="text" value="")
- label
- | {{_ 'username'}}
- span.error.hide.username-taken
- | {{_ 'error-username-taken'}}
- //if isLdap
- // input.js-profile-username(type="text" value=user.username readonly)
- //else
- input.js-profile-username(type="text" value="")
- label
- | {{_ 'email'}}
- span.error.hide.email-taken
- | {{_ 'error-email-taken'}}
- //if isLdap
- // input.js-profile-email(type="email" value="{{user.emails.[0].address}}" readonly)
- //else
- input.js-profile-email(type="email" value="")
- label
- | {{_ 'admin'}}
- select.select-role.js-profile-isadmin
- option(value="false" selected="selected") {{_ 'no'}}
- option(value="true") {{_ 'yes'}}
- label
- | {{_ 'active'}}
- select.select-active.js-profile-isactive
- option(value="false" selected="selected") {{_ 'yes'}}
- option(value="true") {{_ 'no'}}
- label
- | {{_ 'authentication-type'}}
- select.select-authenticationMethod.js-authenticationMethod
- each authentications
- if isSelected value
- option(value="{{value}}" selected) {{_ value}}
- else
- option(value="{{value}}") {{_ value}}
- hr
- label
- | {{_ 'password'}}
- input.js-profile-password(type="password")
- div.buttonsContainer
- input.primary.wide(type="submit" value="{{_ 'save'}}")
|