RequirementSpec Suche auf GetModels umgestellt.
[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("Last modification") %]</th>
26  </tr>
27
28 [%- FOREACH template = TEMPLATES %]
29  <tr class="listrow[% loop.count % 2 %]">
30   <td>
31    <a href="#" onclick="$('#select-template-details-row-[% template.id %]').toggle(); $(this).find('span').toggle();">
32     <span>[+]</span>
33     <span style="display: none;">[-]</span>
34    </a>
35   </td>
36   <td><a href="#" onclick="kivi.requirement_spec.paste_selected_template([% template.id %]);">[%- LxERP.t8("Paste template") %]</a></td>
37   <td>[%- HTML.escape(template.title) %]</td>
38   <td>[% template.mtime ? template.mtime.to_kivitendo(precision='minute') : template.itime.to_kivitendo(precision='minute') %]</td>
39  </tr>
40
41  <tr class="listrow[% loop.count % 2 %]" style="display: none;" id="select-template-details-row-[% template.id %]">
42   [% SET front    = template.text_blocks_sorted(output_position=0) %]
43   [% SET sections = template.sections_sorted %]
44   [% SET back     = template.text_blocks_sorted(output_position=1) %]
45   <td colspan="4">
46    [%- LxERP.t8("What this template contains") %]:<br>
47    <ul>
48     [% PROCESS text_blocks blocks=front title=LxERP.t8("#1 text block(s) front", front.size) %]
49
50     [%- IF sections.size %]
51     <li>[%- LxERP.t8("#1 section(s)", sections.size) %]:
52      <ol>
53       [%- FOREACH section = sections %]
54        <li>[%- HTML.escape(section.fb_number) %]: [%- HTML.escape(section.title) %]</li>
55       [%- END %]
56      </ol>
57     </li>
58     [%- END %]
59
60     [% PROCESS text_blocks blocks=back  title=LxERP.t8("#1 text block(s) back",  back.size)  %]
61    </ul>
62   </td>
63  </tr>
64 [%- END %]
65 </table>
66
67 [%- END %]
68
69 <p><a href="#" onclick="$('#jqueryui_popup_dialog').dialog('close');">[%- LxERP.t8("Abort") %]</a></p>