diff --git a/app/controllers/basil_controller.rb b/app/controllers/basil_controller.rb index a7115012..ae80f46c 100644 --- a/app/controllers/basil_controller.rb +++ b/app/controllers/basil_controller.rb @@ -26,11 +26,13 @@ class BasilController < ApplicationController ].map(&:name) @content_type = params[:content_type].try(:humanize) || 'Character' - if @content_type.nil? || !@enabled_content_types.include?(@content_type) - return raise "Invalid content type: #{params[:content_type]}" - end + if @content_type.present? + if !@enabled_content_types.include?(@content_type) + return raise "Invalid content type: #{params[:content_type]}" + end - @content = @current_user_content[@content_type].sort_by(&:name) + @content = @current_user_content[@content_type].sort_by(&:name) + end end def content diff --git a/app/views/basil/content.html.erb b/app/views/basil/content.html.erb index 5af1460f..596039d9 100644 --- a/app/views/basil/content.html.erb +++ b/app/views/basil/content.html.erb @@ -54,13 +54,15 @@ function commission_basil(style) { <% if @relevant_fields.empty? %>
- Basil works best with guidance! Please fill out more fields for this page + Basil works best with guidance! +

+ Please <%= link_to 'fill out more fields', @content.edit_path %> for this page before requesting an image.
<% end %>
- <% if @can_request_another %> + <% if @can_request_another && @relevant_fields.any? %> <%= link_to 'Customize per-field importance', "javascript:var sliders = document.getElementsByClassName('js-importance-slider'); for(var i = 0; i < sliders.length; i++) sliders.item(i).classList.remove('hide')" %> <% end %> diff --git a/app/views/basil/index.html.erb b/app/views/basil/index.html.erb index b8e400fb..4e4ed0f0 100644 --- a/app/views/basil/index.html.erb +++ b/app/views/basil/index.html.erb @@ -10,8 +10,8 @@ will be pulled from any answers you've given to relevant fields on their notebook page.

- NEW: You can also - <%= link_to 'help Basil get better by leaving feedback', basil_rating_queue_path %>. + You can also + <%= link_to 'help Basil get better by leaving feedback on your images', basil_rating_queue_path %>.

@@ -24,6 +24,9 @@
<%= content_class_from_name(content_type).icon %> <%= content_type.pluralize %> + <% if @content_type == content_type %> + chevron_right + <% end %>
<% end %> <% end %>