Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 97a566ba

Von Hans Peter Schlaepfer vor fast 6 Jahren hinzugefügt

  • ID 97a566ba50d7fdd2e50ca4979c80b7eccba5798f
  • Vorgänger aecdcab3
  • Nachfolger 9a765725

Neues kivitendo Design Aenderungen in templates/webpages/requirement_spec/..

Unterschiede anzeigen:

templates/webpages/requirement_spec/_edit_time_and_cost_estimate.html
1
[%- USE LxERP -%][%- USE L -%][%- USE HTML -%][%- USE P -%]
2
[%- DEFAULT id_prefix = 'time_and_cost_estimate_form' %]
1
[% USE LxERP %]
2
[% USE L %]
3
[% USE HTML %]
4
[% USE P %]
5
[% DEFAULT id_prefix = 'time_and_cost_estimate_form' %]
3 6

  
4 7
<div id="time_cost_estimate_form_container" class="edit-time-cost-estimate-context-menu">
5
 [%- IF !SELF.requirement_spec.sections.size %]
6
  <p>[%- LxERP.t8("Neither sections nor function blocks have been created yet.") %]</p>
8
<div class="wrapper">
9
 [% IF !SELF.requirement_spec.sections.size %]
10
  <p>[% LxERP.t8("Neither sections nor function blocks have been created yet.") %]</p>
7 11

  
8
 [%- ELSE %]
12
 [% ELSE %]
9 13

  
10
  [%- SET at_least_one_function_block = 0 %]
14
  [% SET at_least_one_function_block = 0 %]
11 15

  
12 16
  <form method="post" id="edit_time_cost_estimate_form">
13
   [%- L.hidden_tag('id', SELF.requirement_spec.id, id=id_prefix _ '_id') -%]
17
   [% L.hidden_tag('id', SELF.requirement_spec.id, id=id_prefix _ '_id') %]
14 18

  
15 19
   [%# time-cost-estimate-context-menu %]
16
   <table class="time-cost-estimate">
17
    <tbody>
18
     [%- FOREACH section = SELF.requirement_spec.sections_sorted %]
19
      <tr class="listheading">
20
       <th>[%- LxERP.t8("Function block") %]</th>
21
       <th>[%- LxERP.t8("Complexity") %]</th>
22
       <th>[%- LxERP.t8("Risk") %]</th>
23
       <th align="right">[%- LxERP.t8("Time estimate") %]</th>
20
   <table class="tbl-list time-cost-estimate test">
21
     [% FOREACH section = SELF.requirement_spec.sections_sorted %]
22
     <thead>
23
      <tr>
24
       <th>[% LxERP.t8("Function block") %]</th>
25
       <th>[% LxERP.t8("Complexity") %]</th>
26
       <th>[% LxERP.t8("Risk") %]</th>
27
       <th class="right">[% LxERP.t8("Time estimate") %]</th>
24 28
      </tr>
25

  
29
      </thead>
30
    <tbody>
26 31
      <tr class="listrow section">
27
       <td colspan="5">[%- HTML.escape(section.fb_number) %]: [%- HTML.escape(section.title) %]</td>
32
       <th class="caption" colspan="4">[% HTML.escape(section.fb_number) %]: [% HTML.escape(section.title) %]</td>
28 33
      </tr>
29 34

  
30
      [%- IF section.children.size %]
31
       [%- SET at_least_one_function_block = 1 %]
32
       [%- FOREACH child = section.children_sorted %]
33
        [%- INCLUDE 'requirement_spec/_edit_time_and_cost_estimate_item.html'
35
      [% IF section.children.size %]
36
       [% SET at_least_one_function_block = 1 %]
37
       [% FOREACH child = section.children_sorted %]
38
        [% INCLUDE 'requirement_spec/_edit_time_and_cost_estimate_item.html'
34 39
                    id_prefix = id_prefix
35 40
                    item      = child
36 41
                    level     = 1 %]
37
       [%- END %]
38
      [%- END -%]
39
     [%- END -%]
42
       [% END %]
43
      [% END %]
44
     [% END %]
40 45
    </tbody>
41 46
   </table>
42 47

  
43 48
   [% L.button_tag("kivi.requirement_spec.standard_time_cost_estimate_ajax_call('save')", LxERP.t8("Save")) %]
44 49
  </form>
45
 [%- END %]
50
 [% END %]
51
</div>
46 52
</div>
templates/webpages/requirement_spec/_edit_time_and_cost_estimate_item.html
1
[%- USE HTML -%][%- USE LxERP -%][%- USE P -%][%- USE L -%]
2
<tr class="listrow">
3
 [% L.hidden_tag("requirement_spec_items[+].id", item.id, id = id_prefix _ '_item_id') %]
1
[% USE HTML %]
2
[% USE LxERP %]
3
[% USE P %]
4
[% USE L %]
4 5

  
5
 <td style="padding-left: [%- level * 50 -%]px">
6
  [%- item.fb_number _ ": " _ item.description_as_restricted_html -%]
6
<tr>
7
 <td style="padding-left:[% level * 50 %]px;">
8
  [% L.hidden_tag("requirement_spec_items[+].id", item.id, id = id_prefix _ '_item_id') %]
9
  [% item.fb_number _ ": " _ item.description_as_restricted_html %]
7 10
 </td>
8 11
 <td>
9
  [%- L.select_tag('requirement_spec_items[].complexity_id', SELF.complexities, id=id_prefix _ '_complexity_id_' _ item.id, title_key='description', default=item.complexity_id, style="width: 100%") %]<br>
12
  [% L.select_tag('requirement_spec_items[].complexity_id', SELF.complexities, id=id_prefix _ '_complexity_id_' _ item.id, title_key='description', default=item.complexity_id, style="width: 100%") %]<br>
10 13
 </td>
11 14
 <td>
12
  [%- L.select_tag('requirement_spec_items[].risk_id', SELF.risks, id=id_prefix _ '_risk_id_' _ item.id, title_key='description', default=item.risk_id, style="width: 100%") %]<br>
15
  [% L.select_tag('requirement_spec_items[].risk_id', SELF.risks, id=id_prefix _ '_risk_id_' _ item.id, title_key='description', default=item.risk_id, style="width: 100%") %]<br>
13 16
 </td>
14
 [%- IF !item.children.size -%]
15
  <td align="right" nowrap>[%- P.man_days_tag('requirement_spec_items[].time_estimation', item, id=id_prefix _ '_time_estimation') %]</td>
16
 [%- ELSE -%]
17
  <td>&nbsp;</td>
18
 [%- END -%]
17
 [% IF !item.children.size %]
18
    <td class="date">[% P.man_days_tag('requirement_spec_items[].time_estimation', item, id=id_prefix _ '_time_estimation') %]</td>
19
 [% ELSE %]
20
    <td>&nbsp;</td>
21
 [% END %]
19 22
</tr>
20 23

  
21
[%- IF item.children.size -%]
22
 [%- FOREACH child = item.children_sorted -%]
23
  [%- INCLUDE 'requirement_spec/_edit_time_and_cost_estimate_item.html'
24
[% IF item.children.size %]
25
 [% FOREACH child = item.children_sorted %]
26
  [% INCLUDE 'requirement_spec/_edit_time_and_cost_estimate_item.html'
24 27
              id_prefix = id_prefix
25 28
              item      = child
26
              level     = level + 1 -%]
27
 [%- END -%]
28
[%- END -%]
29
              level     = level + 1 %]
30
 [% END %]
31
[% END %]
templates/webpages/requirement_spec/_filter.html
1
[%- USE HTML %][%- USE L %][%- USE LxERP %]
1
[% USE HTML %]
2
[% USE L %]
3
[% USE LxERP %]
2 4

  
3
<div class="filter_toggle">
4
 <a href="#" onClick="$('.filter_toggle').toggle(); $('#filter_customer_name_substr_ilike').focus();">[% LxERP.t8("Show Filter") %]</a>
5
</div>
5
<div class="wrapper">
6 6

  
7
<div class="filter_toggle" style="display:none">
8
 <a href="#" onClick="javascript:$('.filter_toggle').toggle()">[% LxERP.t8("Hide Filter") %]</a>
9

  
10
 <form method="post" action="controller.pl" id="search_form">
11
  [%- L.hidden_tag("is_template", is_template) %]
12

  
13
  <p>
14
   <table>
15
    <tr>
16
     <th align="right">[% LxERP.t8("Title") %]</th>
17
     <td>[% L.input_tag('filter.title:substr::ilike', filter.title_substr__ilike, class="rs_input_field") %]</td>
18
    </tr>
19

  
20
[%- UNLESS is_template %]
21
    <tr>
22
     <th align="right">[% LxERP.t8("Customer") %]</th>
23
     <td>[% L.input_tag('filter.customer.name:substr::ilike', filter.customer.name_substr__ilike, class="rs_input_field") %]</td>
24
    </tr>
25

  
26
    <tr>
27
     <th align="right">[% LxERP.t8("Customer Number") %]</th>
28
     <td>[% L.input_tag('filter.customer.customernumber:substr::ilike', filter.customer.customernumber_substr__ilike, class="rs_input_field") %]</td>
29
    </tr>
30

  
31
    <tr>
32
     <th align="right">[% LxERP.t8("Requirement Spec Type") %]</th>
33
     <td>[% L.select_tag('filter.type_id', SELF.types, default=filter.type_id, title_key="description", with_empty=1, class="rs_input_field") %]</td>
34
    </tr>
35

  
36
    <tr>
37
     <th align="right">[% LxERP.t8("Requirement Spec Status") %]</th>
38
     <td>[% L.select_tag('filter.status_id[]', SELF.statuses, default=filter.status_id_, title_key="description", multiple=1, class="rs_input_field") %][%# NOTE: the trailing '_' is NOT a mistake -- look at SL::Controller::Helper::Filtered for the explanation! %]</td>
39
    </tr>
40

  
41
    <tr>
42
     <th align="right">[% LxERP.t8("Project Number") %]</th>
43
     <td>[% L.input_tag('filter.project.projectnumber:substr::ilike', filter.project.projectnumber_substr__ilike, class="rs_input_field") %]</td>
44
    </tr>
45
    <tr>
46
     <th align="right">[% LxERP.t8("Project Description") %]</th>
47
     <td>[% L.input_tag('filter.project.description:substr::ilike', filter.project.description_substr__ilike, class="rs_input_field") %]</td>
48
    </tr>
49

  
50
    [% FOREACH cvar_cfg = SELF.cvar_configs %]
51
     [%- IF cvar_cfg.searchable %]
7
[% BLOCK filter_toggle_panel %]
8
<form method="post" action="controller.pl" id="search_form">
9
  [% L.hidden_tag("is_template", is_template) %]
10
  <table class="tbl-horizontal">
11
    <tbody>
52 12
      <tr>
53
       <th align="right">[% HTML.escape(cvar_cfg.description) %]</th>
54
       <td>[% INCLUDE 'common/render_cvar_filter_input.html' cvar_cfg=cvar_cfg cvar_class="rs_input_field" %]</td>
13
        <th>[% LxERP.t8("Title") %]</th>
14
        <td>[% L.input_tag('filter.title:substr::ilike', filter.title_substr__ilike, class="rs_input_field wi-lightwide") %]</td>
55 15
      </tr>
56
     [% END %]
57
    [% END %]
58

  
59
    [% L.hidden_tag("include_cvars.dummy__", 1) %]
60
    [% IF SELF.includeable_cvar_configs.size %]
61
     <tr>
62
      <th align="right">[% LxERP.t8("Include in Report") %]</th>
63
      <td>
64
       <table>
16
      [% UNLESS is_template %]
17
        <tr>
18
          <th>[% LxERP.t8("Customer") %]</th>
19
          <td>[% L.input_tag('filter.customer.name:substr::ilike', filter.customer.name_substr__ilike, class="rs_input_field wi-lightwide") %]</td>
20
        </tr>
65 21
        <tr>
66
         [% FOREACH cvar_cfg = SELF.includeable_cvar_configs %]
22
          <th>[% LxERP.t8("Customer Number") %]</th>
23
          <td>[% L.input_tag('filter.customer.customernumber:substr::ilike', filter.customer.customernumber_substr__ilike, class="rs_input_field wi-lightwide") %]</td>
24
        </tr>
25
        <tr>
26
          <th>[% LxERP.t8("Requirement Spec Type") %]</th>
27
          <td>[% L.select_tag('filter.type_id', SELF.types, default=filter.type_id, title_key="description", with_empty=1, class="rs_input_field wi-lightwide") %]</td>
28
        </tr>
29
        <tr>
30
          <th>[% LxERP.t8("Requirement Spec Status") %]</th>
67 31
          <td>
68
           [% name__ = cvar_cfg.name;
69
              L.checkbox_tag("include_cvars." _ name__, value="1", checked=(SELF.include_cvars.$name__ ? 1 : ''), label=cvar_cfg.description) %]
32
            [% L.select_tag('filter.status_id[]', SELF.statuses, default=filter.status_id_, title_key="description", multiple=1, class="rs_input_field wi-wide") %]
33
            [%# NOTE: the trailing '_' is NOT a mistake -- look at SL::Controller::Helper::Filtered for the explanation! %]
70 34
          </td>
71
          [%- IF !loop.last && ((loop.count % 3) == 0) %]
72
           </tr><tr>
73
          [% END %]
74
         [% END %]
75 35
        </tr>
76
       </table>
77
      </td>
78
     </tr>
79
    [% END %]
80
[%- END %]
81
   </table>
82
  </p>
83
 </form>
84
</div>
36
        <tr>
37
          <th>[% LxERP.t8("Project Number") %]</th>
38
          <td>[% L.input_tag('filter.project.projectnumber:substr::ilike', filter.project.projectnumber_substr__ilike, class="rs_input_field wi-lightwide") %]</td>
39
        </tr>
40
        <tr>
41
          <th>[% LxERP.t8("Project Description") %]</th>
42
          <td>[% L.input_tag('filter.project.description:substr::ilike', filter.project.description_substr__ilike, class="rs_input_field wi-lightwide") %]</td>
43
        </tr>
44
        [% FOREACH cvar_cfg = SELF.cvar_configs %]
45
          [% IF cvar_cfg.searchable %]
46
            <tr>
47
              <th>[% HTML.escape(cvar_cfg.description) %]</th>
48
              <td>[% INCLUDE 'common/render_cvar_filter_input.html' cvar_cfg=cvar_cfg cvar_class="rs_input_field" %]</td>
49
            </tr>
50
          [% END %]
51
        [% END # %]
52
      [% END # /UNLESS is_template %]
53
    </tbody>
54
  </table>
55
  [% L.hidden_tag("include_cvars.dummy__", 1) %] [% IF SELF.includeable_cvar_configs.size %]
56
  <table class="tbl-plain">
57
    <caption>[% LxERP.t8("Include in Report") %]</caption>
58
    <tbody>
59
      [% FOREACH cvar_cfg = SELF.includeable_cvar_configs %]
60
      <tr>
61
        <td>
62
          [% name__ = cvar_cfg.name; L.checkbox_tag("include_cvars." _ name__, value="1", checked=(SELF.include_cvars.$name__ ? 1 : ''), label=cvar_cfg.description) %]
63
        </td>
64
      [% IF !loop.last && ((loop.count % 3) == 0) %]
65
      </tr>
66
      <tr>
67
        [% END %]
68
      </tr>
69
      [% END %]
70
    <tbody>
71
  </table>
72
  [% END %]
73
</form>
74
[% END # /BLOCK filter_toggle_panel %]
75

  
76
[% INCLUDE 'common/toggle_panel.html' %]
77

  
78
</div><!-- /.wrapper -->
templates/webpages/requirement_spec/_form.html
1
[%- USE LxERP -%][%- USE L -%][%- USE HTML -%]
2
[%- DEFAULT id_prefix = 'basic_settings_form'
3
            submit_as = 'post'
1
[% USE LxERP %]
2
[% USE L %]
3
[% USE HTML %]
4
[% 
5
  DEFAULT id_prefix = 'basic_settings_form'
6
          submit_as = 'post'
4 7
%]
5 8
<form method="post" action="controller.pl" id="[% id_prefix %]"[% UNLESS submit_as == 'post' %] class="edit-basic-settings-context-menu"[% END %]>
6
 <h2>[% LxERP.t8("Edit general settings") %]</h2>
9
<div class="wrapper">
7 10

  
8
 [% L.hidden_tag("id", SELF.requirement_spec.id, id=id_prefix _ '_id') %]
9
 [% L.hidden_tag("requirement_spec.is_template", SELF.requirement_spec.is_template, id=id_prefix _ '_is_template') %]
11
[% L.hidden_tag("id", SELF.requirement_spec.id, id=id_prefix _ '_id') %]
12
[% L.hidden_tag("requirement_spec.is_template", SELF.requirement_spec.is_template, id=id_prefix _ '_is_template') %]
10 13

  
11
 <table class="rs_input_field">
12
  <tr>
13
   <td>[% LxERP.t8("Title") %]</td>
14
   <td>[% L.input_tag("requirement_spec.title", SELF.requirement_spec.title, id=id_prefix _ '_title') %]</td>
15
  </tr>
14
<table class="tbl-horizontal rs_input_field">
15
  <caption>[% LxERP.t8("Edit general settings") %]</caption>
16
  <tbody>
17
    <tr>
18
     <th>[% LxERP.t8("Title") %]</th>
19
     <td>[% L.input_tag("requirement_spec.title", SELF.requirement_spec.title, id=id_prefix _ '_title') %]</td>
20
    </tr>
21
    <tr>
22
     <th>[% LxERP.t8("Requirement Spec Type") %]</th>
23
     <td>[% L.select_tag("requirement_spec.type_id",  SELF.types, default=SELF.requirement_spec.type_id, title_key="description", id=id_prefix _ '_type_id') %]</td>
24
    </tr>
25
    [% UNLESS SELF.requirement_spec.is_template %]
26
      <tr>
27
       <th>[% LxERP.t8("Requirement Spec Status") %]</th>
28
       <td>[% L.select_tag("requirement_spec.status_id",  SELF.statuses, default=SELF.requirement_spec.status_id, title_key="description", id=id_prefix _ '_status_id') %]</td>
29
      </tr>
30
      <tr>
31
        <th>[% LxERP.t8("Customer") %]</th>
32
        <td>[% 
33
            L.select_tag("requirement_spec.customer_id",  SELF.customers, default=SELF.requirement_spec.customer_id, title_key="name", id=id_prefix _ '_customer_id',
34
              onchange="kivi.requirement_spec.basic_settings_customer_changed('#" _ id_prefix _ "_customer_id', '#" _ id_prefix _ "_hourly_rate_as_number')") 
35
        %]</td>
36
      </tr>
37
      <tr>
38
        <th>[% LxERP.t8("Hourly Rate") %]</th>
39
        <td>[% L.input_tag("requirement_spec.hourly_rate_as_number", SELF.requirement_spec.hourly_rate_as_number, id=id_prefix _ '_hourly_rate_as_number') %]</td>
40
      </tr>
41
    [% END %]
42
    [% cvars = SELF.requirement_spec.cvars_by_config %]
43
    [% FOREACH var = cvars %]
44
      <tr>
45
        <th>[% HTML.escape(var.config.description) %]</th>
46
        <td>[% INCLUDE 'common/render_cvar_input.html'
47
                        cvar_name_prefix = 'cvars.' %]</td>
48
      </tr>
49
    [% END %]
50
  </tbody>
51
</table>
16 52

  
17
  <tr>
18
   <td>[% LxERP.t8("Requirement Spec Type") %]</td>
19
   <td>[% L.select_tag("requirement_spec.type_id",  SELF.types, default=SELF.requirement_spec.type_id, title_key="description", id=id_prefix _ '_type_id') %]</td>
20
  </tr>
21

  
22
[%- UNLESS SELF.requirement_spec.is_template %]
23

  
24
  <tr>
25
   <td>[% LxERP.t8("Requirement Spec Status") %]</td>
26
   <td>[% L.select_tag("requirement_spec.status_id",  SELF.statuses, default=SELF.requirement_spec.status_id, title_key="description", id=id_prefix _ '_status_id') %]</td>
27
  </tr>
28

  
29
  <tr>
30
   <td>[% LxERP.t8("Customer") %]</td>
31
   <td>[% L.select_tag("requirement_spec.customer_id",  SELF.customers, default=SELF.requirement_spec.customer_id, title_key="name", id=id_prefix _ '_customer_id',
32
                       onchange="kivi.requirement_spec.basic_settings_customer_changed('#" _ id_prefix _ "_customer_id', '#" _ id_prefix _ "_hourly_rate_as_number')") %]</td>
33
  </tr>
34

  
35
  <tr>
36
   <td>[% LxERP.t8("Hourly Rate") %]</td>
37
   <td>[% L.input_tag("requirement_spec.hourly_rate_as_number", SELF.requirement_spec.hourly_rate_as_number, id=id_prefix _ '_hourly_rate_as_number') %]</td>
38
  </tr>
39

  
40
[%- END %]
41

  
42
  [% cvars = SELF.requirement_spec.cvars_by_config %]
43

  
44
  [% FOREACH var = cvars %]
45
   <tr>
46
    <td>[% HTML.escape(var.config.description) %]</td>
47

  
48
    <td>
49
      [% INCLUDE 'common/render_cvar_input.html'
50
                 cvar_name_prefix = 'cvars.'
51
      %]
52
    </td>
53
   </tr>
54
  [% END %]
55

  
56
 </table>
57

  
58
[%- IF SELF.copy_source %]
59
 [%- L.hidden_tag('copy_source_id', SELF.copy_source.id) %]
60

  
61
 <p>
62
  [%- IF SELF.requirement_spec.is_template %]
63
   [%- LxERP.t8("The new requirement spec template will be a copy of '#1'.", SELF.copy_source.title) %]
64
  [%- ELSE %]
65
   [%- LxERP.t8("The new requirement spec will be a copy of '#1' for customer '#2'.", SELF.copy_source.title, SELF.copy_source.customer.name) %]
66
  [%- END %]
67
 </p>
68
[%- END %]
53
[% IF SELF.copy_source %]
54
  [% L.hidden_tag('copy_source_id', SELF.copy_source.id) %]
55
  <p>
56
    [% IF SELF.requirement_spec.is_template %]
57
      [% LxERP.t8("The new requirement spec template will be a copy of '#1'.", SELF.copy_source.title) %]
58
    [% ELSE %]
59
      [% LxERP.t8("The new requirement spec will be a copy of '#1' for customer '#2'.", SELF.copy_source.title, SELF.copy_source.customer.name) %]
60
    [% END %]
61
  </p>
62
[% END %]
69 63

  
70
 <p>
64
<div class="buttons">
71 65
[% IF submit_as != 'post' %]
72 66
  [% L.ajax_submit_tag("controller.pl?action=RequirementSpec/update",  "#" _ id_prefix, LxERP.t8("Save"), id=id_prefix _ '_submit') %]
73 67
  <script type="text/javascript"><!--
......
82 76
  });
83 77
--></script>
84 78
[% END %]
85
 </p>
79
 </div><!-- /.buttons -->
80
</div><!-- /.wrapper -->
86 81
</form>
templates/webpages/requirement_spec/_header.html
1
[%- USE HTML -%][%- USE LxERP -%]
2
<div id="requirement-spec-header">
3
 <h1>
4
  [%- IF SELF.requirement_spec.is_template %]
5
   [%- HTML.escape(LxERP.t8("Requirement spec template '#1'", SELF.requirement_spec.title)) %]
6
  [%- ELSE %]
7
   [%- HTML.escape(SELF.requirement_spec.displayable_name('format', 'with_customer')) %]
8
   [% LxERP.t8("for") %]
9
   [% HTML.escape(SELF.requirement_spec.customer.displayable_name) -%]
10
  [%- END %]
11
 </h1>
12
</div>
1
[% USE HTML %]
2
[% USE LxERP %]
3

  
4
<h1 id="requirement-spec-header">
5
  [% IF SELF.requirement_spec.is_template %]
6
    [% HTML.escape(LxERP.t8("Requirement spec template '#1'", SELF.requirement_spec.title)) %]
7
  [% ELSE %]
8
    [% HTML.escape(SELF.requirement_spec.displayable_name('format', 'with_customer')) %]
9
    [% LxERP.t8("for") %]
10
    [% HTML.escape(SELF.requirement_spec.customer.displayable_name) %]
11
  [% END %]
12
</h1>
13

  
templates/webpages/requirement_spec/_new_project_form.html
1
[%- USE LxERP -%][%- USE L -%]
2
[%- SET id_prefix = "project_link_form"
3
        style     = "width: 300px" %]
4
<form method="post" action="controller.pl" id="[% id_prefix %]"[% UNLESS submit_as == 'post' %] class="edit-project-link-context-menu"[% END %]>
5
 <h2>[% LxERP.t8("Edit project link") %]: [% LxERP.t8("Create a new project") %]</h2>
6

  
7
 [% L.hidden_tag("id", SELF.requirement_spec.id, id=id_prefix _ "_id") %]
8
 [% L.hidden_tag("project_link_action", "create", id=id_prefix _ "_project_link_action") %]
1
[% USE LxERP %]
2
[% USE L %]
3
[% SET id_prefix = "project_link_form" %]
4
[% style = "width:300px;" %] 
9 5

  
10
 <table class="rs_input_field">
11
  <tr>
12
   <td>[% LxERP.t8("Project Number") %]</td>
13
   <td>[% L.input_tag("project.projectnumber", "", id=id_prefix _ "_projectnumber", style=style) %]</td>
14
  </tr>
15

  
16
  <tr>
17
   <td>[% LxERP.t8("Description") %]</td>
18
   <td>[% L.input_tag("project.description", SELF.requirement_spec.title, id=id_prefix _ "_description", style=style) %]</td>
19
  </tr>
6
<form method="post" action="controller.pl" id="[% id_prefix %]"[% UNLESS submit_as == 'post' %] class="edit-project-link-context-menu"[% END %]>
20 7

  
21
  <tr>
22
   <td>[% LxERP.t8("Project Type") %]</td>
23
   <td>[% L.select_tag("project.project_type_id", SELF.project_types, default=SELF.default_project_type.id, title_key="description", id=id_prefix _ "_project_type_id", style=style) %]</td>
24
  </tr>
25 8

  
26
  <tr>
27
   <td>[% LxERP.t8("Project Status") %]</td>
28
   <td>[% L.select_tag("project.project_status_id", SELF.project_statuses, default=SELF.default_project_status.id, title_key="description", id=id_prefix _ "_project_status_id", style=style) %]</td>
29
  </tr>
9
[% L.hidden_tag("id", SELF.requirement_spec.id, id=id_prefix _ "_id") %]
10
[% L.hidden_tag("project_link_action", "create", id=id_prefix _ "_project_link_action") %]
30 11

  
31
  <tr>
32
   <td>[% LxERP.t8("Customer") %]</td>
33
   <td>[% L.select_tag("project.customer_id", SELF.customers, default=SELF.requirement_spec.customer_id, title_key="name", with_empty=1, id=id_prefix _ "_customer_id", style=style) %]</td>
34
  </tr>
35
 </table>
12
<table class="tbl-horizontal rs_input_field">
13
  <caption>[% LxERP.t8("Edit project link") %]: [% LxERP.t8("Create a new project") %]</caption>
14
  <tbody>
15
    <tr>
16
      <th>[% LxERP.t8("Project Number") %]</th>
17
      <td>[% L.input_tag("project.projectnumber", "", id=id_prefix _ "_projectnumber", style=style) %]</td>
18
    </tr>
19
    <tr>
20
      <th>[% LxERP.t8("Description") %]</th>
21
      <td>[% L.input_tag("project.description", SELF.requirement_spec.title, id=id_prefix _ "_description", style=style) %]</td>
22
    </tr>
23
    <tr>
24
      <th>[% LxERP.t8("Project Type") %]</th>
25
      <td>[% L.select_tag("project.project_type_id", SELF.project_types, default=SELF.default_project_type.id, title_key="description", id=id_prefix _ "_project_type_id", style=style) %]</td>
26
    </tr>
27
    <tr>
28
      <th>[% LxERP.t8("Project Status") %]</th>
29
      <td>[% L.select_tag("project.project_status_id", SELF.project_statuses, default=SELF.default_project_status.id, title_key="description", id=id_prefix _ "_project_status_id", style=style) %]</td>
30
    </tr>
31
    <tr>
32
      <th>[% LxERP.t8("Customer") %]</th>
33
      <td>[% L.select_tag("project.customer_id", SELF.customers, default=SELF.requirement_spec.customer_id, title_key="name", with_empty=1, id=id_prefix _ "_customer_id", style=style) %]</td>
34
    </tr>
35
  </tbody>
36
</table>
36 37

  
37
 <p>
38
 <div class="buttons">
38 39
  [% L.ajax_submit_tag("controller.pl?action=RequirementSpec/update_project_link",  "#" _ id_prefix, LxERP.t8("Save"), id=id_prefix _ '_submit') %]
39 40
  <script type="text/javascript"><!--
40 41
  $(function() {
41 42
    $("#[% id_prefix %] INPUT[type=text]").keydown(function(event) {
42 43
      if(event.keyCode == 13) {
43 44
        event.preventDefault();
44
        $('#[% id_prefix %]_submit').click();
45
        $("#[% id_prefix %]_submit").click();
45 46
        return false;
46 47
      }
47 48
    });
48 49
  });
49 50
--></script>
50
 </p>
51
</div>
51 52
</form>
templates/webpages/requirement_spec/_project_link_details.html
1
[%- USE HTML -%][%- USE LxERP -%]
2
<table>
3
 <tr class="listrow">
4
  <td>[% LxERP.t8("Project Number") %]:</td>
5
  <td>[% HTML.escape(requirement_spec.project.projectnumber) %]</td>
6
 </tr>
1
[% USE HTML %]
2
[% USE LxERP %]
7 3

  
8
 <tr class="listrow">
9
  <td>[% LxERP.t8("Description") %]:</td>
10
  <td>[% HTML.escape(requirement_spec.project.description) %]</td>
11
 </tr>
12

  
13
 <tr class="listrow">
14
  <td>[% LxERP.t8("Customer") %]:</td>
15
  <td>[% HTML.escape(requirement_spec.project.customer.name) %]</td>
16
 </tr>
17

  
18
 <tr class="listrow">
19
  <td>[% LxERP.t8("Type") %]:</td>
20
  <td>[% HTML.escape(requirement_spec.project.project_type.description) %]</td>
21
 </tr>
22

  
23
 <tr class="listrow">
24
  <td>[% LxERP.t8("Status") %]:</td>
25
  <td>[% HTML.escape(requirement_spec.project.project_status.description) %]</td>
26
 </tr>
4
<table class="tbl-horizontal">
5
  <tbody>
6
    <tr>
7
      <th>[% LxERP.t8("Project Number") %]:</th>
8
      <td>[% HTML.escape(requirement_spec.project.projectnumber) %]</td>
9
    </tr>
10
    <tr>
11
      <th>[% LxERP.t8("Description") %]:</th>
12
      <td>[% HTML.escape(requirement_spec.project.description) %]</td>
13
    </tr>
14
    <tr>
15
      <th>[% LxERP.t8("Customer") %]:</th>
16
      <td>[% HTML.escape(requirement_spec.project.customer.name) %]</td>
17
    </tr>
18
    <tr>
19
      <th>[% LxERP.t8("Type") %]:</th>
20
      <td>[% HTML.escape(requirement_spec.project.project_type.description) %]</td>
21
    </tr>
22
    <tr>
23
      <th>[% LxERP.t8("Status") %]:</th>
24
      <td>[% HTML.escape(requirement_spec.project.project_status.description) %]</td>
25
    </tr>
26
  </tbody>
27 27
</table>
templates/webpages/requirement_spec/_project_link_form.html
1
[%- USE LxERP -%][%- USE L -%]
2
[%- SET id_prefix = "project_link_form" %]
1
[% USE LxERP %]
2
[% USE L %]
3
[% SET id_prefix = "project_link_form" %]
4

  
3 5
<form method="post" action="controller.pl" id="[% id_prefix %]"[% UNLESS submit_as == 'post' %] class="edit-project-link-context-menu"[% END %]>
4
 <h2>[% LxERP.t8("Edit project link") %]</h2>
5 6

  
6
 [% L.hidden_tag("id", SELF.requirement_spec.id, id=id_prefix _ "_id") %]
7
<h2>[% LxERP.t8("Edit project link") %]</h2>
7 8

  
8
 [% IF !SELF.requirement_spec.project_id %]
9
  <p>[% LxERP.t8("This requirement spec is currently not linked to a project.") %]</p>
9
[% L.hidden_tag("id", SELF.requirement_spec.id, id=id_prefix _ "_id") %]
10 10

  
11
 [% ELSE %]
11
[% IF !SELF.requirement_spec.project_id %]
12
  <p>[% LxERP.t8("This requirement spec is currently not linked to a project.") %]</p>
13
[% ELSE %]
12 14
  <p>[% LxERP.t8("This requirement spec is currently linked to the following project:") %]</p>
13 15
  [% INCLUDE "requirement_spec/_project_link_details.html" requirement_spec=SELF.requirement_spec %]
14
 [% END %]
16
[% END %]
15 17

  
16
 <table>
17
  <tr><td colspan="2">[% L.radio_button_tag("project_link_action", id=id_prefix _ "_project_link_action_keep", value="keep", label=LxERP.t8("Keep the project link the way it is."), checked="1") %]</td></tr>
18

  
19
<table class="test">
20
  <tr>
21
    <td colspan="2"> [% L.radio_button_tag("project_link_action", id=id_prefix _ "_project_link_action_keep", value="keep", label=LxERP.t8("Keep the project link the way it is."), checked="1") %] </td>
22
  </tr>
18 23
  [% IF SELF.requirement_spec.project_id %]
19
   <tr><td colspan="2">[% L.radio_button_tag("project_link_action", id=id_prefix _ "_project_link_action_none", value="none", label=LxERP.t8("Do not link to a project.")) %]</td></tr>
24
  <tr>
25
    <td colspan="2"> [% L.radio_button_tag("project_link_action", id=id_prefix _ "_project_link_action_none", value="none", label=LxERP.t8("Do not link to a project.")) %] </td>
26
  </tr>
20 27
  [% END %]
21
  <tr><td colspan="2">[% L.radio_button_tag("project_link_action", id=id_prefix _ "_project_link_action_new", value="new", label=LxERP.t8("Create a new project and link to it.")) %]</td></tr>
22 28
  <tr>
23
   <td>[% L.radio_button_tag("project_link_action", id=id_prefix _ "_project_link_action_existing", value="existing", label=LxERP.t8("Link to the following project:")) %]</td>
24
   <td>[% L.select_tag("new_project_id", SELF.projects, id=id_prefix _ "_new_project_id", title_key="full_description", disabled="true") %]</td>
29
    <td colspan="2"> [% L.radio_button_tag("project_link_action", id=id_prefix _ "_project_link_action_new", value="new", label=LxERP.t8("Create a new project and link to it.")) %] </td>
30
  </tr>
31
  <tr>
32
    <td> [% L.radio_button_tag("project_link_action", id=id_prefix _ "_project_link_action_existing", value="existing", label=LxERP.t8("Link to the following project:")) %] </td>
33
    <td> [% L.select_tag("new_project_id", SELF.projects, id=id_prefix _ "_new_project_id", title_key="full_description", disabled="true") %] </td>
25 34
  </tr>
26
 </table>
35
</table>
27 36

  
28
 <p>
37
 <div class="buttons">
29 38
  [% L.ajax_submit_tag("controller.pl?action=RequirementSpec/update_project_link",  "#" _ id_prefix, LxERP.t8("Save"), id=id_prefix _ "_submit") %]
30 39
  <script type="text/javascript"><!--
31 40
  $(function() {
......
42 51
    });
43 52
  });
44 53
--></script>
45
 </p>
54
 </div>
46 55
</form>
templates/webpages/requirement_spec/_show_basic_settings.html
1
[%- USE HTML -%][%- USE LxERP -%]
2
<div id="basic_settings" class="basic-settings-context-menu">
3
 <h2>
4
  [% IF SELF.requirement_spec.is_template %]
5
   [% LxERP.t8("Basic Settings for the Requirement Spec Template") %]
6
  [% ELSE %]
7
   [% LxERP.t8("Basic Settings for the Requirement Spec") %]
8
  [% END %]
9
 </h2>
10

  
11
 <table>
12
  <tr class="listrow">
13
   <td>[% LxERP.t8("Title") %]:</td>
14
   <td>[% HTML.escape(SELF.requirement_spec.title) %]</td>
15
  </tr>
16

  
17
  <tr class="listrow">
18
   <td>[% LxERP.t8("Requirement Spec Type") %]:</td>
19
   <td>[% HTML.escape(SELF.requirement_spec.type.description) %]</td>
20
  </tr>
21

  
22
[%- UNLESS SELF.requirement_spec.is_template %]
23

  
24
  <tr class="listrow">
25
   <td>[% LxERP.t8("Requirement Spec Status") %]:</td>
26
   <td>[% HTML.escape(SELF.requirement_spec.status.description) %]</td>
27
  </tr>
28

  
29
  <tr class="listrow">
30
   <td>[% LxERP.t8("Customer") %]:</td>
31
   <td>[% HTML.escape(SELF.requirement_spec.customer.name) %]</td>
32
  </tr>
33

  
34
  <tr class="listrow">
35
   <td>[% LxERP.t8("Hourly Rate") %]:</td>
36
   <td>[% HTML.escape(SELF.requirement_spec.hourly_rate_as_number) %]</td>
37
  </tr>
1
[% USE HTML %]
2
[% USE LxERP %]
38 3

  
39
  [% cvars = SELF.requirement_spec.cvars_by_config %]
40

  
41
  [% FOREACH var = cvars %]
42
   <tr class="listrow">
43
    <td>[% HTML.escape(var.config.description) %]</td>
44
    <td>[% HTML.escape(var.value_as_text) %]</td>
45
   </tr>
46
  [% END %]
47

  
48
[%- END %]
4
<div id="basic_settings" class="basic-settings-context-menu">
5
<div class="wrapper">
49 6

  
50
 </table>
7
<h2>
8
[% IF SELF.requirement_spec.is_template %]
9
  [% LxERP.t8("Basic Settings for the Requirement Spec Template") %]
10
[% ELSE %]
11
  [% LxERP.t8("Basic Settings for the Requirement Spec") %]
12
[% END %]
13
</h2>
14

  
15
<table class="tbl-horizontal">
16
  <tbody>
17
    <tr>
18
      <th>[% LxERP.t8("Title") %]:</th>
19
      <td>[% HTML.escape(SELF.requirement_spec.title) %]</td>
20
    </tr>
21
    <tr>
22
      <th>[% LxERP.t8("Requirement Spec Type") %]:</th>
23
      <td>[% HTML.escape(SELF.requirement_spec.type.description) %]</td>
24
    </tr>
25
    [% UNLESS SELF.requirement_spec.is_template %]
26
      <tr>
27
        <th>[% LxERP.t8("Requirement Spec Status") %]:</th>
28
        <td>[% HTML.escape(SELF.requirement_spec.status.description) %]</td>
29
      </tr>
30
      <tr>
31
        <th>[% LxERP.t8("Customer") %]:</th>
32
        <td>[% HTML.escape(SELF.requirement_spec.customer.name) %]</td>
33
      </tr>
34
      <tr>
35
        <th>[% LxERP.t8("Hourly Rate") %]:</th>
36
        <td>[% HTML.escape(SELF.requirement_spec.hourly_rate_as_number) %]</td>
37
      </tr>
38
      [% cvars = SELF.requirement_spec.cvars_by_config %]
39
      [% FOREACH var = cvars %]
40
        <tr>
41
          <th>[% HTML.escape(var.config.description) %]</th>
42
          <td>[% HTML.escape(var.value_as_text) %]</td>
43
        </tr>
44
      [% END %]
45
    [% END %]
46
  </tbody>
47
</table>
51 48

  
52 49
[% UNLESS SELF.requirement_spec.is_template %]
50
  <h2>[% LxERP.t8("Project Link") %]</h2>
53 51

  
54
 <h2>[% LxERP.t8("Project Link") %]</h2>
55

  
56
 [% IF !SELF.requirement_spec.project_id %]
57
  <p>[% LxERP.t8("This requirement spec is currently not linked to a project.") %]</p>
52
  [% IF !SELF.requirement_spec.project_id %]
53
    <p>[% LxERP.t8("This requirement spec is currently not linked to a project.") %]</p>
54
  [% ELSE %]
55
    [% INCLUDE 'requirement_spec/_project_link_details.html' requirement_spec=SELF.requirement_spec %]
56
  [% END %]
58 57

  
59
 [% ELSE %]
60
  [% INCLUDE 'requirement_spec/_project_link_details.html' requirement_spec=SELF.requirement_spec %]
61
 [% END %]
62 58
[% END %]
63
</div>
59
</div><!-- /.wrapper -->
60

  
61
</div><!-- /#basic_settings -->
templates/webpages/requirement_spec/_show_time_and_cost_estimate.html
1
[%- USE LxERP -%][%- USE L -%][%- USE HTML -%][%- USE P -%]
2
[%- DEFAULT id_prefix = 'time_and_cost_estimate_form' %]
3
[%- SET total_cost = 0 %]
1
[% USE LxERP %]
2
[% USE L %]
3
[% USE HTML %]
4
[% USE P %]
5
[% DEFAULT id_prefix = 'time_and_cost_estimate_form' %]
6
[% SET total_cost = 0 %]
4 7

  
5 8
<div id="time_cost_estimate"[% IF initially_hidden %] style="display: none;"[% END %]>
6
 [%- IF !SELF.requirement_spec.sections.size %]
7
  <p>[%- LxERP.t8("Neither sections nor function blocks have been created yet.") %]</p>
9
<div class="wrapper">
8 10

  
9
 [%- ELSE %]
11
[% IF !SELF.requirement_spec.sections.size %]
12
  <p class="message message_info">[% LxERP.t8("Neither sections nor function blocks have been created yet.") %]</p>
10 13

  
11
  [%- SET at_least_one_function_block = 0 %]
14
[% ELSE %]
12 15

  
13
  <table class="time-cost-estimate time-cost-estimate-context-menu">
14
   <tbody>
15
    [%- FOREACH section = SELF.requirement_spec.sections_sorted %]
16
     <tr class="listheading">
17
      <th>[%- LxERP.t8("Function block") %]</th>
18
      <th>[%- LxERP.t8("Complexity") %]</th>
19
      <th>[%- LxERP.t8("Risk") %]</th>
20
      <th align="right">[%- LxERP.t8("Time estimate") %]</th>
21
      [%- UNLESS SELF.requirement_spec.is_template %]
22
       <th align="right">[%- LxERP.t8("Price") %]</th>
23
      [%- END %]
24
     </tr>
16
[% SET at_least_one_function_block = 0 %]
25 17

  
26
     <tr class="listrow section">
27
      <td colspan="5">[%- HTML.escape(section.fb_number) %]: [%- HTML.escape(section.title) %]</td>
28
     </tr>
29

  
30
     [%- IF section.children.size %]
31
      [%- SET at_least_one_function_block = 1 %]
32
      [%- FOREACH child = section.children_sorted %]
33
       [%- INCLUDE 'requirement_spec/_show_time_and_cost_estimate_item.html'
34
                   section = section
35
                   item    = child
36
                   level   = 1 %]
37
      [%- END %]
38

  
39
      <tr class="listrow subtotal">
40
       <td style="padding-left: 50px" colspan="3" class="sum">[%- LxERP.t8("Sum for section") -%]:</td>
41
       <td align="right" nowrap>[%- P.format_man_days(section.time_estimation, 'skip_zero'=1) -%]</td>
42
       [%- UNLESS SELF.requirement_spec.is_template %]
43
        [%- SET section_cost = section.time_estimation * SELF.requirement_spec.hourly_rate * section.sellprice_factor;
44
                total_cost   = total_cost + section_cost %]
45
        <td align="right" nowrap>[%- LxERP.format_amount(section_cost, 2) -%] EUR</td>
46
       [%- END %]
18
<table class="tbl-list time-cost-estimate time-cost-estimate-context-menu">
19
  <thead>
20
    <tr>
21
      <th>[% LxERP.t8("Function block") %]</th>
22
      <th>[% LxERP.t8("Complexity") %]</th>
23
      <th>[% LxERP.t8("Risk") %]</th>
24
      <th class="right">[% LxERP.t8("Time estimate") %]</th>
25
      [% UNLESS SELF.requirement_spec.is_template %]
26
       <th class="right">[% LxERP.t8("Price") %]</th>
27
      [% END %]
28
    </tr>
29
  </thead>
30
  <tbody>
31
  [% FOREACH section = SELF.requirement_spec.sections_sorted %]
32
    <tr class="section">
33
      <th colspan="5"><b>[% HTML.escape(section.fb_number) %]: [% HTML.escape(section.title) %]</b></th>
34
    </tr>
35
    [% IF section.children.size %]
36
      [% SET at_least_one_function_block = 1 %]
37
      [% FOREACH child = section.children_sorted %]
38
        [% INCLUDE 'requirement_spec/_show_time_and_cost_estimate_item.html'
39
                    section = section
40
                    item    = child
41
                    level   = 1 %]
42
      [% END %]
43
      <tr class="subtotal">
44
        <th colspan="3" class="right">[% LxERP.t8("Sum for section") %]:</th>
45
        <td class="numeric">[% P.format_man_days(section.time_estimation, 'skip_zero'=1) %]</td>
46
        [% UNLESS SELF.requirement_spec.is_template %]
47
         [% SET section_cost = section.time_estimation * SELF.requirement_spec.hourly_rate * section.sellprice_factor;
48
                 total_cost   = total_cost + section_cost %]
49
         <!-- PENDENT: hier ist EURO angegeben -->
50
         <td class="numeric">[% LxERP.format_amount(section_cost, 2) %] EUR</td>
51
        [% END %]
47 52
      </tr>
48
     [%- END -%]
49
    [%- END -%]
50
   </tbody>
51

  
52
   <tfoot>
53
      [% END %]
54
    [% END %]
55
  </tbody>
56
  <tfoot>
53 57
    <tr>
54
     <td colspan="3">[%- LxERP.t8("Sum for #1", SELF.requirement_spec.type.description) -%]:</td>
55
     <td align="right" nowrap>[%- P.format_man_days(SELF.requirement_spec.time_estimation) -%]</td>
56
     [%- UNLESS SELF.requirement_spec.is_template %]
57
      <td align="right" nowrap>[%- LxERP.format_amount(total_cost, 2) -%] EUR</td>
58
     [%- END %]
58
      <th class="right" colspan="3">[% LxERP.t8("Sum for #1", SELF.requirement_spec.type.description) %]:</th>
59
      <td class="right">[% P.format_man_days(SELF.requirement_spec.time_estimation) %]</td>
60
      [% UNLESS SELF.requirement_spec.is_template %]
61
        <!-- PENDENT: hier ist EURO angegeben -->
62
        <td class="right" >[% LxERP.format_amount(total_cost, 2) %] EUR</td>
63
      [% END %]
59 64
    </tr>
60 65
   </tfoot>
61
  </table>
62
 [%- END %]
63
</div>
66
</table>
67

  
68
[% END %]
69

  
70
</div><!-- /.wrapper -->
71
</div><!-- /#time_cost_estimate -->
templates/webpages/requirement_spec/_show_time_and_cost_estimate_item.html
1
[%- USE HTML -%][%- USE LxERP -%][%- USE P -%]
2
<tr class="listrow">
3
 <td style="padding-left: [%- level * 50 -%]px">
4
  [%- item.fb_number _ ": " _ item.description_as_restricted_html -%]
5
 </td>
6
 <td>[%- HTML.escape(item.complexity.description) -%]</td>
7
 <td>[%- HTML.escape(item.risk.description) -%]</td>
8
 [%- IF !item.children.size -%]
9
  <td align="right" nowrap>[%- P.format_man_days(item.time_estimation, skip_zero=1) -%]</td>
10
  [%- UNLESS SELF.requirement_spec.is_template %]
11
   <td align="right" nowrap>[%- LxERP.format_amount(item.time_estimation * SELF.requirement_spec.hourly_rate * section.sellprice_factor, 2) -%] EUR</td>
12
  [%- END %]
13
 [%- ELSE -%]
14
  <td>&nbsp;</td>
15
  <td>&nbsp;</td>
16
 [%- END -%]
1
[% USE HTML %]
2
[% USE LxERP %]
3
[% USE P %]
4

  
5
<tr>
6
  <td style="padding-left:[% level * 50 %]px;">
7
    [% item.fb_number _ ": " _ item.description_as_restricted_html %]
8
  </td>
9
  <td>[% HTML.escape(item.complexity.description) %]</td>
10
  <td>[% HTML.escape(item.risk.description) %]</td>
11
  [% IF !item.children.size %]
12
    <td class="right">[% P.format_man_days(item.time_estimation, skip_zero=1) %]</td>
13
    [% UNLESS SELF.requirement_spec.is_template %]
14
      <td class="right">[% LxERP.format_amount(item.time_estimation * SELF.requirement_spec.hourly_rate * section.sellprice_factor, 2) %] EUR</td>
15
    [% END %]
16
  [% ELSE %]
17
    <td>&nbsp;</td>
18
    <td>&nbsp;</td>
19
  [% END %]
17 20
</tr>
18 21

  
19
[%- IF item.children.size -%]
20
 [%- FOREACH child = item.children_sorted -%]
21
  [%- INCLUDE 'requirement_spec/_show_time_and_cost_estimate_item.html'
22
              section = section
23
              item    = child
24
              level   = level + 1 -%]
25
 [%- END -%]
22
[% IF item.children.size %]
23
  [% FOREACH child = item.children_sorted %]
24
    [% INCLUDE 'requirement_spec/_show_time_and_cost_estimate_item.html'
25
      section = section
26
      item    = child
27
      level   = level + 1 %]
28
  [% END %]
26 29

  
27
 <tr class="listrow subtotal">
28
  <td style="padding-left: [%- (level + 1) * 50 -%]px" colspan="3">[%- LxERP.t8("Sum for #1", item.fb_number) -%]:</td>
29
  <td align="right" nowrap>[%- P.format_man_days(item.time_estimation, skip_zero=1) -%]</td>
30
  [%- UNLESS SELF.requirement_spec.is_template %]
31
   <td align="right" nowrap>[%- LxERP.format_amount(item.time_estimation * SELF.requirement_spec.hourly_rate * section.sellprice_factor, 2) -%] EUR</td>
32
  [%- END %]
33
 </tr>
34
[%- END -%]
30
  <tr class="subtotal">
31
    <td style="padding-left:[% (level + 1) * 50 %]px;" colspan="3">[% LxERP.t8("Sum for #1", item.fb_number) %]:</td>
32
    <td class="right">[% P.format_man_days(item.time_estimation, skip_zero=1) %]</td>
33
    [% UNLESS SELF.requirement_spec.is_template %]
34
       <td class="right">[% LxERP.format_amount(item.time_estimation * SELF.requirement_spec.hourly_rate * section.sellprice_factor, 2) %] EUR</td>
35
    [% END %]
36
  </tr>
37
[% END %]
templates/webpages/requirement_spec/_version.html
1
[%- USE L -%][%- USE LxERP -%][%- USE HTML -%]
1
[% USE L %]
2
[% USE LxERP %]
3
[% USE HTML %]
4

  
2 5
[% L.hidden_tag('current_version_id', requirement_spec.version.id) %]
3 6
[% LxERP.t8("Current version") %]:
4 7
[% IF !requirement_spec.version.id %]
5
 [% LxERP.t8("Working copy without version") %]
8
  [% LxERP.t8("Working copy without version") %]
6 9
[% ELSE %]
7
 [% LxERP.t8("Version") %] [% HTML.escape(requirement_spec.version.version_number) %]
8
 [% LxERP.t8("dated") %] [% HTML.escape(requirement_spec.version.itime.to_kivitendo(precision='minute')) %]
9
[%- END -%]
10
  [% LxERP.t8("Version") %] [% HTML.escape(requirement_spec.version.version_number) %]
11
  [% LxERP.t8("dated") %] [% HTML.escape(requirement_spec.version.itime.to_kivitendo(precision='minute')) %]
12
[% END %]
templates/webpages/requirement_spec/new.html
1 1
<h1>[% FORM.title %]</h1>
2 2

  
3
[%- INCLUDE 'common/flash.html' %]
3
[% INCLUDE 'common/flash.html' %]
4 4

  
5
[%- INCLUDE 'requirement_spec/_form.html' %]
5
[% INCLUDE 'requirement_spec/_form.html' %]
templates/webpages/requirement_spec/report_bottom.html
1 1
[% USE L %]
2
[%- L.paginate_controls(models=models) %]
2
[% L.paginate_controls(models=models) %]
3
</div><!-- /.wrapper -->
templates/webpages/requirement_spec/report_top.html
1
[%- USE L %]
2
[%- PROCESS "requirement_spec/_filter.html" filter=SELF.models.filtered.laundered %]
3
 <hr>
1
[% USE L %]
2
[% PROCESS "requirement_spec/_filter.html" filter=SELF.models.filtered.laundered %]
3
<div class="wrapper">
templates/webpages/requirement_spec/select_template_to_paste.html
1
[%- USE LxERP -%][%- USE HTML -%][%- USE L -%]
2
[%- BLOCK text_blocks %]
3
 [%- IF blocks.size %]
4
     <li>
5
      [%- title %]:
1
[% USE LxERP %]
2
[% USE HTML %]
3
[% USE L %]
4

  
5
[% BLOCK text_blocks %]
6
  [% IF blocks.size %]
7
    <li>[% title %]:
6 8
      <ol>
7
       [%- FOREACH block = blocks %]
8
        <li>[%- HTML.escape(block.title) %]</li>
9
       [%- END %]
9
        [% FOREACH block = blocks %]
10
          <li>[% HTML.escape(block.title) %]</li>
11
        [% END %]
10 12
      </ol>
11
     </li>
12
 [%- END %]
13
[%- END %]
14

  
15
[%- IF !TEMPLATES.size %]
16
<p>[%- LxERP.t8("No requirement spec templates have been created yet.") %]</p>
13
    </li>
14
  [% END %]
15
[% END %]
17 16

  
18
[%- ELSE %]
17
[% IF !TEMPLATES.size %]
18
  <p>[% LxERP.t8("No requirement spec templates have been created yet.") %]</p>
19 19

  
20
<table>
21
 <tr class="listheading">
22
  <th>[%- LxERP.t8("Detail view") %]</th>
23
  <th>[%- LxERP.t8("Paste template") %]</th>
24
  <th>[%- LxERP.t8("Title") %]</th>
25
  <th>[%- LxERP.t8("Type") %]</th>
26
  <th>[%- LxERP.t8("Last modification") %]</th>
20
[% ELSE %]
21
<table class="tbl-list">
22
  <thead>
23
 <tr>
24
  <th>[% LxERP.t8("Detail view") %]</th>
25
  <th>[% LxERP.t8("Paste template") %]</th>
26
  <th>[% LxERP.t8("Title") %]</th>
27
  <th>[% LxERP.t8("Type") %]</th>
28
  <th>[% LxERP.t8("Last modification") %]</th>
27 29
 </tr>
28

  
29
[%- FOREACH template = TEMPLATES %]
30
 </thead>
31
<tbody>
32
[% FOREACH template = TEMPLATES %]
30 33
 <tr class="listrow[% loop.count % 2 %]">
31 34
  <td>
32
   <a href="#" onclick="$('#select-template-details-row-[% template.id %]').toggle(); $(this).find('span').toggle();">
35
   <a href="#" onclick='$("#select-template-details-row-[% template.id %]").toggle(); $(this).find("span").toggle();'>
33 36
    <span>[+]</span>
34 37
    <span style="display: none;">[-]</span>
35 38
   </a>
36 39
  </td>
37
  <td><a href="#" onclick="kivi.requirement_spec.paste_selected_template([% template.id %]);">[%- LxERP.t8("Paste template") %]</a></td>
38
  <td>[%- HTML.escape(template.title) %]</td>
39
  <td>[%- HTML.escape(template.type.description) %]</td>
40
  <td><a href="#" onclick='kivi.requirement_spec.paste_selected_template([% template.id %]);'>[% LxERP.t8("Paste template") %]</a></td>
41
  <td>[% HTML.escape(template.title) %]</td>
42
  <td>[% HTML.escape(template.type.description) %]</td>
40 43
  <td>[% template.mtime ? template.mtime.to_kivitendo(precision='minute') : template.itime.to_kivitendo(precision='minute') %]</td>
41 44
 </tr>
42 45

  
43
 <tr class="listrow[% loop.count % 2 %]" style="display: none;" id="select-template-details-row-[% template.id %]">
46
 <tr style="display: none;" id="select-template-details-row-[% template.id %]">
44 47
  [% SET front    = template.text_blocks_sorted(output_position=0) %]
45 48
  [% SET sections = template.sections_sorted %]
46 49
  [% SET back     = template.text_blocks_sorted(output_position=1) %]
47 50
  [% SET parts    = template.parts_sorted %]
48 51
  <td colspan="4">
49
   [%- LxERP.t8("What this template contains") %]:<br>
52
   [% LxERP.t8("What this template contains") %]:<br>
50 53
   <ul>
51 54
    [% PROCESS text_blocks blocks=front title=LxERP.t8("#1 text block(s) front", front.size) %]
52 55

  
53
    [%- IF sections.size %]
54
    <li>[%- LxERP.t8("#1 section(s)", sections.size) %]:
56
    [% IF sections.size %]
57
    <li>[% LxERP.t8("#1 section(s)", sections.size) %]:
55 58
     <ol>
56
      [%- FOREACH section = sections %]
57
       <li>[%- HTML.escape(section.fb_number) %]: [%- HTML.escape(section.title) %]</li>
58
      [%- END %]
59
      [% FOREACH section = sections %]
60
       <li>[% HTML.escape(section.fb_number) %]: [% HTML.escape(section.title) %]</li>
61
      [% END %]
59 62
     </ol>
60 63
    </li>
61
    [%- END %]
64
    [% END %]
62 65

  
63 66
    [% PROCESS text_blocks blocks=back  title=LxERP.t8("#1 text block(s) back",  back.size)  %]
64 67

  
65
    [%- IF parts.size %]
66
    <li>[%- LxERP.t8("#1 additional part(s)", parts.size) %]:
68
    [% IF parts.size %]
69
    <li>[% LxERP.t8("#1 additional part(s)", parts.size) %]:
67 70
     <ol>
68
      [%- FOREACH part = parts %]
69
       <li>[%- HTML.escape(part.part.description) %]: [%- HTML.escape(part.qty_as_number) %] [% HTML.escape(part.unit.name) %]</li>
70
      [%- END %]
71
      [% FOREACH part = parts %]
72
       <li>[% HTML.escape(part.part.description) %]: [% HTML.escape(part.qty_as_number) %] [% HTML.escape(part.unit.name) %]</li>
73
      [% END %]
71 74
     </ol>
72 75
    </li>
73
    [%- END %]
76
    [% END %]
74 77
   </ul>
75 78
  </td>
76 79
 </tr>
77
[%- END %]
80
[% END %]
81
</tbody>
78 82
</table>
79 83

  
80
[%- END %]
84
[% END %]
81 85

  
82
<p><a href="#" onclick="$('#jqueryui_popup_dialog').dialog('close');">[%- LxERP.t8("Abort") %]</a></p>
86
<p><a href="#" onclick='$("#jqueryui_popup_dialog").dialog("close");' class="button neutral">[% LxERP.t8("Abort") %]</a></p>
templates/webpages/requirement_spec/show.html
1
[%- USE JSON -%][%- USE HTML %][%- USE L %][%- USE LxERP %][%- USE P -%][%- USE JavaScript -%]
1
[% USE JSON %]
2
[% USE HTML %]
3
[% USE L %]
4
[% USE LxERP %]
5
[% USE P %]
6
[% USE JavaScript %]
2 7
[% SET sections = SELF.requirement_spec.sections_sorted || [] %]
3 8

  
4
[%- INCLUDE 'common/flash.html' %]
9
[% INCLUDE 'common/flash.html' %]
5 10

  
6
[%- INCLUDE 'requirement_spec/_header.html' %]
11
[% INCLUDE 'requirement_spec/_header.html' %]
7 12

  
8
[%- L.hidden_tag('requirement_spec_id', SELF.requirement_spec.id, 'data-is-template'=(SELF.requirement_spec.is_template ? 1 : 0)) -%]
13
[% L.hidden_tag('requirement_spec_id', SELF.requirement_spec.id, 'data-is-template'=(SELF.requirement_spec.is_template ? 1 : 0)) %]
9 14

  
10 15
<div id="requirement_spec_tabs" class="tabwidget">
11
 <ul>
12
  <li id="tab-header-function-block"><a href="#function-blocks-tab">[%- LxERP.t8("Content") %]</a></li>
13
  <li id="tab-header-basic-settings"><a href="controller.pl?action=RequirementSpec/ajax_show_basic_settings&id=[% HTML.url(SELF.requirement_spec.id) %]">[%- LxERP.t8("Basic settings") %]</a></li>
14
  <li id="tab-header-time-cost-estimate"><a href="controller.pl?action=RequirementSpec/ajax_show_time_and_cost_estimate&id=[% HTML.url(SELF.requirement_spec.id) %]">[%- LxERP.t8("Time and price estimate") %]</a></li>
15
  <li id="tab-header-additional-parts"><a href="controller.pl?action=RequirementSpecPart/show&requirement_spec_id=[% HTML.url(SELF.requirement_spec.id) %]">[%- LxERP.t8("Additional articles") %]</a></li>
16
  [%- UNLESS SELF.requirement_spec.is_template %]
17
   <li id="tab-header-versions"><a href="controller.pl?action=RequirementSpecVersion/list&requirement_spec_id=[% HTML.url(SELF.requirement_spec.id) %]">[%- LxERP.t8("Versions") %]</a></li>
18
   <li id="tab-header-quotations-orders"><a href="[% SELF.url_for(controller='RequirementSpecOrder', action='list', requirement_spec_id=SELF.requirement_spec.id) %]">[%- LxERP.t8("Quotations and orders") %]</a></li>
19
  [%- END %]
20
 </ul>
21

  
22
 <div id="function-blocks-tab" class="section-context-menu">
23
  [%- UNLESS SELF.requirement_spec.is_template %]
24
   <div id="requirement_spec_version">
25
    [%- INCLUDE 'requirement_spec/_version.html' requirement_spec=SELF.requirement_spec -%]
26
   </div>
27
  [%- END %]
16
 
17
<ul>
18
  <li id="tab-header-function-block"><a href="#function-blocks-tab">[% LxERP.t8("Content") %]</a></li>
19
  <li id="tab-header-basic-settings"><a href="controller.pl?action=RequirementSpec/ajax_show_basic_settings&id=[% HTML.url(SELF.requirement_spec.id) %]">[% LxERP.t8("Basic settings") %]</a></li>
20
  <li id="tab-header-time-cost-estimate"><a href="controller.pl?action=RequirementSpec/ajax_show_time_and_cost_estimate&id=[% HTML.url(SELF.requirement_spec.id) %]">[% LxERP.t8("Time and price estimate") %]</a></li>
21
  <li id="tab-header-additional-parts"><a href="controller.pl?action=RequirementSpecPart/show&requirement_spec_id=[% HTML.url(SELF.requirement_spec.id) %]">[% LxERP.t8("Additional articles") %]</a></li>
22
  [% UNLESS SELF.requirement_spec.is_template %] 
23
    <li id="tab-header-versions"><a href="controller.pl?action=RequirementSpecVersion/list&requirement_spec_id=[% HTML.url(SELF.requirement_spec.id) %]">[% LxERP.t8("Versions") %]</a></li>
24
    <li id="tab-header-quotations-orders"><a href="[% SELF.url_for(controller='RequirementSpecOrder', action='list', requirement_spec_id=SELF.requirement_spec.id) %]">[% LxERP.t8("Quotations and orders") %]</a></li>
25
  [% END %] 
26
</ul>
27

  
28
<div id="function-blocks-tab" class="section-context-menu">
29
  [% UNLESS SELF.requirement_spec.is_template %]
30
    <div id="requirement_spec_version">
31
      [% INCLUDE 'requirement_spec/_version.html' requirement_spec=SELF.requirement_spec %]
32
    </div>
33
  [% END %]
28 34

  
29 35
  <div id="column-container" class="clearfix">
30
   <div id="tree-column">
31
    <div id="tree"></div>
32
   </div>
36
    <div id="tree-column">
37
     <div id="tree"></div>
38
    </div>
33 39

  
34
   <div id="content-column" class="clearfix">
35
    [% L.hidden_tag('current_content_type', SELF.requirement_spec_item.id ? 'section' : '') %]
36
    [% L.hidden_tag('current_content_id',   SELF.requirement_spec_item.id) %]
40
    <div id="content-column" class="clearfix">
41
      [% L.hidden_tag('current_content_type', SELF.requirement_spec_item.id ? 'section' : '') %]
42
      [% L.hidden_tag('current_content_id',   SELF.requirement_spec_item.id) %]
37 43

  
38
    <div id="column-content">
39
     [%- IF SELF.requirement_spec_item -%]
40
      [%- INCLUDE 'requirement_spec_item/_section.html' requirement_spec_item=SELF.requirement_spec_item -%]
41
     [%- ELSE -%]
42
      [%- INCLUDE 'requirement_spec_item/_no_section.html' -%]
43
     [%- END -%]
44
      <div id="column-content">
45
        [% IF SELF.requirement_spec_item %]
46
          [% INCLUDE 'requirement_spec_item/_section.html' requirement_spec_item=SELF.requirement_spec_item %]
47
        [% ELSE %]
48
          [% INCLUDE 'requirement_spec_item/_no_section.html' %]
49
        [% END %]
44 50
    </div>
45 51
   </div>
46
  </div>
52
  </div><!-- /#column-container -->
47 53
 </div>
48
</div>
49 54

  
50
<script type="text/javascript">
51
 <!--
55

  
56

  
57
</div><!-- /#requirement_spec_tabs -->
58

  
59
<script type="text/javascript"><!--
52 60
$(function() {
53 61
  var tree_data = [
54 62
    { data:     [% JSON.json(LxERP.t8("Text blocks front")) %],
......
80 88
  ];
81 89

  
82 90
  var initially_open = ['tb-front', 'tb-back', 'sections'
83
[%- FOREACH section = sections -%]
91
[% FOREACH section = sections %]
84 92
        , "fb-[% section.id %]"
85
 [%- FOREACH function_block = section.children -%]
86
        , "fb-[% function_block.id -%]"
87
 [%- END -%]
88
[%- END -%]
93
 [% FOREACH function_block = section.children %]
94
        , "fb-[% function_block.id %]"
95
 [% END %]
96
[% END %]
89 97
  ];
90 98

  
91 99
  kivi.requirement_spec.initialize_requirement_spec({
......
104 112
  });
105 113
});
106 114

  
107
  -->
108
</script>
115
  --></script>

Auch abrufbar als: Unified diff