Report tpl whitespace cleanup
authorColeman Watts <coleman@civicrm.org>
Thu, 11 Dec 2014 18:32:44 +0000 (13:32 -0500)
committerColeman Watts <coleman@civicrm.org>
Thu, 11 Dec 2014 18:32:44 +0000 (13:32 -0500)
12 files changed:
templates/CRM/Report/Form.tpl
templates/CRM/Report/Form/Actions.tpl
templates/CRM/Report/Form/Criteria.tpl
templates/CRM/Report/Form/ErrorMessage.tpl
templates/CRM/Report/Form/Fields.tpl
templates/CRM/Report/Form/Instance.tpl
templates/CRM/Report/Form/Register.tpl
templates/CRM/Report/Form/Statistics.tpl
templates/CRM/Report/Page/InstanceList.tpl
templates/CRM/Report/Page/List.tpl
templates/CRM/Report/Page/Options.tpl
templates/CRM/Report/Page/TemplateList.tpl

index 6460ef5b49d6aa9e0db79af544f7aa9af63e1f38..a8a3f923e714f56a9f8566419aedf2b9aa4e1cd9 100644 (file)
   {include file="CRM/common/crmeditable.tpl"}
 {/if}
 {* this div is being used to apply special css *}
-    {if $section eq 1}
-    <div class="crm-block crm-content-block crm-report-layoutGraph-form-block">
-        {*include the graph*}
-        {include file="CRM/Report/Form/Layout/Graph.tpl"}
-    </div>
-    {elseif $section eq 2}
-    <div class="crm-block crm-content-block crm-report-layoutTable-form-block">
-        {*include the table layout*}
-        {include file="CRM/Report/Form/Layout/Table.tpl"}
+{if $section eq 1}
+  <div class="crm-block crm-content-block crm-report-layoutGraph-form-block">
+    {*include the graph*}
+    {include file="CRM/Report/Form/Layout/Graph.tpl"}
+  </div>
+{elseif $section eq 2}
+  <div class="crm-block crm-content-block crm-report-layoutTable-form-block">
+    {*include the table layout*}
+    {include file="CRM/Report/Form/Layout/Table.tpl"}
   </div>
-    {else}
-    {if $criteriaForm OR $instanceForm OR $instanceFormError}
+{else}
+  {if $criteriaForm OR $instanceForm OR $instanceFormError}
     <div class="crm-block crm-form-block crm-report-field-form-block">
-        {include file="CRM/Report/Form/Fields.tpl"}
+      {include file="CRM/Report/Form/Fields.tpl"}
     </div>
-    {/if}
+  {/if}
 
-    <div class="crm-block crm-content-block crm-report-form-block">
-        {*include actions*}
-        {include file="CRM/Report/Form/Actions.tpl"}
+  <div class="crm-block crm-content-block crm-report-form-block">
+    {*include actions*}
+    {include file="CRM/Report/Form/Actions.tpl"}
 
-        {*Statistics at the Top of the page*}
-        {include file="CRM/Report/Form/Statistics.tpl" top=true}
+    {*Statistics at the Top of the page*}
+    {include file="CRM/Report/Form/Statistics.tpl" top=true}
 
-        {*include the graph*}
-        {include file="CRM/Report/Form/Layout/Graph.tpl"}
+    {*include the graph*}
+    {include file="CRM/Report/Form/Layout/Graph.tpl"}
 
-        {*include the table layout*}
-        {include file="CRM/Report/Form/Layout/Table.tpl"}
-      <br />
-        {*Statistics at the bottom of the page*}
-        {include file="CRM/Report/Form/Statistics.tpl" bottom=true}
+    {*include the table layout*}
+    {include file="CRM/Report/Form/Layout/Table.tpl"}
+    <br />
+    {*Statistics at the bottom of the page*}
+    {include file="CRM/Report/Form/Statistics.tpl" bottom=true}
 
-        {include file="CRM/Report/Form/ErrorMessage.tpl"}
-    </div>
-    {/if}
-    {if $outputMode == 'print'}
-      <script type="text/javascript">
-        window.print();
-      </script>
-    {/if}
+    {include file="CRM/Report/Form/ErrorMessage.tpl"}
+  </div>
+{/if}
+{if $outputMode == 'print'}
+  <script type="text/javascript">
+    window.print();
+  </script>
+{/if}
index 7a8a89a9b58c470af38c78bd363136dfb1492cbd..ef56ae60db85a159d4189fdd588f85deeb4dbdd8 100644 (file)
 *}
 {if !$printOnly} {* NO print section starts *}
 
-    {* build the print pdf buttons *}
-    {if $rows}
-        <div class="crm-tasks">
-        {assign var=print value="_qf_"|cat:$form.formName|cat:"_submit_print"}
-        {assign var=pdf   value="_qf_"|cat:$form.formName|cat:"_submit_pdf"}
-        {assign var=csv   value="_qf_"|cat:$form.formName|cat:"_submit_csv"}
-        {assign var=group value="_qf_"|cat:$form.formName|cat:"_submit_group"}
-        {assign var=chart value="_qf_"|cat:$form.formName|cat:"_submit_chart"}
-        <table style="border:0;">
-            <tr>
-                <td>
-                    <table class="form-layout-compressed">
-                        <tr>
-                            <td>{$form.$print.html}&nbsp;&nbsp;</td>
-                            <td>{$form.$pdf.html}&nbsp;&nbsp;</td>
-                            <td>{$form.$csv.html}&nbsp;&nbsp;</td>
-                            {if $instanceUrl}
-                                <td>&nbsp;&nbsp;&raquo;&nbsp;<a href="{$instanceUrl}">{ts}Existing report(s) from this template{/ts}</a></td>
-                            {/if}
-                        </tr>
-                    </table>
-                </td>
-                <td>
-                    <table class="form-layout-compressed" align="right">
-                        {if $chartSupported}
-                            <tr>
-                                <td>{$form.charts.html|crmAddClass:big}</td>
-                                <td align="right">{$form.$chart.html}</td>
-                            </tr>
-                        {/if}
-                        {if $form.groups}
-                            <tr>
-                                <td>
-                                  {$form.groups.html}{$form.$group.html}
-                                  <script type="text/javascript">
-                                    {literal}
-                                    (function($) {
-                                      $('#groups').val('').change(function() {
-                                        CRM.confirm({
-                                          message: ts({/literal}'{ts escape='js' 1='<em>%1</em>'}Add all contacts to %1 group?{/ts}'{literal}, {1: $('option:selected', '#groups').text()})
-                                        })
-                                          .on({
-                                            'crmConfirm:yes': function() {
-                                              $('#groups').siblings(':submit').click();
-                                            },
-                                            'crmConfirm:no dialogclose': function() {
-                                              $('#groups').select2('val', '');
-                                            }
-                                          });
-                                      });
-                                    })(CRM.$);
-                                    {/literal}
-                                  </script>
-                                </td>
-                            </tr>
-                        {/if}
-                    </table>
-                </td>
-            </tr>
-        </table>
-        </div>
-    {/if}
+  {* build the print pdf buttons *}
+  {if $rows}
+    <div class="crm-tasks">
+      {assign var=print value="_qf_"|cat:$form.formName|cat:"_submit_print"}
+      {assign var=pdf   value="_qf_"|cat:$form.formName|cat:"_submit_pdf"}
+      {assign var=csv   value="_qf_"|cat:$form.formName|cat:"_submit_csv"}
+      {assign var=group value="_qf_"|cat:$form.formName|cat:"_submit_group"}
+      {assign var=chart value="_qf_"|cat:$form.formName|cat:"_submit_chart"}
+      <table style="border:0;">
+        <tr>
+          <td>
+            <table class="form-layout-compressed">
+              <tr>
+                <td>{$form.$print.html}&nbsp;&nbsp;</td>
+                <td>{$form.$pdf.html}&nbsp;&nbsp;</td>
+                <td>{$form.$csv.html}&nbsp;&nbsp;</td>
+                {if $instanceUrl}
+                  <td>&nbsp;&nbsp;&raquo;&nbsp;<a href="{$instanceUrl}">{ts}Existing report(s) from this template{/ts}</a></td>
+                {/if}
+              </tr>
+            </table>
+          </td>
+          <td>
+            <table class="form-layout-compressed" align="right">
+              {if $chartSupported}
+                <tr>
+                  <td>{$form.charts.html|crmAddClass:big}</td>
+                  <td align="right">{$form.$chart.html}</td>
+                </tr>
+              {/if}
+              {if $form.groups}
+                <tr>
+                  <td>
+                    {$form.groups.html}{$form.$group.html}
+                    <script type="text/javascript">
+                      {literal}
+                      (function($) {
+                        $('#groups').val('').change(function() {
+                          CRM.confirm({
+                            message: ts({/literal}'{ts escape='js' 1='<em>%1</em>'}Add all contacts to %1 group?{/ts}'{literal}, {1: $('option:selected', '#groups').text()})
+                          })
+                            .on({
+                              'crmConfirm:yes': function() {
+                                $('#groups').siblings(':submit').click();
+                              },
+                              'crmConfirm:no dialogclose': function() {
+                                $('#groups').select2('val', '');
+                              }
+                            });
+                        });
+                      })(CRM.$);
+                      {/literal}
+                    </script>
+                  </td>
+                </tr>
+              {/if}
+            </table>
+          </td>
+        </tr>
+      </table>
+    </div>
+  {/if}
 
-    {literal}
-    <script type="text/javascript">
+{literal}
+  <script type="text/javascript">
     var flashChartType = {/literal}{if $chartType}'{$chartType}'{else}''{/if}{literal};
     function disablePrintPDFButtons( viewtype ) {
       if (viewtype && flashChartType != viewtype) {
         cj('#_qf_Summary_submit_pdf').prop('disabled', true).addClass('button-disabled');
-  cj('#_qf_Summary_submit_print').prop('disabled', true).addClass('button-disabled');
+        cj('#_qf_Summary_submit_print').prop('disabled', true).addClass('button-disabled');
       } else {
         cj('#_qf_Summary_submit_pdf').prop('disabled', false).removeClass('button-disabled');
-  cj('#_qf_Summary_submit_print').prop('disabled', false).removeClass('button-disabled');
+        cj('#_qf_Summary_submit_print').prop('disabled', false).removeClass('button-disabled');
       }
     }
-    </script>
-    {/literal}
+  </script>
+{/literal}
 {/if} {* NO print section ends *}
index 235aadca96de03f87d9b03a04248eba7779e95b4..bd3428a780bc221d1d713ac58051546772cfded2 100644 (file)
  +--------------------------------------------------------------------+
 *}
 {* Report form criteria section *}
-    {if $colGroups}
+{if $colGroups}
   <div id="report-tab-col-groups" class="civireport-criteria">
-        {foreach from=$colGroups item=grpFields key=dnc}
-            {assign  var="count" value="0"}
-            {* Wrap custom field sets in collapsed accordion pane. *}
-            {if $grpFields.group_title}
-                <div class="crm-accordion-wrapper crm-accordion collapsed">
-                    <div class="crm-accordion-header">
-                                    {$grpFields.group_title}
-                    </div><!-- /.crm-accordion-header -->
-                    <div class="crm-accordion-body">
-            {/if}
-            <table class="criteria-group">
-                <tr class="crm-report crm-report-criteria-field crm-report-criteria-field-{$dnc}">
-                    {foreach from=$grpFields.fields item=title key=field}
-                        {assign var="count" value=`$count+1`}
-                        <td width="25%">{$form.fields.$field.html}</td>
-                        {if $count is div by 4}
-                            </tr><tr class="crm-report crm-report-criteria-field crm-report-criteria-field_{$dnc}">
-                        {/if}
-                    {/foreach}
-                    {if $count is not div by 4}
-                        <td colspan="4 - ($count % 4)"></td>
-                    {/if}
-                </tr>
-            </table>
-            {if $grpFields.group_title}
-                    </div><!-- /.crm-accordion-body -->
-                </div><!-- /.crm-accordion-wrapper -->
-            {/if}
-        {/foreach}
-        </div>
-    {/if}
+    {foreach from=$colGroups item=grpFields key=dnc}
+      {assign  var="count" value="0"}
+      {* Wrap custom field sets in collapsed accordion pane. *}
+      {if $grpFields.group_title}
+        <div class="crm-accordion-wrapper crm-accordion collapsed">
+        <div class="crm-accordion-header">
+          {$grpFields.group_title}
+        </div><!-- /.crm-accordion-header -->
+        <div class="crm-accordion-body">
+      {/if}
+      <table class="criteria-group">
+        <tr class="crm-report crm-report-criteria-field crm-report-criteria-field-{$dnc}">
+          {foreach from=$grpFields.fields item=title key=field}
+          {assign var="count" value=`$count+1`}
+          <td width="25%">{$form.fields.$field.html}</td>
+          {if $count is div by 4}
+        </tr><tr class="crm-report crm-report-criteria-field crm-report-criteria-field_{$dnc}">
+          {/if}
+          {/foreach}
+          {if $count is not div by 4}
+            <td colspan="4 - ($count % 4)"></td>
+          {/if}
+        </tr>
+      </table>
+      {if $grpFields.group_title}
+        </div><!-- /.crm-accordion-body -->
+        </div><!-- /.crm-accordion-wrapper -->
+      {/if}
+    {/foreach}
+  </div>
+{/if}
 
-    {if $groupByElements}
-        <div id="report-tab-group-by-elements" class="civireport-criteria">
-        {assign  var="count" value="0"}
-        <table class="report-layout">
-            <tr class="crm-report crm-report-criteria-groupby">
-                {foreach from=$groupByElements item=gbElem key=dnc}
-                    {assign var="count" value=`$count+1`}
-                    <td width="25%" {if $form.fields.$gbElem}"{/if}>
-                        {$form.group_bys[$gbElem].html}
-                        {if $form.group_bys_freq[$gbElem].html}:<br>
-                            &nbsp;&nbsp;{$form.group_bys_freq[$gbElem].label}&nbsp;{$form.group_bys_freq[$gbElem].html}
-                        {/if}
-                    </td>
-                    {if $count is div by 4}
-                        </tr><tr class="crm-report crm-report-criteria-groupby">
-                    {/if}
-                {/foreach}
-                {if $count is not div by 4}
-                    <td colspan="4 - ($count % 4)"></td>
-                {/if}
-            </tr>
-        </table>
-     </div>
-    {/if}
+{if $groupByElements}
+  <div id="report-tab-group-by-elements" class="civireport-criteria">
+    {assign  var="count" value="0"}
+    <table class="report-layout">
+      <tr class="crm-report crm-report-criteria-groupby">
+        {foreach from=$groupByElements item=gbElem key=dnc}
+        {assign var="count" value=`$count+1`}
+        <td width="25%" {if $form.fields.$gbElem}"{/if}>
+        {$form.group_bys[$gbElem].html}
+        {if $form.group_bys_freq[$gbElem].html}:<br>
+          &nbsp;&nbsp;{$form.group_bys_freq[$gbElem].label}&nbsp;{$form.group_bys_freq[$gbElem].html}
+        {/if}
+        </td>
+        {if $count is div by 4}
+      </tr><tr class="crm-report crm-report-criteria-groupby">
+        {/if}
+        {/foreach}
+        {if $count is not div by 4}
+          <td colspan="4 - ($count % 4)"></td>
+        {/if}
+      </tr>
+    </table>
+  </div>
+{/if}
 
-    {if $orderByOptions}
-      <div id="report-tab-order-by-elements" class="civireport-criteria">
-  <table id="optionField">
-        <tr>
+{if $orderByOptions}
+  <div id="report-tab-order-by-elements" class="civireport-criteria">
+    <table id="optionField">
+      <tr>
         <th>&nbsp;</th>
         <th> {ts}Column{/ts}</th>
         <th> {ts}Order{/ts}</th>
         <th> {ts}Section Header / Group By{/ts}</th>
         <th> {ts}Page Break{/ts}</th>
-        </tr>
+      </tr>
 
-  {section name=rowLoop start=1 loop=6}
-  {assign var=index value=$smarty.section.rowLoop.index}
-  <tr id="optionField_{$index}" class="form-item {cycle values="odd-row,even-row"}">
-        <td>
-        {if $index GT 1}
-            <a onclick="hideRow({$index}); return false;" name="orderBy_{$index}" href="#" class="form-link"><img src="{$config->resourceBase}i/TreeMinus.gif" class="action-icon" alt="{ts}hide field or section{/ts}"/></a>
-        {/if}
-        </td>
-        <td> {$form.order_bys.$index.column.html}</td>
-        <td> {$form.order_bys.$index.order.html}</td>
-        <td> {$form.order_bys.$index.section.html}</td>
-        <td> {$form.order_bys.$index.pageBreak.html}</td>
-  </tr>
-        {/section}
-        </table>
-            <div id="optionFieldLink" class="add-remove-link">
-            <a onclick="showHideRow(); return false;" name="optionFieldLink" href="#" class="form-link"><img src="{$config->resourceBase}i/TreePlus.gif" class="action-icon" alt="{ts}show field or section{/ts}"/>{ts}another column{/ts}</a>
-        </div>
-        <script type="text/javascript">
-            var showRows   = new Array({$showBlocks});
-            var hideBlocks = new Array({$hideBlocks});
-            var rowcounter = 0;
-            {literal}
-            if (navigator.appName == "Microsoft Internet Explorer") {
-                for ( var count = 0; count < hideBlocks.length; count++ ) {
-                    var r = document.getElementById(hideBlocks[count]);
-                    r.style.display = 'none';
-                }
-            }
+      {section name=rowLoop start=1 loop=6}
+        {assign var=index value=$smarty.section.rowLoop.index}
+        <tr id="optionField_{$index}" class="form-item {cycle values="odd-row,even-row"}">
+          <td>
+            {if $index GT 1}
+              <a onclick="hideRow({$index}); return false;" name="orderBy_{$index}" href="#" class="form-link"><img src="{$config->resourceBase}i/TreeMinus.gif" class="action-icon" alt="{ts}hide field or section{/ts}"/></a>
+            {/if}
+          </td>
+          <td> {$form.order_bys.$index.column.html}</td>
+          <td> {$form.order_bys.$index.order.html}</td>
+          <td> {$form.order_bys.$index.section.html}</td>
+          <td> {$form.order_bys.$index.pageBreak.html}</td>
+        </tr>
+      {/section}
+    </table>
+    <div id="optionFieldLink" class="add-remove-link">
+      <a onclick="showHideRow(); return false;" name="optionFieldLink" href="#" class="form-link"><img src="{$config->resourceBase}i/TreePlus.gif" class="action-icon" alt="{ts}show field or section{/ts}"/>{ts}another column{/ts}</a>
+    </div>
+    <script type="text/javascript">
+      var showRows   = new Array({$showBlocks});
+      var hideBlocks = new Array({$hideBlocks});
+      var rowcounter = 0;
+      {literal}
+      if (navigator.appName == "Microsoft Internet Explorer") {
+        for ( var count = 0; count < hideBlocks.length; count++ ) {
+          var r = document.getElementById(hideBlocks[count]);
+          r.style.display = 'none';
+        }
+      }
 
-            // hide and display the appropriate blocks as directed by the php code
-            on_load_init_blocks( showRows, hideBlocks, '');
+      // hide and display the appropriate blocks as directed by the php code
+      on_load_init_blocks( showRows, hideBlocks, '');
 
-            cj('input[id^="order_by_section_"]').click(disPageBreak).each(disPageBreak);
+      cj('input[id^="order_by_section_"]').click(disPageBreak).each(disPageBreak);
 
-            function disPageBreak() {
-              if (!cj(this).prop('checked')) {
-                cj(this).parent('td').next('td').children('input[id^="order_by_pagebreak_"]').prop({checked: false, disabled: true});
-              }
-              else {
-                cj(this).parent('td').next('td').children('input[id^="order_by_pagebreak_"]').prop({disabled: false});
-              }
-            }
+      function disPageBreak() {
+        if (!cj(this).prop('checked')) {
+          cj(this).parent('td').next('td').children('input[id^="order_by_pagebreak_"]').prop({checked: false, disabled: true});
+        }
+        else {
+          cj(this).parent('td').next('td').children('input[id^="order_by_pagebreak_"]').prop({disabled: false});
+        }
+      }
 
-            function hideRow(i) {
-                showHideRow(i);
-                // clear values on hidden field, so they're not saved
-                cj('select#order_by_column_'+ i).val('');
-                cj('select#order_by_order_'+ i).val('ASC');
-                cj('input#order_by_section_'+ i).prop('checked', false);
-                cj('input#order_by_pagebreak_'+ i).prop('checked', false);
-            }
+      function hideRow(i) {
+        showHideRow(i);
+        // clear values on hidden field, so they're not saved
+        cj('select#order_by_column_'+ i).val('');
+        cj('select#order_by_order_'+ i).val('ASC');
+        cj('input#order_by_section_'+ i).prop('checked', false);
+        cj('input#order_by_pagebreak_'+ i).prop('checked', false);
+      }
 
-            {/literal}
-        </script>
-      </div>
-    {/if}
+      {/literal}
+    </script>
+  </div>
+{/if}
 
-    {if $otherOptions}
-        <div id="report-tab-other-options" class="civireport-criteria">
-        <table class="report-layout">
-          {assign var="optionCount" value=0}
-          <tr class="crm-report crm-report-criteria-field">
-          {foreach from=$otherOptions item=optionField key=optionName}
-            {assign var="optionCount" value=`$optionCount+1`}
-            <td>{if $form.$optionName.label}{$form.$optionName.label}&nbsp;{/if}{$form.$optionName.html}</td>
-            {if $optionCount is div by 2}
-              </tr><tr class="crm-report crm-report-criteria-field">
-            {/if}
-          {/foreach}
-          {if $optionCount is not div by 2}
-            <td colspan="2 - ($count % 2)"></td>
-          {/if}
-          </tr>
-        </table>
-        </div>
-    {/if}
+{if $otherOptions}
+  <div id="report-tab-other-options" class="civireport-criteria">
+    <table class="report-layout">
+      {assign var="optionCount" value=0}
+      <tr class="crm-report crm-report-criteria-field">
+        {foreach from=$otherOptions item=optionField key=optionName}
+        {assign var="optionCount" value=`$optionCount+1`}
+        <td>{if $form.$optionName.label}{$form.$optionName.label}&nbsp;{/if}{$form.$optionName.html}</td>
+        {if $optionCount is div by 2}
+      </tr><tr class="crm-report crm-report-criteria-field">
+        {/if}
+        {/foreach}
+        {if $optionCount is not div by 2}
+          <td colspan="2 - ($count % 2)"></td>
+        {/if}
+      </tr>
+    </table>
+  </div>
+{/if}
 
-    {if $filters}
-  <div id="report-tab-set-filters" class="civireport-criteria">
-        <table class="report-layout">
-      {assign var="counter" value=1}
-            {foreach from=$filters     item=table key=tableName}
-           {assign  var="filterCount" value=$table|@count}
-            {* Wrap custom field sets in collapsed accordion pane. *}
-          {if $colGroups.$tableName.group_title and $filterCount gte 1}
-        {* we should close table that contains other filter elements before we start building custom group accordian  *}
-        {if $counter eq 1}
-                </table>
-      {assign var="counter" value=0}
+{if $filters}
+<div id="report-tab-set-filters" class="civireport-criteria">
+  <table class="report-layout">
+    {assign var="counter" value=1}
+    {foreach from=$filters     item=table key=tableName}
+    {assign  var="filterCount" value=$table|@count}
+    {* Wrap custom field sets in collapsed accordion pane. *}
+    {if $colGroups.$tableName.group_title and $filterCount gte 1}
+    {* we should close table that contains other filter elements before we start building custom group accordian  *}
+    {if $counter eq 1}
+  </table>
+  {assign var="counter" value=0}
+  {/if}
+  <div class="crm-accordion-wrapper crm-accordion collapsed">
+    <div class="crm-accordion-header">
+      {$colGroups.$tableName.group_title}
+    </div><!-- /.crm-accordion-header -->
+    <div class="crm-accordion-body">
+      <table class="report-layout">
         {/if}
-                    <div class="crm-accordion-wrapper crm-accordion collapsed">
-                    <div class="crm-accordion-header">
-                                    {$colGroups.$tableName.group_title}
-                    </div><!-- /.crm-accordion-header -->
-                    <div class="crm-accordion-body">
-                    <table class="report-layout">
-               {/if}
-                {foreach from=$table       item=field key=fieldName}
-                    {assign var=fieldOp     value=$fieldName|cat:"_op"}
-                    {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}
-                        <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/DateRange.tpl" fieldName=$fieldName 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>
-                            <td class="report-contents">{$form.$fieldOp.html}</td>
-                            <td>
-                               <span id="{$filterVal}_cell">{$form.$filterVal.label}&nbsp;{$form.$filterVal.html}</span>
-                               <span id="{$filterMin}_max_cell">{$form.$filterMin.label}&nbsp;{$form.$filterMin.html}&nbsp;&nbsp;{$form.$filterMax.label}&nbsp;{$form.$filterMax.html}</span>
-                            </td>
-                        </tr>
-                    {/if}
-                {/foreach}
-                {if $colGroups.$tableName.group_title}
-                        </table>
-                        </div><!-- /.crm-accordion-body -->
-                    </div><!-- /.crm-accordion-wrapper -->
-                    {assign var=closed     value=1"} {*-- ie table tags are closed-- *}
+        {foreach from=$table       item=field key=fieldName}
+          {assign var=fieldOp     value=$fieldName|cat:"_op"}
+          {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}
+            <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/DateRange.tpl" fieldName=$fieldName 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>
+              <td class="report-contents">{$form.$fieldOp.html}</td>
+              <td>
+                <span id="{$filterVal}_cell">{$form.$filterVal.label}&nbsp;{$form.$filterVal.html}</span>
+                <span id="{$filterMin}_max_cell">{$form.$filterMin.label}&nbsp;{$form.$filterMin.html}&nbsp;&nbsp;{$form.$filterMax.label}&nbsp;{$form.$filterMax.html}</span>
+              </td>
+            </tr>
+          {/if}
+        {/foreach}
+        {if $colGroups.$tableName.group_title}
+      </table>
+    </div><!-- /.crm-accordion-body -->
+  </div><!-- /.crm-accordion-wrapper -->
+  {assign var=closed     value=1"} {*-- ie table tags are closed-- *}
                 {else}
                      {assign var=closed     value=0"} {*-- ie table tags are not closed-- *}
                 {/if}
     {/if}
 
     {literal}
-    <script type="text/javascript">
-    {/literal}
-        {foreach from=$filters item=table key=tableName}
-            {foreach from=$table item=field key=fieldName}
-    {literal}var val = "dnc";{/literal}
+  <script type="text/javascript">
+      {/literal}
+          {foreach from=$filters item=table key=tableName}
+              {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}
                     {literal}var val = document.getElementById("{/literal}{$fieldOp}{literal}").value;{/literal}
         {/foreach}
 
         {literal}
-        function showHideMaxMinVal( field, val ) {
-            var fldVal    = field + "_value_cell";
-            var fldMinMax = field + "_min_max_cell";
-            if ( val == "bw" || val == "nbw" ) {
-                cj('#' + fldVal ).hide();
-                cj('#' + fldMinMax ).show();
-            } else if (val =="nll" || val == "nnll") {
-                cj('#' + fldVal).hide() ;
-                cj('#' + field + '_value').val('');
-                cj('#' + fldMinMax ).hide();
-            } else {
-                cj('#' + fldVal ).show();
-                cj('#' + fldMinMax ).hide();
-            }
-        }
+    function showHideMaxMinVal( field, val ) {
+      var fldVal    = field + "_value_cell";
+      var fldMinMax = field + "_min_max_cell";
+      if ( val == "bw" || val == "nbw" ) {
+        cj('#' + fldVal ).hide();
+        cj('#' + fldMinMax ).show();
+      } else if (val =="nll" || val == "nnll") {
+        cj('#' + fldVal).hide() ;
+        cj('#' + field + '_value').val('');
+        cj('#' + fldMinMax ).hide();
+      } else {
+        cj('#' + fldVal ).show();
+        cj('#' + fldMinMax ).hide();
+      }
+    }
 
     CRM.$(function($) {
       $('.crm-report-criteria-groupby input:checkbox').click(function() {
       });
       {/literal}{/if}{literal}
     });
-    </script>
-    {/literal}
+  </script>
+{/literal}
 
index bf77f08d9826d76b525ece5b4803db31035e5504..946f8c38833ba855e5e5ab428b9a29c0bc2229ca 100644 (file)
@@ -24,7 +24,7 @@
  +--------------------------------------------------------------------+
 *}
 {if $outputMode eq 'html' && !$rows}
-    <div class="messages status no-popup">
-        <div class="icon inform-icon"></div>&nbsp; {ts}None found.{/ts}
-    </div>
+  <div class="messages status no-popup">
+    <div class="icon inform-icon"></div>&nbsp; {ts}None found.{/ts}
+  </div>
 {/if}
index b1c3db36fa954ceac23539e198b600bf0441e331..b310654480b72b2ebc3ceb97b7a4d16ebe4f11f8 100644 (file)
@@ -24,8 +24,8 @@
  +--------------------------------------------------------------------+
 *}
 {if !$printOnly} {* NO print section starts *}
-{if $criteriaForm}
-<div class="crm-report-criteria"> {* criteria section starts *}
+  {if $criteriaForm}
+    <div class="crm-report-criteria"> {* criteria section starts *}
       <div id="mainTabContainer">
         {*tab navigation bar*}
         <ul>
         {/if}
       </div> {* end mainTabContainer *}
 
-                    {assign var=save value="_qf_"|cat:$form.formName|cat:"_submit_save"}
-                    {assign var=next value="_qf_"|cat:$form.formName|cat:"_submit_next"}
-                        <div class="crm-submit-buttons">
-                            {$form.buttons.html}
-                            {if $instanceForm}
-                              {$form.$save.html}
-                            {/if}
-                            {if $mode neq 'template' && $form.$next}
-                                {$form.$next.html}
-                            {/if}
-                        </div>
-</div> {* criteria section ends *}
-   {/if}
+      {assign var=save value="_qf_"|cat:$form.formName|cat:"_submit_save"}
+      {assign var=next value="_qf_"|cat:$form.formName|cat:"_submit_next"}
+      <div class="crm-submit-buttons">
+        {$form.buttons.html}
+        {if $instanceForm}
+          {$form.$save.html}
+        {/if}
+        {if $mode neq 'template' && $form.$next}
+          {$form.$next.html}
+        {/if}
+      </div>
+    </div> {* criteria section ends *}
+  {/if}
 
 {literal}
-<script type="text/javascript">
-CRM.$(function($) {
-  var tabSettings = {
-    collapsible: true,
-    active: {/literal}{if $rows}false{else}0{/if}{literal}
-  };
-  // If a tab contains an error, open it
-  if ($('.civireport-criteria .crm-error', '#mainTabContainer').length) {
-    tabSettings.active = $('.civireport-criteria').index($('.civireport-criteria:has(".crm-error")')[0]);
-  }
-  $("#mainTabContainer").tabs(tabSettings);
-});
+  <script type="text/javascript">
+    CRM.$(function($) {
+      var tabSettings = {
+        collapsible: true,
+        active: {/literal}{if $rows}false{else}0{/if}{literal}
+      };
+      // If a tab contains an error, open it
+      if ($('.civireport-criteria .crm-error', '#mainTabContainer').length) {
+        tabSettings.active = $('.civireport-criteria').index($('.civireport-criteria:has(".crm-error")')[0]);
+      }
+      $("#mainTabContainer").tabs(tabSettings);
+    });
 
-</script>
+  </script>
 {/literal}
 
 {/if} {* NO print section ends *}
index b4a610e5f4318f3baab7f6c638f1536b25a8e03c..a1918805bc0dbaa2e84c5050607e8d16a51df72e 100644 (file)
  +--------------------------------------------------------------------+
 *}
 <div id="report-tab-format" class="civireport-criteria">
-<table class="form-layout">
+  <table class="form-layout">
     <tr class="crm-report-instanceForm-form-block-title">
-        <td class="report-label" width="20%">{$form.title.label} {help id="id-report_title" file="CRM/Report/Form/Settings.hlp"}</td>
-        <td >{$form.title.html}</td>
+      <td class="report-label" width="20%">{$form.title.label} {help id="id-report_title" file="CRM/Report/Form/Settings.hlp"}</td>
+      <td >{$form.title.html}</td>
     </tr>
     <tr class="crm-report-instanceForm-form-block-description">
-        <td class="report-label" width="20%">{$form.description.label}</td>
-        <td>{$form.description.html}</td>
+      <td class="report-label" width="20%">{$form.description.label}</td>
+      <td>{$form.description.html}</td>
     </tr>
     <tr class="crm-report-instanceForm-form-block-report_header">
-        <td class="report-label" width="20%">{$form.report_header.label}{help id="id-report_header" file="CRM/Report/Form/Settings.hlp"}</td>
-        <td>{$form.report_header.html}</td>
+      <td class="report-label" width="20%">{$form.report_header.label}{help id="id-report_header" file="CRM/Report/Form/Settings.hlp"}</td>
+      <td>{$form.report_header.html}</td>
     </tr>
     <tr class="crm-report-instanceForm-form-block-report_footer">
-        <td class="report-label" width="20%">{$form.report_footer.label}</td>
-        <td>{$form.report_footer.html}</td>
+      <td class="report-label" width="20%">{$form.report_footer.label}</td>
+      <td>{$form.report_footer.html}</td>
     </tr>
-</table>
+  </table>
 </div>
 
 <div id="report-tab-email" class="civireport-criteria">
   <h3 class="email-delivery-settings-title">{ts}Email Delivery Settings{/ts} {help id="id-email_settings" file="CRM/Report/Form/Settings.hlp"}</h3>
   <table class="form-layout email-delivery-settings-fields">
     <tr class="crm-report-instanceForm-form-block-email_subject">
-        <td class="report-label" width="20%">{$form.email_subject.label}</td>
-        <td>{$form.email_subject.html|crmAddClass:huge}</td>
+      <td class="report-label" width="20%">{$form.email_subject.label}</td>
+      <td>{$form.email_subject.html|crmAddClass:huge}</td>
     </tr>
     <tr class="crm-report-instanceForm-form-block-email_to">
-        <td class="report-label">{$form.email_to.label}</td>
-        <td>{$form.email_to.html|crmAddClass:huge}</td>
+      <td class="report-label">{$form.email_to.label}</td>
+      <td>{$form.email_to.html|crmAddClass:huge}</td>
     </tr>
     <tr class="crm-report-instanceForm-form-block-email_cc">
-        <td class="report-label">{$form.email_cc.label}</td>
-        <td>{$form.email_cc.html|crmAddClass:huge}</td>
+      <td class="report-label">{$form.email_cc.label}</td>
+      <td>{$form.email_cc.html|crmAddClass:huge}</td>
     </tr>
-</table>
+  </table>
 </div>
 
 <div id="report-tab-access" class="civireport-criteria">
-<table class="form-layout">
+  <table class="form-layout">
     <tr class="crm-report-instanceForm-form-block-is_navigation">
-  <td class="report-label">{$form.is_navigation.label}</td>
-        <td>{$form.is_navigation.html}<br />
-            <span class="description">{ts}All report instances are automatically included in the Report Listing page. Check this box to also add this report to the navigation menu.{/ts}</span>
-        </td>
+      <td class="report-label">{$form.is_navigation.label}</td>
+      <td>{$form.is_navigation.html}<br />
+        <span class="description">{ts}All report instances are automatically included in the Report Listing page. Check this box to also add this report to the navigation menu.{/ts}</span>
+      </td>
     </tr>
     <tr class="crm-report-instanceForm-form-block-parent_id" id="navigation_menu">
-  <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>
+      <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>
     <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 $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/Settings.hlp"}</td>
-            <td>{$form.permission.html|crmAddClass:huge}</td>
-        </tr>
-        <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>
+      <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/Settings.hlp"}</td>
+        <td>{$form.permission.html|crmAddClass:huge}</td>
+      </tr>
+      <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}
     <tr class="crm-report-instanceForm-form-block-isReserved">
       <td class="report-label">{$form.is_reserved.label} {help id="id-is_reserved" file="CRM/Report/Form/Settings.hlp"}</td>
       <td class="report-label">{$form.row_count.label} {help id="id-dash_limit" file="CRM/Report/Form/Settings.hlp"}</td>
       <td>{$form.row_count.html}</td>
     </tr>
-</table>
+  </table>
 </div>
 
 {include file="CRM/common/showHideByFieldValue.tpl"
 }
 
 {if $is_navigation}
- <script type="text/javascript">
-     document.getElementById('is_navigation').checked = true;
-     showHideByValue('is_navigation','','navigation_menu','table-row','radio',false);
- </script>
 <script type="text/javascript">
+    document.getElementById('is_navigation').checked = true;
+    showHideByValue('is_navigation','','navigation_menu','table-row','radio',false);
 </script>
 {/if}
 
 {literal}
 <script type="text/javascript">
   CRM.$(function($) {
-      var formName = {/literal}"{$form.formName}"{literal};
-      $('#title').data('initial_value', $('#title').val());
-      $('#_qf_' + formName + '_submit_save').click (
-          function(){
-              if ( $('#is_navigation').prop('checked') && $('#parent_id').val() == '') {
-                  var confirmMsg = {/literal}'{ts escape="js"}You have chosen to include this report in the Navigation Menu without selecting a Parent Menu item from the dropdown. This will add the report to the top level menu bar. Are you sure you want to continue?{/ts}'{literal}
-                  return confirm(confirmMsg);
-              }
-          }
-      );
-      $('#_qf_' + formName + '_submit_next').click (
-          function(){
-              if ( $('#title').data('initial_value') == $('#title').val() ) {
-                  var confirmMsg = {/literal}'{ts escape="js"}You are saving a copy of this report with the same report title. Are you sure you want to continue?{/ts}'{literal}
-                  return confirm(confirmMsg);
-              }
-          }
-      );
+    var formName = {/literal}"{$form.formName}"{literal};
+    $('#title').data('initial_value', $('#title').val());
+    $('#_qf_' + formName + '_submit_save').click(function() {
+      if ($('#is_navigation').prop('checked') && $('#parent_id').val() == '') {
+        var confirmMsg = {/literal}'{ts escape="js"}You have chosen to include this report in the Navigation Menu without selecting a Parent Menu item from the dropdown. This will add the report to the top level menu bar. Are you sure you want to continue?{/ts}'{literal}
+        return confirm(confirmMsg);
+      }
+    });
+    $('#_qf_' + formName + '_submit_next').click(function() {
+      if ($('#title').data('initial_value') == $('#title').val()) {
+        var confirmMsg = {/literal}'{ts escape="js"}You are saving a copy of this report with the same report title. Are you sure you want to continue?{/ts}'{literal}
+        return confirm(confirmMsg);
+      }
+    });
   });
 </script>
 {/literal}
index f3b81278a204f7b43611d146759dc330b2f64f3b..1269f5133cea0f373ff6ba63bd5fdef69ef7d944 100644 (file)
   <h3>{ts}New Report Template{/ts}</h3>
 {/if}
 <div class="crm-block crm-form-block crm-report-register-form-block">
-{if $action eq 8}
-    <table class="form-layout">
+  {if $action eq 8}
+  <table class="form-layout">
     <tr class="buttons">
-        <td><div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
-        </td>
-        <td></td>
+      <td><div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
+      </td>
+      <td></td>
     </tr>
     <tr>
-        <td colspan=2>
+      <td colspan=2>
         <div class="messages status no-popup">
-      <div class="icon inform-icon"></div> &nbsp;
-        {ts}WARNING: Deleting this option will result in the loss of all Report related records which use the option. This may mean the loss of a substantial amount of data, and the action cannot be undone. Do you want to continue?{/ts}
+          <div class="icon inform-icon"></div> &nbsp;
+          {ts}WARNING: Deleting this option will result in the loss of all Report related records which use the option. This may mean the loss of a substantial amount of data, and the action cannot be undone. Do you want to continue?{/ts}
         </div>
-        </td>
+      </td>
     </tr>
-{else}
+    {else}
 
     <table class="form-layout">
-        <tr class="buttons crm-report-register-form-block-buttons">
-            <td><div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
-            </td>
-            <td></td>
-        </tr>
-        <tr class="crm-report-register-form-block-label">
-            <td class="label">{$form.label.label}</td>
-            <td class="view-value">{$form.label.html} <br /><span class="description">{ts}Report title appear in the display screen.{/ts}</span>
-            </td>
-        </tr>
-        <tr class="crm-report-register-form-block-description">
-            <td class="label">{$form.description.label}</td>
-            <td class="view-value">{$form.description.html} <br /><span class="description">{ts}Report description appear in the display screen.{/ts}</span>
-            </td>
-        </tr>
-        <tr class="crm-report-register-form-block-url">
-            <td class="label">{$form.value.label}</td>
-            <td class="view-value">{$form.value.html} <br /><span class="description">{ts}Report Url must be like "contribute/summary"{/ts}</span>
-            </td>
-        </tr>
-        <tr class="crm-report-register-form-block-class">
-            <td class="label">{$form.name.label}</td>
-            <td class="view-value">{$form.name.html} <br /><span class="description">{ts}Report Class must be present before adding the report here, e.g. 'CRM_Report_Form_Contribute_Summary'{/ts}</span>
-            </td>
-        </tr>
-        <tr class="crm-report-register-form-block-weight">
-            <td class="label">{$form.weight.label}</td>
-            <td class="view-value">{$form.weight.html}</td>
-        </tr>
-        <tr class="crm-report-register-form-block-component">
-            <td class="label">{$form.component_id.label}</td>
-            <td class="view-value">{$form.component_id.html} <br /><span class="description">{ts}Specify the Report if it is belongs to any component like "CiviContribute"{/ts}</span>
-            </td>
-        </tr>
-        <tr class="crm-report-register-form-block-is_active">
-            <td class="label">{$form.is_active.label}</td>
-            <td class="view-value">{$form.is_active.html}</td>
-        </tr>
-{/if}
-    <tr class="buttons crm-report-register-form-block-buttons">
+      <tr class="buttons crm-report-register-form-block-buttons">
+        <td><div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
+        </td>
+        <td></td>
+      </tr>
+      <tr class="crm-report-register-form-block-label">
+        <td class="label">{$form.label.label}</td>
+        <td class="view-value">{$form.label.html} <br /><span class="description">{ts}Report title appear in the display screen.{/ts}</span>
+        </td>
+      </tr>
+      <tr class="crm-report-register-form-block-description">
+        <td class="label">{$form.description.label}</td>
+        <td class="view-value">{$form.description.html} <br /><span class="description">{ts}Report description appear in the display screen.{/ts}</span>
+        </td>
+      </tr>
+      <tr class="crm-report-register-form-block-url">
+        <td class="label">{$form.value.label}</td>
+        <td class="view-value">{$form.value.html} <br /><span class="description">{ts}Report Url must be like "contribute/summary"{/ts}</span>
+        </td>
+      </tr>
+      <tr class="crm-report-register-form-block-class">
+        <td class="label">{$form.name.label}</td>
+        <td class="view-value">{$form.name.html} <br /><span class="description">{ts}Report Class must be present before adding the report here, e.g. 'CRM_Report_Form_Contribute_Summary'{/ts}</span>
+        </td>
+      </tr>
+      <tr class="crm-report-register-form-block-weight">
+        <td class="label">{$form.weight.label}</td>
+        <td class="view-value">{$form.weight.html}</td>
+      </tr>
+      <tr class="crm-report-register-form-block-component">
+        <td class="label">{$form.component_id.label}</td>
+        <td class="view-value">{$form.component_id.html} <br /><span class="description">{ts}Specify the Report if it is belongs to any component like "CiviContribute"{/ts}</span>
+        </td>
+      </tr>
+      <tr class="crm-report-register-form-block-is_active">
+        <td class="label">{$form.is_active.label}</td>
+        <td class="view-value">{$form.is_active.html}</td>
+      </tr>
+      {/if}
+      <tr class="buttons crm-report-register-form-block-buttons">
         <td><div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
         </td>
         <td></td>
-    </tr>
+      </tr>
     </table>
 </div>
index 95663383da363c9c3e0fc94f814ad7e6a90c24e9..ff6b6c3ea8715cdcc4036ff6f635fab5f3c336a7 100644 (file)
  +--------------------------------------------------------------------+
 *}
 {if $top}
-    {if $printOnly}
-        <h1>{$reportTitle}</h1>
-        <div id="report-date">{$reportDate}</div>
-    {/if}
-    {if $statistics and $outputMode}
-        <table class="report-layout statistics-table">
-            {foreach from=$statistics.groups item=row}
-                <tr>
-                   <th class="statistics" scope="row">{$row.title}</th>
-                   <td>{$row.value}</td>
-                </tr>
-            {/foreach}
-            {foreach from=$statistics.filters item=row}
-                <tr>
-                    <th class="statistics" scope="row">{$row.title}</th>
-                    <td>{$row.value}</td>
-                </tr>
-            {/foreach}
-        </table>
-    {/if}
+  {if $printOnly}
+    <h1>{$reportTitle}</h1>
+    <div id="report-date">{$reportDate}</div>
+  {/if}
+  {if $statistics and $outputMode}
+    <table class="report-layout statistics-table">
+      {foreach from=$statistics.groups item=row}
+        <tr>
+          <th class="statistics" scope="row">{$row.title}</th>
+          <td>{$row.value}</td>
+        </tr>
+      {/foreach}
+      {foreach from=$statistics.filters item=row}
+        <tr>
+          <th class="statistics" scope="row">{$row.title}</th>
+          <td>{$row.value}</td>
+        </tr>
+      {/foreach}
+    </table>
+  {/if}
 {/if}
 
 {if $bottom and $rows and $statistics}
-    <table class="report-layout">
-        {foreach from=$statistics.counts item=row}
-            <tr>
-                <th class="statistics" scope="row">{$row.title}</th>
-                <td>
-                   {if $row.type eq 1024}
-                       {$row.value|crmMoney}
-                   {elseif $row.type eq 2}
-                       {$row.value}
-                   {else}
-                       {$row.value|crmNumberFormat}
-                   {/if}
+  <table class="report-layout">
+    {foreach from=$statistics.counts item=row}
+      <tr>
+        <th class="statistics" scope="row">{$row.title}</th>
+        <td>
+          {if $row.type eq 1024}
+            {$row.value|crmMoney}
+          {elseif $row.type eq 2}
+            {$row.value}
+          {else}
+            {$row.value|crmNumberFormat}
+          {/if}
 
-                </td>
-            </tr>
-        {/foreach}
-    </table>
+        </td>
+      </tr>
+    {/foreach}
+  </table>
 {/if}
index 6fcf2ac96657e6c36c9d17e2cf53c0faf6277c15..091d7fee59e8e05c66365d5c268d12605a31f35e 100644 (file)
  +--------------------------------------------------------------------+
 *}
 {strip}
-<div class="action-link">
-  {if $templateUrl}
-    <a href="{$templateUrl}" class="button"><span><div class="icon add-icon"></div> {$newButton}</span></a>
-  {/if}
-  {if $reportUrl}
-    <a href="{$reportUrl}" class="button"><span>{ts}View All Reports{/ts}</span></a>
-  {/if}
-</div>
-{if $list}
-<div class="crm-block crm-form-block crm-report-instanceList-form-block">
-{counter start=0 skip=1 print=false}
-{foreach from=$list item=rows key=report}
-<div class="crm-accordion-wrapper crm-accordion_{$report}-accordion ">
- <div class="crm-accordion-header">
-    {if $title}{$title}{elseif $report EQ 'Contribute'}{ts}Contribution Reports{/ts}{else}{$report} {ts}Reports{/ts}{/if}</a>
- </div><!-- /.crm-accordion-header -->
- <div class="crm-accordion-body">
-  <div id="{$report}" class="boxBlock">
-      <table class="report-layout">
-        {foreach from=$rows item=row}
-        <tr id="row_{counter}" class="crm-report-instanceList">
-          <td class="crm-report-instanceList-title" style="width:35%"><a href="{$row.url}" title="{ts}Run this report{/ts}">&raquo; <strong>{$row.title}</strong></a></td>
-          <td class="crm-report-instanceList-description">{$row.description}</td>
-          {if $row.deleteUrl}
-            <td class="crm-report-instanceList-deleteUrl" style = "width:5%"><a href="{$row.deleteUrl}" onclick="return window.confirm('{ts}Are you sure you want delete this report?{/ts} {ts}This action cannot be undone.{/ts}');">{ts}Delete{/ts}</a></td>
-          {/if}
-        </tr>
-        {/foreach}
-      </table>
+  <div class="action-link">
+    {if $templateUrl}
+      <a href="{$templateUrl}" class="button"><span><div class="icon add-icon"></div> {$newButton}</span></a>
+    {/if}
+    {if $reportUrl}
+      <a href="{$reportUrl}" class="button"><span>{ts}View All Reports{/ts}</span></a>
+    {/if}
   </div>
-</div>
-</div>
-{/foreach}
-</div>
+  {if $list}
+    <div class="crm-block crm-form-block crm-report-instanceList-form-block">
+      {counter start=0 skip=1 print=false}
+      {foreach from=$list item=rows key=report}
+        <div class="crm-accordion-wrapper crm-accordion_{$report}-accordion ">
+          <div class="crm-accordion-header">
+            {if $title}{$title}{elseif $report EQ 'Contribute'}{ts}Contribution Reports{/ts}{else}{$report} {ts}Reports{/ts}{/if}</a>
+          </div><!-- /.crm-accordion-header -->
+          <div class="crm-accordion-body">
+            <div id="{$report}" class="boxBlock">
+              <table class="report-layout">
+                {foreach from=$rows item=row}
+                  <tr id="row_{counter}" class="crm-report-instanceList">
+                    <td class="crm-report-instanceList-title" style="width:35%"><a href="{$row.url}" title="{ts}Run this report{/ts}">&raquo; <strong>{$row.title}</strong></a></td>
+                    <td class="crm-report-instanceList-description">{$row.description}</td>
+                    {if $row.deleteUrl}
+                      <td class="crm-report-instanceList-deleteUrl" style = "width:5%"><a href="{$row.deleteUrl}" onclick="return window.confirm('{ts}Are you sure you want delete this report?{/ts} {ts}This action cannot be undone.{/ts}');">{ts}Delete{/ts}</a></td>
+                    {/if}
+                  </tr>
+                {/foreach}
+              </table>
+            </div>
+          </div>
+        </div>
+      {/foreach}
+    </div>
 
-<div class="action-link">
-  {if $templateUrl}
-    <a href="{$templateUrl}" class="button"><span><div class="icon add-icon"></div> {$newButton}</span></a>
-  {/if}
-  {if $reportUrl}
-    <a href="{$reportUrl}" class="button"><span>{ts}View All Reports{/ts}</span></a>
-  {/if}
-</div>
+    <div class="action-link">
+      {if $templateUrl}
+        <a href="{$templateUrl}" class="button"><span><div class="icon add-icon"></div> {$newButton}</span></a>
+      {/if}
+      {if $reportUrl}
+        <a href="{$reportUrl}" class="button"><span>{ts}View All Reports{/ts}</span></a>
+      {/if}
+    </div>
 
-{else}
-<div class="crm-content-block">
-<div class="messages status no-popup">
-  <div class="icon inform-icon"></div>&nbsp;
+  {else}
+    <div class="crm-content-block">
+      <div class="messages status no-popup">
+        <div class="icon inform-icon"></div>&nbsp;
         {ts 1=$compName}No %1 reports have been created.{/ts} &nbsp;
         {if $templateUrl}
-            {ts 1=$templateUrl}You can create reports by selecting from the <a href="%1">list of report templates here.</a>{/ts}
+          {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}
+          {ts}Contact your site administrator for help creating reports.{/ts}
         {/if}
+      </div>
     </div>
-</div>
-{/if}
+  {/if}
 {/strip}
index 4ba7bce4354013f511a887cd5c7513339756974c..d2650a1b263fd36d285d3336e4a09f3f82ead962 100644 (file)
  +--------------------------------------------------------------------+
 *}
 {strip}
-    <fieldset>
-        <legend>{ts}Template List{/ts}</legend>
-        {if $list}
-            {foreach from=$list item=rows key=report}
-          <br>
-                <div style="cursor:pointer;background-color:#F5F5F5" onclick="toggle_visibility('{$report}');">
-              <table class="form-layout">
+  <fieldset>
+    <legend>{ts}Template List{/ts}</legend>
+    {if $list}
+      {foreach from=$list item=rows key=report}
+        <br>
+        <div style="cursor:pointer;background-color:#F5F5F5" onclick="toggle_visibility('{$report}');">
+          <table class="form-layout">
             <tr>
-          <td><strong>{if $report}{$report}{else}Contact{/if} Reports</strong></td>
-      </tr>
-        </table>
-          </div>
-    <div id="{$report}" style="display:none;">
-        <table style="border:0;">
+              <td><strong>{if $report}{$report}{else}Contact{/if} Reports</strong></td>
+            </tr>
+          </table>
+        </div>
+        <div id="{$report}" style="display:none;">
+          <table style="border:0;">
             {foreach from=$rows item=row}
-                      <tr style="border-bottom:1px solid #E3E9ED;background-color:{cycle values="#FFFFFF;,#F4F6F8;" name="$report"}">
-                      <td style="color:#2F425C;width:200px;">
-                             <a href="{$row.url}" style="text-decoration:none;display:block;" title="{$row.description}">
-                             <img alt="report" src="{$config->resourceBase}i/report.gif"/>&nbsp;&nbsp;
+              <tr style="border-bottom:1px solid #E3E9ED;background-color:{cycle values="#FFFFFF;,#F4F6F8;" name="$report"}">
+                <td style="color:#2F425C;width:200px;">
+                  <a href="{$row.url}" style="text-decoration:none;display:block;" title="{$row.description}">
+                    <img alt="report" src="{$config->resourceBase}i/report.gif"/>&nbsp;&nbsp;
                     <strong>{$row.title}</strong>
-            </a>
-               {if $row.instanceUrl}
-          <div align="right">
-              <a href="{$row.instanceUrl}">{ts}Instance(s){/ts}</a>
-          </div>
-            {/if}
-              </td>
-        <td style="cursor:help;width:350px;">
-            {$row.description}
-        </td>
-          </tr>
+                  </a>
+                  {if $row.instanceUrl}
+                    <div align="right">
+                      <a href="{$row.instanceUrl}">{ts}Instance(s){/ts}</a>
+                    </div>
+                  {/if}
+                </td>
+                <td style="cursor:help;width:350px;">
+                  {$row.description}
+                </td>
+              </tr>
             {/foreach}
-                    </table>
-                </div>
+          </table>
+        </div>
       {/foreach}
-        {else}
-            <div class="messages status no-popup">
-                <div class="icon inform-icon"></div>&nbsp; {ts}There are currently no Reports.{/ts}
-            </div>
-        {/if}
-    </fieldset>
+    {else}
+      <div class="messages status no-popup">
+        <div class="icon inform-icon"></div>&nbsp; {ts}There are currently no Reports.{/ts}
+      </div>
+    {/if}
+  </fieldset>
 {/strip}
 {literal}
-<script type="text/javascript">
+  <script type="text/javascript">
     function toggle_visibility(id) {
-  var e = document.getElementById(id);
-  if (e.style.display == 'block') {
-      e.style.display = 'none';
-  } else {
-      e.style.display = 'block';
-  }
+      var e = document.getElementById(id);
+      if (e.style.display == 'block') {
+        e.style.display = 'none';
+      } else {
+        e.style.display = 'block';
+      }
     }
-</script>
+  </script>
 {/literal}
index ec693677e25a6317f26b0a155d0284f3003d19a3..f799dd69935e277a01c043a4af80db076619119e 100644 (file)
  +--------------------------------------------------------------------+
 *}
 <div id="help">
-    {ts 1=$GName}The existing option choices for %1 group are listed below. You can add, edit or delete them from this screen.{/ts}
+  {ts 1=$GName}The existing option choices for %1 group are listed below. You can add, edit or delete them from this screen.{/ts}
 </div>
 {if $action ne 1 and $action ne 2}
-    <div class="action-link">
-  <a href="{$newReport}"  id="new"|cat:$GName class="button"><span>&raquo; {ts 1=$GName}Register New %1{/ts}</span></a>
-    </div>
-    <div class="spacer"></div>
+  <div class="action-link">
+    <a href="{$newReport}"  id="new"|cat:$GName class="button"><span>&raquo; {ts 1=$GName}Register New %1{/ts}</span></a>
+  </div>
+  <div class="spacer"></div>
 {/if}
 {if $rows}
-    <div id="optionList">
-  {strip}
-  {* handle enable/disable actions*}
-   {include file="CRM/common/enableDisableApi.tpl"}
-   {include file="CRM/common/crmeditable.tpl"}
-       <table id="options" class="row-highlight">
-       <thead>
-    <tr>
-        <th>{ts}Label{/ts}</th>
-        <th>{ts}URL{/ts}</th>
-        <th>{ts}Description{/ts}</th>
-        <th>{ts}Order{/ts}</th>
-        {if $showIsDefault}
+  <div id="optionList">
+    {strip}
+      {* handle enable/disable actions*}
+      {include file="CRM/common/enableDisableApi.tpl"}
+      {include file="CRM/common/crmeditable.tpl"}
+      <table id="options" class="row-highlight">
+        <thead>
+        <tr>
+          <th>{ts}Label{/ts}</th>
+          <th>{ts}URL{/ts}</th>
+          <th>{ts}Description{/ts}</th>
+          <th>{ts}Order{/ts}</th>
+          {if $showIsDefault}
             <th>{ts}Default{/ts}</th>
-        {/if}
-        <th>{ts}Reserved{/ts}</th>
-        <th>{ts}Enabled?{/ts}</th>
-        <th>{ts}Component{/ts}</th>
-        <th></th>
-        <th class="hiddenElement"></th>
-    </tr>
+          {/if}
+          <th>{ts}Reserved{/ts}</th>
+          <th>{ts}Enabled?{/ts}</th>
+          <th>{ts}Component{/ts}</th>
+          <th></th>
+          <th class="hiddenElement"></th>
+        </tr>
         </thead>
-    {foreach from=$rows item=row}
-        <tr id="option_value-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"}{$row.class}{if NOT $row.is_active} crm-report-optionList crm-report-optionList-status_disable disabled{else} crm-report-optionList crm-report-optionList-status_enable{/if}">
-             <td class="crm-report-optionList-label crm-editable" data-field="label">{$row.label}</td>
+        {foreach from=$rows item=row}
+          <tr id="option_value-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"}{$row.class}{if NOT $row.is_active} crm-report-optionList crm-report-optionList-status_disable disabled{else} crm-report-optionList crm-report-optionList-status_enable{/if}">
+            <td class="crm-report-optionList-label crm-editable" data-field="label">{$row.label}</td>
             <td class="crm-report-optionList-value">{$row.value}</td>
             <td class="crm-report-optionList-description">{$row.description}</td>
             <td class="nowrap crm-report-optionList-order">{$row.weight}</td>
             {if $showIsDefault}
-                <td class="crm-report-optionList-default_value">{$row.default_value}</td>
+              <td class="crm-report-optionList-default_value">{$row.default_value}</td>
             {/if}
             <td class="crm-report-optionList-is_reserved">{if $row.is_reserved eq 1}{ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
-          <td class="crm-report-optionList-is_active" id="row_{$row.id}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
-          <td class="crm-report-optionList-component_name">{$row.component_name}</td>
+            <td class="crm-report-optionList-is_active" id="row_{$row.id}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
+            <td class="crm-report-optionList-component_name">{$row.component_name}</td>
             <td class="crm-report-optionList-action">{$row.action}</td>
-        </tr>
-    {/foreach}
+          </tr>
+        {/foreach}
       </table>
-  {/strip}
+    {/strip}
 
-        {if $action ne 1 and $action ne 2}
-            <div class="action-link">
-    <a href="{$newReport}"  id="new"|cat:$GName class="button"><span>&raquo; {ts 1=$GName}Register New %1{/ts}</span></a>
-            </div>
-        {/if}
-    </div>
+    {if $action ne 1 and $action ne 2}
+      <div class="action-link">
+        <a href="{$newReport}"  id="new"|cat:$GName class="button"><span>&raquo; {ts 1=$GName}Register New %1{/ts}</span></a>
+      </div>
+    {/if}
+  </div>
 {else}
-    <div class="messages status no-popup">
-        <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>&nbsp; {ts 1=$newReport}There are no option values entered. You can <a href="%1">add one</a>.{/ts}
-    </div>
+  <div class="messages status no-popup">
+    <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>&nbsp; {ts 1=$newReport}There are no option values entered. You can <a href="%1">add one</a>.{/ts}
+  </div>
 {/if}
index 3952ae88b19faf003c9006ff4141e506f5d7b0c9..014f43ff5f80ce9618cfe29336dac5e03b37c46f 100644 (file)
  +--------------------------------------------------------------------+
 *}
 <div class="crm-block crm-form-block crm-report-templateList-form-block">
-<div class="help">
-{ts}Create reports for your users from any of the report templates listed below. Click on a template title to get started. Click Existing Report(s) to see any reports that have already been created from that template.{/ts}
-</div>
-{strip}
-{if $list}
-{counter start=0 skip=1 print=false}
-    {foreach from=$list item=rows key=report}
-<div class="crm-accordion-wrapper crm-accordion_{$report}-accordion ">
- <div class="crm-accordion-header">
-  {if $report}{if $report EQ 'Contribute'}{ts}Contribution{/ts}{else}{$report}{/if}{else}Contact{/if} Report Templates
- </div><!-- /.crm-accordion-header -->
- <div class="crm-accordion-body">
-  <div id="{$report}" class="boxBlock">
-      <table class="report-layout">
-    {foreach from=$rows item=row}
-        <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}">&raquo; <strong>{$row.title}</strong></a>
-          {if $row.instanceUrl}
-        <div style="font-size:10px;text-align:right;margin-top:3px;">
-            <a href="{$row.instanceUrl}">{ts}Existing Report(s){/ts}</a>
-        </div>
-          {/if}
-      </td>
-      <td style="cursor:help;" class="crm-report-templateList-description">
-          {$row.description}
-      </td>
-        </tr>
-    {/foreach}
-      </table>
+  <div class="help">
+    {ts}Create reports for your users from any of the report templates listed below. Click on a template title to get started. Click Existing Report(s) to see any reports that have already been created from that template.{/ts}
   </div>
- </div><!-- /.crm-accordion-body -->
-</div><!-- /.crm-accordion-wrapper -->
-{/foreach}
-{else}
-    <div class="messages status no-popup">
+  {strip}
+    {if $list}
+      {counter start=0 skip=1 print=false}
+      {foreach from=$list item=rows key=report}
+        <div class="crm-accordion-wrapper crm-accordion_{$report}-accordion ">
+          <div class="crm-accordion-header">
+            {if $report}{if $report EQ 'Contribute'}{ts}Contribution{/ts}{else}{$report}{/if}{else}Contact{/if} Report Templates
+          </div><!-- /.crm-accordion-header -->
+          <div class="crm-accordion-body">
+            <div id="{$report}" class="boxBlock">
+              <table class="report-layout">
+                {foreach from=$rows item=row}
+                  <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}">&raquo; <strong>{$row.title}</strong></a>
+                      {if $row.instanceUrl}
+                        <div style="font-size:10px;text-align:right;margin-top:3px;">
+                          <a href="{$row.instanceUrl}">{ts}Existing Report(s){/ts}</a>
+                        </div>
+                      {/if}
+                    </td>
+                    <td style="cursor:help;" class="crm-report-templateList-description">
+                      {$row.description}
+                    </td>
+                  </tr>
+                {/foreach}
+              </table>
+            </div>
+          </div><!-- /.crm-accordion-body -->
+        </div><!-- /.crm-accordion-wrapper -->
+      {/foreach}
+    {else}
+      <div class="messages status no-popup">
         <div class="icon inform-icon"></div>&nbsp; {ts}There are currently no Report Templates.{/ts}
-    </div>
-{/if}
-{/strip}
+      </div>
+    {/if}
+  {/strip}
 
 </div>