1 | <?php |
---|
2 | /** |
---|
3 | * @file views-exposed-form.tpl.php |
---|
4 | * |
---|
5 | * This template handles the layout of the views exposed filter form. |
---|
6 | * |
---|
7 | * Variables available: |
---|
8 | * - $widgets: An array of exposed form widgets. Each widget contains: |
---|
9 | * - $widget->label: The visible label to print. May be optional. |
---|
10 | * - $widget->operator: The operator for the widget. May be optional. |
---|
11 | * - $widget->widget: The widget itself. |
---|
12 | * - $sort_by: The select box to sort the view using an exposed form. |
---|
13 | * - $sort_order: The select box with the ASC, DESC options to define order. May be optional. |
---|
14 | * - $items_per_page: The select box with the available items per page. May be optional. |
---|
15 | * - $offset: A textfield to define the offset of the view. May be optional. |
---|
16 | * - $reset_button: A button to reset the exposed filter applied. May be optional. |
---|
17 | * - $button: The submit button for the form. |
---|
18 | * |
---|
19 | * @ingroup views_templates |
---|
20 | */ |
---|
21 | ?> |
---|
22 | <?php if (!empty($q)): ?> |
---|
23 | <?php |
---|
24 | // This ensures that, if clean URLs are off, the 'q' is added first so that |
---|
25 | // it shows up first in the URL. |
---|
26 | print $q; |
---|
27 | ?> |
---|
28 | <?php endif; ?> |
---|
29 | <div class="views-exposed-form"> |
---|
30 | <div class="views-exposed-widgets clear-block"> |
---|
31 | <?php foreach ($widgets as $id => $widget): ?> |
---|
32 | <div class="views-exposed-widget views-widget-<?php print $id; ?>"> |
---|
33 | <?php if (!empty($widget->label)): ?> |
---|
34 | <label for="<?php print $widget->id; ?>"> |
---|
35 | <?php print $widget->label; ?> |
---|
36 | </label> |
---|
37 | <?php endif; ?> |
---|
38 | <?php if (!empty($widget->operator)): ?> |
---|
39 | <div class="views-operator"> |
---|
40 | <?php print $widget->operator; ?> |
---|
41 | </div> |
---|
42 | <?php endif; ?> |
---|
43 | <div class="views-widget"> |
---|
44 | <?php print $widget->widget; ?> |
---|
45 | </div> |
---|
46 | </div> |
---|
47 | <?php endforeach; ?> |
---|
48 | <?php if (!empty($sort_by)): ?> |
---|
49 | <div class="views-exposed-widget views-widget-sort-by"> |
---|
50 | <?php print $sort_by; ?> |
---|
51 | </div> |
---|
52 | <div class="views-exposed-widget views-widget-sort-order"> |
---|
53 | <?php print $sort_order; ?> |
---|
54 | </div> |
---|
55 | <?php endif; ?> |
---|
56 | <?php if (!empty($items_per_page)): ?> |
---|
57 | <div class="views-exposed-widget views-widget-per-page"> |
---|
58 | <?php print $items_per_page; ?> |
---|
59 | </div> |
---|
60 | <?php endif; ?> |
---|
61 | <?php if (!empty($offset)): ?> |
---|
62 | <div class="views-exposed-widget views-widget-offset"> |
---|
63 | <?php print $offset; ?> |
---|
64 | </div> |
---|
65 | <?php endif; ?> |
---|
66 | <div class="views-exposed-widget views-submit-button"> |
---|
67 | <?php print $button; ?> |
---|
68 | </div> |
---|
69 | <?php if (!empty($reset_button)): ?> |
---|
70 | <div class="views-exposed-widget views-reset-button"> |
---|
71 | <?php print $reset_button; ?> |
---|
72 | </div> |
---|
73 | <?php endif; ?> |
---|
74 | </div> |
---|
75 | </div> |
---|