[%# TT conversion of manage/invitecodes.bml # Invite code management system (user-facing). # # Authors: # Jen Griffin # # Copyright (c) 2011 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 %] [%- END -%] [%- IF print_req_form -%]

[% '.form.request.header' | ml %]

[% '.form.request.intro' | ml %]

[% dw.form_auth; reason_label = '.form.request.reason' | ml; submit_label = '.form.request.submit2' | ml; form.textbox( label = reason_label, name = 'reason', id = 'reason', size = 75, maxlength = 255 ); form.submit( value = submit_label ) %]
[%- END -%] [%- IF view_full; viewing_label = '.label.viewing.full' | ml(aopts = "href='/invite'"); ELSE; viewing_label = '.label.viewing.partial' | ml(aopts = "href='/invite?full=1'"); END -%]

[% viewing_label %]

[%- IF has_codes -%]

[% '.label.send' | ml(aopts = "href='/manage/circle/invite'") %]

[%- FOREACH code = invitecodes; IF code.is_used; recuser = code.recipient; END -%] [% END %]
[% '.header.code' | ml %] [% '.header.recipient' | ml %] [% '.header.used' | ml %] [% '.header.sent' | ml %] [% '.header.email' | ml %]
[% code.code %] [%- IF code.is_used; users.$recuser.ljuser_display; ELSE; link = create_link( code.code ); '.code.use' | ml(aopts = "href='$link'"); END -%] [% IF code.is_used; time_to_http( users.$recuser.timecreate ); END %] [% time_to_http( code.timesent ) %] [% code.email %]
[%- ELSE -%]

[% IF view_full; '.noinvitecodes' | ml; ELSE; '.noinvitecodes.partial' | ml; END %]

[%- END -%]