diff --git a/draft/application/cms/src/kernel/link/cms_link.e b/draft/application/cms/src/kernel/link/cms_link.e index c9b37941..51194356 100644 --- a/draft/application/cms/src/kernel/link/cms_link.e +++ b/draft/application/cms/src/kernel/link/cms_link.e @@ -32,6 +32,10 @@ feature -- status report deferred end + has_children: BOOLEAN + deferred + end + feature -- Query parent: detachable CMS_LINK diff --git a/draft/application/cms/src/kernel/link/cms_local_link.e b/draft/application/cms/src/kernel/link/cms_local_link.e index 16289dea..32b34fe8 100644 --- a/draft/application/cms/src/kernel/link/cms_local_link.e +++ b/draft/application/cms/src/kernel/link/cms_local_link.e @@ -33,12 +33,29 @@ feature -- Status report is_expandable: BOOLEAN + has_children: BOOLEAN + do + Result := attached children as l_children and then not l_children.is_empty + end + permission_arguments: detachable ITERABLE [STRING] children: detachable LIST [CMS_LINK] feature -- Element change + add_link (lnk: CMS_LINK) + local + lst: like children + do + lst := children + if lst = Void then + create {ARRAYED_LIST [CMS_LINK]} lst.make (1) + children := lst + end + lst.force (lnk) + end + set_children (lst: like children) do children := lst @@ -47,11 +64,17 @@ feature -- Element change set_expanded (b: like is_expanded) do is_expanded := b + if b then + is_expandable := True + end end set_expandable (b: like is_expandable) do is_expandable := b + if not b then + is_expanded := False + end end get_is_active (req: WSF_REQUEST)