forked from e621ng/e621ng
Add lore tag category
This commit is contained in:
parent
63896890eb
commit
5a133e1643
@ -24,6 +24,7 @@ module PostIndex
|
||||
indexes :tag_count_meta, type: 'integer'
|
||||
indexes :tag_count_species, type: 'integer'
|
||||
indexes :tag_count_invalid, type: 'integer'
|
||||
indexes :tag_count_lore, type: 'integer'
|
||||
indexes :comment_count, type: 'integer'
|
||||
|
||||
indexes :file_size, type: 'integer'
|
||||
@ -199,6 +200,7 @@ module PostIndex
|
||||
tag_count_meta: tag_count_meta,
|
||||
tag_count_species: tag_count_species,
|
||||
tag_count_invalid: tag_count_invalid,
|
||||
tag_count_lore: tag_count_lore,
|
||||
comment_count: options[:comment_count] || comment_count,
|
||||
|
||||
file_size: file_size,
|
||||
|
@ -532,6 +532,19 @@ fart'
|
||||
"hover" => "#444"
|
||||
}
|
||||
},
|
||||
"lore" => {
|
||||
"category" => 8,
|
||||
"short" => 'lor',
|
||||
'extra' => [],
|
||||
'header' => %{<h2 class="lore-tag-list">Lore</h2>},
|
||||
'humanized' => nil,
|
||||
'mod_only' => true,
|
||||
'relatedbutton' => nil,
|
||||
'css' => {
|
||||
'color' => '#000',
|
||||
'hover' => '#444'
|
||||
}
|
||||
},
|
||||
"meta" => {
|
||||
"category" => 7,
|
||||
"short" => "meta",
|
||||
@ -557,12 +570,12 @@ fart'
|
||||
|
||||
#Sets the order of the split tag header list (presenters/tag_set_presenter.rb)
|
||||
def split_tag_header_list
|
||||
@split_tag_header_list ||= ["artist","copyright","character","species","general","meta","invalid"]
|
||||
@split_tag_header_list ||= ["invalid","artist","copyright","character","species","general","meta","lore"]
|
||||
end
|
||||
|
||||
#Sets the order of the categorized tag string (presenters/post_presenter.rb)
|
||||
def categorized_tag_list
|
||||
@categorized_tag_list ||= ["artist","copyright","character","species","meta","general","invalid"]
|
||||
@categorized_tag_list ||= ["invalid","artist","copyright","character","species","meta","general","lore"]
|
||||
end
|
||||
|
||||
#Sets the order of the related tag buttons (javascripts/related_tag.js)
|
||||
|
5
db/migrate/20190924233432_add_lore_tag_category.rb
Normal file
5
db/migrate/20190924233432_add_lore_tag_category.rb
Normal file
@ -0,0 +1,5 @@
|
||||
class AddLoreTagCategory < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
add_column :posts, :tag_count_lore, :int, null: false, default: 0
|
||||
end
|
||||
end
|
@ -1986,7 +1986,8 @@ CREATE TABLE public.posts (
|
||||
tag_count_invalid integer DEFAULT 0 NOT NULL,
|
||||
description text DEFAULT ''::text NOT NULL,
|
||||
comment_count integer DEFAULT 0 NOT NULL,
|
||||
change_seq bigint NOT NULL
|
||||
change_seq bigint NOT NULL,
|
||||
tag_count_lore integer DEFAULT 0 NOT NULL
|
||||
);
|
||||
|
||||
|
||||
@ -5266,6 +5267,7 @@ INSERT INTO "schema_migrations" (version) VALUES
|
||||
('20190829044313'),
|
||||
('20190905111159'),
|
||||
('20190916204908'),
|
||||
('20190919213915');
|
||||
('20190919213915'),
|
||||
('20190924233432');
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user