Commit e1b3c02d authored by Phil Hughes's avatar Phil Hughes

Enables the option in user preferences to turn on the new navigation

parent f7e7e40d
...@@ -298,10 +298,6 @@ module ApplicationHelper ...@@ -298,10 +298,6 @@ module ApplicationHelper
end end
end end
def can_toggle_new_nav?
Rails.env.development?
end
def show_new_nav? def show_new_nav?
cookies["new_nav"] == "true" cookies["new_nav"] == "true"
end end
......
...@@ -74,9 +74,8 @@ ...@@ -74,9 +74,8 @@
= link_to "Profile", current_user, class: 'profile-link', data: { user: current_user.username } = link_to "Profile", current_user, class: 'profile-link', data: { user: current_user.username }
%li %li
= link_to "Settings", profile_path = link_to "Settings", profile_path
- if can_toggle_new_nav? %li
%li = link_to "Turn on new nav", profile_preferences_path(anchor: "new-navigation")
= link_to "Turn on new nav", profile_preferences_path(anchor: "new-navigation")
%li.divider %li.divider
%li %li
= link_to "Sign out", destroy_user_session_path, method: :delete, class: "sign-out-link" = link_to "Sign out", destroy_user_session_path, method: :delete, class: "sign-out-link"
......
...@@ -16,25 +16,22 @@ ...@@ -16,25 +16,22 @@
.preview= image_tag "#{scheme.css_class}-scheme-preview.png" .preview= image_tag "#{scheme.css_class}-scheme-preview.png"
= f.radio_button :color_scheme_id, scheme.id = f.radio_button :color_scheme_id, scheme.id
= scheme.name = scheme.name
- if can_toggle_new_nav? .col-sm-12
.col-sm-12 %hr
%hr .col-lg-3.profile-settings-sidebar#new-navigation
.col-lg-3.profile-settings-sidebar#new-navigation %h4.prepend-top-0
%h4.prepend-top-0 New Navigation
New Navigation %p
%p This setting allows you to turn on or off the new upcoming navigation concept.
This setting allows you to turn on or off the new upcoming navigation concept. .col-lg-9.syntax-theme
= succeed '.' do = label_tag do
= link_to 'Learn more', '', target: '_blank' .preview= image_tag "old_nav.png"
.col-lg-9.syntax-theme %input.js-experiment-feature-toggle{ type: "radio", value: "false", name: "new_nav", checked: !show_new_nav? }
= label_tag do Old
.preview= image_tag "old_nav.png" = label_tag do
%input.js-experiment-feature-toggle{ type: "radio", value: "false", name: "new_nav", checked: !show_new_nav? } .preview= image_tag "new_nav.png"
Old %input.js-experiment-feature-toggle{ type: "radio", value: "true", name: "new_nav", checked: show_new_nav? }
= label_tag do New
.preview= image_tag "new_nav.png"
%input.js-experiment-feature-toggle{ type: "radio", value: "true", name: "new_nav", checked: show_new_nav? }
New
.col-sm-12 .col-sm-12
%hr %hr
.col-lg-4.profile-settings-sidebar .col-lg-4.profile-settings-sidebar
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment