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}