116 lines
5.4 KiB
Smarty
116 lines
5.4 KiB
Smarty
<form class="defaultForm form-horizontal" id="matchingFields" method="post" action="{$link->getAdminLink('PShowImporterConfig', true)}&file={$smarty.get.file}&step=2">
|
|
<div class="panel">
|
|
<div class="panel-heading">
|
|
{l s='Match columns from file to columns from PrestaShop database' mod='pshowimporter'}
|
|
</div>
|
|
<div class="panel-wrapper" style="overflow-x: scroll;">
|
|
<div class="table-responsive-row">
|
|
<table class="table">
|
|
<thead>
|
|
|
|
<tr>
|
|
{assign var='i' value=0}
|
|
{foreach from=reset($rows) item='cell'}
|
|
|
|
<th>
|
|
|
|
<select style="width: 150px;" name="type{$i}"
|
|
ng-init="psiCtrl.type{$i} = '{if isset($matched_fields[$i+1][0])}{$matched_fields[$i+1][0]}{else}none{/if}'"
|
|
ng-model="psiCtrl.type{$i}" class="form-control">
|
|
<option value="none">{l s='skip' mod='pshowimporter'}</option>
|
|
|
|
{foreach from=$db_tables key='tablename' item='columns'}
|
|
<option value="{$tablename}{$i}">
|
|
{if ($tablename == 'product')}
|
|
{l s='Product' mod='pshowimporter'}
|
|
{elseif ($tablename == 'feature')}
|
|
{l s='Feature' mod='pshowimporter'}
|
|
{elseif ($tablename == 'category')}
|
|
{l s='Category' mod='pshowimporter'}
|
|
{elseif ($tablename == 'attributegroup')}
|
|
{l s='Attribute' mod='pshowimporter'}
|
|
{elseif ($tablename == 'combination')}
|
|
{l s='Combination' mod='pshowimporter'}
|
|
{/if}
|
|
</option>
|
|
{/foreach}
|
|
</select>
|
|
|
|
</th>
|
|
|
|
{assign var='i' value=$i+1}
|
|
|
|
{/foreach}
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
{assign var='i' value=0}
|
|
{foreach from=reset($rows) item='cell'}
|
|
|
|
<th>
|
|
<select class="form-control" ng-disabled="true"
|
|
ng-show="psiCtrl.type{$i} == 'none'">
|
|
</select>
|
|
|
|
{foreach from=$db_tables item='columns' key='tablename'}
|
|
<select name="{$tablename}{$i}" class="form-control"
|
|
ng-show="psiCtrl.type{$i} == '{$tablename}{$i}'">
|
|
{foreach from=$columns item='desc' key='key'}
|
|
<option value='{$key}' {if isset($matched_fields[$i+1][1]) && $matched_fields[$i+1][1] == $key}selected{/if}>{$desc}</option>
|
|
{/foreach}
|
|
</select>
|
|
{/foreach}
|
|
|
|
</th>
|
|
|
|
{assign var='i' value=$i+1}
|
|
|
|
{/foreach}
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
<tbody>
|
|
{foreach from=$rows item='row'}
|
|
|
|
<tr>
|
|
|
|
{foreach from=$row item='cell'}
|
|
|
|
<td>
|
|
|
|
{(string)$cell|truncate:30}
|
|
|
|
</td>
|
|
|
|
{/foreach}
|
|
|
|
</tr>
|
|
|
|
{/foreach}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="panel-footer">
|
|
<button type="submit" value="1" name="submit_matchfields"
|
|
class="btn btn-default pull-right" ng-show="{(int)$category_matching}">
|
|
<i class="process-icon-save"></i> {l s='Save' mod='pshowimporter'}
|
|
</button>
|
|
<button type="submit" value="1" name="submit_matchfields"
|
|
class="btn btn-default pull-right" ng-hide="{(int)$category_matching}">
|
|
<i class="process-icon-save"></i> {l s='Save and back to files list' mod='pshowimporter'}
|
|
</button>
|
|
<button type="submit" value="1" name="submitNimport_matchfields"
|
|
class="btn btn-default pull-right" ng-hide="{(int)$category_matching}">
|
|
<i class="process-icon-save"></i> {l s='Save and import' mod='pshowimporter'}
|
|
</button>
|
|
<a href="{$link->getAdminLink('PShowImporterMain', true)}" class="btn btn-default">
|
|
<i class="process-icon-cancel"></i> {l s='Cancel' mod='pshowimporter'}
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</form>
|