104 lines
3.4 KiB
Text
104 lines
3.4 KiB
Text
[%# communities/members/new.tt
|
|
|
|
Invite new members and show pending invites
|
|
|
|
Authors:
|
|
Afuna <coder.dw@afunamatata.com>
|
|
|
|
Copyright (c) 2015 by Dreamwidth Studios, LLC.
|
|
|
|
This program is free software; you may redistribute it and/or modify it under
|
|
the same terms as Perl itself. For a copy of the license, please reference
|
|
'perldoc perlartistic' or 'perldoc perlgpl'.
|
|
%]
|
|
|
|
[%- sections.title = ".title" | ml -%]
|
|
[%- CALL dw.active_resource_group( "foundation" ) -%]
|
|
|
|
[%- sections.head = BLOCK %]
|
|
<style type="text/css">
|
|
#content input[type="text"] {
|
|
width: auto;
|
|
}
|
|
</style>
|
|
[%- END -%]
|
|
|
|
[%- dw.need_res( { group => "foundation" }
|
|
"stc/css/components/inline-lists.css"
|
|
"stc/css/components/queues.css"
|
|
) -%]
|
|
|
|
[%- linkbar -%]
|
|
|
|
<form method="POST" action="[% form_invite_action_url %]">
|
|
[%- dw.form_auth -%]
|
|
<ul class="no-bullet">
|
|
[%- FOREACH row = [1..rows] -%]
|
|
<li class="row">
|
|
<div class="columns small-3">
|
|
[%- form.textbox( title = dw.ml( "Username" )
|
|
name = "user_$row",
|
|
class = "journaltype-textbox user-textbox"
|
|
) -%]
|
|
</div>
|
|
<div class="columns small-9"><ul class="inline-list">
|
|
[%- FOREACH role = roles -%]
|
|
<li>[%- form.checkbox_nested(
|
|
label=dw.ml( "/communities/members/edit.tt.role.$role" ),
|
|
id="${role}_${row}",
|
|
name="user_role_$row",
|
|
value=role )
|
|
-%]</li>
|
|
[%- END -%]
|
|
</ul></div>
|
|
</li>
|
|
[%- END -%]
|
|
</ul>
|
|
|
|
<input type="submit" class="button" value="[% '.invite.button' | ml %]" />
|
|
</form>
|
|
|
|
[%- IF sentinvite_list.size > 0 or has_active_filter -%]
|
|
<hr>
|
|
<h2>[%- ".header.pending" | ml -%]</h2>
|
|
|
|
[%- INCLUDE components/filter.tt
|
|
links => sentinvite_filters
|
|
-%]
|
|
|
|
[%- IF sentinvite_list.size > 0 -%]
|
|
<ul class="queue">
|
|
[%- FOREACH invite = sentinvite_list -%]
|
|
<li class="row queue-item">
|
|
<form method="POST" action="[%- form_revoke_action_url -%]">
|
|
[%- form.hidden( name = "revoke", value = invite.userid ) -%]
|
|
[%- dw.form_auth -%]
|
|
<div class="columns small-3">[%- invite.user -%]</div>
|
|
<div class="columns small-4">[%- role_strings = [] -%]
|
|
[%- FOREACH role = invite.roles -%]
|
|
[%- role_strings.push( dw.ml( "/communities/members/edit.tt.role.$role" ) ) -%]
|
|
[%- END -%]
|
|
[%- role_strings.join( ", " ) -%]</div>
|
|
<div class="columns small-3">
|
|
[% ".invite.header.inviter" | ml( user = invite.invited_by ) %]
|
|
<div class="timestamp">[%- invite.date -%]</div>
|
|
</div>
|
|
<div class="columns small-2">
|
|
[%- IF invite.status == "outstanding" -%]
|
|
<input type="submit" class="small secondary button" value="[%- ".button.cancel" | ml -%]">
|
|
[%- ELSE -%]
|
|
[%- invite.status -%]
|
|
[%- END -%]</div>
|
|
</form>
|
|
</li>
|
|
[%- END -%]
|
|
</ul>
|
|
|
|
[% INCLUDE components/pagination.tt
|
|
current => sentinvite_pages.current,
|
|
total_pages => sentinvite_pages.total_pages,
|
|
%]
|
|
[%- ELSE -%]
|
|
<div class="panel">[% ".empty.filter" | ml %]</div>
|
|
[%- END -%]
|
|
[%- END -%]
|