[%- USE JSON -%][%- USE HTML %][%- USE L %][%- USE LxERP %][%- USE P -%]
+[% SET sections = SELF.requirement_spec.sections_sorted || [] %]
[%- INCLUDE 'common/flash.html' %]
metadata: { type: "sections" },
attr: { id: "sections", class: "section-context-menu" },
children: [
-[% FOREACH section = SELF.requirement_spec.sections %]
+[% FOREACH section = sections %]
[% P.requirement_spec_item_jstree_data(section).json %][% IF !loop.last %],[% END %]
[% END %]
]},
];
var initially_open = ['tb-front', 'tb-back', 'sections'
-[%- FOREACH section = SELF.requirement_spec.sections -%]
+[%- FOREACH section = sections -%]
, "fb-[% section.id %]"
[%- FOREACH function_block = section.children -%]
, "fb-[% function_block.id -%]"