Sha256: 664202910f23aa886fe64bc18c299daf4b0237b7dcee527dd71e6f32e4d6e2ec

Contents?: true

Size: 1.26 KB

Versions: 11

Compression:

Stored size: 1.26 KB

Contents

= javascript_include_tag "carnival/advanced_search"
= link_to t("advanced_search"), "", id: "advanced_search_toggler", :class => "carnival-action-button busca"
%ul#advanced_search_form.carnival-form
  - presenter.advanced_search_fields.each do |key, field|
    - if params[key.to_s].present? && params[key.to_s] != "undefined"
      - value =  params[key.to_s]
    %li.search_item
      .search_field
        .label
          = label_tag key, t("activerecord.attributes.#{presenter.full_model_name}.#{key}")
        .field
          = render '/carnival/shared/advanced_search_field', :field => field, :presenter => presenter, :value => value
  %li.search_item
    .action
      = link_to t("clear"), "#", :id=> "clear_button", :class => "carnival-action-button clear-search"
    .action
      = link_to t("search"), "#", :id=> "search_button", :class => "carnival-action-button search-submit"

%ul.advanced-search-tags
  - presenter.advanced_search_fields.each do |key, field|
    - if params[key.to_s].present? && params[key.to_s] != "undefined"
      - value =  params[key.to_s]
      %li.advanced-search-tag
        = t("activerecord.attributes.#{presenter.full_model_name}.#{key}")
        = ": #{value}"
        %a{:href => "javascript:Carnival.removeAdvancedSearch('"+key.to_s+"')"}

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
carnival-0.2.1 app/views/carnival/shared/_advanced_search.html.haml
carnival-0.2.0 app/views/carnival/shared/_advanced_search.html.haml
carnival-0.1.9 app/views/carnival/shared/_advanced_search.html.haml
carnival-0.1.8 app/views/carnival/shared/_advanced_search.html.haml
carnival-0.1.7 app/views/carnival/shared/_advanced_search.html.haml
carnival-0.1.6 app/views/carnival/shared/_advanced_search.html.haml
carnival-0.1.5 app/views/carnival/shared/_advanced_search.html.haml
carnival-0.1.3 app/views/carnival/shared/_advanced_search.html.haml
carnival-0.1.2 app/views/carnival/shared/_advanced_search.html.haml
carnival-0.1.1 app/views/carnival/shared/_advanced_search.html.haml
carnival-0.1.0 app/views/carnival/shared/_advanced_search.html.haml