Add a templates root folder

This commit is contained in:
Veronica Berglyd Olsen
2024-02-02 20:40:57 +01:00
parent 8af720cbd6
commit 64889ac5d8
7 changed files with 65 additions and 9 deletions
+17 -3
View File
@@ -334,15 +334,29 @@ class NWItem:
def isNovelLike(self) -> bool:
"""Check if the item is of a novel-like class."""
return self._class in (nwItemClass.NOVEL, nwItemClass.ARCHIVE)
return self._class in (
nwItemClass.NOVEL,
nwItemClass.ARCHIVE,
nwItemClass.TEMPLATES,
)
def documentAllowed(self) -> bool:
"""Check if the item is allowed to be of document layout."""
return self._class in (nwItemClass.NOVEL, nwItemClass.ARCHIVE, nwItemClass.TRASH)
return self._class in (
nwItemClass.NOVEL,
nwItemClass.ARCHIVE,
nwItemClass.TEMPLATES,
nwItemClass.TRASH,
)
def isInactiveClass(self) -> bool:
"""Check if the item is in an inactive class."""
return self._class in (nwItemClass.NO_CLASS, nwItemClass.ARCHIVE, nwItemClass.TRASH)
return self._class in (
nwItemClass.NO_CLASS,
nwItemClass.ARCHIVE,
nwItemClass.TEMPLATES,
nwItemClass.TRASH,
)
def isRootType(self) -> bool:
"""Check if item is a root item."""