Files
interblue.pl/modules/pshowimporter/views/templates/parts/import_queue.tpl
2024-10-25 14:16:28 +02:00

129 lines
7.1 KiB
Smarty

{if $import_queue|count > 0}
<div class="panel">
{assign files $queue_list}
<div class="panel-heading">
<i class="icon-folder-close"></i>
{l s='Import queue' mod='pshowimporter'}
<span class="badge">{count($files)}</span>
<span class="panel-heading-action">
<a class="list-toolbar-btn" href="">
<span title="" data-toggle="tooltip" class="label-tooltip" data-original-title="{l s='Refresh' mod='pshowimporter'}" data-html="true" data-placement="left">
<i class="process-icon-refresh"></i>
</span>
</a>
</span>
</div>
<div class="table-responsive-row">
<table class="table">
<thead>
<tr>
<th>#</th>
<th>{l s='Filename' mod='pshowimporter'}</th>
<th>{l s='File type' mod='pshowimporter'}</th>
<th>{l s='Source' mod='pshowimporter'}</th>
<th>{l s='File size' mod='pshowimporter'}</th>
<th>{l s='Permissions' mod='pshowimporter'}</th>
<th>{l s='Add date' mod='pshowimporter'}</th>
<th>{l s='Last import date' mod='pshowimporter'}</th>
<th></th>
</tr>
</thead>
<tbody>
{assign var="i" value=0}
{foreach from=$files item=file}
{assign var="i" value=$i+1}
<tr>
<td>{$i}</td>
<td>
<div class="col-lg-11">
{if isset($file['data'])}
{$file['data']['displayFileName']}
{else}
{$file['filename']}
{/if}
</div>
</td>
<td>
{if !$file['filesize']}
&nbsp;-
{else}
{$file['extension']|strtoupper}
{/if}
{if $file['correct_encoding'] !== true && $file['filesize']}
<img src="{$smarty.const.__PS_BASE_URI__}modules/pshowimporter/system/view/img/alert.png"
data-original-title="{l s='This file has incorrect encoding (%s). Change file encoding to UTF-8' mod='pshowimporter' sprintf=$file['correct_encoding']}" width="16" class="label-tooltip ">
{/if}
</td>
{if $file['from_url']}
<td><a href="{$file['from_url']}">{l s='URL address' mod='pshowimporter'}</a></td>
{else}
<td>{l s='Local disk' mod='pshowimporter'}</td>
{/if}
<td>
{if !$file['filesize']}
<img src="{$smarty.const.__PS_BASE_URI__}modules/pshowimporter/system/view/img/alert.png"
data-original-title="{l s='This file is empty - nothing to import' mod='pshowimporter'}" width="16" class="label-tooltip ">
{elseif $file['reqMoreMemory']}
<img src="{$smarty.const.__PS_BASE_URI__}modules/pshowimporter/system/view/img/alert.png"
data-original-title="{l s='This file require minimal `memory_limit`:' mod='pshowimporter'} {$file['reqMoreMemory']}" width="16" class="label-tooltip">
{/if}
{$file['filesize']} {$file['filesizetype']}
</td>
<td>
<span data-toggle="tooltip" class="label-tooltip"
data-original-title="{l s='writable' mod='pshowimporter'}: {$file['writable']}<br>{l s='readable' mod='pshowimporter'}: {$file['readable']}"
data-html="true" data-placement="left">
{$file['chmod']}
</span>
</td>
<td>{$file['time']|date_format:"H:i d/m/Y"}</td>
{if ($file['lastimport'] === false)}
<td>{l s='never' mod='pshowimporter'}</td>
{else}
<td>{$file['lastimport']|date_format:"H:i d/m/Y"}</td>
{/if}
<td class="text-right">
<div class="btn-group-action {if $import_button == 0}hidden{/if}">
<div class="btn-group pull-right">
<a href="{$link->getAdminLink('PShowImporterMain', true)}&page=delfromqueue&filename={$file['time']}-{$file['filename']}" class="edit btn btn-default showLoader">
<i class="icon-remove"></i> {l s='Remove from queue' mod='pshowimporter'}
</a>
</div>
</div>
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
<div class='panel-footer {if $import_button == 0}hidden{/if}'>
<a href="{$link->getAdminLink('PShowImporterImport', true)}" class='btn btn-default pull-right showLoader'>
<i class="process-icon-download"></i> {l s='Import' mod='pshowimporter'}
</a>
<a href="#" onclick="fancyMsgBox('<a href=\'https://pl.wikipedia.org/wiki/Cron\' target=\'_blank\'>{l s='What is CRON?' mod='pshowimporter'}</a><br><br>{l s='Import will be according to the saved configuration for this file.' mod='pshowimporter'}<br><br><b>http://{$smarty.server.HTTP_HOST}{$smarty.const.__PS_BASE_URI__}modules/pshowimporter/direct_import.php?securekey={$smarty.const._IMPORT_SECURE_KEY_}</b>');" title="{l s='Import' mod='pshowimporter'}" class='btn btn-default pull-right'>
<i class="process-icon-download"></i> {l s='Get direct import URL' mod='pshowimporter'}
</a>
<a href="#" onclick="fancyMsgBox('<a href=\'{$link->getAdminLink('PShowImporterMain', true)}&page=ssh\' target=\'_blank\'>{l s='What is this?' mod='pshowimporter'}</a><br><br><b>./direct.sh \'{$smarty.const._IMPORT_SECURE_KEY_}\'</b>');" title="{l s='Import' mod='pshowimporter'}"class='btn btn-default pull-right'>
<i class="process-icon-download"></i> {l s='Get SSH command' mod='pshowimporter'}
</a>
</div>
</div>
{/if}