]> wagnertech.de Git - mfinanz.git/blob - templates/design40_webpages/requirement_spec/select_template_to_paste.html
date error in mapping
[mfinanz.git] / templates / design40_webpages / requirement_spec / select_template_to_paste.html
1 [% USE LxERP %]
2 [% USE HTML %]
3 [% USE L %]
4
5 [% BLOCK text_blocks %]
6   [% IF blocks.size %]
7     <li>[% title %]:
8       <ol>
9         [% FOREACH block = blocks %]
10           <li>[% HTML.escape(block.title) %]</li>
11         [% END %]
12       </ol>
13     </li>
14   [% END %]
15 [% END %]
16
17 [% IF !TEMPLATES.size %]
18   <p>[% LxERP.t8("No requirement spec templates have been created yet.") %]</p>
19
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>
29  </tr>
30  </thead>
31 <tbody>
32 [% FOREACH template = TEMPLATES %]
33  <tr class="listrow[% loop.count % 2 %]">
34   <td>
35    <a href="#" onclick='$("#select-template-details-row-[% template.id %]").toggle(); $(this).find("span").toggle();'>
36     <span>[+]</span>
37     <span style="display: none;">[-]</span>
38    </a>
39   </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>
43   <td>[% template.mtime ? template.mtime.to_kivitendo(precision='minute') : template.itime.to_kivitendo(precision='minute') %]</td>
44  </tr>
45
46  <tr style="display: none;" id="select-template-details-row-[% template.id %]">
47   [% SET front    = template.text_blocks_sorted(output_position=0) %]
48   [% SET sections = template.sections_sorted %]
49   [% SET back     = template.text_blocks_sorted(output_position=1) %]
50   [% SET parts    = template.parts_sorted %]
51   <td colspan="4">
52    [% LxERP.t8("What this template contains") %]:<br>
53    <ul>
54     [% PROCESS text_blocks blocks=front title=LxERP.t8("#1 text block(s) front", front.size) %]
55
56     [% IF sections.size %]
57     <li>[% LxERP.t8("#1 section(s)", sections.size) %]:
58      <ol>
59       [% FOREACH section = sections %]
60        <li>[% HTML.escape(section.fb_number) %]: [% HTML.escape(section.title) %]</li>
61       [% END %]
62      </ol>
63     </li>
64     [% END %]
65
66     [% PROCESS text_blocks blocks=back  title=LxERP.t8("#1 text block(s) back",  back.size)  %]
67
68     [% IF parts.size %]
69     <li>[% LxERP.t8("#1 additional part(s)", parts.size) %]:
70      <ol>
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 %]
74      </ol>
75     </li>
76     [% END %]
77    </ul>
78   </td>
79  </tr>
80 [% END %]
81 </tbody>
82 </table>
83
84 [% END %]
85
86 <p><a href="#" onclick='$("#jqueryui_popup_dialog").dialog("close");' class="button neutral">[% LxERP.t8("Abort") %]</a></p>