FEATURE: add category suppress from latest

In the past we used suppress_from_homepage, it had mixed semantics
it would remove from category list if category list was on home and
unconditionally remove from latest.

New setting explicitly only removes from latest list but leaves the
category list alond
This commit is contained in:
Sam
2018-02-22 09:56:18 +11:00
parent d2b518c61c
commit 720e1965e3
18 changed files with 67 additions and 30 deletions

View File

@ -273,7 +273,7 @@ class ImportScripts::DiscuzX < ImportScripts::Base
description: row['description'],
position: row['position'].to_i + max_position,
color: color,
suppress_from_homepage: (row['status'] == (0) || row['status'] == (3)),
suppress_from_latest: (row['status'] == (0) || row['status'] == (3)),
post_create_action: lambda do |category|
if slug = @category_slug[row['id']]
category.update(slug: slug)