Added revisions support to node management.

Updated node extension implementation.
Updated known permissions for node module.
Improved code for node storage extension , in preparation to code factorization.
Ensured that author is updated when saved.
This commit is contained in:
2015-08-07 19:17:25 +02:00
parent 44ada4b6b1
commit cd0c2acd87
15 changed files with 464 additions and 132 deletions

View File

@@ -36,6 +36,9 @@ feature -- Access
node: detachable CMS_NODE
revision: INTEGER_64
-- If not zero, about history version of the node.
feature -- Element change
set_node (a_node: like node)
@@ -43,18 +46,22 @@ feature -- Element change
node := a_node
end
set_revision (a_rev: like revision)
do
revision := a_rev
end
feature -- Execution
process
-- Computed response message.
local
b: STRING_8
b: detachable STRING_8
nid: INTEGER_64
l_node: like node
do
l_node := node
if l_node = Void then
create b.make_empty
nid := node_id_path_parameter (request)
if nid > 0 then
l_node := node_api.node (nid)
@@ -67,8 +74,16 @@ feature -- Execution
then
l_manager.append_html_output_to (l_node, Current)
end
elseif revision > 0 then
set_main_content ("Missing revision node!")
else
set_main_content ("Missing node")
set_main_content ("Missing node!")
end
if revision > 0 then
add_warning_message ("The revisions let you track differences between multiple versions of a post.")
end
if l_node /= Void and revision > 0 then
set_title ("Revision #" + revision.out + " of " + html_encoded (l_node.title))
end
end