Added support for block options for the feed aggregator blocks.
Updated weight for primary_tabs block.
This commit is contained in:
@@ -230,6 +230,7 @@ feature -- Hook
|
|||||||
s: READABLE_STRING_8
|
s: READABLE_STRING_8
|
||||||
b: CMS_CONTENT_BLOCK
|
b: CMS_CONTENT_BLOCK
|
||||||
pref: STRING
|
pref: STRING
|
||||||
|
nb: INTEGER
|
||||||
do
|
do
|
||||||
if attached feed_aggregator_api as l_feed_api then
|
if attached feed_aggregator_api as l_feed_api then
|
||||||
pref := "feed."
|
pref := "feed."
|
||||||
@@ -238,7 +239,15 @@ feature -- Hook
|
|||||||
else
|
else
|
||||||
s := a_block_id
|
s := a_block_id
|
||||||
end
|
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)
|
create b.make (a_block_id, Void, l_content, Void)
|
||||||
b.set_is_raw (True)
|
b.set_is_raw (True)
|
||||||
a_response.add_block (b, "feed_" + s)
|
a_response.add_block (b, "feed_" + s)
|
||||||
|
|||||||
@@ -786,16 +786,6 @@ feature -- Blocks
|
|||||||
end
|
end
|
||||||
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
|
top_header_block: CMS_CONTENT_BLOCK
|
||||||
local
|
local
|
||||||
s: STRING
|
s: STRING
|
||||||
@@ -846,7 +836,18 @@ feature -- Blocks
|
|||||||
if attached message as m and then not m.is_empty then
|
if attached message as m and then not m.is_empty then
|
||||||
create Result.make ("message", Void, "<div id=%"message%">" + m + "</div>", Void)
|
create Result.make ("message", Void, "<div id=%"message%">" + m + "</div>", Void)
|
||||||
Result.set_is_raw (True)
|
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.set_weight (-2)
|
||||||
|
Result.add_css_class ("tabs")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user