|
12 | 12 | </style>
|
13 | 13 | <form id="SearchScan" action="{g->url}" method="get">
|
14 | 14 | <div id="gsContent" class="gcBorder1">
|
15 |
| - {* header *} |
16 |
| - <div class="gbBlock gcBackground1 gHeader"> |
17 |
| - <h2> {g->text text="Search the Gallery"} </h2> |
18 |
| - </div> |
19 |
| -
|
20 | 15 | {g->hiddenFormVars}
|
21 | 16 | <input type="hidden" name="{g->formVar var="controller"}" value="{$SearchScan.controller}"/>
|
22 | 17 | <input type="hidden" name="{g->formVar var="form[formName]"}" value="SearchScan"/>
|
|
36 | 31 | {
|
37 | 32 | document.getElementById(search_options[i]).checked = val;
|
38 | 33 | }
|
| 34 | + return false; |
39 | 35 | }
|
40 | 36 |
|
41 | 37 | function invertCheck() {
|
|
45 | 41 | o = document.getElementById(search_options[i]);
|
46 | 42 | o.checked = !o.checked;
|
47 | 43 | }
|
| 44 | + return false; |
48 | 45 | }
|
49 | 46 | {/literal}
|
50 | 47 | // ]]>
|
51 | 48 | </script>
|
52 | 49 |
|
53 | 50 | {* search form*}
|
54 |
| - <div class="gbBlock"> |
55 |
| - <div class="input-wrapper"> |
56 |
| - <input type="text" size="50" class="form-control" |
57 |
| - name="{g->formVar var="form[searchCriteria]"}" value="{$form.searchCriteria}"/> |
58 |
| - <script type="text/javascript"> |
59 |
| - document.getElementById('SearchScan')['{g->formVar var="form[searchCriteria]"}'].focus(); |
60 |
| - </script> |
61 |
| - <input type="submit" class="btn btn-primary" |
62 |
| - name="{g->formVar var="form[action][search]"}" value="{g->text text="Search"}"/> |
63 |
| -
|
64 |
| - {if isset($form.error.searchCriteria.missing)} |
65 |
| - <div class="giError"> |
66 |
| - {g->text text="You must enter some text to search for!"} |
67 |
| - </div> |
68 |
| - {/if} |
| 51 | + <div class="gbBlock form-group"> |
| 52 | + <div class="input-wrapper input-group col-xs-12 col-md-6"> |
| 53 | + <input type="text" |
| 54 | + size="50" |
| 55 | + class="form-control" |
| 56 | + title="{$form.searchCriteria}" |
| 57 | + aria-label="{$form.searchCriteria}" |
| 58 | + name="{g->formVar var="form[searchCriteria]"}" |
| 59 | + value="{$form.searchCriteria}"/> |
| 60 | + <div class="input-group-btn"> |
| 61 | + <input type="submit" class="btn btn-primary" |
| 62 | + name="{g->formVar var="form[action][search]"}" value="{g->text text="Search"}"/> |
| 63 | + <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" |
| 64 | + aria-haspopup="true" aria-expanded="false"> |
| 65 | + <span class="glyphicon glyphicon-wrench"></span></button> |
| 66 | + <ul class="dropdown-menu"> |
| 67 | + {foreach from=$SearchScan.modules key=moduleId item=moduleInfo} |
| 68 | + {foreach from=$moduleInfo.options key=optionId item=optionInfo} |
| 69 | + <li> |
| 70 | + <a href="#"> |
| 71 | + <label for="cb_{$moduleId}_{$optionId}"> |
| 72 | + <input type="checkbox" id="cb_{$moduleId}_{$optionId}" |
| 73 | + name="{g->formVar var="form[options][$moduleId][$optionId]"}" |
| 74 | + {if isset($form.options.$moduleId.$optionId)} checked="checked"{/if}/> |
| 75 | + {$optionInfo.description} |
| 76 | + </label></a> |
| 77 | + </li>{/foreach} |
| 78 | + {/foreach} |
| 79 | + <li><a href="#" onclick="javascript:event.stopPropagation();setCheck(1); return false;">{g->text text="Check All"}</a></li> |
| 80 | + <li><a href="#" onclick="javascript:event.stopPropagation();setCheck(0); return false;">{g->text text="Uncheck All"}</a></li> |
| 81 | + <li><a href="#" onclick="javascript:event.stopPropagation();invertCheck()">{g->text text="Invert"}</a></li> |
| 82 | + </ul> |
| 83 | + </div> |
69 | 84 | </div>
|
70 |
| - <div class="options-wrapper"> |
71 |
| - {foreach from=$SearchScan.modules key=moduleId item=moduleInfo} |
72 |
| - {foreach from=$moduleInfo.options key=optionId item=optionInfo} |
73 |
| - <input type="checkbox" id="cb_{$moduleId}_{$optionId}" |
74 |
| - name="{g->formVar var="form[options][$moduleId][$optionId]"}" |
75 |
| - {if isset($form.options.$moduleId.$optionId)} checked="checked"{/if}/> |
76 |
| - <label for="cb_{$moduleId}_{$optionId}"> |
77 |
| - {$optionInfo.description} |
78 |
| - </label> |
79 |
| - {/foreach} |
80 |
| - {/foreach} |
81 |
| - <div> |
82 |
| - <a href="javascript:setCheck(1)">{g->text text="Check All"}</a> |
83 |
| - |
84 |
| - <a href="javascript:setCheck(0)">{g->text text="Uncheck All"}</a> |
85 |
| - |
86 |
| - <a href="javascript:invertCheck()">{g->text text="Invert"}</a> |
| 85 | + {if isset($form.error.searchCriteria.missing)} |
| 86 | + <div class="giError"> |
| 87 | + {g->text text="You must enter some text to search for!"} |
87 | 88 | </div>
|
| 89 | + {/if} |
| 90 | + <div class="options-wrapper"> |
| 91 | +
|
88 | 92 | </div>
|
89 | 93 |
|
90 | 94 | </div>
|
91 |
| -
|
| 95 | + <script type="text/javascript"> |
| 96 | + document.getElementById('SearchScan')['{g->formVar var="form[searchCriteria]"}'].focus(); |
| 97 | + </script> |
92 | 98 | {* Search results *}
|
93 | 99 | {assign var="resultCount" value="0"}
|
94 | 100 | {if !empty($SearchScan.searchResults)}
|
|
111 | 117 |
|
112 | 118 | {assign var="searchCriteria" value=$form.searchCriteria}
|
113 | 119 | {if (sizeof($results.results) > 0)}
|
| 120 | + <div id="gsThumbMatrix" class="col-xs-12"> |
114 | 121 | {foreach from=$results.results item=result}
|
115 | 122 | {assign var=itemId value=$result.itemId}
|
116 | 123 | <div class="giItemCell col-xs-12 col-sm-6 col-md-4 col-lg-3">
|
|
139 | 146 | </div>
|
140 | 147 | </div>
|
141 | 148 | {/foreach}
|
| 149 | + </div> |
142 | 150 | <script type="text/javascript">
|
143 | 151 | search_HighlightResults('{$searchCriteria}');
|
144 | 152 | </script>
|
|
0 commit comments