Sha256: 43c8b098b0637f26a33d1b8b96f64e3131f3ec4b65dd41738d5e0225a98848c3
Contents?: true
Size: 1.09 KB
Versions: 3
Compression:
Stored size: 1.09 KB
Contents
# TODO: Use codenames instead of names GROUP = { "Text" => %w[RichText PlainText Markdown Phrase HTML], "Data" => %w[Number Toggle Date URI], "Upload" => %w[File Image], "Custom" => [], "Organize" => ["List", "Pointer", "Search", "Link list", "Nest list"], "Template" => ["Notification template", "Email template", "Twitter template"], "Admin" => ["Cardtype", "User", "Role", "Sign up", "Session", "Set", "Setting"], "Styling" => ["Layout", "Skin", "Bootswatch skin", "Customized bootswatch skin", "CSS", "SCSS"], "Scripting" => %w[JSON JavaScript CoffeeScript] }.freeze # DEFAULT_RULE_GROUPS = ["Text", "Data", "Upload", "Organize - Search"] # STRUCTURE_RULE_GROUPS = ["Text", "Organize > Search"] # group for each cardtype: { "RichText => "Content", "Layout" => "Admin", ... } GROUP_MAP = GROUP.each_with_object({}) do |(cat, types), h| types.each { |t| h[t] = cat } end format :html do def custom_types custom_types = [] Auth.createable_types.each do |type| custom_types << type unless All::CardtypeGroups::GROUP_MAP[type] end custom_types end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
card-mod-rules-0.14.2 | set/all/cardtype_groups.rb |
card-mod-rules-0.14.1 | set/all/cardtype_groups.rb |
card-mod-rules-0.14.0 | set/all/cardtype_groups.rb |