Sha256: 38c0529b115ac086e342c42aafd661a4be78baa142b80afb476ab7ec6d6bee4f

Contents?: true

Size: 1.04 KB

Versions: 2

Compression:

Stored size: 1.04 KB

Contents

- if @advanced_search
  %script{:type=>"text/javascript"}
    $(document).ready(function(){
    var queryParams = [];
    - @advanced_search.each do |k, v|
      = "queryParams.push(generateQueryParam('#{k}', '', 'equal', '#{v}'));"
    $(".table").first().data("advancedquery", "{" + queryParams.join(", ") + "}");
    });
- if presenter.advanced_search_fields.size > 0
  = javascript_include_tag "carnival/advanced_search"
  .table-tools.toggler
    = link_to t("advanced_search"), "", id: "advanced_search_toggler", :class => "filters"
  %ul#advanced_search_form
    %form
      - presenter.advanced_search_fields.each do |key, field|
        %li.search_item
          .search_field
            .label
              = label_tag key, t("#{presenter.model_name}.#{key}")
            .field
              = render '/carnival/shared/advanced_search_field', :field => field, :presenter => presenter
      %li.search_item
        .action
          = link_to t("clear"), "#", :id=> "clear_button"
        .action
          = link_to t("search"), "#", :id=> "search_button"

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
carnival-0.0.11 app/views/carnival/shared/_advanced_search.html.haml
carnival-0.0.10 app/views/carnival/shared/_advanced_search.html.haml