From 8394e0ce86391b0518401be403d10f2eeb60076a Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Tue, 22 Dec 2015 07:13:26 +0800 Subject: [PATCH] re-add regular uservoice code --- app/views/layouts/application.html.erb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index bf351870..8057d576 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -138,6 +138,13 @@ Metamaps.Loading.loader.setDensity(41); // default is 40 Metamaps.Loading.loader.setRange(0.9); // default is 1.3 Metamaps.Loading.loader.show(); // Hidden by default + + // set up uservoice with signed in user + <% if authenticated? && ENV['SSO_KEY'] %> + USERVOICE.load(Metamaps.Active.Mapper.name, Metamaps.Active.Mapper.id, "<%= user.email %>", "<%= current_sso_token %>"); + <% else %> + USERVOICE.load(); + <% end %> <%= render :partial => 'layouts/googleanalytics' if Rails.env.production? %>