Importsource: add single source history
This commit is contained in:
parent
56bc31ce97
commit
a79883af3e
|
@ -57,7 +57,7 @@ class ImportsourceController extends ActionController
|
||||||
->setConnection($this->db())
|
->setConnection($this->db())
|
||||||
->setImportSource($source)
|
->setImportSource($source)
|
||||||
);
|
);
|
||||||
$this->render('list/table', null, true);
|
$this->setViewScript('list/table');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function modifierAction()
|
public function modifierAction()
|
||||||
|
@ -77,7 +77,7 @@ class ImportsourceController extends ActionController
|
||||||
$this->view->table = $this->loadTable('propertymodifier')
|
$this->view->table = $this->loadTable('propertymodifier')
|
||||||
->enforceFilter(Filter::where('source_id', $id))
|
->enforceFilter(Filter::where('source_id', $id))
|
||||||
->setConnection($this->db());
|
->setConnection($this->db());
|
||||||
$this->render('list/table', null, true);
|
$this->setViewScript('list/table');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function indexAction()
|
public function indexAction()
|
||||||
|
@ -98,7 +98,22 @@ class ImportsourceController extends ActionController
|
||||||
}
|
}
|
||||||
|
|
||||||
$form->handleRequest();
|
$form->handleRequest();
|
||||||
$this->render('object/form', null, true);
|
$this->setViewScript('object/form');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function historyAction()
|
||||||
|
{
|
||||||
|
$url = $this->getRequest()->getUrl();
|
||||||
|
$id = $url->shift('id');
|
||||||
|
if ($url->shift('action') === 'remove') {
|
||||||
|
$this->view->form = $this->loadForm('removeImportrun');
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->prepareTabs($id)->activate('history');
|
||||||
|
$this->view->title = $this->translate('Import run history');
|
||||||
|
$this->view->stats = $this->db()->fetchImportStatistics();
|
||||||
|
$this->prepareTable('importrun');
|
||||||
|
$this->view->table->enforceFilter(Filter::where('source_id', $id));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function editmodifierAction()
|
public function editmodifierAction()
|
||||||
|
@ -135,7 +150,7 @@ class ImportsourceController extends ActionController
|
||||||
->enforceFilter(Filter::where('source_id', $source_id))
|
->enforceFilter(Filter::where('source_id', $source_id))
|
||||||
->setConnection($this->db());
|
->setConnection($this->db());
|
||||||
|
|
||||||
$this->render('list/table', null, true);
|
$this->setViewScript('list/table');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function prepareTabs($id = null)
|
protected function prepareTabs($id = null)
|
||||||
|
@ -149,6 +164,9 @@ class ImportsourceController extends ActionController
|
||||||
))->add('modifier', array(
|
))->add('modifier', array(
|
||||||
'url' => 'director/importsource/modifier' . '?source_id=' . $id,
|
'url' => 'director/importsource/modifier' . '?source_id=' . $id,
|
||||||
'label' => $this->translate('Modifiers'),
|
'label' => $this->translate('Modifiers'),
|
||||||
|
))->add('history', array(
|
||||||
|
'url' => 'director/importsource/history' . '?id=' . $id,
|
||||||
|
'label' => $this->translate('History'),
|
||||||
))->add('preview', array(
|
))->add('preview', array(
|
||||||
'url' => 'director/importsource/preview' . '?id=' . $id,
|
'url' => 'director/importsource/preview' . '?id=' . $id,
|
||||||
'label' => $this->translate('Preview'),
|
'label' => $this->translate('Preview'),
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
<div class="controls">
|
||||||
|
<?= $this->tabs ?>
|
||||||
|
<h1><?= $this->escape($this->title) ?></h1>
|
||||||
|
<span class="action-links"<?php if (! $this->stayHere): ?> data-base-target="_next"<?php endif ?>>
|
||||||
|
<?= $this->addLink ?>
|
||||||
|
</span>
|
||||||
|
<?= $this->filterEditor ?>
|
||||||
|
<?= $this->table->getPaginator() ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="content"<?php if (! $this->stayHere): ?> data-base-target="_next"<?php endif ?>>
|
||||||
|
<?= $this->form ?>
|
||||||
|
<?php if ($table->count()): ?>
|
||||||
|
<?= $this->table->render() ?>
|
||||||
|
<?php endif ?>
|
||||||
|
</div>
|
Loading…
Reference in New Issue