Added feed aggregation module.

Improved the CMS Block system to support condition.
This commit is contained in:
2015-09-09 16:47:47 +02:00
parent ec53a2682b
commit abebd00a4f
12 changed files with 342 additions and 1 deletions

View File

@@ -0,0 +1,24 @@
note
description: "Condition for block to be displayed."
date: "$Date$"
revision: "$Revision$"
deferred class
CMS_BLOCK_CONDITION
feature -- Access
description: READABLE_STRING_32
deferred
end
feature -- Evaluation
satisfied_for_response (res: CMS_RESPONSE): BOOLEAN
deferred
end
note
copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
end

View File

@@ -0,0 +1,46 @@
note
description: "Condition for block to be displayed."
date: "$Date$"
revision: "$Revision$"
class
CMS_BLOCK_EXPRESSION_CONDITION
inherit
CMS_BLOCK_CONDITION
create
make
feature {NONE} -- Initialization
make (a_exp: READABLE_STRING_8)
do
expression := a_exp
end
feature -- Access
description: READABLE_STRING_32
do
create Result.make_from_string_general ("Expression: %"")
Result.append_string_general (expression)
Result.append_character ('%"')
end
expression: STRING
feature -- Evaluation
satisfied_for_response (res: CMS_RESPONSE): BOOLEAN
do
if expression.same_string ("is_front") then
Result := res.is_front
elseif expression.starts_with ("path=") then
end
end
note
copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
end

View File

@@ -39,6 +39,9 @@ feature -- Status report
deferred
end
conditions: detachable LIST [CMS_BLOCK_CONDITION]
-- Optional block condition to be enabled.
feature -- Element change
add_css_class (a_class: READABLE_STRING_8)