Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 0bdb141a

Von Sven Schöling vor mehr als 3 Jahren hinzugefügt

  • ID 0bdb141adbe196bc49b5f496aad476022dd8d47b
  • Vorgänger 015d45ca
  • Nachfolger 47577d1d

Mobile: Templates für den File Dialog

- is_global ist noch nicht unterstützt
- json-loses direkt-rendern wird nicht unterstützt
- umbenennen ist noch nicht implementiert

Unterschiede anzeigen:

templates/mobile_webpages/file/list.html
1
[%- USE LxERP -%]
2
[%- USE L %]
3
[%- USE HTML %]
4
[%- USE P %]
5

  
6
<h4>[% source.title | html %]</h4>
7

  
8
<div>
9
[%- FOREACH source = SOURCES %]
10
 <table class="highlight striped">
11
  <thead>
12
   <tr>
13
  [%- SET checkname = source.chk_action %]
14
  [%- IF edit_attachments %]
15
    <th>[% P.M.checkbox_tag(checkname _ '_checkall', label=source.chkall_title) %]
16
  [%- END %]
17
    <th>[% LxERP.t8('Date') | html %]</th>
18
    <th>[% source.file_title | html %]</th>
19
  [%- IF file_type == 'image' %]
20
    <th>[% LxERP.t8('Title') %]</th>
21
    <th>[% LxERP.t8('ImagePreview') %]</th>
22
    <th>[% LxERP.t8('Description') %]</th>
23
  [%- ELSE %]
24
    <th></th>
25
  [%- END %]
26
   </tr>
27
  </thead>
28

  
29
  <tbody>
30
  [%- FOREACH file = source.files %]
31
   <tr>
32
    [%- IF edit_attachments %]
33
    <td>[%- P.M.checkbox_tag(checkname _ '[]', value=file.id _ '_' _ file.version, class=checkname, label=' ') %]</td>
34
    [%- END %]
35
    <td>[% file.mtime_as_timestamp_s %][% L.hidden_tag("version[]", file.version) %]</td>
36
    <td><a href="controller.pl?action=File/download&id=[% file.id %][%- IF file.version %]&version=[%- file.version %][%- END %]">
37
        <span id="[% "filename_" _ file.id %][%- IF file.version %]_[% file.version %][%- END %]">[% file.file_name %]</span></a></td>
38
    [%- IF file_type == 'image' %]
39
    <td>[% file.title %]</td>
40
    <td>
41
      <img src="controller.pl?action=File/download&id=[% file.id %][%- IF file.version %]&version=[%- file.version %][%- END %]" alt="[% file.title %]" width="64px">
42
    </td>
43
    <td>[% file.description %]</td>
44
    [%- ELSE %]
45
    <td></td>
46
    [%- END %]
47
   </tr>
48
  [%- END %]
49
  </tbody>
50
 </table>
51
  <div>
52
  [%- IF edit_attachments %]
53
    [%- IF source.can_import %]
54
      [% P.M.button_tag("kivi.File.unimport(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ checkname _ "');", source.chk_title) %]
55
    [%- ELSE %]
56
      [%- IF source.can_delete %]
57
        [% P.M.button_tag("kivi.File.delete("   _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ checkname _ "');", source.chk_title) %]
58
      [%- END %]
59
    [%- END %]
60
  [%- END %]
61
  [%- IF source.can_rename %]
62
    [% P.M.button_tag("kivi.File.rename(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ checkname _ "');",  source.rename_title ) %]
63
  [%- END %]
64
  [%- IF source.can_upload %]
65
    [% P.M.button_tag("kivi.File.upload(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ source.upload_title _ "');", source.upload_title ) %]
66
  [%- END %]
67
  [%- IF source.can_import %]
68
    [% P.M.button_tag("kivi.File.import("   _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ source.name _ "','" _ source.path _"');",  source.import_title ) %]
69
  [%- END %]
70
  </div>
71
[%- END %]
72
  <div></div><div>
73
[% P.M.button_tag("kivi.File.update(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "');", LxERP.t8('Update')) %]
74
  </div>
75
</div>
templates/mobile_webpages/file/upload_dialog.html
1
[%- USE L -%]
2
[%- USE P -%]
3
[%- USE T8 -%]
4
[%- USE LxERP -%]
5
[%- USE JavaScript -%]
6

  
7
<form method="post" id="upload_form" enctype="multipart/form-data" action="controller.pl">
8
  [% SET multiple = 'true' %]
9
  [% IF SELF.object_type == 'shop_image' %][% multiple = 'false' %][% END %]
10
  <div class="row">
11
    <div class="file-field input-field col s12">
12
      <div class="btn s3">
13
        <span>[% 'Filename' | $T8 %]</span>
14
        <input
15
          name="uploadfiles[]" type="file" [% IF multiple %]multiple[% END %]
16
          id="upload_files" size="45" accept="[% SELF.accept_types %]" capture="camera"
17
          onchange="kivi.File.allow_upload_submit();">
18
      </div>
19
      <div class="file-path-wrapper s9">
20
        <input class="file-path validate" type="text">
21
      </div>
22
    </div>
23

  
24
    <div class="s12">
25
     [% P.M.button_tag(
26
       P.escape_js_call("kivi.File.upload_selected_files", SELF.object_id, SELF.object_type, SELF.file_type, SELF.maxsize, SELF.is_global),
27
       LxERP.t8("Upload file"),
28
       id="upload_selected_button",
29
       disabled=1)
30
     %]
31
     [% P.M.button_tag("kivi.File.reset_upload_form()", LxERP.t8('Reset'), flat=1) %]
32
    </div>
33

  
34
  </div>
35

  
36

  
37
 <hr>
38

  
39
 <div id="upload_result"></div>
40
</form>

Auch abrufbar als: Unified diff