Sha256: 8860e5bb68356c239e69e5912d2fa889c7d98379e2823f865a30f8d0af3e8d64

Contents?: true

Size: 1.01 KB

Versions: 3

Compression:

Stored size: 1.01 KB

Contents

<div class="level-left">
  <div class="level-item" style="margin-left: 0.2rem">
    <p class="subtitle is-5">
      <strong><%= resources.count %></strong> <%= resource_name.pluralize %>
    </p>
  </div>
  <div class="level-item">
    <%= form_tag resource_path, method: :get do %>
      <div class="field has-addons">
        <p class="control has-icons-left">
          <%= text_field_tag(filter_property, flash[:search], class: 'input is-small', id: 'search-input', placeholder: "Find a #{resource_name}") %>
          <span class="icon is-small is-left"><i class="fas fa-search"></i>
        </p>
        <p class="control">
          <%= submit_tag('Search', class: 'button is-small') %>
        </p>
      </div>
    <% end %>
  </div>
</div>

<script type="text/javascript">
  <% if flash[:search] %>
    var searchInput = document.getElementById("search-input");
    var searchInputvalue = searchInput.value;

    searchInput.focus();
    searchInput.value = '';
    searchInput.value = searchInputvalue;
  <% end %>
</script>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
kafka_command-0.0.3 app/views/kafka_command/shared/_search_bar.html.erb
kafka_command-0.0.2 app/views/kafka_command/shared/_search_bar.html.erb
kafka_command-0.0.1 app/views/kafka_command/shared/_search_bar.html.erb