diff --git a/app/assets/stylesheets/partials/_panels.scss b/app/assets/stylesheets/partials/_panels.scss index 251d4378..e40cb284 100644 --- a/app/assets/stylesheets/partials/_panels.scss +++ b/app/assets/stylesheets/partials/_panels.scss @@ -76,3 +76,26 @@ #advanced-search-panel legend { color: #000 } + +.ask-us { + margin-top: 3rem; + a { + margin-top: 0.5rem; + &:after { + padding-left: 1rem; + font-family: FontAwesome; + content: '\f075'; + } + } + &.view-md { + @media (min-width: $bp-screen-md) { + display: none; + } + } + &.view-lg { + display: none; + @media (min-width: $bp-screen-md) { + display: block; + } + } +} diff --git a/app/assets/stylesheets/partials/_results.scss b/app/assets/stylesheets/partials/_results.scss index 1d9d07ae..a730fb0c 100644 --- a/app/assets/stylesheets/partials/_results.scss +++ b/app/assets/stylesheets/partials/_results.scss @@ -6,6 +6,14 @@ margin-bottom: 3rem; background-color: $white-t; padding: 15px; + + .no-results { + margin-left: -15px; + } + + .no-results + .ask-us { + margin-top: 0rem; + } } .result { diff --git a/app/views/record/_sidebar.html.erb b/app/views/record/_sidebar.html.erb index b6e42e00..5f6b73e0 100644 --- a/app/views/record/_sidebar.html.erb +++ b/app/views/record/_sidebar.html.erb @@ -8,11 +8,5 @@ <% end %> -
-

Ask Us

-

Not finding what you're looking for? We're here to help with anything from quick questions to in-depth research.

-

- Ask Us -

-
+ <%= render 'shared/ask_gis' if Flipflop.enabled?(:gdt) %> diff --git a/app/views/search/results.html.erb b/app/views/search/results.html.erb index 38c3ac5d..eb1ed27d 100644 --- a/app/views/search/results.html.erb +++ b/app/views/search/results.html.erb @@ -48,7 +48,7 @@ <%= render(partial: 'shared/error', collection: @errors) %> -
+
<% if @filters.present? %> <% end %> @@ -71,15 +72,17 @@ <%= render(partial: 'search/result', collection: @results) %> <% else %> -
+

No results found for your search

<% end %>
+ <%= render partial: 'shared/ask_gis', locals: { display: 'aside' } if Flipflop.enabled?(:gdt) && @results.blank? %> <% if @results.present? %> + <%= render partial: 'shared/ask_gis', locals: { display: 'view-md' } if Flipflop.enabled?(:gdt) %> <% end %>
diff --git a/app/views/shared/_ask_gis.html.erb b/app/views/shared/_ask_gis.html.erb new file mode 100644 index 00000000..c9048a45 --- /dev/null +++ b/app/views/shared/_ask_gis.html.erb @@ -0,0 +1,10 @@ +<% if display == 'view-aside' %> +
+<% end %> +
+

Need help?

+ Ask GIS +
+<% if display == 'view-aside' %> +
+<% end %>