diff --git a/app/controllers/plans_controller.rb b/app/controllers/plans_controller.rb index c2140f7..44ce2ea 100644 --- a/app/controllers/plans_controller.rb +++ b/app/controllers/plans_controller.rb @@ -24,6 +24,8 @@ # Get the current user's org @default_org = current_user.org if @orgs.include?(current_user.org) + @is_test = params[:test] ||= false + respond_to :html end diff --git a/app/views/plans/index.html.erb b/app/views/plans/index.html.erb index a05c523..47cdfd2 100644 --- a/app/views/plans/index.html.erb +++ b/app/views/plans/index.html.erb @@ -33,6 +33,11 @@
<%= link_to _('Create plan'), - new_plan_path, - :class => "btn btn-primary" %> + new_plan_path, + class: "btn btn-primary" %> + + <%= link_to _('Create test plan'), + "#{new_plan_path}?test=true", + class: "left-indent", + id: "create-test" %>
diff --git a/app/views/plans/new.html.erb b/app/views/plans/new.html.erb index 2c51daf..08d44a8 100644 --- a/app/views/plans/new.html.erb +++ b/app/views/plans/new.html.erb @@ -88,6 +88,7 @@ + <%= render partial: 'shared/accessible_submit_button', locals: {id: 'create_plan_submit', diff --git a/config/application.rb b/config/application.rb index b0c8544..4392d71 100644 --- a/config/application.rb +++ b/config/application.rb @@ -123,5 +123,12 @@ # Load Branded terminology (e.g. organization name, application name, etc.) config.branding = config_for(:branding).deep_symbolize_keys + + # The default visibility setting for new plans + # 0 = Institutional visibility + # 1 = Public visibility - (NOT advisable because plans will show up in Public DMPs page by default) + # 2 = Test - (NOT advisable because test plans are excluded from statistics) + # 3 = Private + config.default_plan_visibility = 3 end end diff --git a/lib/assets/stylesheets/roadmap-form.scss b/lib/assets/stylesheets/roadmap-form.scss index c79f056..c581767 100644 --- a/lib/assets/stylesheets/roadmap-form.scss +++ b/lib/assets/stylesheets/roadmap-form.scss @@ -451,6 +451,12 @@ width: 95%; } +/* View plans */ +/* ------------------------------------------------ */ +div.main_page_content p #create-test { + vertical-align: middle; +} + /* Create plan */ /* ------------------------------------------------ */ #create_plan { diff --git a/lib/assets/stylesheets/roadmap.scss b/lib/assets/stylesheets/roadmap.scss index d52d951..b41c792 100644 --- a/lib/assets/stylesheets/roadmap.scss +++ b/lib/assets/stylesheets/roadmap.scss @@ -74,6 +74,10 @@ text-align: center; } +.left-indent { + margin-left: 15px; +} + table.dmp_table{ width: 100%; border-collapse: separate;