Improved taxonomy by supporting tags, multiple terms allowed, and required kind of vocabulary for specific content type.

Updated node web form, to support taxonomy editing if allowed (specific support for CMS_VOCABULARY.is_tags: BOOLEAN).
Added notion of required or optional module dependencies.
This commit is contained in:
2015-12-03 19:24:58 +01:00
parent f1f3c126dd
commit 20dfce1396
27 changed files with 1339 additions and 84 deletions

View File

@@ -132,14 +132,16 @@ feature {NONE} -- Implementation: update
until
not a_module.is_enabled
loop
if
attached a_collection.item (ic.item) as mod and then
mod.is_enabled
then
update_module_status_within (mod, a_collection)
else
--| dependency not found or disabled
a_module.disable
if ic.item.is_required then
if
attached a_collection.item (ic.item.module_type) as mod and then
mod.is_enabled
then
update_module_status_within (mod, a_collection)
else
--| dependency not found or disabled
a_module.disable
end
end
end
end

View File

@@ -236,16 +236,22 @@ feature -- Access
sql_start
-- Set the cursor on first element.
require
no_error: not has_error
deferred
end
sql_after: BOOLEAN
-- Are there no more items to iterate over?
require
no_error: not has_error
deferred
end
sql_forth
-- Fetch next row from last sql execution, if any.
require
no_error: not has_error
deferred
end
@@ -255,6 +261,7 @@ feature -- Access
sql_item (a_index: INTEGER): detachable ANY
require
no_error: not has_error
valid_index: sql_valid_item_index (a_index)
deferred
end
@@ -446,7 +453,7 @@ feature {NONE} -- Implementation
across
l_removals as ic
loop
Result.remove_substring (ic.item.start_index - j, ic.item.end_index - j)
Result.remove_substring (ic.item.start_index - j - a_start_index + 1, ic.item.end_index - j - a_start_index + 1)
j := j + ic.item.end_index - ic.item.start_index + 1
end
-- a_offset.replace (a_offset.item j)

View File

@@ -29,8 +29,8 @@ feature -- Access
version: STRING
-- Version of the module?
dependencies: detachable LIST [TYPE [CMS_MODULE]]
-- Optional dependencies.
dependencies: detachable LIST [TUPLE [module_type: TYPE [CMS_MODULE]; is_required: BOOLEAN]]
-- Optional declaration for dependencies.
permissions: LIST [READABLE_STRING_8]
-- List of permission ids, used by this module, and declared.
@@ -55,16 +55,22 @@ feature {CMS_API} -- Module Initialization
end
add_dependency (a_type: TYPE [CMS_MODULE])
-- Add dependency using type of module `a_type'.
local
deps: like dependencies
-- Add required dependency using type of module `a_type'.
do
deps := dependencies
if deps = Void then
create {ARRAYED_LIST [TYPE [CMS_MODULE]]} deps.make (1)
dependencies := deps
put_dependency (a_type, True)
end
put_dependency (a_type: TYPE [CMS_MODULE]; is_required: BOOLEAN)
-- Add required or optional dependency using type of module `a_type', based on `is_required' value.
local
lst: like dependencies
do
lst := dependencies
if lst = Void then
create {ARRAYED_LIST [TUPLE [module_type: TYPE [CMS_MODULE]; is_required: BOOLEAN]]} lst.make (1)
dependencies := lst
end
deps.force (a_type)
lst.force ([a_type, is_required])
end
feature -- Status