Commit d6d1340a authored by Phil Hughes's avatar Phil Hughes

IDE is now EEU

parent 04fdd455
......@@ -310,8 +310,8 @@ module ApplicationHelper
cookies["sidebar_collapsed"] == "true"
end
def show_new_ide?
cookies["new_repo"] == "true" && body_data_page != 'projects:show'
def show_new_ide?(project)
cookies["new_repo"] == "true" && body_data_page != 'projects:show' && project.feature_available?(:ide)
end
def locale_path
......
......@@ -52,7 +52,7 @@ module BlobHelper
end
def ide_blob_link(project = @project, ref = @ref, path = @path, options = {})
return unless show_new_ide?
return unless show_new_ide?(@project)
blob = options.delete(:blob)
blob ||= project.repository.blob_at(ref, path) rescue nil
......
......@@ -3,6 +3,8 @@
= render 'profiles/head'
= form_for @user, url: profile_preferences_path, remote: true, method: :put, html: { class: 'row prepend-top-default js-preferences-form' } do |f|
= render "profiles/preferences/ide", f: f
.col-lg-4.application-theme
%h4.prepend-top-0
GitLab navigation theme
......
......@@ -68,7 +68,7 @@
#{ _('New tag') }
.tree-controls
- if show_new_ide?
- if show_new_ide?(@project)
= succeed " " do
= link_to ide_edit_path(@project, @id), class: 'btn btn-default' do
= ide_edit_text
......
- show_create = local_assigns.fetch(:show_create, false)
- show_new_branch_form = show_new_ide? && show_create && can?(current_user, :push_code, @project)
- show_new_branch_form = show_new_ide?(@project) && show_create && can?(current_user, :push_code, @project)
- dropdown_toggle_text = @ref || @project.default_branch
= form_tag switch_project_refs_path(@project), method: :get, class: "project-refs-form" do
= hidden_field_tag :destination, destination
......
......@@ -57,6 +57,7 @@ class License < ActiveRecord::Base
sast_container
dast
epics
ide
].freeze
# List all features available for early adopters,
......
- if License.feature_available?(:ide)
.col-lg-4
%h4.prepend-top-0
Web IDE (Beta)
%p
Enable the new web IDE on this device to make it possible to open and edit multiple files with a single commit.
- if current_application_settings.should_check_namespace_plan?
Available for public GitLab.com projects or those using Gold.
.col-lg-8.multi-file-editor-options
= label_tag do
.preview.append-bottom-10= image_tag "multi-editor-off.png"
= f.radio_button :multi_file, "off", checked: true
Off
= label_tag do
.preview.append-bottom-10= image_tag "multi-editor-on.png"
= f.radio_button :multi_file, "on", checked: false
On
.col-sm-12
%hr
......@@ -4,6 +4,8 @@ describe 'User visits the profile preferences page' do
let(:user) { create(:user) }
before do
stub_licensed_features(ide: true)
sign_in(user)
visit(profile_preferences_path)
......
......@@ -5,6 +5,8 @@ feature 'Multi-file editor new directory', :js do
let(:project) { create(:project, :repository) }
before do
stub_licensed_features(ide: true)
project.add_master(user)
sign_in(user)
......
......@@ -5,6 +5,8 @@ feature 'Multi-file editor new file', :js do
let(:project) { create(:project, :repository) }
before do
stub_licensed_features(ide: true)
project.add_master(user)
sign_in(user)
......
......@@ -7,6 +7,8 @@ feature 'Multi-file editor upload file', :js do
let(:img_file) { File.join(Rails.root, 'spec', 'fixtures', 'dk.png') }
before do
stub_licensed_features(ide: true)
project.add_master(user)
sign_in(user)
......
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