Sha256: aaec13f57fbc7dd5ca9f6a37ea3104afc67ab43bc4e20895c56aa08a49fc1e06

Contents?: true

Size: 1.89 KB

Versions: 3

Compression:

Stored size: 1.89 KB

Contents

<div class="umlaut-section search_inside">
  <%
  search_providers = search_inside  
  # We don't show this block until ALL possible search inside tools
  # have been found. Too hard to deal with AJAX update of a DIV
  # that has a text input box in it otherwise. 
  # TODO: Make this a helper function!?
  if (search_providers.length > 0 and (not service_type_in_progress?('search_inside'))) %>
    <div class="section_heading">
      <h3>Search inside this <%= @user_request.referent.container_type_of_thing %></h3>
    </div>
    <div class="umlaut_section_content">
      <%= content_tag("form", :target => "_blank", :action => url_for(:controller=>'link_router', :action=>'index')) do %>

        <div class="search-inside-source input-prepend input-append">
          <span class="add-on"> via </span> 

          <% if search_providers.length > 1 %>
            <%= select_tag("id", options_for_select(search_providers.collect {|st| [st.view_data[:display_text], st.id]}), 
                            :class =>"input-medium id") %>
          <% else %>
            <input type="hidden" name="id" value="<%= search_providers[0].id %>">
            <span class="add-on"><%= search_providers[0].view_data[:display_text] %></span>
          <% end %>

        </div>
        <div class="search-inside-query input-append">
          <input name="query" type="text" /> 
          <input value="search" type="submit" class="btn add-on">
        </div>     
      <% end %>
    </div>
  <% elsif (@user_request.referent.format == 'book' && service_type_in_progress?('search_inside')) %>
    <%# don't show the spinner unless it's identified as a book, otherwise too likely to be a false promise %>
    <%= render(:partial => "background_progress", :locals => {:svc_type => "search_inside", 
      :progress_message => "Looking for tools to search inside this #{@user_request.referent.container_type_of_thing}" }) %>
  <% end %>

</div>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
umlaut-3.3.1 app/views/resolve/_search_inside.html.erb
umlaut-3.3.0 app/views/resolve/_search_inside.html.erb
umlaut-3.2.0 app/views/resolve/_search_inside.html.erb