6c811b34683c843fe9e12480b55cb0b73fc23f1d
[kivitendo-erp.git] / templates / webpages / shop_part / _list_images.html
1 [%- USE HTML %][%- USE L -%][%- USE P -%][%- USE LxERP -%]
2 [%- USE T8 %][% USE Base64 %]
3 [%- USE Dumper %]
4 <table width="100%" id="images_list">
5   <thead>
6     <tr class="listheading">
7       <th width="10px"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]" class="dragdrop"></th>
8       <th width="70px"></th>
9       <th>[% 'Title' | $T8 %]</th>
10       <th>[% 'Description' | $T8 %]</th>
11       <th>[% 'Filename' | $T8 %]</th>
12       <th>[% 'Orig. Size w/h' | $T8 %]</th>
13       <th>[% 'Action' | $T8 %]</th>
14     </tr>
15   </thead>
16   <tbody>
17    [%-  FOREACH img = IMAGES %]
18    [% # Dumper.dump_html(img) %]
19     <tr class="listrow" id="image_id_[%  img.id %]">
20       <td><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]" class="dragdrop"></td>
21       <td width="70px"><img src="data:[%  img.thumbnail_content_type %];base64,[%  img.thumbnail_content.encode_base64 %]" alt="[%  img.file.title %]"></td>
22       <td>[% HTML.escape(img.file.title) %]</td>
23       <td>[% HTML.escape(img.file.description) %]</td>
24       <td>[% HTML.escape(img.file.file_name) %]</td>
25       <td>[% HTML.escape(img.org_file_width) _  ' x ' _ HTML.escape(img.org_file_height) %]</td>
26       <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>
27     </tr>
28    [%  END %]
29   </tbody>
30 </table>
31
32 [% L.sortable_element('#images_list tbody', url=SELF.url_for(action='reorder'), with='image_id') %]
33 <p>
34 [% L.button_tag("kivi.ShopPart.imageUpload(" _ FORM.id _ ",'shop_image','image', '',0);", LxERP.t8('File upload') ) %]
35 </p>