3235: Do not bring up search dialog until enter/click in top nav
[arvados.git] / apps / workbench / app / views / layouts / body.html.erb
index c703bc7004b37e606a4d49d11d31fbf27b361f54..4a512650901e53ffaec636905a6db07b8c2e194c 100644 (file)
           </li>
 
           <% if current_user %>
-          <!-- XXX placeholder for this when search is implemented
           <li>
-            <form class="navbar-form" role="search">
+            <form class="navbar-form" role="search"
+                       data-search-modal=
+                       "<%= url_for(
+                        action: 'choose',
+                        controller: 'search',
+                        title: 'Search',
+                        action_name: 'Show',
+                        action_href: url_for(controller: :actions, action: :show),
+                        action_method: 'get',
+                        action_data: {selection_param: 'uuid', success: 'redirect-to-created-object', copy_from_search_box: true}.to_json)
+                       %>">
               <div class="input-group" style="width: 220px">
                 <input type="text" class="form-control" placeholder="search">
-                <span class="input-group-addon"><span class="glyphicon glyphicon-search"></span></span>
+                <a class="input-group-addon"><span class="glyphicon glyphicon-search"></span></a>
               </div>
             </form>
           </li>
-          -->
-
-          <li>
-            <%= link_to(url_for(
-                       action: 'choose',
-                       controller: 'search',
-                       title: 'Search',
-                       action_name: 'Show',
-                       action_href: url_for(controller: :actions, action: :show),
-                       action_method: 'get',
-                       action_data: {selection_param: 'uuid', success: 'redirect-to-created-object'}.to_json),
-                      { class: "", remote: true, method: 'get' }) do %>
-              <i class="fa fa-fw fa-search"></i> Search
-            <% end %>
-          </li>
 
           <li class="dropdown notification-menu">
             <a href="#" class="dropdown-toggle" data-toggle="dropdown" id="notifications-menu">