add visible export status, remove unused methods

This commit is contained in:
Daniel Seifert 2021-04-16 23:19:28 +02:00
parent c8bd400f70
commit c7bf1017d4
Signed by: DanielS
GPG Key ID: 6A513E13AEE66170
6 changed files with 46 additions and 71 deletions

View File

@ -26,7 +26,9 @@ use D3\DataWizard\Application\Model\Exports\noArticleTextSet;
use D3\DataWizard\Application\Model\Exports\unreleasedRatings;
use D3\DataWizard\Application\Model\Exports\wrongArticlePrice;
use OxidEsales\Eshop\Application\Controller\Admin\AdminDetailsController;
use OxidEsales\Eshop\Core\Exception\StandardException;
use OxidEsales\Eshop\Core\Registry;
use OxidEsales\Eshop\Core\UtilsView;
class d3ExportWizard extends AdminDetailsController
{
@ -56,6 +58,12 @@ class d3ExportWizard extends AdminDetailsController
{
$id = Registry::getRequest()->getRequestEscapedParameter('exportid');
$this->configuration->getExportById($id)->run();
$oEx = oxNew(
StandardException::class,
Registry::getLang()->translateString('D3_DATAWIZARD_ERR_NOEXPORTCONTENT')
);
Registry::get(UtilsView::class)->addErrorToDisplay($oEx);
}
public function getUserMessages()
@ -67,67 +75,4 @@ class d3ExportWizard extends AdminDetailsController
{
return null;
}
public function exportEmptyCategories()
{
/** @var \D3\DataWizard\Application\Model\Exports\emptyCategories $export */
$export = oxNew(emptyCategories::class);
$export->run();
}
public function exportInactiveCategories()
{
/** @var \D3\DataWizard\Application\Model\Exports\inactiveCategories $export */
$export = oxNew(inactiveCategories::class);
$export->run();
}
public function exportGappedArticleImages()
{
/** @var \D3\DataWizard\Application\Model\Exports\gappedArticleImages $export */
$export = oxNew(gappedArticleImages::class);
$export->run();
}
public function exportNoArticleTextsSet()
{
/** @var \D3\DataWizard\Application\Model\Exports\noArticleTextSet $export */
$export = oxNew(noArticleTextSet::class);
$export->run();
}
public function exportWrongArticlePrice()
{
/** @var \D3\DataWizard\Application\Model\Exports\wrongArticlePrice $export */
$export = oxNew(wrongArticlePrice::class);
$export->run();
}
public function exportArticlesWithoutManufacturers()
{
/** @var \D3\DataWizard\Application\Model\Exports\articlesWithoutManufacturers $export */
$export = oxNew(articlesWithoutManufacturers::class);
$export->run();
}
public function exportUnreleasedRatings()
{
/** @var \D3\DataWizard\Application\Model\Exports\unreleasedRatings $export */
$export = oxNew(unreleasedRatings::class);
$export->run();
}
public function exportInactiveParentCategory()
{
/** @var \D3\DataWizard\Application\Model\Exports\inactiveParentCategory $export */
$export = oxNew(inactiveParentCategory::class);
$export->run();
}
public function exportActiveArticlesInactiveCategory()
{
/** @var \D3\DataWizard\Application\Model\Exports\activeArticlesInactiveCategory $export */
$export = oxNew(activeArticlesInactiveCategory::class);
$export->run();
}
}

View File

@ -19,6 +19,8 @@ class Configuration
{
const GROUP_CATEGORY = 'D3_DATAWIZARD_GROUP_CATEGORIES';
const GROUP_ARTICLES = 'D3_DATAWIZARD_GROUP_ARTICLES';
const GROUP_USERS = 'D3_DATAWIZARD_GROUP_USERS';
const GROUP_ORDERS = 'D3_DATAWIZARD_GROUP_ORDERS';
const GROUP_REMARKS = 'D3_DATAWIZARD_GROUP_REMARKS';
protected $exports = [];

View File

@ -24,12 +24,18 @@ $aLang = array(
//Navigation
'charset' => 'UTF-8',
'd3mxDataWizard' => '<i class="fa fa-fw fas-hat-wizard"></i> Data Wizard',
'd3mxDataWizard_Export' => 'Exporte',
'D3_DATAWIZARD_GROUP_ARTICLES' => 'Artikel',
'D3_DATAWIZARD_GROUP_CATEGORIES' => 'Kategorien',
'D3_DATAWIZARD_GROUP_REMARKS' => 'Bewertungen',
'D3_DATAWIZARD_GROUP_USERS' => 'Benutzer',
'D3_DATAWIZARD_GROUP_ORDERS' => 'Bestellungen',
'D3_DATAWIZARD_EXPORT_SUBMIT' => 'Export starten'
'D3_DATAWIZARD_EXPORT_SUBMIT' => 'Export starten',
'D3_DATAWIZARD_ERR_NOEXPORT_INSTALLED' => 'Es sind keine Exporte installiert oder aktiviert.',
'D3_DATAWIZARD_ERR_NOEXPORTCONTENT' => 'Export ist leer, kein Inhalt zum Download verfügbar'
// Abracadata
// Harry Potter

View File

@ -50,7 +50,7 @@
<div class="card-body pb-0">
<div class="row">
[{foreach from=$oView->getGroupExports($group) key="id" item="export"}]
<div class="col-sm-3 pb-4">
<div class="col-sm-6 col-md-4 col-lg-3 pb-4">
<div class="card">
<h5 class="card-header">
[{$export->getTitle()}]
@ -59,7 +59,18 @@
<p class="card-text">
[{$export->getDescription()}]
</p>
<button class="btn btn-primary" onclick="document.getElementById('exportid').value = '[{$id}]'; document.getElementById('myedit').submit();">
<button class="btn btn-primary"
onclick="
setTimeout(function(){
document.getElementById('mask').className='';
document.getElementById('popup2').className='d3loader-2';
}, 3000);
document.getElementById('mask').className='on';
document.getElementById('popup2').className='d3loader-2 on';
document.getElementById('exportid').value = '[{$id}]';
document.getElementById('myedit').submit();
"
>
<i class="fas fa-magic"></i>
[{oxmultilang ident=$export->getButtonText()}]
</button>
@ -77,8 +88,19 @@
[{/foreach}]
</div>
[{else}]
keine Exporte definiert
<div class="alert alert-primary" role="alert">
[{oxmultilang ident="D3_DATAWIZARD_ERR_NOEXPORT_INSTALLED"}]
</div>
[{/if}]
</form>
<div id="mask" class=""></div>
<div id="popup2" class="d3loader-2">
<div class="d3loader-spinner">
<div class="d3loader-circle-1"></div>
<div class="d3loader-circle-2"></div>
<div class="d3loader-circle-3"></div>
</div>
</div>
[{include file="d3_cfg_mod_inc.tpl"}]

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<OX>
<OXMENU id="NAVIGATION_ESHOPADMIN">
<MAINMENU id="mxservice">
<SUBMENU id="d3mxDataWizard" cl="d3ExportWizard" disableForDemoShop="1" />
<OXMENU id="d3mxd3modules">
<MAINMENU id="d3mxDataWizard">
<SUBMENU id="d3mxDataWizard_Export" cl="d3ExportWizard" disableForDemoShop="1" />
</MAINMENU>
</OXMENU>
</OX>

View File

@ -22,7 +22,7 @@ $sMetadataVersion = '2.1';
*/
$aModule = [
'id' => 'd3datawizard',
'title' => '<img src="https://logos.oxidmodule.com/d3logo.svg" alt="(D3)" style="height:1em;width:1em"> Data Wizard query framework',
'title' => '<img src="https://logos.oxidmodule.com/d3logo.svg" alt="(D3)" style="height:1em;width:1em"> Data Wizard framework',
'description' => [
'de' => '',
'en' => '',