show_search_form

NAML documentation   Watch a video
   Usages of this macro
... in search.naml
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
<macro name="show_search_form" requires="search">
    <div class="shaded-bg-color rounded">
        <n.page_node
Binary
Namespace: NodePageNamespace
Parameters: do
.search_form
Macro
Requires: node, searcher_tool
Parameters: author, starrer, query, days, style, do
.>
            <table>
                <tr>
                    <td class="verbose-search-box">
                        <style type="text/css">
                            div.field-title { margin-top: 0; }
                        </style>
                        <div class="second-font field-title">Search</div>
                        <n.case_author_search
Macro
Requires: search
Parameters: do
.>
                            <select name="author">
                                <option value="[n.author_param
Macro
/]" selected="true">posts by '<n.user
Binary
Namespace: SearchNamespace
Parameters: do
.name
Binary
Namespace: UserNamespace
Parameters: truncate
/>'</option>
                                <option value="">all posts</option>
                            </select>
                        </n.case_author_search.>
                        <n.search_query_field
Macro
Parameters: do
.input
Macro
Requires: field
Parameters: size, maxlength, tabindex, type
 size="40" />
                        <select name="days">
                            <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.not
Binary
Namespace: BasicNamespace
Parameters: condition
.contains_substring
Binary
Namespace: BasicNamespace
Parameters: string, substring
 string="-0-1-7-30-90-180-365-" substring="-[n.days
Binary
Namespace: SearchNamespace
/]-">
                                <then>
                                    <n.days_option
Macro
Requires: search
Parameters: text, value
. value="[n.days
Binary
Namespace: SearchNamespace
/]">past <n.days
Binary
Namespace: SearchNamespace
/> days</n.days_option.>
                                </then>
                            </n.if.not.contains_substring>
                            <n.days_option
Macro
Requires: search
Parameters: text, value
. value="0">all dates</n.days_option.>
                            <n.days_option
Macro
Requires: search
Parameters: text, value
. value="1">past 24 hours</n.days_option.>
                            <n.days_option
Macro
Requires: search
Parameters: text, value
. value="7">past week</n.days_option.>
                            <n.days_option
Macro
Requires: search
Parameters: text, value
. value="30">past month</n.days_option.>
                            <n.days_option
Macro
Requires: search
Parameters: text, value
. value="90">past 3 months</n.days_option.>
                            <n.days_option
Macro
Requires: search
Parameters: text, value
. value="180">past 6 months</n.days_option.>
                            <n.days_option
Macro
Requires: search
Parameters: text, value
. value="365">past year</n.days_option.>
                        </select>
                        &nbsp;<input type="submit" value="Go &raquo;" />
                    </td>
                    <td style="font-size:90%;padding:0 0 .3em 1em;vertical-align:bottom">
                        <div style="margin-bottom:.4em">
                            <a href="[n.advanced_search_path_using_params
Macro
Requires: node
Parameters: days
/]">Advanced Search</a>
                        </div>
                        <a href="[n.help
Binary
Namespace: NabbleNamespace
Parameters: do
.search
Binary
Namespace: HelpsNs
Parameters: do
.url
Binary
Namespace: HelpNs
/]">Show Tips</a>
                    </td>
                </tr>
            </table>
        </n.page_node.search_form.>
    </div>
</macro>