| 1 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" |
|---|
| 2 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
|---|
| 3 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
|---|
| 4 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
|---|
| 5 | lang="en" |
|---|
| 6 | metal:use-macro="here/main_template/macros/master" |
|---|
| 7 | i18n:domain="plone"> |
|---|
| 8 | |
|---|
| 9 | <metal:head fill-slot="top_slot" |
|---|
| 10 | tal:define="dummy python:request.set('disable_border',1)" /> |
|---|
| 11 | <metal:block fill-slot="column_one_slot" /> |
|---|
| 12 | <metal:block fill-slot="column_two_slot" /> |
|---|
| 13 | |
|---|
| 14 | <div metal:fill-slot="main"> |
|---|
| 15 | |
|---|
| 16 | <h1 class="documentFirstHeading" |
|---|
| 17 | i18n:translate="heading_advanced_search">Advanced search for content</h1> |
|---|
| 18 | |
|---|
| 19 | <p i18n:translate="description_advanced_search"> |
|---|
| 20 | This search form enables you to find content on the site by |
|---|
| 21 | specifying one or more search terms. |
|---|
| 22 | <br /> |
|---|
| 23 | Remember that you can use the quick search anytime, it's normally |
|---|
| 24 | good enough, this search form is just if you want to be more specific. |
|---|
| 25 | </p> |
|---|
| 26 | |
|---|
| 27 | <form action="search" |
|---|
| 28 | class="enableAutoFocus" |
|---|
| 29 | method="get" |
|---|
| 30 | name="search" |
|---|
| 31 | tal:define="DateTime python:modules['DateTime'].DateTime"> |
|---|
| 32 | |
|---|
| 33 | <fieldset> |
|---|
| 34 | |
|---|
| 35 | <legend i18n:translate="legend_search_terms">Search Terms</legend> |
|---|
| 36 | |
|---|
| 37 | <div class="field"> |
|---|
| 38 | <label for="SearchableText" i18n:translate="label_search_text">Search Text</label> |
|---|
| 39 | |
|---|
| 40 | <div class="formHelp" i18n:translate="help_search_text"> |
|---|
| 41 | For a simple text search, enter your search term |
|---|
| 42 | here. Multiple words may be found by combining |
|---|
| 43 | them with <strong>AND</strong> and <strong>OR</strong>. |
|---|
| 44 | The text in this field will be matched with |
|---|
| 45 | items' contents, title and description. |
|---|
| 46 | </div> |
|---|
| 47 | |
|---|
| 48 | <input type="text" |
|---|
| 49 | id="SearchableText" |
|---|
| 50 | name="SearchableText" |
|---|
| 51 | size="25" |
|---|
| 52 | tal:attributes="value request/SearchableText|nothing" |
|---|
| 53 | /> |
|---|
| 54 | </div> |
|---|
| 55 | |
|---|
| 56 | <div class="field"> |
|---|
| 57 | <label for="Title" i18n:translate="label_title">Title</label> |
|---|
| 58 | |
|---|
| 59 | <div class="formHelp" i18n:translate="help_search_title"> |
|---|
| 60 | Return items matching this title. |
|---|
| 61 | </div> |
|---|
| 62 | |
|---|
| 63 | <input type="text" |
|---|
| 64 | id="Title" |
|---|
| 65 | name="Title" |
|---|
| 66 | size="25" |
|---|
| 67 | /> |
|---|
| 68 | </div> |
|---|
| 69 | |
|---|
| 70 | <div class="field"> |
|---|
| 71 | <label for="Subject" i18n:translate="label_categories">Categories</label> |
|---|
| 72 | |
|---|
| 73 | <div class="formHelp" i18n:translate="help_search_categories"> |
|---|
| 74 | Return items matching some or all of these Categories. |
|---|
| 75 | Multiple words may be found by pressing <strong>Ctrl</strong> |
|---|
| 76 | (or <strong>Apple</strong> key on Mac) while clicking the |
|---|
| 77 | keywords. |
|---|
| 78 | </div> |
|---|
| 79 | |
|---|
| 80 | <select name="Subject:list" |
|---|
| 81 | id="Subject" |
|---|
| 82 | size="7" |
|---|
| 83 | multiple="multiple" |
|---|
| 84 | tal:define="contentSubjects here/Subject; |
|---|
| 85 | usedSubjects python:here.portal_catalog.uniqueValuesFor('Subject');" |
|---|
| 86 | > |
|---|
| 87 | <option value="#" |
|---|
| 88 | tal:repeat="subject usedSubjects" |
|---|
| 89 | tal:content="subject" |
|---|
| 90 | tal:attributes="value subject" |
|---|
| 91 | i18n:domain="plone-metadata" |
|---|
| 92 | i18n:translate="" |
|---|
| 93 | >dummy</option> |
|---|
| 94 | </select> |
|---|
| 95 | <br /> |
|---|
| 96 | |
|---|
| 97 | <input type="radio" |
|---|
| 98 | name="Subject_usage:ignore_empty" |
|---|
| 99 | id="Subject_or" |
|---|
| 100 | value="" |
|---|
| 101 | class="noborder" |
|---|
| 102 | tal:attributes="checked python:1"/> |
|---|
| 103 | <label for="Subject_or" i18n:translate="description_subject_or"> |
|---|
| 104 | Match any |
|---|
| 105 | </label> |
|---|
| 106 | <br /> |
|---|
| 107 | |
|---|
| 108 | <input type="radio" |
|---|
| 109 | name="Subject_usage:ignore_empty" |
|---|
| 110 | id="Subject_and" |
|---|
| 111 | value="operator:and" |
|---|
| 112 | class="noborder" |
|---|
| 113 | tal:attributes="checked python:0"/> |
|---|
| 114 | <label for="Subject_and" i18n:translate="description_subject_and"> |
|---|
| 115 | Match all |
|---|
| 116 | </label> |
|---|
| 117 | </div> |
|---|
| 118 | |
|---|
| 119 | <div class="field"> |
|---|
| 120 | <label for="Description" i18n:translate="label_description">Description</label> |
|---|
| 121 | |
|---|
| 122 | <div class="formHelp" i18n:translate="help_search_description"> |
|---|
| 123 | Return items matching this description. |
|---|
| 124 | Multiple words may be found |
|---|
| 125 | by combining them with <strong>AND</strong> and <strong>OR</strong>. |
|---|
| 126 | </div> |
|---|
| 127 | |
|---|
| 128 | <input type="text" |
|---|
| 129 | id="Description" |
|---|
| 130 | name="Description" |
|---|
| 131 | size="25" |
|---|
| 132 | /> |
|---|
| 133 | </div> |
|---|
| 134 | |
|---|
| 135 | <div class="field"> |
|---|
| 136 | <label for="created" i18n:translate="label_new_items_since">New items since</label> |
|---|
| 137 | |
|---|
| 138 | <div class="formHelp" i18n:translate="help_search_new_items_since"> |
|---|
| 139 | Return items added since you were last logged on, the last week, etc. |
|---|
| 140 | </div> |
|---|
| 141 | |
|---|
| 142 | <tal:datetime define="today python:DateTime().earliestTime()"> |
|---|
| 143 | <select name="created:list:date" |
|---|
| 144 | id="created" |
|---|
| 145 | tal:define="yesterday python:(today-1).Date(); |
|---|
| 146 | lastweek python:(today-7).Date(); |
|---|
| 147 | lastmonth python:(today-31).Date(); |
|---|
| 148 | ever string:1970/02/01;"> |
|---|
| 149 | <option value="#" |
|---|
| 150 | tal:condition="not: isAnon" |
|---|
| 151 | tal:attributes="value python:member is not None and member.getProperty('last_login_time') or today" |
|---|
| 152 | i18n:translate="last_login">Last log-in</option> |
|---|
| 153 | <option value="#" tal:attributes="value yesterday" i18n:translate="time_yesterday"> Yesterday </option> |
|---|
| 154 | <option value="#" tal:attributes="value lastweek" i18n:translate="time_last_week"> Last week </option> |
|---|
| 155 | <option value="#" tal:attributes="value lastmonth" i18n:translate="time_last_month"> Last month </option> |
|---|
| 156 | <option value="#" tal:attributes="value ever" selected="selected" i18n:translate="time_ever"> Ever </option> |
|---|
| 157 | </select> |
|---|
| 158 | </tal:datetime> |
|---|
| 159 | |
|---|
| 160 | <input type="hidden" name="created_usage" value="range:min" /> |
|---|
| 161 | </div> |
|---|
| 162 | |
|---|
| 163 | <div class="field" tal:define="portal_types portal/portal_types;"> |
|---|
| 164 | <label i18n:translate="label_item_type">Item type</label> |
|---|
| 165 | |
|---|
| 166 | <div class="formHelp" i18n:translate="help_search_item_type"> |
|---|
| 167 | Return items of a specific type. |
|---|
| 168 | </div> |
|---|
| 169 | |
|---|
| 170 | <span class="optionsToggle"> |
|---|
| 171 | <input type="checkbox" |
|---|
| 172 | onclick="javascript:toggleSelect(this, 'portal_type:list', true);" |
|---|
| 173 | name="pt_toggle" |
|---|
| 174 | value="#" |
|---|
| 175 | id="pt_toggle" |
|---|
| 176 | class="noborder" |
|---|
| 177 | checked="checked" /> |
|---|
| 178 | <label for="pt_toggle" |
|---|
| 179 | i18n:translate="label_toggle" |
|---|
| 180 | >Select All/None |
|---|
| 181 | </label> |
|---|
| 182 | </span> |
|---|
| 183 | <br /> |
|---|
| 184 | <div style="float:left; margin-right: 2em;" |
|---|
| 185 | tal:define="allTypes python:putils.getUserFriendlyTypes(); |
|---|
| 186 | typeLists python:here.createMultiColumnList(allTypes, numCols=2, sort_on='self');" |
|---|
| 187 | tal:repeat="sublist typeLists"> |
|---|
| 188 | <tal:items repeat="type sublist"> |
|---|
| 189 | <input type="checkbox" |
|---|
| 190 | name="portal_type:list" |
|---|
| 191 | value="#" |
|---|
| 192 | class="noborder" |
|---|
| 193 | checked="checked" |
|---|
| 194 | tal:attributes="value type; |
|---|
| 195 | id string:portal_type_${repeat/sublist/number}_${repeat/type/number}"/> |
|---|
| 196 | <label for="" |
|---|
| 197 | i18n:translate="" |
|---|
| 198 | tal:attributes="for string:portal_type_${repeat/sublist/number}_${repeat/type/number}" |
|---|
| 199 | tal:content="python: portal_types.getTypeInfo(type).Title()" |
|---|
| 200 | /> |
|---|
| 201 | <br /> |
|---|
| 202 | </tal:items> |
|---|
| 203 | </div> |
|---|
| 204 | </div> |
|---|
| 205 | |
|---|
| 206 | <div class="visualClear" id="clear-space-before-author"><!-- --></div> |
|---|
| 207 | <br /> |
|---|
| 208 | |
|---|
| 209 | <div class="field"> |
|---|
| 210 | <label for="Creator" i18n:translate="label_author">Author</label> |
|---|
| 211 | |
|---|
| 212 | <div class="formHelp" i18n:translate="help_search_author"> |
|---|
| 213 | Return items created by a particular person. |
|---|
| 214 | </div> |
|---|
| 215 | |
|---|
| 216 | <tal:creators tal:define="creators python:portal.portal_catalog.uniqueValuesFor('Creator')"> |
|---|
| 217 | <select name="Creator" |
|---|
| 218 | id="Creator" |
|---|
| 219 | tal:condition="python: len(creators) <= 30"> |
|---|
| 220 | <option value="" i18n:translate="label_any_author">Any Author</option> |
|---|
| 221 | <metal:block tal:repeat="creator creators"> |
|---|
| 222 | <option value="" tal:attributes="value creator" tal:content="creator"> username </option> |
|---|
| 223 | </metal:block> |
|---|
| 224 | </select> |
|---|
| 225 | |
|---|
| 226 | <input name="Creator" |
|---|
| 227 | tal:condition="python: len(creators) > 30 " /> |
|---|
| 228 | </tal:creators> |
|---|
| 229 | </div> |
|---|
| 230 | |
|---|
| 231 | |
|---|
| 232 | <div class="visualClear" id="clear-space-before-submit"><!-- --></div> |
|---|
| 233 | |
|---|
| 234 | <div class="formControls"> |
|---|
| 235 | <input class="context" |
|---|
| 236 | type="submit" |
|---|
| 237 | name="submit" |
|---|
| 238 | value="Search" |
|---|
| 239 | i18n:attributes="value label_search;" |
|---|
| 240 | /> |
|---|
| 241 | </div> |
|---|
| 242 | |
|---|
| 243 | </fieldset> |
|---|
| 244 | |
|---|
| 245 | </form> |
|---|
| 246 | |
|---|
| 247 | </div> |
|---|
| 248 | |
|---|
| 249 | </html> |
|---|