Files
ROC/src/kernel/content/cms_block.e
Jocelyn Fiat 3496536751 Added CMS_API.request: WSF_REQUEST to ease dev of ROC CMS code.
- Removed CMS_REQUEST_UTIL
  - centralize a few request related code into CMS_API
Added CMS_API.user, CMS_API.set_user (CMS_USER), ... and user related routines.

Refactored Auth related code
  - added various abstractions to factorize implementation and harmonize solutions.
  - revisited the logout strategy.
  - updated the account info page, and remove info user should not care about.
  - simplified the process, and encourage auth module to follow same design.

Added CMS_LINK helper routines to modify the related query string.
Removed CMS_USER.profile (and related routines)
   - It was not used so far.
   - it will probably a specific module later, if needed.

Update various module to avoid fetching user from sql directly, and let this task to CMS_USER_API.

Removed CMS_NODE_API.node_author (a_node: CMS_NODE): detachable CMS_USER,
   - as the info is already in CMS_NODE.author

Added CMS_RESPONSE.redirection_delay, if ever one code want to redirect after a few seconds.
Added the request uri info to the not found cms response.
2016-01-29 21:58:49 +01:00

124 lines
2.5 KiB
Plaintext

note
description: "Describe content to be placed inside Regions."
date: "$Date: 2015-01-30 19:37:02 +0100 (ven., 30 janv. 2015) $"
deferred class
CMS_BLOCK
inherit
CMS_BLOCK_SETUP
undefine
is_equal
end
COMPARABLE
DEBUG_OUTPUT
undefine
is_equal
end
feature -- Access
name: READABLE_STRING_8
-- Name identifying Current block.
deferred
end
html_options: detachable CMS_HTML_OPTIONS
-- Optional addition html options.
feature -- Status report
is_empty: BOOLEAN
-- Is current block empty?
deferred
end
is_enabled: BOOLEAN
-- Is current block enabled?
is_raw: BOOLEAN
-- Is raw?
-- If True, do not get wrapped it with block specific div
deferred
end
feature -- Comparison
is_less alias "<" (other: like Current): BOOLEAN
-- <Precursor>.
do
Result := weight < other.weight
end
feature -- Element change
add_css_class (a_class: READABLE_STRING_8)
-- Add css class `a_class'.
local
opts: like html_options
do
opts := html_options
if opts = Void then
create opts
html_options := opts
end
opts.add_css_class (a_class)
end
remove_css_class (a_class: READABLE_STRING_GENERAL)
-- Remove css class `a_class'.
local
opts: like html_options
do
opts := html_options
if opts = Void then
create opts
html_options := opts
end
opts.remove_css_class (a_class)
end
feature -- Conversion
append_to_html (a_theme: CMS_THEME; a_output: STRING_8)
-- Append HTML representation of Current block to `a_output'.
do
a_output.append (to_html (a_theme))
end
to_html (a_theme: CMS_THEME): STRING_8
-- HTML representation of Current block.
deferred
end
feature -- Status report
debug_output: STRING_32
-- String that should be displayed in debugger to represent `Current'.
do
create Result.make_from_string_general ("Block")
if is_raw then
Result.append_string_general (" <raw>")
end
if not is_enabled then
Result.append_string_general (" <disabled>")
end
Result.append_character (' ')
Result.append_character ('[')
Result.append_string_general (name)
Result.append_character (']')
if attached title as l_title then
Result.append_character (' ')
Result.append_character ('%"')
Result.append (l_title)
Result.append_character ('%"')
end
end
note
copyright: "2011-2016, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
end