mourningdove/views/directory/index.tt

131 lines
4.3 KiB
Text
Raw Normal View History

2026-05-24 01:03:05 +00:00
[%# TT conversion of directorysearch.bml & directory.bml
# Directory search, as inherited from LiveJournal.
#
# Authors:
# Jen Griffin <kareila@livejournal.com>
#
# 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.head = BLOCK %]
<style type='text/css'>
.field_class { text-align: right; }
</style>
[% END -%]
[%- usetitle = comm_page ? '.title.comm' : '.title.directory' -%]
[%- sections.title = usetitle | ml -%]
[%- emcolor='#c0c0c0'; # from global.look
%]
[%# building blocks for search table
%]
[%- BLOCK searchcrit %]
<tr bgcolor='[% emcolor %]'>
<td align='left' colspan='2'><b>[% name | ml %]</b></td>
</tr>
[% END -%]
[%- BLOCK searchform_before %]<tr align='left'><td>&nbsp;</td><td>[% END -%]
[%- BLOCK searchform_after %]</td></tr>[% END -%]
[%# end blocks
%]
[%- usethis = comm_page ? '.use.comm' : '.use.dir' -%]
<p>[% usethis | ml(aopts = "href='$site.root/community/search'",
sitename = site.nameshort) %]</p>
<hr />
<center>
<form style='margin-top: 1.5em' action="/directorysearch" method='GET'>
<table summary='' cellpadding='4' cellspacing='0' border='0'>
<!--- location (s_loc) --->
[% PROCESS searchcrit name = '.by_location';
PROCESS searchform_before; location_widget;
PROCESS searchform_after %]
<!---- update time (s_ut) ----->
[% PROCESS searchcrit name = '.by_updated';
PROCESS searchform_before;
'.updated_in_last' | ml %]
<select name="ut_days">
<option value="">-------</option>
<option value="1">[% '.opt.day' | ml %]</option>
<option value="7">[% '.opt.week' | ml %]</option>
<option value="30">[% '.opt.month' | ml %]</option>
</select>
[% PROCESS searchform_after %]
<!---- interest (s_int) ----->
[% PROCESS searchcrit name = '.by_interest';
PROCESS searchform_before %]
[% '.user_likes' | ml %] <input name="int_like" size='30' /><br />
[% '.int_multiple' | ml %]
[% PROCESS searchform_after %]
<!---- trust/watch (s_fr) ----->
[% circle_label = comm_page ? '.by_members' : '.by_circle';
PROCESS searchcrit name = circle_label;
PROCESS searchform_before;
IF comm_page %]
[% '.comm.member' | ml %] <input name="user_is_member" size='15' maxlength='25' />
[% ELSE -%]
[% '.user_trusts' | ml %] <input name="user_trusts" size='15' maxlength='25' /><br />
[% '.user_trusted_by' | ml %] <input name="user_trusted_by" size='15' maxlength='25' /><br />
[% '.user_watches' | ml %] <input name="user_watches" size='15' maxlength='25' /><br />
[% '.user_watched_by' | ml %] <input name="user_watched_by" size='15' maxlength='25' />
[% END -%]
[% PROCESS searchform_after %]
<!---- output formatting ----->
[% PROCESS searchcrit name = '.display_results';
PROCESS searchform_before %]
<table class="table" summary=''>
<tr>
<td align='right'>[% '.display_by' | ml %]</td>
<td>
<select name="opt_format">
<option value="pics">[% '.show.picture' | ml %]</option>
<option value="simple">[% '.show.text_only' | ml %]</option>
</select>
</td>
</tr>
<tr>
<td align='right'>[% '.records_per_page' | ml %]</td>
<td>
<select name="opt_pagesize">
<option value="25">25</option>
<option value="50">50</option>
<option value="100" selected='selected'>100</option>
<option value="200">200</option>
</select>
</td>
</tr>
</table>
[% PROCESS searchform_after %]
<!--- submit --->
[%- IF comm_page -%]
<input type='hidden' name='journaltype' value='C'>
[%- END -%]
<tr bgcolor='[% emcolor %]'><td colspan='2' align='center'>
<input type='submit' value="[% '.button.search' | ml %]" />
<input type='reset' value="[% '.button.clear' | ml %]" />
</td></tr>
</table>
</form>
</center>