Added support for block options for the feed aggregator blocks.

Updated weight for primary_tabs block.
This commit is contained in:
2015-10-17 00:17:59 +02:00
parent 23c395513b
commit 62bf58ce6d
2 changed files with 21 additions and 11 deletions

View File

@@ -230,6 +230,7 @@ feature -- Hook
s: READABLE_STRING_8
b: CMS_CONTENT_BLOCK
pref: STRING
nb: INTEGER
do
if attached feed_aggregator_api as l_feed_api then
pref := "feed."
@@ -238,7 +239,15 @@ feature -- Hook
else
s := a_block_id
end
if attached feed_to_html (s, 0, True, a_response) as l_content then
nb := 0
if
attached a_response.block_options (a_block_id) as l_options and then
attached {READABLE_STRING_GENERAL} l_options.item ("size") as l_size and then
l_size.is_integer
then
nb := l_size.to_integer
end
if attached feed_to_html (s, nb, True, a_response) as l_content then
create b.make (a_block_id, Void, l_content, Void)
b.set_is_raw (True)
a_response.add_block (b, "feed_" + s)

View File

@@ -786,16 +786,6 @@ feature -- Blocks
end
end
primary_tabs_block: detachable CMS_MENU_BLOCK
do
if attached primary_tabs as m and then not m.is_empty then
create Result.make (m)
Result.is_horizontal := True
Result.set_is_raw (True)
Result.add_css_class ("tabs")
end
end
top_header_block: CMS_CONTENT_BLOCK
local
s: STRING
@@ -846,7 +836,18 @@ feature -- Blocks
if attached message as m and then not m.is_empty then
create Result.make ("message", Void, "<div id=%"message%">" + m + "</div>", Void)
Result.set_is_raw (True)
Result.set_weight (-3)
end
end
primary_tabs_block: detachable CMS_MENU_BLOCK
do
if attached primary_tabs as m and then not m.is_empty then
create Result.make (m)
Result.is_horizontal := True
Result.set_is_raw (True)
Result.set_weight (-2)
Result.add_css_class ("tabs")
end
end