Commit 185cc345 authored by jaapjansma's avatar jaapjansma
Browse files

update manage data processor screen

parent 751767c2
......@@ -36,8 +36,14 @@ class CRM_Dataprocessor_Form_ManageDataProcessors extends CRM_Core_Form {
foreach($dataProcessors as $idx => $dataProcessor) {
$dataProcessors[$idx]['status_label'] = CRM_Dataprocessor_Status::statusToLabel($dataProcessor['status']);
$outputs = civicrm_api3('DataProcessorOutput', 'get',['data_processor_id' => $dataProcessor['id'], 'options' => ['limit' => 0]]);
$outputTypeTitles = $factory->getOutputs();
foreach(CRM_Utils_Array::value('values', $outputs) as $outputIndex => $output) {
$outputClass = $factory->getOutputByName($output['type']);
$outputTypeTitle = "";
if (isset($outputTypeTitles[$output['type']])) {
$outputTypeTitle = $outputTypeTitles[$output['type']];
}
$dataProcessors[$idx]['navigation'][$outputIndex]['type'] = $outputTypeTitle;
if ($outputClass instanceof \Civi\DataProcessor\Output\UIFormOutputInterface) {
$dataProcessors[$idx]['navigation'][$outputIndex]['url'] = CRM_Utils_System::url($outputClass->getUrlToUi($output, $dataProcessor), array('reset' => '1'));
$dataProcessors[$idx]['navigation'][$outputIndex]['title'] = $outputClass->getTitleForUiLink($output, $dataProcessor);
......
......@@ -92,7 +92,7 @@
{if $data_processor.navigation}
{foreach from=$data_processor.navigation item=navigationItem}
<a href="{$navigationItem.url}"
class="action-item crm-hover-button" title="{$navigationItem.title}">{$navigationItem.title}</a>
class="action-item crm-hover-button" title="{$navigationItem.title}">{$navigationItem.type}</a>
{/foreach}
{/if}
</td>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment