Übersetzungen
[kivitendo-erp.git] / templates / webpages / requirement_spec / tree.html
1 [%- USE HTML %][%- USE L %][%- USE LxERP %][% USE P %][% USE JSON %]
2
3 [%- L.hidden_tag('requirement_spec_id', SELF.requirement_spec.id) -%]
4
5 <div id="column-container">
6  <div id="tree-column">
7   <div style="min-height: 32px; height: 32px;">
8    <div style="float: left">
9     [% L.button_tag("new_section_form()", LxERP.t8("New section"), id="new-section-button") %]
10    </div>
11    <div style="clear: both"></div>
12   </div>
13
14   <div id="tree"></div>
15  </div>
16
17  <div id="content-column" class="clearfix">
18   <p>There's beauty in the breakdown. 0</p>
19   <p>There's beauty in the breakdown. 1</p>
20   <p>There's beauty in the breakdown. 2</p>
21   <p>There's beauty in the breakdown. 3</p>
22   <p>There's beauty in the breakdown. 4</p>
23   <p>There's beauty in the breakdown. 5</p>
24   <p>There's beauty in the breakdown. 6</p>
25   <p>There's beauty in the breakdown. 7</p>
26   <p>There's beauty in the breakdown. 8</p>
27   <p>There's beauty in the breakdown. 9</p>
28   <p>There's beauty in the breakdown. 10</p>
29   <p>There's beauty in the breakdown. 11</p>
30   <p>There's beauty in the breakdown. 12</p>
31   <p>There's beauty in the breakdown. 13</p>
32   <p>There's beauty in the breakdown. 14</p>
33   <p>There's beauty in the breakdown. 15</p>
34   <p>There's beauty in the breakdown. 16</p>
35   <p>There's beauty in the breakdown. 17</p>
36   <p>There's beauty in the breakdown. 18</p>
37   <p>There's beauty in the breakdown. 19</p>
38   <p>There's beauty in the breakdown. 20</p>
39   <p>There's beauty in the breakdown. 21</p>
40   <p>There's beauty in the breakdown. 22</p>
41   <!-- <p>There's beauty in the breakdown. 23</p> -->
42   <!-- <p>There's beauty in the breakdown. 24</p> -->
43   <!-- <p>There's beauty in the breakdown. 25</p> -->
44   <!-- <p>There's beauty in the breakdown. 26</p> -->
45   <!-- <p>There's beauty in the breakdown. 27</p> -->
46   <!-- <p>There's beauty in the breakdown. 28</p> -->
47   <!-- <p>There's beauty in the breakdown. 29</p> -->
48   <!-- <p>There's beauty in the breakdown. 30</p> -->
49   <!-- <p>There's beauty in the breakdown. 31</p> -->
50   <!-- <p>There's beauty in the breakdown. 32</p> -->
51   <!-- <p>There's beauty in the breakdown. 33</p> -->
52   <!-- <p>There's beauty in the breakdown. 34</p> -->
53   <!-- <p>There's beauty in the breakdown. 35</p> -->
54  </div>
55 </div>
56
57 <script type="text/javascript">
58  <!--
59      var tree_data = [
60        { "data": [% JSON.json(LxERP.t8("Text blocks front")) %],
61          "metadata": { "type": "textblocks-front" },
62          "attr": { "id": "tb-front" },
63          "children": [
64 [% FOREACH tb = SELF.requirement_spec.text_blocks_for_position(0) %]
65  [% P.requirement_spec_text_block_jstree_data(tb).json %][% IF !loop.last %],[% END %]
66 [% END %]
67          ]
68        },
69
70        { "data": [% JSON.json(LxERP.t8("Sections")) %],
71          "metadata": { "type": "sections" },
72          "attr": { "id": "sections" },
73          "children": [
74
75 [% FOREACH section = SELF.requirement_spec.sections %]
76  [% P.requirement_spec_item_jstree_data(section).json %][% IF !loop.last %],[% END %]
77 [% END %]
78          ]
79        },
80
81        { "data": [% JSON.json(LxERP.t8("Text blocks back")) %],
82          "metadata": { "type": "textblocks-back" },
83          "attr": { "id": "tb-back" },
84          "children": [
85 [% FOREACH tb = SELF.requirement_spec.text_blocks_for_position(1) %]
86  [% P.requirement_spec_text_block_jstree_data(tb).json %][% IF !loop.last %],[% END %]
87 [% END %]
88          ]
89        }
90      ];
91
92      $(function() {
93        $('#tree').jstree({
94          "core": {
95            "animation": 0,
96            "initially_open": [ "tb-front", "tb-back", "sections"
97 [%- FOREACH section = SELF.requirement_spec.sections -%]
98  , "fb-[% section.id %]"
99  [%- FOREACH function_block = section.children -%]
100   , "fb-[% function_block.id -%]"
101  [%- END -%]
102 [%- END -%]
103  ]
104          },
105          "json_data": {
106            "data": tree_data
107          },
108          "crrm": {
109            "move": {
110              "check_move": check_move,
111              "open_move": true
112            }
113          },
114          "themes": {
115            "theme": "requirement-spec"
116          },
117          "plugins": [ "themes", "json_data", "ui", "crrm", "dnd" ]
118        })
119        .bind("move_node.jstree", node_moved);
120      });
121   -->
122 </script>