Added support for log stored in CMS_STORAGE.

Added support for custom value stored in CMS_STORAGE.
Added optional css classes addition to CMS_BLOCK output.
Refactored storage, to manage node from node module code only (or mostly).

TODO: improved view for a cms node, for now hardcoded.
This commit is contained in:
2015-04-15 16:39:03 +02:00
parent 2b25c23977
commit f2bb061488
59 changed files with 1693 additions and 414 deletions

View File

@@ -20,6 +20,9 @@ feature -- Access
deferred
end
html_options: detachable CMS_HTML_OPTIONS
-- Optional addition html options.
feature -- status report
is_enabled: BOOLEAN
@@ -31,6 +34,34 @@ feature -- status report
deferred
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
to_html (a_theme: CMS_THEME): STRING_8

View File

@@ -46,7 +46,7 @@ feature -- Access
feature -- Status report
is_raw: BOOLEAN
is_raw: BOOLEAN assign set_is_raw
-- Is raw?
-- If True, do not get wrapped it with block specific div

View File

@@ -31,9 +31,10 @@ feature -- Access
feature -- Status report
is_horizontal: BOOLEAN
is_horizontal: BOOLEAN assign set_is_horizontal
-- Is horizontal layout for the menu?
is_raw: BOOLEAN = False
is_raw: BOOLEAN assign set_is_raw
-- <Precursor>
feature -- Element change
@@ -52,11 +53,23 @@ feature -- Element change
title := a_title
end
set_is_horizontal (b: BOOLEAN)
-- Set `is_horizontal' to `b'.
do
is_horizontal := b
end
set_is_raw (b: BOOLEAN)
-- Set `is_raw' to `b'.
do
is_raw := b
end
feature -- Conversion
to_html (a_theme: CMS_THEME): STRING_8
do
Result := a_theme.menu_html (menu, is_horizontal)
Result := a_theme.menu_html (menu, is_horizontal, html_options)
end
end

View File

@@ -9,9 +9,8 @@ class
feature -- Access
item (a_name: detachable READABLE_STRING_GENERAL): CONTENT_FORMAT
item (a_name: detachable READABLE_STRING_GENERAL): detachable CONTENT_FORMAT
do
Result := default_format
if a_name /= Void then
across
all_formats as c