Moved all location related queries into CMS_API, instead of CMS_SETUP.
Note that CMS_SETUP provides locations set by default or from configuration file. Now theme related resources can be found under site/modules/$mod_name/... or site/themes/$theme/modules/... so only theme related resources can be overriden for now.
This commit is contained in:
@@ -31,7 +31,7 @@ feature {NONE} -- Initialization
|
||||
admin_email := l_site_name + " <" + admin_email +">"
|
||||
end
|
||||
|
||||
if attached {CONFIG_READER} a_cms_api.module_configuration ("login", Void) as cfg then
|
||||
if attached {CONFIG_READER} a_cms_api.module_configuration_by_name ("login", Void) as cfg then
|
||||
if attached cfg.text_item ("smtp") as l_smtp then
|
||||
-- Overwrite global smtp setting if any.
|
||||
smtp_server := utf.utf_32_string_to_utf_8_string_8 (l_smtp)
|
||||
|
||||
@@ -529,7 +529,8 @@ feature {NONE} -- Helpers
|
||||
do
|
||||
create p.make_from_string ("templates")
|
||||
p := p.extended ("block_").appended (a_block_id).appended_with_extension ("tpl")
|
||||
p := a_response.module_resource_path (Current, p)
|
||||
|
||||
p := a_response.api.module_theme_resource_location (Current, p)
|
||||
if p /= Void then
|
||||
if attached p.entry as e then
|
||||
create Result.make (a_block_id, Void, p.parent, e)
|
||||
|
||||
@@ -149,26 +149,26 @@ feature -- Access: router
|
||||
-- TODO: for now, focused only on web interface, add REST api later. [2015-April-29]
|
||||
create l_node_handler.make (a_api, a_node_api)
|
||||
create l_uri_mapping.make_trailing_slash_ignored ("/node", l_node_handler)
|
||||
a_router.map_with_request_methods (l_uri_mapping, a_router.methods_get_post)
|
||||
a_router.map (l_uri_mapping, a_router.methods_get_post)
|
||||
|
||||
a_router.handle_with_request_methods ("/node/add/{type}", l_node_handler, a_router.methods_get_post)
|
||||
a_router.handle_with_request_methods ("/node/{id}/edit", l_node_handler, a_router.methods_get_post)
|
||||
a_router.handle_with_request_methods ("/node/{id}/delete", l_node_handler, a_router.methods_get_post)
|
||||
a_router.handle_with_request_methods ("/node/{id}/trash", l_node_handler, a_router.methods_get_post)
|
||||
a_router.handle ("/node/add/{type}", l_node_handler, a_router.methods_get_post)
|
||||
a_router.handle ("/node/{id}/edit", l_node_handler, a_router.methods_get_post)
|
||||
a_router.handle ("/node/{id}/delete", l_node_handler, a_router.methods_get_post)
|
||||
a_router.handle ("/node/{id}/trash", l_node_handler, a_router.methods_get_post)
|
||||
|
||||
a_router.handle_with_request_methods ("/node/{id}", l_node_handler, a_router.methods_get)
|
||||
a_router.handle ("/node/{id}", l_node_handler, a_router.methods_get)
|
||||
-- For now: no REST API handling... a_router.methods_get_put_delete + a_router.methods_get_post)
|
||||
|
||||
-- Nodes
|
||||
create l_nodes_handler.make (a_api, a_node_api)
|
||||
create l_uri_mapping.make_trailing_slash_ignored ("/nodes", l_nodes_handler)
|
||||
a_router.map_with_request_methods (l_uri_mapping, a_router.methods_get)
|
||||
a_router.map (l_uri_mapping, a_router.methods_get)
|
||||
|
||||
--Trash
|
||||
|
||||
create l_trash_handler.make (a_api, a_node_api)
|
||||
create l_uri_mapping.make_trailing_slash_ignored ("/trash", l_trash_handler)
|
||||
a_router.map_with_request_methods (l_uri_mapping, a_router.methods_get)
|
||||
a_router.map (l_uri_mapping, a_router.methods_get)
|
||||
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user