1 [%- USE JSON -%][%- USE HTML %][%- USE L %][%- USE LxERP %][%- USE P -%]
3 [%- INCLUDE 'common/flash.html' %]
5 [%- INCLUDE 'requirement_spec/_header.html' %]
7 [%- L.hidden_tag('requirement_spec_id', SELF.requirement_spec.id) -%]
9 <div class="tabwidget">
11 <li><a href="#function-blocks-tab">[%- LxERP.t8("Content") %]</a></li>
12 <li><a href="controller.pl?action=RequirementSpec/ajax_edit&id=[% HTML.url(SELF.requirement_spec.id) %]">[%- LxERP.t8("Basic settings") %]</a></li>
13 <li><a href="controller.pl?action=RequirementSpec/ajax_show_time_and_cost_estimate&id=[% HTML.url(SELF.requirement_spec.id) %]">[%- LxERP.t8("Time and cost estimate") %]</a></li>
14 <li><a href="controller.pl?action=RequirementSpecVersion/list&requirement_spec_id=[% HTML.url(SELF.requirement_spec.id) %]">[%- LxERP.t8("Versions") %]</a></li>
17 <div id="function-blocks-tab">
18 <div id="requirement_spec_version">
19 [%- INCLUDE 'requirement_spec/_version.html' requirement_spec=SELF.requirement_spec -%]
22 <div id="column-container" class="clearfix">
23 <div id="tree-column">
27 <div id="content-column" class="clearfix">
28 [% L.hidden_tag('current_content_type', SELF.requirement_spec_item.id ? 'section' : '') %]
29 [% L.hidden_tag('current_content_id', SELF.requirement_spec_item.id) %]
31 <div id="column-content">
32 [%- IF SELF.requirement_spec_item -%]
33 [%- INCLUDE 'requirement_spec_item/_section.html' requirement_spec_item=SELF.requirement_spec_item -%]
35 [%- INCLUDE 'requirement_spec_item/_no_section.html' -%]
43 <script type="text/javascript">
47 { data: [% JSON.json(LxERP.t8("Text blocks front")) %],
48 metadata: { type: "text-blocks-front" },
49 attr: { id: "tb-front", class: "text-block-context-menu" },
51 [% FOREACH tb = SELF.requirement_spec.text_blocks_sorted(output_position=0) %]
52 [% P.requirement_spec_text_block_jstree_data(tb).json %][% IF !loop.last %],[% END %]
56 { data: [% JSON.json(LxERP.t8("Sections")) %],
57 metadata: { type: "sections" },
58 attr: { id: "sections", class: "section-context-menu" },
60 [% FOREACH section = SELF.requirement_spec.sections %]
61 [% P.requirement_spec_item_jstree_data(section).json %][% IF !loop.last %],[% END %]
65 { data: [% JSON.json(LxERP.t8("Text blocks back")) %],
66 metadata: { type: "text-blocks-back" },
67 attr: { id: "tb-back", class: "text-block-context-menu" },
69 [% FOREACH tb = SELF.requirement_spec.text_blocks_sorted(output_position=1) %]
70 [% P.requirement_spec_text_block_jstree_data(tb).json %][% IF !loop.last %],[% END %]
77 initially_open: [ "tb-front", "tb-back", "sections"
78 [%- FOREACH section = SELF.requirement_spec.sections -%]
79 , "fb-[% section.id %]"
80 [%- FOREACH function_block = section.children -%]
81 , "fb-[% function_block.id -%]"
90 check_move: requirement_spec_tree_check_move,
95 theme: "requirement-spec"
97 plugins: [ "themes", "json_data", "ui", "crrm", "dnd" ]
99 .bind("move_node.jstree", requirement_spec_tree_node_moved)
100 .bind("click.jstree", requirement_spec_tree_node_clicked);
101 [% IF SELF.requirement_spec_item %]
102 $.jstree._reference("#tree").select_node('#fb-[% SELF.requirement_spec_item.id %]', true);
105 create_requirement_spec_context_menus();