From 55641774f6d1292bba4d4c2ef51e103db9d0857b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maur=C3=ADcio=20Meneghini=20Fauth?= Date: Wed, 29 Nov 2017 20:47:23 -0200 Subject: [PATCH] Move file_option.twig into import.twig MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: MaurĂ­cio Meneghini Fauth --- templates/display/import/file_option.twig | 73 ------------------- templates/display/import/import.twig | 87 +++++++++++++++++++---- 2 files changed, 73 insertions(+), 87 deletions(-) delete mode 100644 templates/display/import/file_option.twig diff --git a/templates/display/import/file_option.twig b/templates/display/import/file_option.twig deleted file mode 100644 index 28ac2ff2b8..0000000000 --- a/templates/display/import/file_option.twig +++ /dev/null @@ -1,73 +0,0 @@ -
-

{% trans 'File to import:' %}

- - {# We don't have show anything about compression, when no supported #} - {% if compressions is not empty %} -
-

- {{ 'File may be compressed (%s) or uncompressed.'|trans|format(compressions|join(', ')) }} -
- {% trans 'A compressed file\'s name must end in .[format].[compression]. Example: .sql.zip' %} -

-
- {% endif %} - -
- {% if is_upload and upload_dir is not empty %} -
    -
  • - - {{ Util_getBrowseUploadFileBlock(max_upload_size) }} - {% trans 'You may also drag and drop a file on any page.' %} -
  • -
  • - - {{ Util_getSelectUploadFileBlock( - import_list, - upload_dir - ) }} -
  • -
- {% elseif is_upload %} - {{ Util_getBrowseUploadFileBlock(max_upload_size) }} -

{% trans 'You may also drag and drop a file on any page.' %}

- {% elseif not is_upload %} - {{ Message_notice('File uploads are not allowed on this server.'|trans) }} - {% elseif upload_dir is not empty %} - {{ Util_getSelectUploadFileBlock( - import_list, - upload_dir - ) }} - {% endif %} -
- -
- {# Charset of file #} - - {% if is_encoding_supported %} - - {% else %} - {{ Charsets_getCharsetDropdownBox( - dbi, - disable_is, - 'charset_of_file', - 'charset_of_file', - 'utf8', - false - ) }} - {% endif %} -
-
diff --git a/templates/display/import/import.twig b/templates/display/import/import.twig index 054f6a6608..e3ea5e9307 100644 --- a/templates/display/import/import.twig +++ b/templates/display/import/import.twig @@ -36,20 +36,79 @@ 'table': table } only %} - {% include 'display/import/file_option.twig' with { - 'max_upload_size': max_upload_size, - 'import_list': import_list, - 'local_import_file': local_import_file, - 'is_upload': is_upload, - 'upload_dir': upload_dir, - 'timeout_passed_global': timeout_passed_global, - 'compressions': compressions, - 'is_encoding_supported': is_encoding_supported, - 'encodings': encodings, - 'import_charset': import_charset, - 'dbi': dbi, - 'disable_is': disable_is - } only %} +
+

{% trans 'File to import:' %}

+ + {# We don't have show anything about compression, when no supported #} + {% if compressions is not empty %} +
+

+ {{ 'File may be compressed (%s) or uncompressed.'|trans|format(compressions|join(', ')) }} +
+ {% trans 'A compressed file\'s name must end in .[format].[compression]. Example: .sql.zip' %} +

+
+ {% endif %} + +
+ {% if is_upload and upload_dir is not empty %} +
    +
  • + + {{ Util_getBrowseUploadFileBlock(max_upload_size) }} + {% trans 'You may also drag and drop a file on any page.' %} +
  • +
  • + + {{ Util_getSelectUploadFileBlock( + import_list, + upload_dir + ) }} +
  • +
+ {% elseif is_upload %} + {{ Util_getBrowseUploadFileBlock(max_upload_size) }} +

{% trans 'You may also drag and drop a file on any page.' %}

+ {% elseif not is_upload %} + {{ Message_notice('File uploads are not allowed on this server.'|trans) }} + {% elseif upload_dir is not empty %} + {{ Util_getSelectUploadFileBlock( + import_list, + upload_dir + ) }} + {% endif %} +
+ +
+ {# Charset of file #} + + {% if is_encoding_supported %} + + {% else %} + {{ Charsets_getCharsetDropdownBox( + dbi, + disable_is, + 'charset_of_file', + 'charset_of_file', + 'utf8', + false + ) }} + {% endif %} +
+

{% trans 'Partial import:' %}