Added {CMS_RESPONSE}.formats: CMS_FORMATS
This commit is contained in:
@@ -87,7 +87,7 @@ feature -- Forms ...
|
|||||||
elseif a_node /= Void and then attached a_node.format as s_format and then attached response.api.format (s_format) as f_format then
|
elseif a_node /= Void and then attached a_node.format as s_format and then attached response.api.format (s_format) as f_format then
|
||||||
f := f_format
|
f := f_format
|
||||||
else
|
else
|
||||||
f := response.api.formats.default_format
|
f := response.formats.default_format
|
||||||
end
|
end
|
||||||
if b /= Void then
|
if b /= Void then
|
||||||
a_node.set_content (b, Void, f.name) -- FIXME: summary
|
a_node.set_content (b, Void, f.name) -- FIXME: summary
|
||||||
@@ -139,7 +139,7 @@ feature -- Forms ...
|
|||||||
elseif a_node /= Void and then attached a_node.format as s_format and then attached response.api.format (s_format) as f_format then
|
elseif a_node /= Void and then attached a_node.format as s_format and then attached response.api.format (s_format) as f_format then
|
||||||
f := f_format
|
f := f_format
|
||||||
else
|
else
|
||||||
f := response.api.formats.default_format
|
f := response.formats.default_format
|
||||||
end
|
end
|
||||||
if b /= Void then
|
if b /= Void then
|
||||||
l_node.set_content (b, Void, f.name)
|
l_node.set_content (b, Void, f.name)
|
||||||
@@ -185,7 +185,7 @@ feature -- Output
|
|||||||
if attached node_api.cms_api.format (a_node.format) as f then
|
if attached node_api.cms_api.format (a_node.format) as f then
|
||||||
s.append (f.formatted_output (l_content))
|
s.append (f.formatted_output (l_content))
|
||||||
else
|
else
|
||||||
s.append (node_api.cms_api.formats.default_format.formatted_output (l_content))
|
s.append (a_response.formats.default_format.formatted_output (l_content))
|
||||||
end
|
end
|
||||||
|
|
||||||
s.append ("</p>")
|
s.append ("</p>")
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ feature -- Hooks
|
|||||||
create dbg.make
|
create dbg.make
|
||||||
create s.make_empty
|
create s.make_empty
|
||||||
dbg.append_information_to (a_response.request, a_response.response, s)
|
dbg.append_information_to (a_response.request, a_response.response, s)
|
||||||
create b.make ("debug-info", "Debug", s, a_response.api.formats.plain_text)
|
create b.make ("debug-info", "Debug", s, a_response.formats.plain_text)
|
||||||
a_response.add_block (b, "footer")
|
a_response.add_block (b, "footer")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -71,11 +71,13 @@ feature -- Access
|
|||||||
feature -- Formats
|
feature -- Formats
|
||||||
|
|
||||||
formats: CMS_FORMATS
|
formats: CMS_FORMATS
|
||||||
|
-- Available content formats.
|
||||||
once
|
once
|
||||||
create Result
|
create Result
|
||||||
end
|
end
|
||||||
|
|
||||||
format (a_format_name: detachable READABLE_STRING_GENERAL): detachable CONTENT_FORMAT
|
format (a_format_name: detachable READABLE_STRING_GENERAL): detachable CONTENT_FORMAT
|
||||||
|
-- Content format name `a_format_name' if any.
|
||||||
do
|
do
|
||||||
Result := formats.item (a_format_name)
|
Result := formats.item (a_format_name)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -59,15 +59,6 @@ feature -- Access
|
|||||||
|
|
||||||
response: WSF_RESPONSE
|
response: WSF_RESPONSE
|
||||||
|
|
||||||
api: CMS_API
|
|
||||||
-- Current CMS API.
|
|
||||||
|
|
||||||
setup: CMS_SETUP
|
|
||||||
-- Current setup
|
|
||||||
do
|
|
||||||
Result := api.setup
|
|
||||||
end
|
|
||||||
|
|
||||||
status_code: INTEGER
|
status_code: INTEGER
|
||||||
|
|
||||||
header: WSF_HEADER
|
header: WSF_HEADER
|
||||||
@@ -85,6 +76,23 @@ feature -- Access
|
|||||||
redirection: detachable READABLE_STRING_8
|
redirection: detachable READABLE_STRING_8
|
||||||
-- Location for eventual redirection.
|
-- Location for eventual redirection.
|
||||||
|
|
||||||
|
feature -- API
|
||||||
|
|
||||||
|
api: CMS_API
|
||||||
|
-- Current CMS API.
|
||||||
|
|
||||||
|
setup: CMS_SETUP
|
||||||
|
-- Current setup
|
||||||
|
do
|
||||||
|
Result := api.setup
|
||||||
|
end
|
||||||
|
|
||||||
|
formats: CMS_FORMATS
|
||||||
|
-- Available content formats.
|
||||||
|
do
|
||||||
|
Result := api.formats
|
||||||
|
end
|
||||||
|
|
||||||
feature -- Module
|
feature -- Module
|
||||||
|
|
||||||
module_resource_path (a_module: CMS_MODULE; a_resource: PATH): detachable PATH
|
module_resource_path (a_module: CMS_MODULE; a_resource: PATH): detachable PATH
|
||||||
|
|||||||
Reference in New Issue
Block a user