source: extensions/simple_themes/simple/template/search.tpl @ 29751

Last change on this file since 29751 was 29751, checked in by plg, 10 years ago

adapt the new core search.tpl to Simple (copied and modified)

File size: 5.6 KB
Line 
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}
5jQuery(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{assign var='pagetitle' value='Search'}
16{include file='pagetitle.tpl'}
17
18<div id="content">
19  {if isset($MENUBAR)}{$MENUBAR}{/if}
20  {if isset($errors) }
21  <div class="errors">
22    <ul>
23      {foreach from=$errors item=error}
24      <li>{$error}</li>
25      {/foreach}
26    </ul>
27  </div>
28  {/if}
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>
89    <li><label>{'Date'|@translate}</label></li>
90    <li>
91      <select id="start_day" name="start_day">
92          <option value="0">--</option>
93        {section name=day start=1 loop=32}
94          <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$START_DAY_SELECTED}selected="selected"{/if}>{$smarty.section.day.index}</option>
95        {/section}
96      </select>
97      <select id="start_month" name="start_month">
98        {html_options options=$month_list selected=$START_MONTH_SELECTED}
99      </select>
100      <input id="start_year" name="start_year" type="text" size="4" maxlength="4" >
101      <input id="start_linked_date" name="start_linked_date" type="hidden" size="10" disabled="disabled">
102    </li>
103    <li>
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>
105    </li>
106  </ul>
107  <ul>
108    <li><label>{'End-Date'|@translate}</label></li>
109    <li>
110      <select id="end_day" name="end_day">
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>
116      <select id="end_month" name="end_month">
117        {html_options options=$month_list selected=$END_MONTH_SELECTED}
118      </select>
119      <input id="end_year" name="end_year" type="text" size="4" maxlength="4" >
120      <input id="end_linked_date" name="end_linked_date" type="hidden" size="10" disabled="disabled">
121    </li>
122    <li>
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>
124    </li>
125  </ul>
126</fieldset>
127
128<fieldset>
129  <legend>{'Search in albums'|@translate}</legend>
130  <p>
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>
135  </p>
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"><!--
144document.search.search_allwords.focus();
145//--></script>
146
147</div> <!-- content -->
Note: See TracBrowser for help on using the repository browser.