[%# Management pages for virtual gifts in the shop. # # Authors: # Jen Griffin # # Copyright (c) 2010-2020 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'. %] [%- CALL dw.active_resource_group( "foundation" ) -%] [%- dw.need_res( { group => "foundation" } "stc/css/pages/admin/vgifts.css" ) -%] [%- sections.head = BLOCK %] [% END %] [%- sections.title = '.title' | ml -%] [%- PROCESS admin/vgifts/_blocks.tt -%] [%- # selection tabs go here: List All, Filter By Tag, etc. -%] [%- IF tabs.$mode -%] [%- END -%]
[% dw.form_auth %] [% form.hidden( name = 'mode', value = 'activate' ) %]

[% '.header.featured' | ml %]

[%- IF feat.size -%]
    [%- FOREACH vg IN feat -%] [%- PROCESS display_gift -%] [%- END -%]
[%- ELSE -%]

[% '.queue.empty' | ml %]

[%- END -%]

[% '.header.nonfeatured' | ml %]

[%- IF nonfeat.size -%]
    [%- FOREACH vg IN nonfeat -%] [%- PROCESS display_gift -%] [%- END -%]
[%- ELSE -%]

[% '.queue.empty' | ml %]

[%- END -%]

[% form.submit( name = 'submit', value = dw.ml( '.submit.activate' ) ) %]

[%- IF mode == 'tags' -%]

[%- etag = tag | html; untag_txt = '.label.untagged' | ml -%] [% '.header.tagfilter' | ml %] [% tag ? etag : untag_txt %]

[%- IF approved_inactive.size -%]
    [%- IF tag && count -%]
  • [% '.label.untagged' | ml %] ([% count %])
  • [%- END -%] [%- FOREACH k IN approved_inactive.keys; NEXT IF k == tag; c = approved_inactive.$k; NEXT UNLESS c; tagname = k | url -%]
  • [% k | html %] ([% c %])
  • [%- END -%]
[%- END -%]
[%- END -%]
[% PROCESS linkback %]