[%# Interest search, based on code from LiveJournal. # # Authors: # Jen Griffin # # Copyright (c) 2010-2013 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" ) -%] [%- sections.head = BLOCK %] [% END -%] [%- sections.title='.title' | ml -%] [%- IF warn_toolong %]

[% warn_toolong %]

[% END -%]

[% '/directory/index.tt.int_multiple' | ml %]

[% form.textbox( name = 'int', value = interest, # escaped in the controller size = 20 ) %]
[% form.submit( value = dw.ml( "interests.interested.btn" ) ) %]
[% form.hidden( name = 'mode', value = 'enmasse' ) %]
[% form.textbox( name = 'fromuser', size = 20 ) %]
[% form.submit( value = dw.ml( "interests.enmasse.btn" ) ) %]

[% '.morestuff2' | ml(aopts = "href='$site.root/interests'") %]

[% ".header" | ml(interest = interest) %]

[%- IF allcount -%]
[% '.filterlink.label' | ml %]  [%- FOREACH type = type_list; link = type_link(type); IF type != 'none' ; ' | ' ; END; IF link %][% END; ".filterlink.$type" | ml; IF link ; '' ; END; END -%]
[%- FOREACH not_interested -%]

[%- intadd = dw.create_url( '/interests', args => { mode = 'add', intid = intid } ) -%] [%- '.addint3' | ml(int = int, aopts = "href='${intadd}'") -%]

[%- END -%] [%- UNLESS comm_count -%]

[%- '.nocomms2' | ml(aopts = "href='$site.root/communities/new'", num = query_count) %]

[%- END -%]

[%- IF type_count.defined -%] [% '.filtered' | ml(num = allcount, count = type_count) %] [%- ELSE -%] [% '.matches2' | ml(num = allcount) %] [%- END -%]

[%- IF data -%]
[%- ELSIF filtered -%]

[% '.nomatch' | ml(link = type_link('none')) %]

[%- ELSIF allcount && ! filtered -%]

[% '.noshown' | ml %]

[%- END -%] [%- ELSE -%]

[%- '.nocomms2' | ml(aopts = "href='$site.root/communities/new'", num = query_count) %]

[%- IF no_users -%] [%- '.nousers3' | ml(aopts = "href='$site.root/interests?mode=addnew&keyword=$no_users'", num = no_users_count, interests = no_users ) %]

[%- ELSE -%] [%- '.notall' | ml %]

[%- FOREACH not_interested -%]

[%- intadd = dw.create_url( '/interests', args => { mode = 'add', intid = intid } ) -%] [%- '.addint3' | ml(int = int, aopts = "href='${intadd}'") -%]

[%- END -%] [%- END -%] [%- END -%]