2014-02-12 05:23:40 -05:00
|
|
|
extends ../layout
|
|
|
|
|
|
|
|
block content
|
2014-07-07 13:06:12 -04:00
|
|
|
.content.content-alt
|
|
|
|
.container
|
|
|
|
.row
|
|
|
|
.col-md-10.col-md-offset-1
|
2019-03-18 06:24:54 -04:00
|
|
|
h1(ng-non-bindable) #{name || translate(translations.title)}
|
2018-09-25 09:10:06 -04:00
|
|
|
.card(ng-controller="UserMembershipController")
|
2014-07-07 13:06:12 -04:00
|
|
|
.page-header
|
|
|
|
.pull-right(ng-cloak)
|
2018-09-25 09:10:06 -04:00
|
|
|
small(ng-show="groupSize && selectedUsers.length == 0") !{translate("you_have_added_x_of_group_size_y", {addedUsersSize:"<strong>{{ users.length }}</strong>", groupSize:"<strong>{{ groupSize }}</strong>"})}
|
2014-07-07 13:06:12 -04:00
|
|
|
a.btn.btn-danger(
|
|
|
|
href,
|
|
|
|
ng-show="selectedUsers.length > 0"
|
|
|
|
ng-click="removeMembers()"
|
2018-09-25 09:10:06 -04:00
|
|
|
) #{translate(translations.remove)}
|
2018-11-13 05:32:51 -05:00
|
|
|
h3 #{translate(translations.subtitle)}
|
2014-07-07 13:06:12 -04:00
|
|
|
|
|
|
|
.row-spaced-small
|
2018-10-30 10:17:53 -04:00
|
|
|
div(ng-if="inputs.removeMembers.error", ng-cloak)
|
|
|
|
div.alert.alert-danger(ng-if="inputs.removeMembers.errorMessage")
|
|
|
|
| #{translate('error')}:
|
|
|
|
| {{ inputs.removeMembers.errorMessage }}
|
|
|
|
div.alert.alert-danger(ng-if="!inputs.removeMembers.errorMessage")
|
|
|
|
| #{translate('generic_something_went_wrong')}
|
2014-07-07 13:06:12 -04:00
|
|
|
ul.list-unstyled.structured-list(
|
|
|
|
select-all-list,
|
|
|
|
ng-cloak
|
|
|
|
)
|
|
|
|
li.container-fluid
|
|
|
|
.row
|
2020-08-12 10:19:14 -04:00
|
|
|
.col-md-4
|
2014-07-07 13:06:12 -04:00
|
|
|
input.select-all(
|
|
|
|
select-all,
|
|
|
|
type="checkbox"
|
|
|
|
)
|
2014-08-01 07:34:53 -04:00
|
|
|
span.header #{translate("email")}
|
2020-08-12 10:19:14 -04:00
|
|
|
.col-md-4
|
2014-08-01 07:34:53 -04:00
|
|
|
span.header #{translate("name")}
|
2020-08-12 10:19:14 -04:00
|
|
|
.col-md-2
|
|
|
|
span.header #{translate("last_login")}
|
2014-07-07 13:06:12 -04:00
|
|
|
.col-md-2
|
2018-06-07 11:53:19 -04:00
|
|
|
span.header #{translate("accepted_invite")}
|
2014-07-07 13:06:12 -04:00
|
|
|
li.container-fluid(
|
|
|
|
ng-repeat="user in users | orderBy:'email':true",
|
2018-09-25 09:10:06 -04:00
|
|
|
ng-controller="UserMembershipListItemController"
|
2014-07-07 13:06:12 -04:00
|
|
|
)
|
|
|
|
.row
|
2020-08-12 10:19:14 -04:00
|
|
|
.col-md-4
|
2014-07-07 13:06:12 -04:00
|
|
|
input.select-item(
|
|
|
|
select-individual,
|
|
|
|
type="checkbox",
|
|
|
|
ng-model="user.selected"
|
|
|
|
)
|
|
|
|
span.email {{ user.email }}
|
2020-08-12 10:19:14 -04:00
|
|
|
.col-md-4
|
2014-07-07 13:06:12 -04:00
|
|
|
span.name {{ user.first_name }} {{ user.last_name }}
|
2020-08-12 10:19:14 -04:00
|
|
|
.col-md-2
|
|
|
|
span.lastLogin {{ user.last_logged_in_at | formatDate:'Do MMM YYYY' }}
|
2014-07-07 13:06:12 -04:00
|
|
|
.col-md-2
|
|
|
|
span.registered
|
2018-11-19 04:41:34 -05:00
|
|
|
i.fa.fa-check.text-success(ng-show="!user.invite" aria-hidden="true")
|
2018-11-15 12:21:45 -05:00
|
|
|
span.sr-only(ng-show="!user.invite") #{translate('accepted_invite')}
|
2018-11-19 04:41:34 -05:00
|
|
|
i.fa.fa-times(ng-show="user.invite" aria-hidden="true")
|
2018-11-15 12:21:45 -05:00
|
|
|
span.sr-only(ng-show="user.invite") #{translate('invite_not_accepted')}
|
2014-07-07 13:06:12 -04:00
|
|
|
li(
|
|
|
|
ng-if="users.length == 0",
|
|
|
|
ng-cloak
|
|
|
|
)
|
|
|
|
.row
|
|
|
|
.col-md-12.text-centered
|
2014-08-01 07:34:53 -04:00
|
|
|
small #{translate("no_members")}
|
2014-07-07 13:06:12 -04:00
|
|
|
|
2018-04-17 11:09:22 -04:00
|
|
|
hr
|
2018-09-25 09:10:06 -04:00
|
|
|
div(ng-if="!groupSize || users.length < groupSize", ng-cloak)
|
2018-04-17 11:09:22 -04:00
|
|
|
p.small #{translate("add_more_members")}
|
2018-10-30 10:17:53 -04:00
|
|
|
div(ng-if="inputs.addMembers.error", ng-cloak)
|
|
|
|
div.alert.alert-danger(ng-if="inputs.addMembers.errorMessage")
|
|
|
|
| #{translate('error')}:
|
|
|
|
| {{ inputs.addMembers.errorMessage }}
|
|
|
|
div.alert.alert-danger(ng-if="!inputs.addMembers.errorMessage")
|
|
|
|
| #{translate('generic_something_went_wrong')}
|
2018-04-17 11:09:22 -04:00
|
|
|
form.form
|
|
|
|
.row
|
|
|
|
.col-xs-6
|
|
|
|
input.form-control(
|
|
|
|
name="email",
|
|
|
|
type="text",
|
|
|
|
placeholder="jane@example.com, joe@example.com",
|
2018-10-30 10:17:53 -04:00
|
|
|
ng-model="inputs.addMembers.content",
|
2018-04-17 11:09:22 -04:00
|
|
|
on-enter="addMembers()"
|
2018-11-13 05:32:51 -05:00
|
|
|
aria-describedby="add-members-description"
|
2018-04-17 11:09:22 -04:00
|
|
|
)
|
|
|
|
.col-xs-4
|
2019-12-05 08:58:08 -05:00
|
|
|
button.btn.btn-primary(ng-click="addMembers()", ng-disabled="inputs.addMembers.inflightCount > 0")
|
|
|
|
span(ng-show="inputs.addMembers.inflightCount === 0") #{translate("add")}
|
2020-04-22 05:35:33 -04:00
|
|
|
span(ng-show="inputs.addMembers.inflightCount > 0") #{translate("adding")}…
|
2018-09-25 09:10:06 -04:00
|
|
|
.col-xs-2(ng-if="paths.exportMembers", ng-cloak)
|
2018-11-13 05:32:51 -05:00
|
|
|
a(href=paths.exportMembers) #{translate('export_csv')}
|
|
|
|
.row
|
|
|
|
.col-xs-8
|
|
|
|
span.help-block #{translate('add_comma_separated_emails_help')}
|
|
|
|
|
2018-09-25 09:10:06 -04:00
|
|
|
div(ng-if="groupSize && users.length >= groupSize && users.length > 0", ng-cloak)
|
2018-04-17 11:09:22 -04:00
|
|
|
.row
|
2018-09-25 09:10:06 -04:00
|
|
|
.col-xs-2.col-xs-offset-10(ng-if="paths.exportMembers", ng-cloak)
|
2018-11-13 05:32:51 -05:00
|
|
|
a(href=paths.exportMembers) #{translate('export_csv')}
|
2020-08-12 10:19:14 -04:00
|
|
|
|
2014-07-07 13:06:12 -04:00
|
|
|
|
|
|
|
script(type="text/javascript").
|
2019-06-17 10:46:52 -04:00
|
|
|
window.users = !{StringHelper.stringifyJsonForScript(users)};
|
|
|
|
window.paths = !{StringHelper.stringifyJsonForScript(paths)};
|
2018-10-11 13:56:14 -04:00
|
|
|
window.groupSize = #{groupSize || 'null'};
|