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

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

feature 3133: add colorscheme parameter for themes. This way we can use the
appropriate CSS for selectize (and other things)

  • Property svn:eol-style set to LF
File size: 6.0 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.{$themeconf.colorscheme}.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{if count($AUTHORS)>1}
52<fieldset>
53  <legend>{'Search for Author'|@translate}</legend>
54  <p>
55    <select id="authors" placeholder="{'Type in a search term'|translate}" name="authors[]" multiple>
56{foreach from=$AUTHORS item=author}
57      <option value="{$author.author|strip_tags:false|escape:html}">{$author.author|strip_tags:false} ({$author.counter|translate_dec:'%d photo':'%d photos'})</option>
58{/foreach}
59    </select>
60  </p>
61</fieldset>
62{/if}
63
64{if isset($TAGS)}
65<fieldset>
66  <legend>{'Search tags'|@translate}</legend>
67  <p>
68  <select id="tags" placeholder="{'Type in a search term'|translate}" name="tags[]" multiple>
69{foreach from=$TAGS item=tag}
70    <option value="{$tag.id}">{$tag.name} ({$tag.counter|translate_dec:'%d photo':'%d photos'})</option>
71{/foreach}
72  </select>
73  <label><span><input type="radio" name="tag_mode" value="AND" checked="checked"> {'All tags'|@translate}</span></label>
74  <label><span><input type="radio" name="tag_mode" value="OR"> {'Any tag'|@translate}</span></label>
75  </p>
76</fieldset>
77{/if}
78
79<fieldset>
80  <legend>{'Search by date'|@translate}</legend>
81  <ul>
82    <li><label>{'Kind of date'|@translate}</label></li>
83    <li><label>
84      <input type="radio" name="date_type" value="date_creation" checked="checked"> {'Creation date'|@translate}
85    </label></li>
86    <li><label>
87      <input type="radio" name="date_type" value="date_available"> {'Post date'|@translate}
88    </label></li>
89  </ul>
90  <ul>
91    <li><label>{'Date'|@translate}</label></li>
92    <li>
93      <select id="start_day" name="start_day">
94          <option value="0">--</option>
95        {section name=day start=1 loop=32}
96          <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$START_DAY_SELECTED}selected="selected"{/if}>{$smarty.section.day.index}</option>
97        {/section}
98      </select>
99      <select id="start_month" name="start_month">
100        {html_options options=$month_list selected=$START_MONTH_SELECTED}
101      </select>
102      <input id="start_year" name="start_year" type="text" size="4" maxlength="4" >
103      <input id="start_linked_date" name="start_linked_date" type="hidden" size="10" disabled="disabled">
104    </li>
105    <li>
106      <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>
107    </li>
108  </ul>
109  <ul>
110    <li><label>{'End-Date'|@translate}</label></li>
111    <li>
112      <select id="end_day" name="end_day">
113          <option value="0">--</option>
114        {section name=day start=1 loop=32}
115          <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$END_DAY_SELECTED}selected="selected"{/if}>{$smarty.section.day.index}</option>
116        {/section}
117      </select>
118      <select id="end_month" name="end_month">
119        {html_options options=$month_list selected=$END_MONTH_SELECTED}
120      </select>
121      <input id="end_year" name="end_year" type="text" size="4" maxlength="4" >
122      <input id="end_linked_date" name="end_linked_date" type="hidden" size="10" disabled="disabled">
123    </li>
124    <li>
125      <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>
126    </li>
127  </ul>
128</fieldset>
129
130<fieldset>
131  <legend>{'Search in albums'|@translate}</legend>
132  <p>
133    <select id="categories" name="cat[]" multiple>
134      {html_options options=$category_options selected=$category_options_selected}
135    </select>
136    <label><input type="checkbox" name="subcats-included" value="1" checked="checked"> {'Search in sub-albums'|@translate}</label>
137  </p>
138</fieldset>
139<p>
140  <input type="submit" name="submit" value="{'Submit'|@translate}">
141  <input type="reset" value="{'Reset'|@translate}">
142</p>
143</form>
144
145<script type="text/javascript"><!--
146document.search.search_allwords.focus();
147//--></script>
148
149</div> <!-- content -->
Note: See TracBrowser for help on using the repository browser.