Implemented custom cms format, and associated administration pages.

Applied to existing filter and format.
Added embedded_video filter (initially contribute by Javier Velilla).
This commit is contained in:
Jocelyn Fiat
2017-03-30 11:58:44 +02:00
parent 134f876e62
commit 0ce7d11e52
20 changed files with 758 additions and 43 deletions

View File

@@ -10,6 +10,8 @@ class
inherit
CONTENT_FORMAT
DEBUG_OUTPUT
create
make,
make_from_format
@@ -55,6 +57,27 @@ feature -- Access
end
end
feature -- Status report
debug_output: STRING
-- String that should be displayed in debugger to represent `Current'.
do
create Result.make_from_string (name)
if not title.same_string (name) then
Result.append_character (' ')
Result.append_character ('"')
Result.append (title)
Result.append_character ('"')
end
Result.append_character (' ')
across
filters as ic
loop
Result.append_character ('+')
Result.append (ic.item.name)
end
end
feature -- Element change
set_title (a_title: detachable READABLE_STRING_8)
@@ -108,6 +131,6 @@ feature -- Element change
note
copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
copyright: "2011-2017, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
end

View File

@@ -36,8 +36,33 @@ feature -- Access
end
end
is_empty: BOOLEAN
do
Result := count = 0
end
count: INTEGER
do
Result := items.count
end
feature -- Element change
remove (a_name: READABLE_STRING_GENERAL)
do
from
items.start
until
items.after
loop
if a_name.is_case_insensitive_equal (items.item.name) then
items.remove
else
items.forth
end
end
end
extend (f: CMS_FORMAT)
-- Add format `f' to available formats.
do
@@ -46,6 +71,12 @@ feature -- Element change
has_format: item (f.name) = f
end
wipe_out
-- Wipe out the items.
do
items.wipe_out
end
feature -- Access
new_cursor: ITERATION_CURSOR [CMS_FORMAT]
@@ -79,7 +110,7 @@ invariant
items /= Void
note
copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
copyright: "2011-2017, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software