mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
cleanup
This commit is contained in:
parent
470569e98f
commit
df916b150b
@ -6,25 +6,7 @@ class BasilController < ApplicationController
|
||||
def index
|
||||
disabled_content_types = [Universe]
|
||||
|
||||
@enabled_content_types = [
|
||||
Character, Location, Item,
|
||||
Creature, Flora,
|
||||
Food, Planet,
|
||||
Landmark, Town,
|
||||
|
||||
# TODO improve these before release, if possible; otherwise disable
|
||||
# Building, Vehicle,
|
||||
|
||||
# TODO before release
|
||||
# Continent, Country,
|
||||
# Creature, Deity,
|
||||
# Magic, School, Sport, Technology,
|
||||
# Tradition
|
||||
|
||||
# Probably won't do before release
|
||||
# Condition, Government, Group, Job, Language, Lore,
|
||||
# Race, Religion, Scene
|
||||
].map(&:name)
|
||||
@enabled_content_types = BasilService::ENABLED_PAGE_TYPES
|
||||
|
||||
@content_type = params[:content_type].try(:humanize) || 'Character'
|
||||
if @content_type.present?
|
||||
|
||||
@ -1,6 +1,26 @@
|
||||
class BasilService < Service
|
||||
IGNORED_VALUES = ['', 'none', 'n/a', '.', '-', ' ', '?', '??', '???', 'x', nil]
|
||||
|
||||
ENABLED_PAGE_TYPES = [
|
||||
Character, Location, Item,
|
||||
Creature, Flora,
|
||||
Food, Planet,
|
||||
Landmark, Town,
|
||||
|
||||
# TODO improve these before release, if possible; otherwise disable
|
||||
# Building, Vehicle,
|
||||
|
||||
# TODO before release
|
||||
# Continent, Country,
|
||||
# Creature, Deity,
|
||||
# Magic, School, Sport, Technology,
|
||||
# Tradition
|
||||
|
||||
# Probably won't do before release
|
||||
# Condition, Government, Group, Job, Language, Lore,
|
||||
# Race, Religion, Scene
|
||||
].map(&:name)
|
||||
|
||||
def self.enabled_styles_for(page_type)
|
||||
case page_type
|
||||
when 'Character'
|
||||
|
||||
@ -1,17 +1,20 @@
|
||||
<%
|
||||
creating = defined?(creating) && creating
|
||||
editing = defined?(editing) && editing
|
||||
page_type_enabled = BasilService::ENABLED_PAGE_TYPES.include? content.class_name
|
||||
%>
|
||||
|
||||
<ul class="collection content-tabs">
|
||||
<li class="active center grey-text uppercase">
|
||||
Tools
|
||||
</li>
|
||||
<% if page_type_enabled %>
|
||||
<ul class="collection content-tabs">
|
||||
<li class="active center grey-text uppercase">
|
||||
Tools
|
||||
</li>
|
||||
|
||||
<li class="collection-item">
|
||||
<%= link_to basil_content_path(content_type: content.class_name, id: content.id) do %>
|
||||
<i class="material-icons left">palette</i>
|
||||
Image Generation
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
<li class="collection-item">
|
||||
<%= link_to basil_content_path(content_type: content.class_name, id: content.id) do %>
|
||||
<i class="material-icons left">palette</i>
|
||||
Image Generation
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
<% end %>
|
||||
Loading…
Reference in New Issue
Block a user