Added CMS_NODE.is_published and is_trashed: BOOLEAN
For now, whenever we save a node, it is marked as published. Display a node only if published. Updated /trash page. Updated /nodes/ page to take into account the node status.
This commit is contained in:
@@ -73,12 +73,30 @@ feature -- Access
|
||||
deferred
|
||||
end
|
||||
|
||||
feature -- Status reports
|
||||
|
||||
status: INTEGER
|
||||
-- Associated status for the current node.
|
||||
-- default: {CMS_NODE_API}.Not_Published}
|
||||
-- {CMS_NODE_API}.Published
|
||||
-- {CMS_NODE_API}.Trashed
|
||||
|
||||
is_published: BOOLEAN
|
||||
-- Is Current published?
|
||||
do
|
||||
Result := status = {CMS_NODE_API}.published
|
||||
ensure
|
||||
Result implies not is_trashed
|
||||
end
|
||||
|
||||
is_trashed: BOOLEAN
|
||||
-- Is Current trashed?
|
||||
do
|
||||
Result := status = {CMS_NODE_API}.trashed
|
||||
ensure
|
||||
Result implies not is_published
|
||||
end
|
||||
|
||||
feature -- Access
|
||||
|
||||
title: READABLE_STRING_32
|
||||
|
||||
Reference in New Issue
Block a user