From c8278a9304a51a6c01bbff8bd5503d7aa09d447f Mon Sep 17 00:00:00 2001 From: Repellent Date: Sun, 7 Aug 2016 22:10:53 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D1=84=D0=B0=D0=B9=D0=BB=D0=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- import/templates/admin_edit.tpl | 403 ++++++++++++++++++-------------- 1 file changed, 233 insertions(+), 170 deletions(-) diff --git a/import/templates/admin_edit.tpl b/import/templates/admin_edit.tpl index 3357836..12d3e19 100644 --- a/import/templates/admin_edit.tpl +++ b/import/templates/admin_edit.tpl @@ -1,274 +1,337 @@ -
-
{if $smarty.request.id == ''}{#IMPORT_H_ADD#}{else}{#IMPORT_H_EDIT#}{/if}
-
+ -
-
- {#IMPORT_INFO_EDIT#} -
+
+
{if $import_id}{#import_edit_tit#}{else}{#import_new_tit#}{/if}
- -
+ +
-
-
{#IMPORT_H_EDIT#}
+
+
{#import_set#}
- + - + - + - - - - - - + + - - + + - - + + - + +
{#IMPORT_NAME#}{#name#} -
- -
+
{#IMPORT_RUBRICS#}{#rub_name#} - {foreach from=$rubs item=rub} - {if $rub->Id==$import_rub} - - {else} - - {/if} + {/foreach} - + + {else} + {$import.rub_title|escape|stripslashes} + {/if}
{#IMPORT_PARSER#}{#parser#} - + {foreach from=$parsers item=parser} + + {/foreach}
{#IMPORT_DELETE_DOCS#}
{#IMPORT_DOCS_CREATE#}{#docs_disable#}
{#IMPORT_FILE#}
- -
{#docs_create#}
{#IMPORT_CHECK_FILE#}{#monitor#}
- - {if $smarty.request.id != ''} - - - - - {/if} - {#file#}
+
+ + {if $import_id} +   +   +   + + {/if} +
- - {if $smarty.request.id != ''} + {if $import_id}
-
-
{#IMPORT_MAIN_FIELDS#}
+
+
{#fields_main#}
+ + + + + + + + - - + - - - - + + + - {foreach from=$data.fields.header key=k item=v} - - - - - - - + {foreach from=$import.fields.main key=field_id item=field} + + + + + + + {/foreach} - +
+
- +
+
- +
+
- +
{#IMPORT_F#}{#IMPORT_TPL#}{#field#} +
+ +
+
{#field_tpl#}
- - - {$v[1]}
+ + + + + + {$field.title} + + +
+
-
{#IMPORT_RUB_FIELDS#}
+
{#fields_body#}
+ + + + + + + + + - - + + - - - - + + + - {foreach from=$data.fields.body key=k item=v} - - - - - - - - {/foreach} + {foreach from=$import.fields.body key=field_id item=field} - + + + + + - + {/foreach} +
+
+
+ +
+
- +
+
- +
+
- + ID
{#IMPORT_F#}{#IMPORT_TPL#}{#field#} +
+ +
+
{#field_tpl#}
- - - {$v[1]}
- - - - - + + + + + + + {$field_id}{$field.title} + + +
-
{#IMPORT_TAGS#}
+
{#tags#}
- +
+ - - {if $data.tags} - - - - {foreach from=$data.tags key=k item=v} + + + + + {if $import.tags} + + {foreach from=$import.tags item=tag} + + {/foreach} + {/if} -
-
- - - -
+
+
- {#IMPORT_TAGS_TITLE#} + +
+
+
-
+ {#fields_file#} +
+
-
+ +
{/if} + \ No newline at end of file +// функция запуска импорта +function importRun () {ldelim} + location.href='index.php?do=modules&action=modedit&mod=import&moduleaction=importrun&import_id={$import_id}&cp={$sess}'; +/* $.ajax({ldelim} + url: 'index.php?do=modules&action=modedit&mod=import&moduleaction=importrun&import_id={$import_id}&cp={$sess}', + beforeSend: function () {ldelim} $.alerts._overlay('show');{rdelim}, + success: function () {ldelim} + $.alerts._overlay('hide'); + $.jGrowl('{#imported#}', {ldelim} theme: 'accept'{rdelim}); + {rdelim} + {rdelim});*/ +{rdelim} + + +{if $import_id} +{include file="$codemirror_connect"} +{include conn_id="_1" file="$codemirror_editor" textarea_id='codemirror' ctrls='saveCont();' ctrlo='importRun();' height=200} +{include conn_id="_2" file="$codemirror_editor" textarea_id='codemirror2' ctrls='saveCont();' ctrlo='importRun();' height=200} +{include conn_id="_3" file="$codemirror_editor" textarea_id='codemirror3' ctrls='saveCont();' ctrlo='importRun();' height=200} +{/if}