Commit 6ab00393 authored by jaapjansma's avatar jaapjansma
Browse files

Added pdf export output

parent 143f3f49
......@@ -4,6 +4,7 @@
* Added source to retrieve the owner membership, when owner membership is not set (meaning it is already the primary) then it will return itself.
* Added date filter to filter date with the PHP Date Format.
* Added filtering on Contact (sub) type on the contact filter.
* Added PDF Export Output
# Version 1.3.0
......
......@@ -148,7 +148,7 @@ class CRM_DataprocessorOutputExport_CSV implements ExportOutputInterface, Direct
* @throws \Exception
*/
public function downloadExport(\Civi\DataProcessor\ProcessorType\AbstractProcessorType $dataProcessorClass, $dataProcessor, $outputBAO, $formValues, $sortFieldName = null, $sortDirection = 'ASC', $idField=null, $selectedIds=array()) {
if (!$dataProcessorClass->getDataFlow()->recordCount() > self::MAX_DIRECT_SIZE) {
if ($dataProcessorClass->getDataFlow()->recordCount() > self::MAX_DIRECT_SIZE) {
$this->startBatchJob($dataProcessorClass, $dataProcessor, $outputBAO, $formValues, $sortFieldName, $sortDirection, $idField, $selectedIds);
} else {
$this->doDirectDownload($dataProcessorClass, $dataProcessor, $outputBAO, $sortFieldName, $sortDirection, $idField, $selectedIds);
......
This diff is collapsed.
......@@ -133,6 +133,7 @@ class Factory {
$this->addOutput('membership_search', new Definition('CRM_DataprocessorSearch_MembershipSearch'), E::ts('Membership Search'));
$this->addOutput('participant_search', new Definition('CRM_DataprocessorSearch_ParticipantSearch'), E::ts('Participant Search'));
$this->addOutput('export_csv', new Definition('CRM_DataprocessorOutputExport_CSV'), E::ts('CSV Export'));
$this->addOutput('export_pdf', new Definition('CRM_DataprocessorOutputExport_PDF'), E::ts('PDF Export'));
$this->addFilter('simple_sql_filter', new Definition('Civi\DataProcessor\FilterHandler\SimpleSqlFilter'), E::ts('Field filter'));
$this->addFilter('date_filter', new Definition('Civi\DataProcessor\FilterHandler\DateFilter'), E::ts('Date filter'));
$this->addFilter('multiple_field_filter', new Definition('Civi\DataProcessor\FilterHandler\MultipleFieldFilter'), E::ts('Text in multiple fields Filter'));
......
{crmScope extensionKey='dataprocessor'}
<div class="crm-section">
<div class="label">{$form.pdf_format.label}</div>
<div class="content">{$form.pdf_format.html}
<p class="description">
{ts 1=$ManagePdfFormatUrl}You can manage PDF Formats at <a href="%1">Administer --> Communications --> PDF Formats</a>{/ts}
</p>
</div>
<div class="clear"></div>
</div>
<div class="crm-section">
<div class="label">{$form.border.label}</div>
<div class="content">{$form.border.html}</div>
<div class="clear"></div>
</div>
<div class="crm-section">
<div class="label">{$form.header.label}</div>
<div class="content">{$form.header.html}</div>
<div class="clear"></div>
</div>
<div class="crm-section">
<div class="label">{$form.hidden_fields.label}</div>
<div class="content">{$form.hidden_fields.html}</div>
<div class="clear"></div>
</div>
<div class="crm-section">
<div class="label">{$form.additional_column.label}</div>
<div class="content">{$form.additional_column.html}</div>
<div class="clear"></div>
</div>
<div class="crm-section additional_column">
<div class="label">{$form.additional_column_title.label}</div>
<div class="content">{$form.additional_column_title.html}</div>
<div class="clear"></div>
</div>
<div class="crm-section additional_column">
<div class="label">{$form.additional_column_width.label}</div>
<div class="content">{$form.additional_column_width.html}
<p class="description">{ts}E.g. 2 cm{/ts}</p>
</div>
<div class="clear"></div>
</div>
<div class="crm-section additional_column">
<div class="label">{$form.additional_column_height.label}</div>
<div class="content">{$form.additional_column_height.html}
<p class="description">{ts}E.g. 2 cm{/ts}</p>
</div>
<div class="clear"></div>
</div>
<div class="crm-section">
<div class="label">{$form.anonymous.label}</div>
<div class="content">{$form.anonymous.html}
<p class="description">
{ts}Tick this box when you want to make the PDF available for non-logged in users. <br>
<strong>Caution:</strong> when you check this box the data becomes available without logging so this might lead to a data breach.{/ts}</p>
</div>
<div class="clear"></div>
</div>
<script type="text/javascript">
{literal}
CRM.$(function($) {
function toggleAdditionalColumn() {
if ($('#additional_column').prop('checked')) {
$('.crm-section.additional_column').show();
} else {
$('.crm-section.additional_column').hide();
}
}
$('#additional_column').on('click', toggleAdditionalColumn);
$('#additional_column').on('keypress', toggleAdditionalColumn);
//$('#additional_column').trigger('change');
toggleAdditionalColumn();
});
{/literal}
</script>
{/crmScope}
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