Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision d3a17f25

Von Hans P. Schlaepfer vor etwa 4 Jahren hinzugefügt

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

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

Unterschiede anzeigen:

templates/webpages/file/import_dialog.html
[% USE JavaScript %]
<form method="post" id="file_import_form" action="controller.pl">
<table>
<table class="tbl-list">
<thead>
<tr>
<th class="listheading" width="3%">[% L.checkbox_tag(source.chk_action _ '_checkall') %]</th>
<th class="listheading" width="11%">[% source.chkall_title %]</th>
<th>[% LxERP.t8("Attached Filename") %]</th>
</tr>
<tr>
<th>[% L.checkbox_tag(source.chk_action _ '_checkall') %]</th>
<th>[% source.chkall_title %]</th>
<th>[% LxERP.t8("Attached Filename") %]</th>
</tr>
</thead>
<tbody>
[%- FOREACH file = source.files %]
<tr class="listrow[% loop.count % 2 %]">
<td>[%- L.checkbox_tag(source.chk_action _ '[]', 'value'=file.name, 'class'=source.chk_action) %]</td>
<td></td>
<td><span id="[% "filename_" _ file.name %]">[% file.filename %]</span></td>
</tr>
[%- END %]
[% FOREACH file = source.files %]
<tr class="listrow[% loop.count % 2 %]">
<td>[% L.checkbox_tag(source.chk_action _ '[]', 'value'=file.name, 'class'=source.chk_action) %]</td>
<td></td>
<td><span id="[% "filename_" _ file.name %]">[% file.filename %]</span></td>
</tr>
[% END %]
</tbody>
</table>
</table>
<p>
[%- L.button_tag("kivi.File.importaction(" _ SELF.object_id _ ",'" _ SELF.object_type _ "','" _ SELF.file_type _ "','" _ source.name _ "','" _ source.path _ "','"_ source.chk_action _ "');", LxERP.t8('Continue'), id => "import_cont_btn") %]</td>
[%- L.button_tag("kivi.File.importclose();" , LxERP.t8('Cancel') , class => "submit") %]</td></tr>
</p>
<div class="buttons">
[% L.button_tag("kivi.File.importaction(" _ SELF.object_id _ ",'" _ SELF.object_type _ "','" _ SELF.file_type _ "','" _ source.name _ "','" _ source.path _ "','"_ source.chk_action _ "');", LxERP.t8('Continue'), id => "import_cont_btn") %]</td>
[% L.button_tag("kivi.File.importclose();" , LxERP.t8('Cancel') , class => "submit") %]</td></tr>
</div>
</form>
templates/webpages/file/list.html
[%- IF ! json %]
<div id="[% file_type %]_list_[% object_type %]">
[%- END %]
<div class="listtop">[% title %]</div>
[% USE LxERP %]
[% USE L %]
[% USE HTML %]
<div style="padding-bottom: 15px">
[%- SET can_rename = 0 %]
[%- FOREACH source = SOURCES %]
<table style="width: 100%" >
<!-- PENDENT: Ueberpruefen, Tabelle und Buttons -->
[% IF ! json %]
<div id="[% file_type %]_list_[% object_type %]">
[% END %]
<div class="wrapper">
<h2>[% title %]</h2>
[% SET can_rename = 0 %]
[% FOREACH source = SOURCES %]
<table class="tbl-list">
<caption>[% source.title %]</caption>
<thead>
<tr><th class="listheading" colspan="6">[% source.title %]</th></tr>
<tr>
[%- SET checkname = source.chk_action %]
[%- IF is_global %]
[%- SET checkname = object_type _ '_' _ source.chk_action %]
[%- END %]
[%- IF edit_attachments %]
<script type="text/javascript">
<!--
$(function() {
$('#[% checkname %]_checkall').checkall('INPUT[name="[% checkname %][]"]');
});
-->
</script>
<th class="listheading" width="3%">[% L.checkbox_tag(checkname _ '_checkall') %]</th>
<th class="listheading" width="7%">[% source.chkall_title %]</th>
[%- END %]
<th class="listheading" width="15%"><b>[% LxERP.t8('Date') %]</b></th>
<th class="listheading" width="20%"><b>[% source.file_title %]</b></th>
[%- IF file_type == 'image' %]
<th class="listheading" width="15%"><b>[% LxERP.t8('Title') %]</b></th>
<th class="listheading" width="10%">
<b>[% LxERP.t8('ImagePreview') %]</b>
</th>
<th class="listheading" width="30%"><b>[% LxERP.t8('Description') %]</b></th>
[%- ELSE %]
<th class="listheading" width="40%"></th>
[%- END %]
<tr>
[% SET checkname = source.chk_action %]
[% IF is_global %]
[% SET checkname = object_type _ '_' _ source.chk_action %]
[% END %]
[% IF edit_attachments %]
<th>
<script type="text/javascript"><!--
$(function() { $('#[% checkname %]_checkall').checkall('INPUT[name="[% checkname %][]"]'); });
--></script>
[% L.checkbox_tag(checkname _ '_checkall') %]
</th>
<th>[% source.chkall_title %]</th>
[% END %]
<th>[% LxERP.t8('Date') %]</th>
<th>[% source.file_title %]</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 class="listrow[% loop.count % 2 %]">
[%- IF edit_attachments %]
<td>[%- L.checkbox_tag(checkname _ '[]', 'value'=file.id _ '_' _ file.version, 'class'=checkname) %]</td>
<td></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 %]
[% FOREACH file = source.files %]
<tr>
[% IF edit_attachments %]
<td>[% L.checkbox_tag(checkname _ '[]', 'value'=file.id _ '_' _ file.version, 'class'=checkname) %]</td>
<td></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 %]"></td>
<td>[% file.description %]</td>
[% ELSE %]
<td></td>
[% END %]
</tr>
[% END %]
</tbody>
</table
<div>
[%- IF edit_attachments %]
[%- IF source.can_import %]
</table>
<div class="buttons">
[% IF edit_attachments %]
[% IF source.can_import %]
[% L.button_tag("kivi.File.unimport(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ checkname _ "');",source.chk_title) %]
[%- ELSE %]
[%- IF source.can_delete %]
[% ELSE %]
[% IF source.can_delete %]
[% L.button_tag("kivi.File.delete(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ checkname _ "'," _ is_global _ ");", source.chk_title) %]
[%- END %]
[%- END %]
[%- END %]
[%- IF source.can_rename %]
[%- can_rename = 1 %]
[% END %]
[% END %]
[% END %]
[% IF source.can_rename %]
[% can_rename = 1 %]
[% L.button_tag("kivi.File.rename(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ checkname _ "'," _ is_global _ ");", source.rename_title ) %]
[%- END %]
[%- IF source.can_upload %]
[% END %]
[% IF source.can_upload %]
[% L.button_tag("kivi.File.upload(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ source.upload_title _ "'," _ is_global _ ");", source.upload_title ) %]
[%- END %]
[%- IF source.can_import %]
[% END %]
[% IF source.can_import %]
[% L.button_tag("kivi.File.import(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "','" _ source.name _ "','" _ source.path _"');", source.import_title ) %]
[%- END %]
</div>
[%- END %]
<div></div><div>
[% L.button_tag("kivi.File.update(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "'," _ is_global _ ");", LxERP.t8('Update')) %]
</div>
</div>
[%- IF ! json %]
[% END %]
</div><!-- /.buttons -->
[% END #FOREACH SOURCES %]
<div class="buttons">
[% L.button_tag("kivi.File.update(" _ object_id _ ",'" _ object_type _ "','" _ file_type _ "'," _ is_global _ ");", LxERP.t8('Update')) %]
</div>
[%- UNLESS is_global %]
[%- IF can_rename %]
[% INCLUDE 'file/rename_dialog.html' -%]
[%- END %]
[%- END %]
[%- END %]
</div><!-- /.wrapper -->
[% IF ! json %]
</div>
[% UNLESS is_global %]
[% IF can_rename %]
[% INCLUDE 'file/rename_dialog.html' %]
[% END %]
[% END %]
[% END %]
templates/webpages/file/rename_dialog.html
<div class="loading" id="rename_dialog_[% file_type %]" style="display:none" >
<div style="padding-bottom: 15px">
<div>
<table>
<tr><td colspan="2" id="rename_extra_text_[% file_type %]"></td></tr>
<tr><td colspan="2">[%- LxERP.t8("Please modify filename") %]:</td></tr>
<tr><td colspan="2"><input size='40' name="newfilename" id="newfilename_id_[% file_type %]" value=""></td></tr>
<tr><td><input type="hidden" name="next_ids" id="next_ids_id_[% file_type %]" value="">
<input type="hidden" name="sessionfile" id="sessionfile_id_[% file_type %]" value="">
<input type="hidden" name="rename_id" id="rename_id_id_[% file_type %]" value="">
<input type="hidden" name="is_global" id="is_global_id_[% file_type %]" value="">
[% L.button_tag("return kivi.File.renameaction('" _ file_type _ "');", LxERP.t8('Continue'), id => "rename_cont_btn") %]</td>
<td>[% L.button_tag("return kivi.File.renameclose('" _ file_type _"');" , LxERP.t8('Cancel') , class => "submit") %]</td></tr>
</table>
</div>
</div>
</div>
[% USE LxERP %]
[% USE L %]
<div class="loading" id="rename_dialog_[% file_type %]" style="display:none">
<div class="wrapper">
<table class="tbl-plain test">
<tbody>
<tr>
<td id="rename_extra_text_[% file_type %]"></td>
</tr>
<tr>
<td>
<span class="label above">[% LxERP.t8("Please modify filename") %]:</span>
<input class="wi-lightwide" name="newfilename" id="newfilename_id_[% file_type %]" value="">
</td>
</tr>
<tr>
<td>
<input type="hidden" name="next_ids" id="next_ids_id_[% file_type %]" value="">
<input type="hidden" name="sessionfile" id="sessionfile_id_[% file_type %]" value="">
<input type="hidden" name="rename_id" id="rename_id_id_[% file_type %]" value="">
<input type="hidden" name="is_global" id="is_global_id_[% file_type %]" value="">
[% L.button_tag("return kivi.File.renameaction('" _ file_type _ "');", LxERP.t8('Continue'), id => "rename_cont_btn", class="button") %]
[% L.button_tag("return kivi.File.renameclose('" _ file_type _"');" , LxERP.t8('Cancel') , class => "submit button neutral") %]
</td>
</tr>
</tbody>
</table>
</div><!-- /.wrapper -->
</div><!-- /.loading /Rename Dialog -->
templates/webpages/file/upload_dialog.html
[% 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 %]
<table>
<tr>
<td>[%- LxERP.t8("Filename") %]:</td><td>
<input type="file" name="uploadfiles[]" multiple="[% multiple %]" id="upload_files" size="45" accept="[% SELF.accept_types %]" onchange="kivi.File.allow_upload_submit();"></td>
</tr>
[% IF SELF.object_type == 'shop_image' %]
[% SET multiple = 'true' %]
[% IF SELF.object_type == 'shop_image' %][% multiple = 'false' %][% END %]
<table class="tbl-horizontal">
<tbody>
<tr>
<td>[% LxERP.t8("Title") %]</td>
<th>[% LxERP.t8("Filename") %]:</th>
<td><input type="file" name="uploadfiles[]" multiple="[% multiple %]" id="upload_files" size="45" accept="[% SELF.accept_types %]" onchange="kivi.File.allow_upload_submit();"></td>
</tr>
[% IF SELF.object_type == 'shop_image' %]
<tr>
<th>[% LxERP.t8("Title") %]</th>
<td>[% L.input_tag("title",'') %]</td>
</tr>
<tr>
<td>[% LxERP.t8("Description") %]</td>
<th>[% LxERP.t8("Description") %]</th>
<td>[% L.input_tag("description",'') %]</td>
</tr>
[% END %]
</table>
<p>
<input value="[%- LxERP.t8("Upload file") %]" id="upload_selected_button"
onclick="kivi.File.upload_selected_files([% SELF.object_id %],'[% SELF.object_type %]','[% SELF.file_type %]',[% SELF.maxsize %],[% SELF.is_global %]);"
type="button" disabled >
<a href="#" onclick="kivi.File.reset_upload_form();">[%- LxERP.t8("Reset") %]</a>
<a href="#" onclick="$('#files_upload').dialog('close');">[% LxERP.t8("Cancel") %]</a>
</p>
[% END %]
</tbody>
</table>
<hr>
<div class="buttons">
<input value="[% LxERP.t8("Upload file") %]" id="upload_selected_button" onclick="kivi.File.upload_selected_files([% SELF.object_id %],'[% SELF.object_type %]','[% SELF.file_type %]',[% SELF.maxsize %],[% SELF.is_global %]);" type="button" disabled >
<a href="#" onclick="kivi.File.reset_upload_form();" class="button neutral">[% LxERP.t8("Reset") %]</a>
<a href="#" onclick="$('#files_upload').dialog('close');" class="button neutral">[% LxERP.t8("Cancel") %]</a>
</div>
<div id="upload_result"><p>&nbsp;</p></div>
<div id="upload_result"><p></p></div>
</form>

Auch abrufbar als: Unified diff