aboutsummaryrefslogtreecommitdiffstats
path: root/template/yoga/search.tpl
blob: 1b03c34c3a73ad70290d9009a5658c026acc7c6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
{* $Id$ *}
<div id="content">

  <div class="titrePage">
    <ul class="categoryActions">
      <li><a href="{$U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}" rel="nofollow"><img src="{$themeconf.icon_dir}/help.png" class="button" alt="(?)"></a></li>
      <li><a href="{$U_HOME}" title="{'return to homepage'|@translate}" rel="home"><img src="{$themeconf.icon_dir}/home.png" class="button" alt="{'home'|@translate}"/></a></li>
    </ul>
    <h2>{'Search'|@translate}</h2>
  </div>

{if isset($errors) }
<div class="errors">
  <ul>
    {foreach from=$errors item=error}
    <li>{$error}</li>
    {/foreach}
  </ul>
</div>
{/if}

<form class="filter" method="post" name="search" action="{$F_SEARCH_ACTION}">
<fieldset>
  <legend>{'Filter'|@translate}</legend>
  <label>{'search_keywords'|@translate}
    <input type="text" style="width: 300px" name="search_allwords" size="30"  />
  </label>
  <ul>
    <li><label>
      <input type="radio" name="mode" value="AND" checked="checked" />{'search_mode_and'|@translate}
    </label></li>
    <li><label>
      <input type="radio" name="mode" value="OR" />{'search_mode_or'|@translate}
    </label></li>
  </ul>
  <label>{'search_author'|@translate}
    <input type="text" style="width: 300px" name="search_author" size="30"  />
  </label>
</fieldset>

{if isset($TAG_SELECTION)}
<fieldset>
  <legend>{'Search tags'|@translate}</legend>
  {$TAG_SELECTION}
  <label><span><input type="radio" name="tag_mode" value="AND" checked="checked" /> {'All tags'|@translate}</span></label>
  <label><span><input type="radio" name="tag_mode" value="OR" /> {'Any tag'|@translate}</span></label>
</fieldset>
{/if}

<fieldset>
  <legend>{'search_date'|@translate}</legend>
  <ul>
    <li><label>{'search_date_type'|@translate}</label></li>
    <li><label>
      <input type="radio" name="date_type" value="date_creation" checked="checked" />{'Creation date'|@translate}
    </label></li>
    <li><label>
      <input type="radio" name="date_type" value="date_available" />{'Post date'|@translate}
    </label></li>
  </ul>
  <ul>
    <li><label>{'search_date_from'|@translate}</label></li>
    <li>
      <select name="start_day">
          <option value="0">--</option>
        {section name=day start=1 loop=31}
          <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$START_DAY_SELECTED}selected="selected"{/if}>{$smarty.section.day.index}</option>
        {/section}
      </select>
      <select name="start_month">
        {html_options options=$month_list selected=$START_MONTH_SELECTED}
      </select>
      <input name="start_year" type="text" size="4" maxlength="4" >
    </li>
    <li>
      <a 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>
    </li>
  </ul>
  <ul>
    <li><label>{'search_date_to'|@translate}</label></li>
    <li>
      <select name="end_day">
          <option value="0">--</option>
        {section name=day start=1 loop=31}
          <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$END_DAY_SELECTED}selected="selected"{/if}>{$smarty.section.day.index}</option>
        {/section}
      </select>
      <select name="end_month">
        {html_options options=$month_list selected=$END_MONTH_SELECTED}
      </select>
      <input name="end_year" type="text" size="4" maxlength="4" >
    </li>
    <li>
      <a 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>
    </li>
  </ul>
</fieldset>

<fieldset>
  <legend>{'search_options'|@translate}</legend>
  <label>{'search_categories'|@translate}
    <select class="categoryList" name="cat[]" multiple="multiple" >
      {html_options options=$category_options selected=$category_options_selected}
    </select>
  </label>
  <ul>
    <li><label>{'search_subcats_included'|@translate}</label></li>
    <li><label>
      <input type="radio" name="subcats-included" value="1" checked="checked" />{'yes'|@translate}
    </label></li>
    <li><label>
      <input type="radio" name="subcats-included" value="0" />{'no'|@translate}
    </label></li>
  </ul>
  <ul>
    <li><label>{'search_sort'|@translate}</label></li>
    <li><label>
      <input type="radio" name="sd" value="AND" />{'search_ascending'|@translate}
    </label></li>
    <li><label>
      <input type="radio" name="sd" value="d" checked="checked" />{'search_descending'|@translate}
    </label></li>
  </ul>
</fieldset>
<p>
  <input class="submit" type="submit" name="submit" value="{'submit'|@translate}" />
  <input class="submit" type="reset" value="{'reset'|@translate}" />
</p>
</form>

<script type="text/javascript"><!--
document.search.search_allwords.focus();
//--></script>

</div> <!-- content -->