|
| 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 | + |
| 15 | +{html_style} |
| 16 | +.ui-checkbox, .ui-radio, .ui-btn-text { |
| 17 | + z-index:0; |
| 18 | +} |
| 19 | + |
| 20 | +.form-actions { |
| 21 | + margin-top:3em; |
| 22 | + margin-bottom:3em; |
| 23 | +} |
| 24 | +{/html_style} |
| 25 | + |
1 | 26 | {include file='infos_errors.tpl'}
|
2 | 27 | <div data-role="content">
|
3 | 28 | <ul data-role="listview" data-inset="true">
|
|
6 | 31 |
|
7 | 32 |
|
8 | 33 | <form class="filter" method="post" name="search" action="{$F_SEARCH_ACTION}">
|
9 |
| -<fieldset data-role="controlgroup"> |
10 |
| - <legend>{'Filter'|@translate}</legend> |
11 |
| - <div data-role="fieldcontain"> |
12 |
| - <label for="search_allwords">{'Search for words'|@translate}</label> |
13 |
| - <input type="text" id="search_allwords" style="width: 300px" name="search_allwords" size="30"> |
14 |
| - </div> |
15 |
| - |
16 |
| - <input type="radio" name="mode" id="mode_and" value="AND" checked="checked"> |
17 |
| - <label for="mode_and">{'Search for all terms'|@translate}</label> |
18 |
| - <input type="radio" name="mode" id="mode_or" value="OR"> |
19 |
| - <label for="mode_or">{'Search for any term'|@translate}</label> |
20 |
| - <div data-role="fieldcontain"> |
21 |
| - <label for="search_author">{'Search for Author'|@translate}</label> |
22 |
| - <input type="text" style="width: 300px" name="search_author" id="search_author" size="30"> |
23 |
| - </div> |
24 |
| -</fieldset> |
| 34 | + <fieldset data-role="controlgroup"> |
| 35 | + <legend>{'Search for words'|@translate}</legend> |
25 | 36 |
|
26 |
| -{if isset($TAG_SELECTION)} |
27 |
| -<fieldset data-role="controlgroup"> |
28 |
| - <legend>{'Search tags'|@translate}</legend> |
29 |
| - {$TAG_SELECTION} |
| 37 | + <input type="text" name="search_allwords"> |
| 38 | + |
| 39 | + <input type="radio" name="mode" id="mode_and" value="AND" checked="checked"> |
| 40 | + <label for="mode_and">{'Search for all terms'|@translate}</label> |
| 41 | + |
| 42 | + <input type="radio" name="mode" id="mode_or" value="OR"> |
| 43 | + <label for="mode_or">{'Search for any term'|@translate}</label> |
| 44 | + </fieldset> |
| 45 | + |
| 46 | + <fieldset data-role="controlgroup"> |
| 47 | + <legend>{'Apply on properties'|translate}</legend> |
| 48 | + |
| 49 | + <input type="checkbox" name="fields[]" value="name" checked="checked" id="field-name"> |
| 50 | + <label for="field-name">{'Photo title'|translate}</label> |
| 51 | + |
| 52 | + <input type="checkbox" name="fields[]" value="comment" checked="checked" id="field-comment"> |
| 53 | + <label for="field-comment">{'Photo description'|translate}</label> |
| 54 | + |
| 55 | + <input type="checkbox" name="fields[]" value="file" checked="checked" id="field-file"> |
| 56 | + <label for="field-file">{'File name'|translate}</label> |
| 57 | + |
| 58 | +{if isset($TAGS)} |
| 59 | + <input type="checkbox" name="search_in_tags" value="tags" id="field-tags"> |
| 60 | + <label for="field-tags">{'Tags'|translate}</label> |
| 61 | +{/if} |
| 62 | + </fieldset> |
| 63 | + |
| 64 | +{if count($AUTHORS)>=1} |
| 65 | +<fieldset data-role="controlgroup"> |
| 66 | + <legend>{'Search for Author'|@translate}</legend> |
| 67 | + <select id="authors" placeholder="{'Type in a search term'|translate}" name="authors[]" multiple> |
| 68 | +{foreach from=$AUTHORS item=author} |
| 69 | + <option value="{$author.author|strip_tags:false|escape:html}">{$author.author|strip_tags:false} ({$author.counter|translate_dec:'%d photo':'%d photos'})</option> |
| 70 | +{/foreach} |
| 71 | + </select> |
30 | 72 | </fieldset>
|
| 73 | +{/if} |
31 | 74 |
|
| 75 | +{if isset($TAGS)} |
32 | 76 | <fieldset data-role="controlgroup">
|
| 77 | + <legend>{'Search tags'|@translate}</legend> |
| 78 | + <select id="tags" placeholder="{'Type in a search term'|translate}" name="tags[]" multiple> |
| 79 | +{foreach from=$TAGS item=tag} |
| 80 | + <option value="{$tag.id}">{$tag.name} ({$tag.counter|translate_dec:'%d photo':'%d photos'})</option> |
| 81 | +{/foreach} |
| 82 | + </select> |
33 | 83 | <input type="radio" name="tag_mode" id="tag_mode_and" value="AND" checked="checked">
|
34 | 84 | <label for="tag_mode_and">{'All tags'|@translate}</label>
|
| 85 | + |
35 | 86 | <input type="radio" name="tag_mode" id="tag_mode_or" value="OR">
|
36 | 87 | <label for="tag_mode_or">{'Any tag'|@translate}</label>
|
37 | 88 | </fieldset>
|
38 | 89 | {/if}
|
39 | 90 |
|
40 |
| -<div data-role="fieldcontain"> |
| 91 | +<fieldset data-role="controlgroup"> |
41 | 92 | <legend>{'Search in albums'|@translate}</legend>
|
42 |
| - <label for="categoryList">{'Albums'|@translate} |
43 |
| - <select class="categoryList" id="categoryList" name="cat[]" multiple="multiple" data-native-menu="false"> |
44 |
| - {html_options options=$category_options selected=$category_options_selected} |
45 |
| - </select> |
46 |
| - </label> |
47 |
| - <fieldset data-role="controlgroup"> |
48 |
| - <legend>{'Search in sub-albums'|@translate}</legend> |
49 |
| - <input type="radio" name="subcats-included" value="1" id="subcats-included-yes" checked="checked"> |
50 |
| - <label for="subcats-included-yes">{'Yes'|@translate}</label> |
51 |
| - <input type="radio" name="subcats-included" id="subcats-included-no" value="0"> |
52 |
| - <label for="subcats-included-no">{'No'|@translate}</label> |
53 |
| - </fieldset> |
54 |
| -</div> |
55 |
| -<p> |
56 |
| - <input class="submit" type="submit" name="submit" value="{'Submit'|@translate}"> |
57 |
| - <input class="submit" type="reset" value="{'Reset'|@translate}"> |
58 |
| -</p> |
| 93 | + <select id="categories" placeholder="{'Type in a search term'|translate}" name="cat[]" multiple> |
| 94 | + {html_options options=$category_options selected=$category_options_selected} |
| 95 | + </select> |
| 96 | + |
| 97 | + <input type="checkbox" name="subcats-included" value="1" checked="checked" id="subcats-included"> |
| 98 | + <label for="subcats-included">{'Search in sub-albums'|@translate}</label> |
| 99 | +</fieldset> |
| 100 | + |
| 101 | + |
| 102 | + <div class="form-actions"> |
| 103 | + <input class="submit" type="submit" name="submit" value="{'Submit'|@translate}"> |
| 104 | + </div> |
| 105 | + |
59 | 106 | </form>
|
60 | 107 |
|
61 | 108 | <script type="text/javascript"><!--
|
|
0 commit comments