{include file="CRM/Report/Form/ErrorMessage.tpl"}
</div>
{/if}
-{if $outputMode == 'print'}
+{if !empty($outputMode) && $outputMode == 'print'}
<script type="text/javascript">
window.print();
</script>
| and copyright information, see https://civicrm.org/licensing |
+--------------------------------------------------------------------+
*}
-{if !$printOnly} {* NO print section starts *}
+{if empty($printOnly)} {* NO print section starts *}
{* build the print pdf buttons *}
<div class="crm-tasks">
<table class="form-layout-compressed">
<tr>
{include file="CRM/common/tasks.tpl" location="botton"}
- {if $instanceUrl}
+ {if !empty($instanceUrl)}
<td> <i class="crm-i fa-chevron-right" aria-hidden="true"></i> <a href="{$instanceUrl}">{ts}Existing report(s) from this template{/ts}</a></td>
{/if}
</tr>
</td>
<td>
<table class="form-layout-compressed" align="right">
- {if $chartSupported}
+ {if !empty($chartSupported)}
<tr>
<td>{$form.charts.html|crmAddClass:big}</td>
<td align="right">{$form.$chart.html}</td>
</tr>
{/if}
- {if $form.groups}
+ {if !empty($form.groups)}
<tr>
<td>
{$form.groups.html}{$form.$group.html}
// Disable print/pdf output of charts
$('select[name=charts]', 'form.crm-report-form').change(function() {
var viewType = $(this).val(),
- flashChartType = '{/literal}{if $chartType}{$chartType}{else}{/if}{literal}';
+ flashChartType = '{/literal}{if !empty($chartType)}{$chartType}{else}{/if}{literal}';
$('#_qf_Summary_submit_pdf, #_qf_Summary_submit_print').prop('disabled', (viewType && flashChartType != viewType));
});
});
{foreach from=$table item=field key=fieldName}
{literal}var val = "dnc";{/literal}
{assign var=fieldOp value=$fieldName|cat:"_op"}
- {if !($field.operatorType & 4) && !$field.no_display && $form.$fieldOp.html}
+ {if !(!empty($field.operatorType) && $field.operatorType & 4) && empty($field.no_display) && !empty($form.$fieldOp.html)}
{literal}var val = document.getElementById("{/literal}{$fieldOp}{literal}").value;{/literal}
{/if}
{literal}showHideMaxMinVal( "{/literal}{$fieldName}{literal}", val );{/literal}
$('.crm-report-criteria-groupby input:checkbox').click(function() {
$('#fields_' + this.id.substr(10)).prop('checked', this.checked);
});
- {/literal}{if $displayToggleGroupByFields}{literal}
+ {/literal}{if !empty($displayToggleGroupByFields)}{literal}
$('.crm-report-criteria-field input:checkbox').click(function() {
$('#group_bys_' + this.id.substr(7)).prop('checked', this.checked);
});
| and copyright information, see https://civicrm.org/licensing |
+--------------------------------------------------------------------+
*}
-{if $outputMode eq 'html' && !$rows}
+{if !empty($outputMode) && $outputMode eq 'html' && empty($rows)}
<div class="messages status no-popup">
{icon icon="fa-info-circle"}{/icon} {ts}None found.{/ts}
</div>
| and copyright information, see https://civicrm.org/licensing |
+--------------------------------------------------------------------+
*}
-{if !$printOnly} {* NO print section starts *}
- {if $criteriaForm}
+{if empty($printOnly)} {* NO print section starts *}
+ {if !empty($criteriaForm)}
<div class="crm-report-criteria"> {* criteria section starts *}
<div id="mainTabContainer">
{*tab navigation bar*}
<a title="{$tab.title|escape}" href="#report-tab-{$tab.div_label}">{$tab.title}</a>
</li>
{/foreach}
- {if $instanceForm OR $instanceFormError}
+ {if !empty($instanceForm) OR !empty($instanceFormError)}
<li id="tab_settings" class="ui-corner-all">
<a title="{ts}Title and Format{/ts}" href="#report-tab-format">{ts}Title and Format{/ts}</a>
</li>
{include file="CRM/Report/Form/Criteria.tpl"}
{*settings*}
- {if $instanceForm OR $instanceFormError}
+ {if !empty($instanceForm) OR !empty($instanceFormError)}
{include file="CRM/Report/Form/Tabs/Instance.tpl"}
{/if}
</div> {* end mainTabContainer *}
CRM.$(function($) {
var tabSettings = {
collapsible: true,
- active: {/literal}{if $rows}false{else}0{/if}{literal}
+ active: {/literal}{if !empty($rows)}false{else}0{/if}{literal}
};
// If a tab contains an error, open it
if ($('.civireport-criteria .crm-error', '#mainTabContainer').length) {
{*include the graph*}
{include file="CRM/Report/Form/Layout/Graph.tpl"}
- {if $printOnly}
+ {if !empty($printOnly)}
<h1>{$reportTitle}</h1>
<div id="report-date">{$reportDate}</div>
{/if}
| and copyright information, see https://civicrm.org/licensing |
+--------------------------------------------------------------------+
*}
-{if !$rows}
+{if empty($rows)}
<p>{ts}None found.{/ts}</p>
{else}
{if !empty($pager) and $pager->_response and $pager->_response.numPages > 1}
{assign var=fieldHover value=$field|cat:"_hover"}
{assign var=fieldClass value=$field|cat:"_class"}
<td class="crm-report-{$field}{if $header.type eq 1024 OR $header.type eq 1 OR $header.type eq 512} report-contents-right{elseif $row.$field eq 'Subtotal'} report-label{/if}">
- {if $row.$fieldLink}
+ {if !empty($row.$fieldLink)}
<a title="{$row.$fieldHover|escape}" href="{$row.$fieldLink}" {if !empty($row.$fieldClass)} class="{$row.$fieldClass}"{/if}>
{/if}
{$row.$field}
{/if}
- {if $row.$fieldLink}</a>{/if}
+ {if !empty($row.$fieldLink)}</a>{/if}
</td>
{/foreach}
</tr>
+--------------------------------------------------------------------+
*}
{if !empty($top)}
- {if $printOnly}
+ {if !empty($printOnly)}
<h1>{$reportTitle}</h1>
- <div id="report-date">{$reportDate}</div>
+ <div id="report-date">{if !empty($reportDate)}{$reportDate}{/if}</div>
{/if}
- {if $statistics}
+ {if !empty($statistics)}
<table class="report-layout statistics-table">
- {if !empty($statistics.groups)}
+ {if !empty($statistics.groups)}
{foreach from=$statistics.groups item=row}
<tr>
<th class="statistics" scope="row">{$row.title}</th>
{foreach from=$colGroups item=grpFields key=dnc}
{assign var="count" value="0"}
{* Wrap custom field sets in collapsed accordion pane. *}
- {if $grpFields.use_accordian_for_field_selection}
+ {if !empty($grpFields.use_accordian_for_field_selection)}
<div class="crm-accordion-wrapper crm-accordion collapsed">
<div class="crm-accordion-header">
{$grpFields.group_title}
{/if}
</tr>
</table>
- {if $grpFields.use_accordian_for_field_selection}
+ {if !empty($grpFields.use_accordian_for_field_selection)}
</div><!-- /.crm-accordion-body -->
</div><!-- /.crm-accordion-wrapper -->
{/if}
{foreach from=$filters item=table key=tableName}
{assign var="filterCount" value=$table|@count}
{* Wrap custom field sets in collapsed accordion pane. *}
- {if $filterGroups.$tableName.group_title and $filterCount gte 1}
+ {if !empty($filterGroups.$tableName.group_title) and $filterCount gte 1}
{* we should close table that contains other filter elements before we start building custom group accordion
*}
{if $counter eq 1}
{assign var=filterVal value=$fieldName|cat:"_value"}
{assign var=filterMin value=$fieldName|cat:"_min"}
{assign var=filterMax value=$fieldName|cat:"_max"}
- {if $field.operatorType & 4}
+ {if !empty($field.operatorType) && $field.operatorType & 4}
<tr class="report-contents crm-report crm-report-criteria-filter crm-report-criteria-filter-{$tableName}">
- <td class="label report-contents">{$field.title}</td>
- {include file="CRM/Core/DatePickerRangeWrapper.tpl" fieldName=$fieldName hideRelativeLabel=1, from='_from' to='_to'}
+ <td class="label report-contents">{if !empty($field.title)}{$field.title}{/if}</td>
+ {include file="CRM/Core/DatePickerRangeWrapper.tpl" fieldName=$fieldName hideRelativeLabel=1 from='_from' to='_to'}
</tr>
{elseif $form.$fieldOp.html}
- <tr class="report-contents crm-report crm-report-criteria-filter crm-report-criteria-filter-{$tableName}" {if $field.no_display} style="display: none;"{/if}>
- <td class="label report-contents">{$field.title}</td>
+ <tr class="report-contents crm-report crm-report-criteria-filter crm-report-criteria-filter-{$tableName}" {if !empty($field.no_display)} style="display: none;"{/if}>
+ <td class="label report-contents">{if !empty($field.title)}{$field.title}{/if}</td>
<td class="report-contents">{$form.$fieldOp.html}</td>
<td>
<span id="{$filterVal}_cell">{$form.$filterVal.label} {$form.$filterVal.html}</span>
- <span id="{$filterMin}_max_cell">{$form.$filterMin.label} {$form.$filterMin.html} {$form.$filterMax.label} {$form.$filterMax.html}</span>
+ <span id="{$filterMin}_max_cell">
+ {if !empty($form.$filterMin)}{$form.$filterMin.label} {$form.$filterMin.html} {/if}
+ {if !empty($form.$filterMax)}{$form.$filterMax.label} {$form.$filterMax.html}{/if}
+ </span>
</td>
</tr>
{/if}
{/foreach}
- {if $filterGroups.$tableName.group_title}
+ {if !empty($filterGroups.$tableName.group_title)}
</table>
</div><!-- /.crm-accordion-body -->
</div><!-- /.crm-accordion-wrapper -->
<td class="report-label">{$form.parent_id.label} {help id="id-parent" file="CRM/Admin/Form/Navigation.hlp"}</td>
<td>{$form.parent_id.html|crmAddClass:huge}</td>
</tr>
+ {if !empty($form.drilldown_id)}
<tr class="crm-report-instanceForm-form-block-drilldown">
<td class="report-label">{$form.drilldown_id.label}</td>
<td>{$form.drilldown_id.html}</td>
</tr>
+ {/if}
{if $config->userFramework neq 'Joomla'}
<tr class="crm-report-instanceForm-form-block-permission">
<td class="report-label" width="20%">{$form.permission.label} {help id="id-report_perms" file="CRM/Report/Form/Tabs/Settings.hlp"}</td>
<td>{$form.permission.html|crmAddClass:huge}</td>
</tr>
+ {if !empty($form.grouprole)}
<tr class="crm-report-instanceForm-form-block-role">
<td class="report-label" width="20%">{$form.grouprole.label}</td>
<td>{$form.grouprole.html|crmAddClass:huge}</td>
</tr>
+ {/if}
{/if}
<tr class="crm-report-instanceForm-form-block-add-to-my-reports">
<td class="report-label">{$form.add_to_my_reports.label} {help id="id-add_to_my_reports" file="CRM/Report/Form/Tabs/Settings.hlp"}</td>
});
</script>
{/literal}
-{if $is_navigation}
+{if !empty($is_navigation)}
<script type="text/javascript">
document.getElementById('is_navigation').checked = true;
showHideByValue('is_navigation','','navigation_menu','table-row','radio',false);
*}
{strip}
<div class="action-link">
- {if $templateUrl}
+ {if !empty($templateUrl)}
<a href="{$templateUrl}" class="button"><span><i class="crm-i fa-plus-circle" aria-hidden="true"></i> {$newButton}</span></a>
{/if}
- {if $reportUrl}
+ {if !empty($reportUrl)}
<a href="{$reportUrl}" class="button"><span>{ts}View All Reports{/ts}</span></a>
{/if}
</div>
</div>
<div class="action-link">
- {if $templateUrl}
+ {if !empty($templateUrl)}
<a href="{$templateUrl}" class="button"><span><i class="crm-i fa-plus-circle" aria-hidden="true"></i> {$newButton}</span></a>
{/if}
- {if $reportUrl}
+ {if !empty($reportUrl)}
<a href="{$reportUrl}" class="button"><span>{ts}View All Reports{/ts}</span></a>
{/if}
</div>
<div class="crm-content-block">
<div class="messages status no-popup">
{icon icon="fa-info-circle"}{/icon}
- {if $myReports}
+ {if !empty($myReports)}
{ts}You do not have any private reports. To add a report to this section, edit the Report Settings for a report and set 'Add to My Reports' to Yes.{/ts}
{else}
{ts 1=$compName}No %1 reports have been created.{/ts}
- {if $templateUrl}
+ {if !empty($templateUrl)}
{ts 1=$templateUrl}You can create reports by selecting from the <a href="%1">list of report templates here.</a>{/ts}
{else}
{ts}Contact your site administrator for help creating reports.{/ts}
<tr id="row_{counter}" class="crm-report-templateList">
<td class="crm-report-templateList-title" style="width:35%;">
<a href="{$row.url}" title="{ts}Create report from this template{/ts}"><i class="crm-i fa-chevron-right" aria-hidden="true"></i> <strong>{$row.title}</strong></a>
- {if $row.instanceUrl}
+ {if !empty($row.instanceUrl)}
<div style="font-size:10px;text-align:right;margin-top:3px;">
<a href="{$row.instanceUrl}">{ts}Existing Report(s){/ts}</a>
</div>