1 [%- USE HTML %][%- USE L -%][%- USE P -%][%- USE LxERP -%]
2 [%- USE T8 %][% USE Base64 %]
3 <table width="100%" id="images_list">
5 <tr class="listheading">
6 <th width="10px"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]" class="dragdrop"></th>
8 <th>[% 'Title' | $T8 %]</th>
9 <th>[% 'Description' | $T8 %]</th>
10 <th>[% 'Filename' | $T8 %]</th>
11 <th>[% 'Orig. Size w/h' | $T8 %]</th>
12 <th>[% 'Action' | $T8 %]</th>
16 [%- FOREACH img = IMAGES %]
17 <tr class="listrow" id="image_id_[% img.id %]">
18 <td><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]" class="dragdrop"></td>
19 <td width="70px"><img src="data:[% img.thumbnail_content_type %];base64,[% img.thumbnail_content.encode_base64 %]" alt="[% img.file.title %]"></td>
20 <td>[% HTML.escape(img.file.title) %]</td>
21 <td>[% HTML.escape(img.file.description) %]</td>
22 <td>[% HTML.escape(img.file.file_name) %]</td>
23 <td>[% HTML.escape(img.org_file_width) _ ' x ' _ HTML.escape(img.org_file_height) %]</td>
24 <td>[% L.button_tag("kivi.File.delete_file(" _ img.file_id _ ", 'ShopPart/ajax_delete_file')", LxERP.t8('Delete'), confirm=LxERP.t8("Are you sure?")) %]</td>
30 [% L.sortable_element('#images_list tbody', url=SELF.url_for(action='reorder'), with='image_id') %]
32 [% L.button_tag("kivi.ShopPart.imageUpload(" _ FORM.id _ ",'shop_image','image', '',0);", LxERP.t8('File upload') ) %]