Added trash feature: Remove or revert a node.
Added Handler to show the current trash nodes for a given user. An admin can see all the trash nodes. Updated storage to handle trash and revert nodes.
This commit is contained in:
@@ -70,6 +70,11 @@ feature -- Access
|
||||
deferred
|
||||
end
|
||||
|
||||
trash_nodes (a_user_id: INTEGER_64): LIST [CMS_NODE]
|
||||
-- List of nodes by user `a_user_id'.
|
||||
deferred
|
||||
end
|
||||
|
||||
recent_nodes (a_lower: INTEGER; a_count: INTEGER): LIST [CMS_NODE]
|
||||
-- List of recent `a_count' nodes with an offset of `lower'.
|
||||
deferred
|
||||
@@ -135,6 +140,36 @@ feature -- Change: Node
|
||||
deferred
|
||||
end
|
||||
|
||||
trash_node (a_node: CMS_NODE)
|
||||
-- Trash `a_node'.
|
||||
do
|
||||
if a_node.has_id then
|
||||
trash_node_by_id (a_node.id)
|
||||
end
|
||||
end
|
||||
|
||||
revert_node (a_node: CMS_NODE)
|
||||
-- Revert `a_node'.
|
||||
do
|
||||
if a_node.has_id then
|
||||
revert_node_by_id (a_node.id)
|
||||
end
|
||||
end
|
||||
|
||||
trash_node_by_id (a_id: INTEGER_64)
|
||||
-- Trash node by id `a_id'.
|
||||
require
|
||||
valid_node_id: a_id > 0
|
||||
deferred
|
||||
end
|
||||
|
||||
revert_node_by_id (a_id: INTEGER_64)
|
||||
-- Revert node by id `a_id'.
|
||||
require
|
||||
valid_node_id: a_id > 0
|
||||
deferred
|
||||
end
|
||||
|
||||
-- update_node_title (a_user_id: like {CMS_USER}.id; a_node_id: like {CMS_NODE}.id; a_title: READABLE_STRING_32)
|
||||
-- -- Update node title to `a_title', node identified by id `a_node_id'.
|
||||
-- -- The user `a_user_id' is an existing or new collaborator.
|
||||
|
||||
Reference in New Issue
Block a user