Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 81938c0e

Von Sven Schöling vor fast 4 Jahren hinzugefügt

  • ID 81938c0ebb9c2a7914959f06633460d3d84567d6
  • Vorgänger 9a750d9e
  • Nachfolger a3cf2c77

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
[%- USE LxERP -%]
[%- USE L %]
[%- USE HTML %]
[%- USE P %]
<h4>[% source.title | html %]</h4>
<div>
[%- FOREACH source = SOURCES %]
<table class="highlight striped">
<thead>
<tr>
[%- SET checkname = source.chk_action %]
[%- IF edit_attachments %]
<th>[% P.M.checkbox_tag(checkname _ '_checkall', label=source.chkall_title) %]
[%- END %]
<th>[% LxERP.t8('Date') | html %]</th>
<th>[% source.file_title | html %]</th>
[%- IF file_type == 'image' %]
<th>[% LxERP.t8('Title') %]</th>
<th>[% LxERP.t8('ImagePreview') %]</th>
<th>[% LxERP.t8('Description') %]</th>
[%- ELSE %]
<th></th>
[%- END %]
</tr>
</thead>
<tbody>
[%- FOREACH file = source.files %]
<tr>
[%- IF edit_attachments %]
<td>[%- P.M.checkbox_tag(checkname _ '[]', value=file.id _ '_' _ file.version, class=checkname, label=' ') %]</td>
[%- END %]
<td>[% file.mtime_as_timestamp_s %][% L.hidden_tag("version[]", file.version) %]</td>
<td><a href="controller.pl?action=File/download&id=[% file.id %][%- IF file.version %]&version=[%- file.version %][%- END %]">
<span id="[% "filename_" _ file.id %][%- IF file.version %]_[% file.version %][%- END %]">[% file.file_name %]</span></a></td>
[%- IF file_type == 'image' %]
<td>[% file.title %]</td>
<td>
<img src="controller.pl?action=File/download&id=[% file.id %][%- IF file.version %]&version=[%- file.version %][%- END %]" alt="[% file.title %]" width="64px">
</td>
<td>[% file.description %]</td>
[%- ELSE %]
<td></td>
[%- END %]
</tr>
[%- END %]
</tbody>
</table>
<div>
[%- IF edit_attachments %]
[%- IF source.can_import %]
[% P.M.button_tag("kivi.File.unimport(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ checkname _ "');", source.chk_title) %]
[%- ELSE %]
[%- IF source.can_delete %]
[% P.M.button_tag("kivi.File.delete(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ checkname _ "');", source.chk_title) %]
[%- END %]
[%- END %]
[%- END %]
[%- IF source.can_rename %]
[% P.M.button_tag("kivi.File.rename(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ checkname _ "');", source.rename_title ) %]
[%- END %]
[%- IF source.can_upload %]
[% P.M.button_tag("kivi.File.upload(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ source.upload_title _ "');", source.upload_title ) %]
[%- END %]
[%- IF source.can_import %]
[% P.M.button_tag("kivi.File.import(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ source.name _ "','" _ source.path _"');", source.import_title ) %]
[%- END %]
</div>
[%- END %]
<div></div><div>
[% P.M.button_tag("kivi.File.update(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "');", LxERP.t8('Update')) %]
</div>
</div>
templates/mobile_webpages/file/upload_dialog.html
[%- USE L -%]
[%- USE P -%]
[%- USE T8 -%]
[%- USE LxERP -%]
[%- USE JavaScript -%]
<form method="post" id="upload_form" enctype="multipart/form-data" action="controller.pl">
[% SET multiple = 'true' %]
[% IF SELF.object_type == 'shop_image' %][% multiple = 'false' %][% END %]
<div class="row">
<div class="file-field input-field col s12">
<div class="btn s3">
<span>[% 'Filename' | $T8 %]</span>
<input
name="uploadfiles[]" type="file" [% IF multiple %]multiple[% END %]
id="upload_files" size="45" accept="[% SELF.accept_types %]" capture="camera"
onchange="kivi.File.allow_upload_submit();">
</div>
<div class="file-path-wrapper s9">
<input class="file-path validate" type="text">
</div>
</div>
<div class="s12">
[% P.M.button_tag(
P.escape_js_call("kivi.File.upload_selected_files", SELF.object_id, SELF.object_type, SELF.file_type, SELF.maxsize, SELF.is_global),
LxERP.t8("Upload file"),
id="upload_selected_button",
disabled=1)
%]
[% P.M.button_tag("kivi.File.reset_upload_form()", LxERP.t8('Reset'), flat=1) %]
</div>
</div>
<hr>
<div id="upload_result"></div>
</form>

Auch abrufbar als: Unified diff