source: trunk/themes/default/template/search.tpl @ 28732

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

feature 3091: remove inline CSS (but doesn't work with selectize)

  • Property svn:eol-style set to LF
File size: 5.9 KB
Line 
1{* Example of resizeable *}
2{*
3{include file='include/resize.inc.tpl'}
4*}
5
6{combine_script id='jquery.selectize' load='footer' path='themes/default/js/plugins/selectize.min.js'}
7{combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.dark.css"}
8
9{footer_script}
10jQuery(document).ready(function() {
11  jQuery("#authors, #tags, #categories").selectize({
12    plugins: ['remove_button']
13  });
14});
15{/footer_script}
16
17{if isset($MENUBAR)}{$MENUBAR}{/if}
18<div id="content" class="content{if isset($MENUBAR)} contentWithMenu{/if}">
19
20        <div class="titrePage">
21                <ul class="categoryActions">
22                        {combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'}
23                        <li><a href="{$U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}" class="pwg-state-default pwg-button">
24                                <span class="pwg-icon pwg-icon-help"></span><span class="pwg-button-text">{'Help'|@translate}</span>
25                        </a></li>
26                </ul>
27                <h2><a href="{$U_HOME}">{'Home'|@translate}</a>{$LEVEL_SEPARATOR}{'Search'|@translate}</h2>
28        </div>
29
30{include file='infos_errors.tpl'}
31
32<form class="filter" method="post" name="search" action="{$F_SEARCH_ACTION}">
33<fieldset>
34  <legend>{'Search for words'|@translate}</legend>
35  <p>
36    <input type="text" name="search_allwords">
37    <br>
38    <label><input type="radio" name="mode" value="AND" checked="checked">{'Search for all terms'|@translate}</label>
39    <label><input type="radio" name="mode" value="OR">{'Search for any term'|@translate}</label>
40  </p>
41
42  <p>
43    <strong>{'Apply on properties'|translate}</strong><br>
44    <label><input type="checkbox" name="fields[]" value="name" checked="checked">{'Photo title'|translate}</label>
45    <label><input type="checkbox" name="fields[]" value="comment" checked="checked">{'Photo description'|translate}</label>
46    <label><input type="checkbox" name="fields[]" value="file" checked="checked">{'File name'|translate}</label>
47  </p>
48
49</fieldset>
50
51<fieldset>
52  <legend>{'Search for Author'|@translate}</legend>
53  <p>
54    <select id="authors" placeholder="{'Type in a search term'|translate}" name="authors[]" multiple>
55{foreach from=$AUTHORS item=author}
56      <option value="{$author.author|strip_tags:false|escape:html}">{$author.author|strip_tags:false} ({$author.counter|translate_dec:'%d photo':'%d photos'})</option>
57{/foreach}
58    </select>
59  </p>
60</fieldset>
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 class="submit" type="submit" name="submit" value="{'Submit'|@translate}">
139  <input class="submit" 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.