epic-s6ts
[kivitendo-erp.git] / 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 %]:
6       <ol>
7        [%- FOREACH block = blocks %]
8         <li>[%- HTML.escape(block.title) %]</li>
9        [%- END %]
10       </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>
17
18 [%- ELSE %]
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>
27  </tr>
28
29 [%- FOREACH template = TEMPLATES %]
30  <tr class="listrow[% loop.count % 2 %]">
31   <td>
32    <a href="#" onclick="$('#select-template-details-row-[% template.id %]').toggle(); $(this).find('span').toggle();">
33     <span>[+]</span>
34     <span style="display: none;">[-]</span>
35    </a>
36   </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>[% template.mtime ? template.mtime.to_kivitendo(precision='minute') : template.itime.to_kivitendo(precision='minute') %]</td>
41  </tr>
42
43  <tr class="listrow[% loop.count % 2 %]" style="display: none;" id="select-template-details-row-[% template.id %]">
44   [% SET front    = template.text_blocks_sorted(output_position=0) %]
45   [% SET sections = template.sections_sorted %]
46   [% SET back     = template.text_blocks_sorted(output_position=1) %]
47   [% SET parts    = template.parts_sorted %]
48   <td colspan="4">
49    [%- LxERP.t8("What this template contains") %]:<br>
50    <ul>
51     [% PROCESS text_blocks blocks=front title=LxERP.t8("#1 text block(s) front", front.size) %]
52
53     [%- IF sections.size %]
54     <li>[%- LxERP.t8("#1 section(s)", sections.size) %]:
55      <ol>
56       [%- FOREACH section = sections %]
57        <li>[%- HTML.escape(section.fb_number) %]: [%- HTML.escape(section.title) %]</li>
58       [%- END %]
59      </ol>
60     </li>
61     [%- END %]
62
63     [% PROCESS text_blocks blocks=back  title=LxERP.t8("#1 text block(s) back",  back.size)  %]
64
65     [%- IF parts.size %]
66     <li>[%- LxERP.t8("#1 additional part(s)", parts.size) %]:
67      <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      </ol>
72     </li>
73     [%- END %]
74    </ul>
75   </td>
76  </tr>
77 [%- END %]
78 </table>
79
80 [%- END %]
81
82 <p><a href="#" onclick="$('#jqueryui_popup_dialog').dialog('close');">[%- LxERP.t8("Abort") %]</a></p>