Splitted administration and normal web site interfaces.
This optimises a bit the routing map, and make cleaner separation. Make the base url for admin pages customizable via `administration.base_path` variable in cms.ini note: could be /admin, /roc-admin, or .. It is possible to have a specific theme for administration via the variable "administration.admin"
This commit is contained in:
@@ -250,7 +250,7 @@ feature -- Access: Node
|
||||
|
||||
-- Update partial user if needed.
|
||||
if Result /= Void then
|
||||
if attached {CMS_PARTIAL_USER} Result.author as l_partial_author then
|
||||
if attached {CMS_PARTIAL_USER} Result.author as l_partial_author and then l_partial_author.has_id then
|
||||
if attached cms_api.user_api.user_by_id (l_partial_author.id) as l_author then
|
||||
Result.set_author (l_author)
|
||||
else
|
||||
@@ -259,7 +259,7 @@ feature -- Access: Node
|
||||
end
|
||||
end
|
||||
end
|
||||
if attached {CMS_PARTIAL_USER} Result.editor as l_partial_editor then
|
||||
if attached {CMS_PARTIAL_USER} Result.editor as l_partial_editor and then l_partial_editor.has_id then
|
||||
if attached cms_api.user_api.user_by_id (l_partial_editor.id) as l_editor then
|
||||
Result.set_editor (l_editor)
|
||||
else
|
||||
|
||||
@@ -679,10 +679,10 @@ feature {NONE} -- Implementation
|
||||
if attached sql_read_string (7) as l_format then
|
||||
Result.set_format (l_format)
|
||||
end
|
||||
if attached sql_read_integer_64 (8) as l_author_id then
|
||||
if attached sql_read_integer_64 (8) as l_author_id and then l_author_id > 0 then
|
||||
Result.set_author (create {CMS_PARTIAL_USER}.make_with_id (l_author_id))
|
||||
end
|
||||
if attached sql_read_integer_64 (9) as l_editor_id then
|
||||
if attached sql_read_integer_64 (9) as l_editor_id and then l_editor_id > 0 then
|
||||
Result.set_editor (create {CMS_PARTIAL_USER}.make_with_id (l_editor_id))
|
||||
end
|
||||
if attached sql_read_date_time (10) as l_publication_date then
|
||||
|
||||
@@ -69,12 +69,14 @@ feature {CMS_API} -- Module Initialization
|
||||
p1.set_title ("Welcome")
|
||||
p1.set_content ("Welcome, you are using the ROC Eiffel CMS", Void, Void) -- Use default format
|
||||
p1.set_author (u)
|
||||
p1.set_editor (u)
|
||||
l_sql_node_storage.save_node (p1)
|
||||
|
||||
p2 := ct.new_node (Void)
|
||||
p2.set_title ("A new page example")
|
||||
p2.set_content ("This is the content of a page", Void, Void) -- Use default format
|
||||
p2.set_author (u)
|
||||
p2.set_editor (u)
|
||||
p2.set_parent (p1)
|
||||
l_sql_node_storage.save_node (p2)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user