Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision d3a17f25

Von Hans P. Schlaepfer vor mehr als 3 Jahren hinzugefügt

  • ID d3a17f256bf35448a76e9f81aa05b96c43e9804a
  • Vorgänger 1f1d98bc
  • Nachfolger 6a401b5b

Neues Design 2019 Standard-Code templates/webpages/file/

Unterschiede anzeigen:

templates/webpages/file/list.html
1
[%- IF ! json %]
2
<div id="[% file_type %]_list_[% object_type %]">
3
[%- END %]
4
<div class="listtop">[% title %]</div>
5 1
[% USE LxERP %]
6 2
[% USE L %]
7 3
[% USE HTML %]
8 4

  
9
<div style="padding-bottom: 15px">
10
[%- SET can_rename = 0 %]
11
[%- FOREACH source = SOURCES %]
12
 <table style="width: 100%" >
5
<!-- PENDENT: Ueberpruefen, Tabelle und Buttons -->
6
[% IF ! json %]
7
  <div id="[% file_type %]_list_[% object_type %]">
8
[% END %]
9

  
10
<div class="wrapper">
11
<h2>[% title %]</h2>
12

  
13
[% SET can_rename = 0 %]
14
[% FOREACH source = SOURCES %]
15

  
16
<table class="tbl-list">
17
  <caption>[% source.title %]</caption>
13 18
  <thead>
14
   <tr><th class="listheading" colspan="6">[% source.title %]</th></tr>
15
   <tr>
16
  [%- SET checkname = source.chk_action %]
17
  [%- IF is_global %]
18
  [%- SET checkname = object_type _ '_' _ source.chk_action %]
19
  [%- END %]
20
  [%- IF edit_attachments %]
21
 <script type="text/javascript">
22
  <!--
23
$(function() {
24
  $('#[% checkname %]_checkall').checkall('INPUT[name="[% checkname %][]"]');
25
});
26
 -->
27
</script>
28
    <th class="listheading" width="3%">[% L.checkbox_tag(checkname _ '_checkall') %]</th>
29
    <th class="listheading" width="7%">[% source.chkall_title %]</th>
30
  [%- END %]
31
    <th class="listheading" width="15%"><b>[%  LxERP.t8('Date') %]</b></th>
32
    <th class="listheading" width="20%"><b>[%  source.file_title %]</b></th>
33
  [%- IF file_type == 'image' %]
34
    <th class="listheading" width="15%"><b>[%  LxERP.t8('Title') %]</b></th>
35
    <th class="listheading" width="10%">
36
    <b>[%  LxERP.t8('ImagePreview') %]</b>
37
    </th>
38
    <th class="listheading" width="30%"><b>[%  LxERP.t8('Description') %]</b></th>
39
  [%- ELSE %]
40
    <th class="listheading" width="40%"></th>
41
  [%- END %]
19
    <tr>
20
      [% SET checkname = source.chk_action %]
21
      [% IF is_global %]
22
        [% SET checkname = object_type _ '_' _ source.chk_action %]
23
      [% END %]
24
      [% IF edit_attachments %]
25
        <th>
26
          <script type="text/javascript"><!--
27
            $(function() { $('#[% checkname %]_checkall').checkall('INPUT[name="[% checkname %][]"]'); });
28
          --></script>
29
          [% L.checkbox_tag(checkname _ '_checkall') %]
30
        </th>
31
        <th>[% source.chkall_title %]</th>
32
      [% END %]
33
      <th>[%  LxERP.t8('Date') %]</th>
34
      <th>[%  source.file_title %]</th>
35
      [% IF file_type == 'image' %]
36
        <th>[%  LxERP.t8('Title') %]</th>
37
        <th>[%  LxERP.t8('ImagePreview') %]</th>
38
        <th>[%  LxERP.t8('Description') %]</th>
39
      [% ELSE %]
40
        <th></th>
41
      [% END %]
42 42
   </tr>
43 43
  </thead>
44

  
45 44
  <tbody>
46
  [%- FOREACH file = source.files %]
47
   <tr class="listrow[% loop.count % 2 %]">
48
    [%- IF edit_attachments %]
49
    <td>[%- L.checkbox_tag(checkname _ '[]', 'value'=file.id _ '_' _ file.version, 'class'=checkname) %]</td>
50
    <td></td>
51
    [%- END %]
52
    <td>[% file.mtime_as_timestamp_s %][% L.hidden_tag("version[]", file.version) %]</td>
53
    <td><a href="controller.pl?action=File/download&id=[% file.id %][%- IF file.version %]&version=[%- file.version %][%- END %]">
54
        <span id="[% "filename_" _ file.id %][%- IF file.version %]_[% file.version %][%- END %]">[% file.file_name %]</span></a></td>
55
    [%- IF file_type == 'image' %]
56
    <td>[% file.title %]</td>
57
    <td>
58
      <img src="controller.pl?action=File/download&id=[% file.id %][%- IF file.version %]&version=[%- file.version %][%- END %]" alt="[% file.title %]" width="64px">
59
    </td>
60
    <td>[% file.description %]</td>
61
    [%- ELSE %]
62
    <td></td>
63
    [%- END %]
64
   </tr>
65
  [%- END %]
45
    [% FOREACH file = source.files %]
46
      <tr>
47
        [% IF edit_attachments %]
48
          <td>[% L.checkbox_tag(checkname _ '[]', 'value'=file.id _ '_' _ file.version, 'class'=checkname) %]</td>
49
          <td></td>
50
        [% END %]
51
        <td>[% file.mtime_as_timestamp_s %][% L.hidden_tag("version[]", file.version) %]</td>
52
        <td>
53
          <a href="controller.pl?action=File/download&id=[% file.id %][% IF file.version %]&version=[% file.version %][% END %]">
54
          <span id="[% "filename_" _ file.id %][% IF file.version %]_[% file.version %][% END %]">[% file.file_name %]</span></a>
55
        </td>
56
        [% IF file_type == 'image' %]
57
          <td>[% file.title %]</td>
58
          <td><img src="controller.pl?action=File/download&id=[% file.id %][% IF file.version %]&version=[% file.version %][% END %]" alt="[% file.title %]"></td>
59
          <td>[% file.description %]</td>
60
        [% ELSE %]
61
          <td></td>
62
        [% END %]
63
      </tr>
64
    [% END %]
66 65
  </tbody>
67
 </table
68
  <div>
69
  [%- IF edit_attachments %]
70
    [%- IF source.can_import %]
66
</table>
67

  
68
<div class="buttons">
69
  [% IF edit_attachments %]
70
    [% IF source.can_import %]
71 71
      [% L.button_tag("kivi.File.unimport(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ checkname _ "');",source.chk_title) %]
72
    [%- ELSE %]
73
      [%- IF source.can_delete %]
72
    [% ELSE %]
73
      [% IF source.can_delete %]
74 74
        [% L.button_tag("kivi.File.delete("   _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ checkname _ "'," _ is_global _ ");",  source.chk_title) %]
75
      [%- END %]
76
    [%- END %]
77
  [%- END %]
78
  [%- IF source.can_rename %]
79
    [%- can_rename = 1 %]
75
      [% END %]
76
    [% END %]
77
  [% END %]
78
  [% IF source.can_rename %]
79
    [% can_rename = 1 %]
80 80
    [% L.button_tag("kivi.File.rename(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ checkname _ "'," _ is_global _ ");",  source.rename_title ) %]
81
  [%- END %]
82
  [%- IF source.can_upload %]
81
  [% END %]
82
  [% IF source.can_upload %]
83 83
    [% L.button_tag("kivi.File.upload(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ source.upload_title _ "'," _ is_global _ ");", source.upload_title ) %]
84
  [%- END %]
85
  [%- IF source.can_import %]
84
  [% END %]
85
  [% IF source.can_import %]
86 86
    [% L.button_tag("kivi.File.import("   _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ source.name _ "','" _ source.path _"');",  source.import_title ) %]
87
  [%- END %]
88
  </div>
89
[%- END %]
90
  <div></div><div>
91
[% L.button_tag("kivi.File.update(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "'," _ is_global _ ");", LxERP.t8('Update')) %]
92
  </div>
93
</div>
94
[%- IF ! json %]
87
  [% END %]
88
</div><!-- /.buttons -->
89

  
90
[% END #FOREACH SOURCES %]
91

  
92
<div class="buttons">
93
  [% L.button_tag("kivi.File.update(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "'," _ is_global _ ");", LxERP.t8('Update')) %]
95 94
</div>
96
[%- UNLESS is_global %]
97
[%- IF can_rename %]
98
[% INCLUDE 'file/rename_dialog.html' -%]
99
[%- END %]
100
[%- END %]
101
[%- END %]
95

  
96
</div><!-- /.wrapper -->
97

  
98

  
99
[% IF ! json %]
100
  </div>
101
  [% UNLESS is_global %]
102
    [% IF can_rename %]
103
      [% INCLUDE 'file/rename_dialog.html' %]
104
    [% END %]
105
  [% END %]
106
[% END %]

Auch abrufbar als: Unified diff