source: extensions/Versa/template/search.tpl

Last change on this file was 31943, checked in by lexming, 5 years ago

Fix script path conflicts

  • Property svn:executable set to *
File size: 7.0 KB
Line 
1<div id="mainBox">
2
3{* Example of resizeable *}
4{*
5{include file='include/resize.inc.tpl'}
6*}
7
8{combine_script id='jquery.selectize' load='footer' path='themes/default/js/plugins/selectize.min.js'}
9{combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.{$themeconf.colorscheme}.css"}
10
11{footer_script}
12jQuery(document).ready(function() {
13  jQuery("#authors, #tags, #categories").each(function() {
14    jQuery(this).selectize({
15      plugins: ['remove_button'],
16      maxOptions:jQuery(this).find("option").length
17    });
18  })
19});
20{/footer_script}
21
22{if isset($MENUBAR)}{$MENUBAR}{/if}
23{combine_script id='menu.switch' load='footer' require='jquery' path='themes/Versa/js/menuswitch.js'}
24
25<div id="contentBox">
26
27{if isset($errors) or isset($infos)}
28<div class="content messages">
29{include file='infos_errors.tpl'}
30</div>
31{/if}
32
33<div id="content" class="content">
34
35        <div class="titrePage">
36                <ul class="categoryActions">
37                        {combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'}
38                        <li><a href="{$U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}" class="pwg-state-default pwg-button">
39                                <span class="pwg-icon pwg-icon-help"></span><span class="pwg-button-text">{'Help'|@translate}</span>
40                        </a></li>
41                </ul>
42                <h2><a href="{$U_HOME}">{'Home'|@translate}</a>{$LEVEL_SEPARATOR}{'Search'|@translate}</h2>
43        </div>
44
45<form class="filter" method="post" name="search" action="{$F_SEARCH_ACTION}">
46<fieldset>
47  <legend>{'Search for words'|@translate}</legend>
48  <input type="text" size="24" name="search_allwords">
49  <ul>
50    <li>
51      <input id="srchAllTerms" type="radio" name="mode" value="AND" checked="checked">
52      <label class="radioLab" for="srchAllTerms">{'Search for all terms'|@translate}</label>
53    </li>
54    <li>
55      <input id="srchAnyTerm" type="radio" name="mode" value="OR">
56      <label class="radioLab" for="srchAnyTerm">{'Search for any term'|@translate}</label>
57    </li>
58  </ul>
59
60  <strong>{'Apply on properties'|@translate}</strong>
61  <ul>
62    <li>
63      <input id="srchPhoto" type="checkbox" name="fields[]" value="name" checked="checked">
64      <label class="checkLab" for="srchPhoto">{'Photo title'|@translate}</label>
65    </li>
66    <li>
67      <input id="srchPhotoDesc" type="checkbox" name="fields[]" value="comment" checked="checked">
68      <label class="checkLab" for="srchPhotoDesc">{'Photo description'|@translate}</label>
69    </li>
70    <li>
71      <input id="srchFile" type="checkbox" name="fields[]" value="name" checked="checked">
72      <label class="checkLab" for="srchFile">{'File name'|@translate}</label>
73    </li>
74{if isset($TAGS)}
75    <li>
76      <input id="srchTag" type="checkbox" name="search_in_tags" value="tags">
77      <label class="checkLab" for="srchTag">{'Tags'|@translate}</label>
78    </li>
79{/if}
80  </ul>
81
82</fieldset>
83
84{if count($AUTHORS)>=1}
85<fieldset>
86  <legend>{'Search for Author'|@translate}</legend>
87  <p>
88    <select id="authors" placeholder="{'Type in a search term'|@translate}" name="authors[]" multiple>
89{foreach from=$AUTHORS item=author}
90      <option value="{$author.author|strip_tags:false|escape:html}">{$author.author|strip_tags:false} ({$author.counter|@translate_dec:'%d photo':'%d photos'})</option>
91{/foreach}
92    </select>
93  </p>
94</fieldset>
95{/if}
96
97{if isset($TAGS)}
98<fieldset>
99  <legend>{'Search tags'|@translate}</legend>
100  <select id="tags" placeholder="{'Type in a search term'|@translate}" name="tags[]" multiple>
101{foreach from=$TAGS item=tag}
102    <option value="{$tag.id}">{$tag.name} ({$tag.counter|@translate_dec:'%d photo':'%d photos'})</option>
103{/foreach}
104  </select>
105  <ul>
106    <li>
107      <input id="srchAllTags" type="radio" name="tag_mode" value="AND" checked="checked">
108      <label class="radioLab" for="srchAllTags">{'All tags'|@translate}</label>
109    </li>
110    <li>
111      <input id="srchAnyTags" type="radio" name="tag_mode" value="OR">
112      <label class="radioLab" for="srchAnyTags">{'Any tags'|@translate}</label>
113    </li>
114  </ul>
115</fieldset>
116{/if}
117
118<fieldset>
119  <legend>{'Search by date'|@translate}</legend>
120  <p>
121    <select id="start_day" name="start_day">
122        <option value="0">--</option>
123      {section name=day start=1 loop=32}
124        <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$START_DAY_SELECTED}selected="selected"{/if}>{$smarty.section.day.index}</option>
125      {/section}
126    </select>
127    <select id="start_month" name="start_month">
128      {html_options options=$month_list selected=$START_MONTH_SELECTED}
129    </select>
130    <input id="start_year" name="start_year" type="text" size="4" maxlength="4" >
131    <input id="start_linked_date" name="start_linked_date" type="hidden" size="10" disabled="disabled">
132    <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>
133  </p>
134  <p class="date_arrow"><i class="fa fa-arrow-down" aria-hidden="true"></i></p>
135  <p>
136    <select id="end_day" name="end_day">
137        <option value="0">--</option>
138      {section name=day start=1 loop=32}
139        <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$END_DAY_SELECTED}selected="selected"{/if}>{$smarty.section.day.index}</option>
140      {/section}
141    </select>
142    <select id="end_month" name="end_month">
143      {html_options options=$month_list selected=$END_MONTH_SELECTED}
144    </select>
145    <input id="end_year" name="end_year" type="text" size="4" maxlength="4" >
146    <input id="end_linked_date" name="end_linked_date" type="hidden" size="10" disabled="disabled">
147    <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>
148  </p>
149  <ul>
150    <li>
151      <input id="srchCreation" type="radio" name="date_type" value="date_creation" checked="checked">
152      <label class="radioLab" for="srchCreation">{'Creation date'|@translate}</label>
153    </li>
154    <li>
155      <input id="srchPost" type="radio" name="date_type" value="date_available">
156      <label class="radioLab" for="srchPost">{'Post date'|@translate}</label>
157    </li>
158  </ul>
159</fieldset>
160
161<fieldset>
162  <legend>{'Search in albums'|@translate}</legend>
163  <p>
164    <select id="categories" name="cat[]" multiple>
165      {html_options options=$category_options selected=$category_options_selected}
166    </select>
167  </p>
168  <ul>
169    <li>
170      <input id="srchSubCat" type="checkbox" name="subcats-included" value="1" checked="checked">
171      <label class="checkLab" for="srchSubCat">{'Search in sub-albums'|@translate}</label>
172    </li>
173  </ul>
174</fieldset>
175<p>
176  <input type="submit" name="submit" value="{'Search'|@translate}">
177  <input type="reset" value="{'Reset'|@translate}">
178</p>
179</form>
180
181<script type="text/javascript"><!--
182document.search.search_allwords.focus();
183//--></script>
184
185</div> <!-- content -->
186</div> <!-- contentBox -->
187</div> <!-- mainBox -->
Note: See TracBrowser for help on using the repository browser.