[% USE HTML %][% USE L %][% USE LxERP %][%- USE P -%]
-<table>
+<table id="versioned_copies_list">
<thead>
<tr class="listheading">
- <th>[%- LxERP.t8("Version number") %]</th>
+ <th><div class="thingy" style="width: 10px; height: 100%; background-color: red; position: relative; left: -10px;"></div>[%- LxERP.t8("Version number") %]</th>
<th>[%- LxERP.t8("Description") %]</th>
<th>[%- LxERP.t8("Internal comment") %]</th>
<th>[%- LxERP.t8("Last modification") %]</th>
</thead>
<tbody>
- <tr class="listrow">
- <td>
- [%- IF SELF.requirement_spec.version_id %]
- [%- LxERP.t8("Working copy identical to version number #1", SELF.requirement_spec.version.version_number) %]
- [%- ELSE %]
- [%- LxERP.t8("Working copy without version") %]
- [%- END -%]
- </td>
+ <tr class="listrow versioned-copy-context-menu">
+ [%- IF SELF.requirement_spec.version %]
+ [% L.hidden_tag('versioned_copy_id', SELF.requirement_spec.version.requirement_spec_id, no_id=1) %]
+ <td>[%- LxERP.t8("Working copy identical to version number #1", SELF.requirement_spec.version.version_number) %]</td>
+ [%- ELSE %]
+ <td>[%- LxERP.t8("Working copy without version") %]</td>
+ [%- END -%]
<td>[%- LxERP.t8("Working copy; no description yet") %]</td>
<td> </td>
<td>[% SELF.requirement_spec.mtime.to_kivitendo(precision='minute') %]</td>
</tr>
- [%- FOREACH versioned = SELF.versioned_copies %]
- <tr class="listrow versioned_copy_context_menu">
- <td>[% HTML.escape(versioned.version.version_number) %]</td>
- <td>[% HTML.escape(P.truncate(versioned.description)) %]</td>
- <td>[% HTML.escape(P.truncate(versioned.comment)) %]</td>
- <td>[% versioned.mtime.to_kivitendo(precision='minute') %]</td>
+ [%- FOREACH versioned_copy = SELF.requirement_spec.versioned_copies_sorted %]
+ [%- SET version = versioned_copy.version %]
+ <tr class="listrow versioned-copy-context-menu">
+ [% L.hidden_tag('versioned_copy_id', versioned_copy.id, no_id=1) %]
+ <td>[% HTML.escape(version.version_number) %]</td>
+ <td>[% HTML.escape(P.truncate(version.description)) %]</td>
+ <td>[% HTML.escape(P.truncate(version.comment)) %]</td>
+ <td>[% version.itime.to_kivitendo(precision='minute') %]</td>
</tr>
[%- END %]
</tbody>