Browse Source

[search] Fixed hiding logic for rolling time options

Enrico Berti 10 years ago
parent
commit
d4b9bd6fed
1 changed files with 2 additions and 4 deletions
  1. 2 4
      apps/search/src/search/templates/search.mako

+ 2 - 4
apps/search/src/search/templates/search.mako

@@ -78,10 +78,8 @@ ${ commonheader(_('Search'), "search", user, "80px") | n,unicode }
       </label>
       </label>
     <!-- /ko -->
     <!-- /ko -->
 
 
-    <!-- ko if: columns().length > 0 -->
-      <select data-bind="options: $root.availableDateFields, value: collection.timeFilter.field, optionsValue: 'name', visible: $root.isEditing" class="input-medium"></select>
-      <span data-bind="template: {name: 'time-filter'}"></span>
-    <!-- /ko -->
+    <select data-bind="options: $root.availableDateFields, value: collection.timeFilter.field, optionsValue: 'name', visible: $root.isEditing() && $root.availableDateFields().length > 0" class="input-medium" style="margin-left: 4px"></select>
+    <span data-bind="template: {name: 'time-filter'}"></span>
   </form>
   </form>
 
 
   <form class="form-search" style="margin: 0" data-bind="submit: searchBtn, visible: columns().length != 0">
   <form class="form-search" style="margin: 0" data-bind="submit: searchBtn, visible: columns().length != 0">