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

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

feature 3091: search.php (advanced search), display a list of known authors instead of a text field.

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