]> wagnertech.de Git - mfinanz.git/blob - templates/webpages/requirement_spec/show.html
Pflichtenhefte: Zeit- und Kostenschätzungsmaske
[mfinanz.git] / templates / webpages / requirement_spec / show.html
1 [%- USE JSON -%][%- USE HTML %][%- USE L %][%- USE LxERP %][%- USE P -%]
2
3 [%- INCLUDE 'common/flash.html' %]
4
5 [%- INCLUDE 'requirement_spec/_header.html' %]
6
7 [%- L.hidden_tag('requirement_spec_id', SELF.requirement_spec.id) -%]
8
9 <div class="tabwidget">
10  <ul>
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  </ul>
15
16  <div id="function-blocks-tab">
17   <div id="requirement_spec_version">
18     [%- INCLUDE 'requirement_spec/_version.html' requirement_spec=SELF.requirement_spec -%]
19   </div>
20
21   <div id="column-container" class="clearfix">
22    <div id="tree-column">
23     <div id="tree"></div>
24    </div>
25
26    <div id="content-column" class="clearfix">
27     [% L.hidden_tag('current_content_type', SELF.requirement_spec_item.id ? 'section' : '') %]
28     [% L.hidden_tag('current_content_id',   SELF.requirement_spec_item.id) %]
29
30     <div id="column-content">
31      [%- IF SELF.requirement_spec_item -%]
32       [%- INCLUDE 'requirement_spec_item/_section.html' requirement_spec_item=SELF.requirement_spec_item -%]
33      [%- ELSE -%]
34       [%- INCLUDE 'requirement_spec_item/_no_section.html' -%]
35      [%- END -%]
36     </div>
37    </div>
38   </div>
39  </div>
40 </div>
41
42 <script type="text/javascript">
43  <!--
44 $(function() {
45   var tree_data = [
46     { data:     [% JSON.json(LxERP.t8("Text blocks front")) %],
47       metadata: { type: "text-blocks-front" },
48       attr:     { id: "tb-front", class: "text-block-context-menu" },
49       children: [
50 [% FOREACH tb = SELF.requirement_spec.text_blocks_for_position(0) %]
51  [% P.requirement_spec_text_block_jstree_data(tb).json %][% IF !loop.last %],[% END %]
52 [% END %]
53       ]},
54
55     { data:     [% JSON.json(LxERP.t8("Sections")) %],
56       metadata: { type: "sections" },
57       attr:     { id: "sections", class: "section-context-menu" },
58       children: [
59 [% FOREACH section = SELF.requirement_spec.sections %]
60  [% P.requirement_spec_item_jstree_data(section).json %][% IF !loop.last %],[% END %]
61 [% END %]
62       ]},
63
64     { data:     [% JSON.json(LxERP.t8("Text blocks back")) %],
65       metadata: { type: "text-blocks-back" },
66       attr:     { id: "tb-back", class: "text-block-context-menu" },
67       children: [
68 [% FOREACH tb = SELF.requirement_spec.text_blocks_for_position(1) %]
69  [% P.requirement_spec_text_block_jstree_data(tb).json %][% IF !loop.last %],[% END %]
70 [% END %]
71       ]}];
72
73   $('#tree').jstree({
74     core: {
75       animation: 0,
76       initially_open: [ "tb-front", "tb-back", "sections"
77 [%- FOREACH section = SELF.requirement_spec.sections -%]
78         , "fb-[% section.id %]"
79  [%- FOREACH function_block = section.children -%]
80         , "fb-[% function_block.id -%]"
81  [%- END -%]
82 [%- END -%]
83     ]},
84     json_data: {
85       data: tree_data
86     },
87     crrm: {
88       move: {
89         check_move: requirement_spec_tree_check_move,
90         open_move:  true
91       }
92     },
93     themes: {
94       theme: "requirement-spec"
95     },
96     plugins: [ "themes", "json_data", "ui", "crrm", "dnd" ]
97   })
98   .bind("move_node.jstree", requirement_spec_tree_node_moved)
99   .bind("click.jstree",     requirement_spec_tree_node_clicked);
100 [% IF SELF.requirement_spec_item %]
101   $.jstree._reference("#tree").select_node('#fb-[% SELF.requirement_spec_item.id %]', true);
102 [% END %]
103
104   create_requirement_spec_context_menus();
105 });
106
107   -->
108 </script>