[ARVADOS] updated: d047c1cb9ceecb6e324adf102e5e38e11fe698e1

Git user git at public.curoverse.com
Tue Aug 29 10:47:25 EDT 2017


Summary of changes:
 apps/workbench/app/views/layouts/body.html.erb | 55 ++++++++++++++------------
 apps/workbench/config/application.default.yml  |  7 ++++
 2 files changed, 37 insertions(+), 25 deletions(-)

       via  d047c1cb9ceecb6e324adf102e5e38e11fe698e1 (commit)
      from  ecaf4e935d372ed1b39ff16a908dcd2797479940 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit d047c1cb9ceecb6e324adf102e5e38e11fe698e1
Author: Tom Clegg <tom at curoverse.com>
Date:   Tue Aug 29 10:45:26 2017 -0400

    12033: Add config to link multi-site search to a remote site.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>

diff --git a/apps/workbench/app/views/layouts/body.html.erb b/apps/workbench/app/views/layouts/body.html.erb
index fe1698e..15f6545 100644
--- a/apps/workbench/app/views/layouts/body.html.erb
+++ b/apps/workbench/app/views/layouts/body.html.erb
@@ -28,31 +28,36 @@ SPDX-License-Identifier: AGPL-3.0 %>
 
           <% if current_user %>
             <% if current_user.is_active %>
-            <li>
-              <form class="navbar-form">
-                <%= link_to({controller: 'collections', action: 'multisite'}, {class: 'btn btn-default'}) do %>
-                  Multi-site search
-                <% end %>
-              </form>
-            </li>
-            <li>
-              <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'}.to_json)
-                         %>">
-                <div class="input-group" style="width: 220px">
-                  <input type="text" class="form-control" placeholder="search this site">
-                  <a class="input-group-addon"><span class="glyphicon glyphicon-search"></span></a>
-                </div>
-              </form>
-            </li>
+              <% if Rails.configuration.multi_site_search %>
+                <li>
+                  <form class="navbar-form">
+                    <%=
+                       target = Rails.configuration.multi_site_search
+                       if target == true
+                         target = {controller: 'collections', action: 'multisite'}
+                       end
+                       link_to("Multi-site search", target, {class: 'btn btn-default'}) %>
+                  </form>
+                </li>
+              <% end %>
+              <li>
+                <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'}.to_json)
+                           %>">
+                  <div class="input-group" style="width: 220px">
+                    <input type="text" class="form-control" placeholder="search this site">
+                    <a class="input-group-addon"><span class="glyphicon glyphicon-search"></span></a>
+                  </div>
+                </form>
+              </li>
             <% end %>
 
             <li class="dropdown notification-menu">
diff --git a/apps/workbench/config/application.default.yml b/apps/workbench/config/application.default.yml
index da20573..83164d1 100644
--- a/apps/workbench/config/application.default.yml
+++ b/apps/workbench/config/application.default.yml
@@ -302,3 +302,10 @@ common:
   # Token to be included in all healthcheck requests. Disabled by default.
   # Workbench expects request header of the format "Authorization: Bearer xxx"
   ManagementToken: false
+
+  # Enable/disable "multi-site search" in top nav (true/false), or
+  # link it to the multi-site search on a remote Workbench site.
+  #
+  # Example:
+  # multi_site_search: https://workbench.qr1hi.arvadosapi.com/collections/multisite
+  multi_site_search: true

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list