{* $Id$ *} {* parameters used in this template: * filegals_manager : If value not empty, adds hidden input filegals_manager value=$filegals_manager * whatlabel : Change form title. Default value (if $whatlabel empty) is "Find". If $whatlabel is not empty, the text presented is $whatlabel content * exact_match : If set adds exact_match field * types : If not empty adds type dropdown whith types array values * types_tag : HTML element used to display types ('select' or 'checkbox'). Defaults to 'select'. * find_type : types selected value(s) - has to be a string for types_tag 'select' and an array for 'checkbox' * topics : If not empty adds topic dropdown with topics array values * find_show_languages : If value = 'y' adds lang dropdown with languages value dropdown * find_lang : lang dropdown selected value * find_show_categories : If value = 'y' adds categories dropdown with categories array values * find_show_categories_multi : If value = 'y' adds categories dropdown with categories array values with multi selector * find_categId : categories selected value * find_show_num_rows : If value = 'y' adds maxRecords field. Value: maxRecords * find_show_date_range : If value = 'y' adds date range to filter within * find_show_orphans : If value = 'y' adds a checkbox orphan * find_show_sub : If value = 'y' add a checkbox offering to search child file galleries * filters : array( filter_field1 => array( option1_value => option1_text, ... ), filter_field2 => ... ) * filter_names : array( filter_field1 => filter_field1_name, ... ) * filter_values : array( filter_fieldX => filter_fieldX_selected_value, ... ) * autocomplete : name of the variable you want for autocomplete of the input field (only for * find_other : If value != '', show an input box label with find_other * find_in : Description of the searched content (displayed in a tooltip on the search term field, should possibly be reviewed) * map_only : to only show the pages map (used with tablesorter since other find functions aren't needed) * Usage examples : {include file='find.tpl'} * {include file='find.tpl' find_show_languages='y' find_show_categories='y' find_show_num_rows='y'} *}
{if !isset($map_only) or $map_only ne 'y'}
{if !empty($filegals_manager)}{/if} {query _type='form_input' maxRecords='NULL' type='NULL' types='NULL' find='NULL' topic='NULL' lang='NULL' exact_match='NULL' categId='NULL' cat_categories='NULL' filegals_manager='NULL' save='NULL' offset=0 searchlist='NULL' searchmap='NULL'}
{if isset($autocomplete)} {jq}$("#find").tiki("autocomplete", "{{$autocomplete}}");{/jq} {/if} {jq} jQuery("#find").tooltip(); {/jq}
{if !empty($find_show_sub) and $find_show_sub eq 'y'}
{/if} {if !empty($find) or !empty($find_type) or !empty($find_topic) or !empty($find_lang) or !empty($find_langOrphan) or !empty($find_categId) or !empty($find_orphans) or !empty($find_other_val) or $maxRecords ne $prefs.maxRecords}{* $find_date_from & $find_date_to get set usually *} {/if}
{if !empty($types) and ( !isset($types_tag) or $types_tag eq 'select' )}
{/if} {if !empty($topics)}
{/if} {if (isset($find_show_languages) && $find_show_languages eq 'y') and $prefs.feature_multilingual eq 'y'}
{if isset($find_show_languages_excluded) and $find_show_languages_excluded eq 'y'} {/if}
{/if} {if isset($find_show_date_range) && $find_show_date_range eq 'y'}
{html_select_date time=$find_date_from prefix="find_from_" month_format="%m"}
{html_select_date time=$find_date_to prefix="find_to_" month_format="%m"}
{/if} {if ((isset($find_show_categories) && $find_show_categories eq 'y') or (isset($find_show_categories_multi) && $find_show_categories_multi eq 'y')) and $prefs.feature_categories eq 'y' and !empty($categories)}
{if $find_show_categories_multi eq 'n' || $findSelectedCategoriesNumber <= 1}
{if $prefs.javascript_enabled eq 'y' && $find_show_categories_multi eq 'y'} {tr}Multiple select{/tr} {/if}
{/if}
{if count($categories) gt 0} {$cat_tree}
{select_all checkbox_names='cat_categories[]' label="{tr}Select/deselect all categories{/tr}"}
{else}
{tr}No categories defined{/tr}
{* end .clear *} {/if} {if $tiki_p_admin_categories eq 'y'} {/if}
{* end #multiselect *}
{* end #category_multiselect_find *}
{/if} {if !empty($types) and isset($types_tag) and $types_tag eq 'checkbox'}
{foreach key=key item=value from=$types}
{/foreach}
{/if} {if !empty($filters)}
{foreach key=key item=item from=$filters}
{/foreach}
{/if} {if !empty($find_durations)} {foreach key=key item=duration from=$find_durations}
{html_select_duration prefix=$duration.prefix default=$duration.default default_unit=$duration.default_unit}
{/foreach} {/if} {if !empty($show_find_orphans) and $show_find_orphans eq 'y'}
{/if} {if !empty($find_other)}
{/if} {if isset($find_show_num_rows) && $find_show_num_rows eq 'y'}
{/if} {/if} {if isset($gmapbuttons) && $gmapbuttons}
{if isset($mapview) && $mapview} {else} {/if}
{/if} {if (!isset($map_only) or $map_only ne 'y') or (isset($gmapbuttons) && $gmapbuttons)}
{/if}