Noosfero/noosfero

View on GitHub
app/views/shared/_profile_search_form.html.erb

Summary

Maintainability
Test Coverage
<% search_label = _("Find in %s's content") % profile.short_name %>
<%= form_tag( { :controller => 'profile_search', :profile => profile.identifier}, :method => 'data-remote', :class => 'search_form' ) do %>
  <div class="search-field" id="profile-search">
    <span class="formfield">
      <%= search_input_with_suggestions 'q', :articles, @q, :title => search_label, :placeholder => search_label %>
      <%= submit_button(:search, _('Search'), :id => 'profile-search-button') %>
    </span>
    <%= hidden_field_tag :block, block.id if defined? block %>
    <div>
      <%= labelled_radio_button profile.short_name, 'where', 'profile', true, :title => _("Find in %s's content") % profile.short_name %>
      <%= labelled_radio_button _('General'), 'where', 'environment', false, :title => _("Search all content") %>
    </div>
  </div>
<% end %>