Pflichtenheftvorlagen einfügen
[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 <h1>[%- LxERP.t8("Select template to paste") %]</h1>
16
17 [%- IF !TEMPLATES.size %]
18 <p>[%- LxERP.t8("No requirement spec templates have been created yet.") %]</p>
19
20 <p><a href="#" onclick="$('#jqm_popup_dialog').jqmClose();">[%- LxERP.t8("Abort") %]</a></p>
21
22 [%- ELSE %]
23
24 <table>
25  <tr class="listheading">
26   <th>[%- LxERP.t8("Detail view") %]</th>
27   <th>[%- LxERP.t8("Paste template") %]</th>
28   <th>[%- LxERP.t8("Title") %]</th>
29   <th>[%- LxERP.t8("Last modification") %]</th>
30  </tr>
31
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>[% template.mtime ? template.mtime.to_kivitendo(precision='minute') : template.itime.to_kivitendo(precision='minute') %]</td>
43  </tr>
44
45  <tr class="listrow[% loop.count % 2 %]" style="display: none;" id="select-template-details-row-[% template.id %]">
46   [% SET front    = template.text_blocks_sorted(output_position=0) %]
47   [% SET sections = template.sections_sorted %]
48   [% SET back     = template.text_blocks_sorted(output_position=1) %]
49   <td colspan="4">
50    [%- LxERP.t8("What this template contains") %]:<br>
51    <ul>
52     [% PROCESS text_blocks blocks=front title=LxERP.t8("#1 text block(s) front", front.size) %]
53
54     [%- IF sections.size %]
55     <li>[%- LxERP.t8("#1 section(s)", sections.size) %]:
56      <ol>
57       [%- FOREACH section = sections %]
58        <li>[%- HTML.escape(section.fb_number) %]: [%- HTML.escape(section.title) %]</li>
59       [%- END %]
60      </ol>
61     </li>
62     [%- END %]
63
64     [% PROCESS text_blocks blocks=back  title=LxERP.t8("#1 text block(s) back",  back.size)  %]
65    </ul>
66   </td>
67  </tr>
68 [%- END %]
69 </table>
70
71 <p><a href="#" onclick="$('#jqm_popup_dialog').jqmClose();">[%- LxERP.t8("Abort") %]</a></p>
72 [%- END %]