mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
more polish
This commit is contained in:
parent
a44a486a7e
commit
8c45d7d09c
@ -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
|
||||
|
||||
@ -54,13 +54,15 @@ function commission_basil(style) {
|
||||
|
||||
<% if @relevant_fields.empty? %>
|
||||
<div class="red card-panel lighten-3">
|
||||
Basil works best with guidance! Please fill out more fields for this page
|
||||
<strong>Basil works best with guidance!</strong>
|
||||
<br /><br />
|
||||
Please <%= link_to 'fill out more fields', @content.edit_path %> for this page
|
||||
before requesting an image.
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div>
|
||||
<% 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 %>
|
||||
|
||||
|
||||
@ -10,8 +10,8 @@
|
||||
will be pulled from any answers you've given to relevant fields on their notebook page.
|
||||
</p>
|
||||
<p style="margin-left: 1rem">
|
||||
<strong class="purple-text">NEW</strong>: 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 %>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -24,6 +24,9 @@
|
||||
<div class="<%= content_class_from_name(content_type).color %> white-text hoverable card-panel">
|
||||
<i class="material-icons left"><%= content_class_from_name(content_type).icon %></i>
|
||||
<%= content_type.pluralize %>
|
||||
<% if @content_type == content_type %>
|
||||
<i class="material-icons right">chevron_right</i>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user