Commit | Line | Data |
---|---|---|
7f254ad8 AE |
1 | <?php |
2 | ||
3 | /** | |
4 | * @file | |
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 clearfix"> | |
31 | <?php foreach ($widgets as $id => $widget): ?> | |
32 | <div id="<?php print $widget->id; ?>-wrapper" 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 | <?php if (!empty($widget->description)): ?> | |
47 | <div class="description"> | |
48 | <?php print $widget->description; ?> | |
49 | </div> | |
50 | <?php endif; ?> | |
51 | </div> | |
52 | <?php endforeach; ?> | |
53 | <?php if (!empty($sort_by)): ?> | |
54 | <div class="views-exposed-widget views-widget-sort-by"> | |
55 | <?php print $sort_by; ?> | |
56 | </div> | |
57 | <div class="views-exposed-widget views-widget-sort-order"> | |
58 | <?php print $sort_order; ?> | |
59 | </div> | |
60 | <?php endif; ?> | |
61 | <?php if (!empty($items_per_page)): ?> | |
62 | <div class="views-exposed-widget views-widget-per-page"> | |
63 | <?php print $items_per_page; ?> | |
64 | </div> | |
65 | <?php endif; ?> | |
66 | <?php if (!empty($offset)): ?> | |
67 | <div class="views-exposed-widget views-widget-offset"> | |
68 | <?php print $offset; ?> | |
69 | </div> | |
70 | <?php endif; ?> | |
71 | <div class="views-exposed-widget views-submit-button"> | |
72 | <?php print $button; ?> | |
73 | </div> | |
74 | <?php if (!empty($reset_button)): ?> | |
75 | <div class="views-exposed-widget views-reset-button"> | |
76 | <?php print $reset_button; ?> | |
77 | </div> | |
78 | <?php endif; ?> | |
79 | </div> | |
80 | </div> |