diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-07-28 16:50:58 +0100 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-07-28 16:50:58 +0100 |
commit | aadb04b585c76b22da5c69d9e35a738e4ca66368 (patch) | |
tree | ac7c16054de310fc6db55faf4261aa01d0aa5d76 /app | |
parent | d708d30587331e2d4ba15c84433e0bd07103dd87 (diff) | |
download | gitlab-ce-aadb04b585c76b22da5c69d9e35a738e4ca66368.tar.gz |
Add groundwork for feature flag
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/application_helper.rb | 4 | ||||
-rw-r--r-- | app/views/profiles/preferences/show.html.haml | 22 |
2 files changed, 26 insertions, 0 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 1c165700b19..2e31e0ead21 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -301,4 +301,8 @@ module ApplicationHelper def show_new_nav? cookies["new_nav"] == "true" end + + def show_new_repo? + cookies["new_repo"] == "true" + end end diff --git a/app/views/profiles/preferences/show.html.haml b/app/views/profiles/preferences/show.html.haml index 9aed498a8a0..9664eccc834 100644 --- a/app/views/profiles/preferences/show.html.haml +++ b/app/views/profiles/preferences/show.html.haml @@ -40,6 +40,28 @@ New .col-sm-12 %hr + .col-lg-4.profile-settings-sidebar#new-navigation + %h4.prepend-top-0 + New Repository + %p + This setting allows you to turn on or off the new upcoming repository concept. + .col-lg-8.syntax-theme + .nav-wip + %p + The new repository is currently a work-in-progress concept and only usable on wide-screens. There are a number of improvements that we are working on in order to further refine the repository view. + %p + %a{ href: 'https://gitlab.com/gitlab-org/gitlab-ce/issues/31890', target: 'blank' } Learn more + about the improvements that are coming soon! + = label_tag do + .preview= image_tag "old_repo.png" + %input.js-experiment-feature-toggle{ type: "radio", value: "false", name: "new_repo", checked: !show_new_repo? } + Old + = label_tag do + .preview= image_tag "new_repo.png" + %input.js-experiment-feature-toggle{ type: "radio", value: "true", name: "new_repo", checked: show_new_repo? } + New + .col-sm-12 + %hr .col-lg-4.profile-settings-sidebar %h4.prepend-top-0 Behavior |