Changeset 29751
- Timestamp:
- Sep 22, 2014, 8:34:24 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/simple_themes/simple/template/search.tpl
r13556 r29751 1 {combine_script id='jquery.selectize' load='footer' path='themes/default/js/plugins/selectize.min.js'} 2 {combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.{$themeconf.colorscheme}.css"} 3 4 {footer_script} 5 jQuery(document).ready(function() { 6 jQuery("#authors, #tags, #categories").each(function() { 7 jQuery(this).selectize({ 8 plugins: ['remove_button'], 9 maxOptions:jQuery(this).find("option").length 10 }); 11 }) 12 }); 13 {/footer_script} 14 1 15 {assign var='pagetitle' value='Search'} 2 16 {include file='pagetitle.tpl'} … … 13 27 </div> 14 28 {/if} 15 <form class="filter" method="post" name="search" action="{$F_SEARCH_ACTION}"> 16 <fieldset> 17 <legend>{'Filter'|@translate}</legend> 18 <label>{'Search for words'|@translate} 19 <input type="text" style="width: 300px" name="search_allwords" size="30" /> 20 </label> 21 <ul> 22 <li><label> 23 <input type="radio" name="mode" value="AND" checked="checked" />{'Search for all terms'|@translate} 24 </label></li> 25 <li><label> 26 <input type="radio" name="mode" value="OR" />{'Search for any terms'|@translate} 27 </label></li> 28 </ul> 29 <label>{'Search for Author'|@translate} 30 <input type="text" style="width: 300px" name="search_author" size="30" /> 31 </label> 32 </fieldset> 33 {if isset($TAG_SELECTION)} 34 <fieldset> 35 <legend>{'Search tags'|@translate}</legend> 36 {$TAG_SELECTION} 37 <label><span><input type="radio" name="tag_mode" value="AND" checked="checked" /> {'All tags'|@translate}</span></label> 38 <label><span><input type="radio" name="tag_mode" value="OR" /> {'Any tag'|@translate}</span></label> 39 </fieldset> 40 {/if} 41 <fieldset> 42 <legend>{'Search by Date'|@translate}</legend> 43 <ul> 44 <li><label>{'Kind of date'|@translate}</label></li> 45 <li><label> 46 <input type="radio" name="date_type" value="date_creation" checked="checked" />{'Creation date'|@translate} 47 </label></li> 48 <li><label> 49 <input type="radio" name="date_type" value="date_available" />{'Post date'|@translate} 50 </label></li> 51 </ul> 52 <ul> 29 30 <form class="filter" method="post" name="search" action="{$F_SEARCH_ACTION}"> 31 <fieldset> 32 <legend>{'Search for words'|@translate}</legend> 33 <p> 34 <input type="text" name="search_allwords"> 35 <br> 36 <label><input type="radio" name="mode" value="AND" checked="checked"> {'Search for all terms'|@translate}</label> 37 <label><input type="radio" name="mode" value="OR"> {'Search for any term'|@translate}</label> 38 </p> 39 40 <p> 41 <strong>{'Apply on properties'|translate}</strong><br> 42 <label><input type="checkbox" name="fields[]" value="name" checked="checked"> {'Photo title'|translate}</label> 43 <label><input type="checkbox" name="fields[]" value="comment" checked="checked"> {'Photo description'|translate}</label> 44 <label><input type="checkbox" name="fields[]" value="file" checked="checked"> {'File name'|translate}</label> 45 </p> 46 47 </fieldset> 48 49 {if count($AUTHORS)>=1} 50 <fieldset> 51 <legend>{'Search for Author'|@translate}</legend> 52 <p> 53 <select id="authors" placeholder="{'Type in a search term'|translate}" name="authors[]" multiple> 54 {foreach from=$AUTHORS item=author} 55 <option value="{$author.author|strip_tags:false|escape:html}">{$author.author|strip_tags:false} ({$author.counter|translate_dec:'%d photo':'%d photos'})</option> 56 {/foreach} 57 </select> 58 </p> 59 </fieldset> 60 {/if} 61 62 {if isset($TAGS)} 63 <fieldset> 64 <legend>{'Search tags'|@translate}</legend> 65 <p> 66 <select id="tags" placeholder="{'Type in a search term'|translate}" name="tags[]" multiple> 67 {foreach from=$TAGS item=tag} 68 <option value="{$tag.id}">{$tag.name} ({$tag.counter|translate_dec:'%d photo':'%d photos'})</option> 69 {/foreach} 70 </select> 71 <label><span><input type="radio" name="tag_mode" value="AND" checked="checked"> {'All tags'|@translate}</span></label> 72 <label><span><input type="radio" name="tag_mode" value="OR"> {'Any tag'|@translate}</span></label> 73 </p> 74 </fieldset> 75 {/if} 76 77 <fieldset> 78 <legend>{'Search by date'|@translate}</legend> 79 <ul> 80 <li><label>{'Kind of date'|@translate}</label></li> 81 <li><label> 82 <input type="radio" name="date_type" value="date_creation" checked="checked"> {'Creation date'|@translate} 83 </label></li> 84 <li><label> 85 <input type="radio" name="date_type" value="date_available"> {'Post date'|@translate} 86 </label></li> 87 </ul> 88 <ul> 53 89 <li><label>{'Date'|@translate}</label></li> 54 90 <li> 55 91 <select id="start_day" name="start_day"> 56 92 <option value="0">--</option> 57 93 {section name=day start=1 loop=32} 58 94 <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$START_DAY_SELECTED}selected="selected"{/if}>{$smarty.section.day.index}</option> 59 60 95 {/section} 96 </select> 61 97 <select id="start_month" name="start_month"> 62 63 98 {html_options options=$month_list selected=$START_MONTH_SELECTED} 99 </select> 64 100 <input id="start_year" name="start_year" type="text" size="4" maxlength="4" > 65 101 <input id="start_linked_date" name="start_linked_date" type="hidden" size="10" disabled="disabled"> … … 67 103 <li> 68 104 <a class="date_today" href="#" onClick="document.search.start_day.value={$smarty.now|date_format:"%d"};document.search.start_month.value={$smarty.now|date_format:"%m"};document.search.start_year.value={$smarty.now|date_format:"%Y"};return false;">{'today'|@translate}</a> 69 70 71 105 </li> 106 </ul> 107 <ul> 72 108 <li><label>{'End-Date'|@translate}</label></li> 73 109 <li> 74 110 <select id="end_day" name="end_day"> 75 76 77 78 79 111 <option value="0">--</option> 112 {section name=day start=1 loop=32} 113 <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$END_DAY_SELECTED}selected="selected"{/if}>{$smarty.section.day.index}</option> 114 {/section} 115 </select> 80 116 <select id="end_month" name="end_month"> 81 82 117 {html_options options=$month_list selected=$END_MONTH_SELECTED} 118 </select> 83 119 <input id="end_year" name="end_year" type="text" size="4" maxlength="4" > 84 120 <input id="end_linked_date" name="end_linked_date" type="hidden" size="10" disabled="disabled"> … … 86 122 <li> 87 123 <a class="date_today" href="#" onClick="document.search.end_day.value={$smarty.now|date_format:"%d"};document.search.end_month.value={$smarty.now|date_format:"%m"};document.search.end_year.value={$smarty.now|date_format:"%Y"};return false;">{'today'|@translate}</a> 88 </li> 89 </ul> 90 </fieldset> 91 <fieldset> 92 <legend>{'Search Options'|@translate}</legend> 93 <label>{'Search in albums'|@translate} 94 <select class="categoryList" name="cat[]" multiple="multiple" > 95 {html_options options=$category_options selected=$category_options_selected} 96 </select> 97 </label> 98 <ul> 99 <li><label>{'Search in sub-albums'|@translate}</label></li> 100 <li><label> 101 <input type="radio" name="subcats-included" value="1" checked="checked" />{'Yes'|@translate} 102 </label></li> 103 <li><label> 104 <input type="radio" name="subcats-included" value="0" />{'No'|@translate} 105 </label></li> 106 </ul> 107 </fieldset> 124 </li> 125 </ul> 126 </fieldset> 127 128 <fieldset> 129 <legend>{'Search in albums'|@translate}</legend> 108 130 <p> 109 <input class="submit" type="submit" name="submit" value="{'Submit'|@translate}" /> 110 <input class="submit" type="reset" value="{'Reset'|@translate}" /> 131 <select id="categories" name="cat[]" multiple> 132 {html_options options=$category_options selected=$category_options_selected} 133 </select> 134 <label><input type="checkbox" name="subcats-included" value="1" checked="checked"> {'Search in sub-albums'|@translate}</label> 111 135 </p> 112 </form> 113 <script type="text/javascript"><!-- 114 document.search.search_allwords.focus(); 115 //--></script> 136 </fieldset> 137 <p> 138 <input type="submit" name="submit" value="{'Submit'|@translate}"> 139 <input type="reset" value="{'Reset'|@translate}"> 140 </p> 141 </form> 142 143 <script type="text/javascript"><!-- 144 document.search.search_allwords.focus(); 145 //--></script> 146 116 147 </div> <!-- content -->
Note: See TracChangeset
for help on using the changeset viewer.