From 8c902e9e0e4563dbc94a606f0514ceda1a2b562f Mon Sep 17 00:00:00 2001 From: "deb.monish" Date: Fri, 6 Apr 2018 18:55:01 +0530 Subject: [PATCH] (accessibility/misc-core-fixes/issues/3) Remove CMS specific print header templates that share same code --- templates/CRM/common/CMSPrint.tpl | 93 ++++++++++++++++++++++++++++++ templates/CRM/common/backdrop.tpl | 54 +---------------- templates/CRM/common/drupal.tpl | 54 +---------------- templates/CRM/common/drupal6.tpl | 55 +----------------- templates/CRM/common/drupal8.tpl | 54 +---------------- templates/CRM/common/unittests.tpl | 54 +---------------- templates/CRM/common/wordpress.tpl | 73 +---------------------- 7 files changed, 99 insertions(+), 338 deletions(-) create mode 100644 templates/CRM/common/CMSPrint.tpl diff --git a/templates/CRM/common/CMSPrint.tpl b/templates/CRM/common/CMSPrint.tpl new file mode 100644 index 0000000000..2c5a879419 --- /dev/null +++ b/templates/CRM/common/CMSPrint.tpl @@ -0,0 +1,93 @@ +{* + +--------------------------------------------------------------------+ + | CiviCRM version 5 | + +--------------------------------------------------------------------+ + | Copyright CiviCRM LLC (c) 2004-2018 | + +--------------------------------------------------------------------+ + | This file is a part of CiviCRM. | + | | + | CiviCRM is free software; you can copy, modify, and distribute it | + | under the terms of the GNU Affero General Public License | + | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | + | | + | CiviCRM is distributed in the hope that it will be useful, but | + | WITHOUT ANY WARRANTY; without even the implied warranty of | + | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | + | See the GNU Affero General Public License for more details. | + | | + | You should have received a copy of the GNU Affero General Public | + | License and the CiviCRM Licensing Exception along | + | with this program; if not, contact CiviCRM LLC | + | at info[AT]civicrm[DOT]org. If you have questions about the | + | GNU Affero General Public License or the licensing of CiviCRM, | + | see the CiviCRM license FAQ at http://civicrm.org/licensing | + +--------------------------------------------------------------------+ +*} +{if $config->debug} +{include file="CRM/common/debug.tpl"} +{/if} + +
+ +{crmNavigationMenu is_default=1} + +{if $breadcrumb} + +{/if} + +{if isset($browserPrint) and $browserPrint} +{* Javascript window.print link. Used for public pages where we can't do printer-friendly view. *} +
+ + + +
+{else} +{* Printer friendly link/icon. *} +
+ + + +
+{/if} + +{if $pageTitle} +
+

{if $isDeleted}{/if}{$pageTitle}{if $isDeleted}{/if}

+
+{/if} + +{crmRegion name='page-header'} +{/crmRegion} +
+ +{if isset($localTasks) and $localTasks} + {include file="CRM/common/localNav.tpl"} +{/if} +
+ {include file="CRM/common/status.tpl"} + {crmRegion name='page-body'} + {if isset($isForm) and $isForm and isset($formTpl)} + {include file="CRM/Form/$formTpl.tpl"} + {else} + {include file=$tplFile} + {/if} + {/crmRegion} +
+ +{crmRegion name='page-footer'} +{if $urlIsPublic} + {include file="CRM/common/publicFooter.tpl"} +{else} + {include file="CRM/common/footer.tpl"} +{/if} +{/crmRegion} + +
{* end crm-container div *} diff --git a/templates/CRM/common/backdrop.tpl b/templates/CRM/common/backdrop.tpl index ecb2906e0f..9c9369d1bd 100644 --- a/templates/CRM/common/backdrop.tpl +++ b/templates/CRM/common/backdrop.tpl @@ -23,56 +23,4 @@ | see the CiviCRM license FAQ at http://civicrm.org/licensing | +--------------------------------------------------------------------+ *} -{if $config->debug} -{include file="CRM/common/debug.tpl"} -{/if} - -
- - -{crmNavigationMenu is_default=1} - -{if isset($browserPrint) and $browserPrint} -{* Javascript window.print link. Used for public pages where we can't do printer-friendly view. *} -
- - - -
-{else} -{* Printer friendly link/icon. *} -
- - - -
-{/if} - -{crmRegion name='page-header'} -{/crmRegion} -
- -{if isset($localTasks) and $localTasks} - {include file="CRM/common/localNav.tpl"} -{/if} -
- {include file="CRM/common/status.tpl"} - {crmRegion name='page-body'} - {if isset($isForm) and $isForm and isset($formTpl)} - {include file="CRM/Form/$formTpl.tpl"} - {else} - {include file=$tplFile} - {/if} - {/crmRegion} -
- -{crmRegion name='page-footer'} -{if $urlIsPublic} - {include file="CRM/common/publicFooter.tpl"} -{else} - {include file="CRM/common/footer.tpl"} -{/if} -{/crmRegion} - - -
{* end crm-container div *} +{include file="CRM/common/CMSPrint.tpl"} diff --git a/templates/CRM/common/drupal.tpl b/templates/CRM/common/drupal.tpl index ecb2906e0f..9c9369d1bd 100644 --- a/templates/CRM/common/drupal.tpl +++ b/templates/CRM/common/drupal.tpl @@ -23,56 +23,4 @@ | see the CiviCRM license FAQ at http://civicrm.org/licensing | +--------------------------------------------------------------------+ *} -{if $config->debug} -{include file="CRM/common/debug.tpl"} -{/if} - -
- - -{crmNavigationMenu is_default=1} - -{if isset($browserPrint) and $browserPrint} -{* Javascript window.print link. Used for public pages where we can't do printer-friendly view. *} -
- - - -
-{else} -{* Printer friendly link/icon. *} -
- - - -
-{/if} - -{crmRegion name='page-header'} -{/crmRegion} -
- -{if isset($localTasks) and $localTasks} - {include file="CRM/common/localNav.tpl"} -{/if} -
- {include file="CRM/common/status.tpl"} - {crmRegion name='page-body'} - {if isset($isForm) and $isForm and isset($formTpl)} - {include file="CRM/Form/$formTpl.tpl"} - {else} - {include file=$tplFile} - {/if} - {/crmRegion} -
- -{crmRegion name='page-footer'} -{if $urlIsPublic} - {include file="CRM/common/publicFooter.tpl"} -{else} - {include file="CRM/common/footer.tpl"} -{/if} -{/crmRegion} - - -
{* end crm-container div *} +{include file="CRM/common/CMSPrint.tpl"} diff --git a/templates/CRM/common/drupal6.tpl b/templates/CRM/common/drupal6.tpl index 2a424882e5..9c9369d1bd 100644 --- a/templates/CRM/common/drupal6.tpl +++ b/templates/CRM/common/drupal6.tpl @@ -23,57 +23,4 @@ | see the CiviCRM license FAQ at http://civicrm.org/licensing | +--------------------------------------------------------------------+ *} -{if $config->debug} -{include file="CRM/common/debug.tpl"} -{/if} - -
- -{crmNavigationMenu is_default=1} - -{if isset($browserPrint) and $browserPrint} -{* Javascript window.print link. Used for public pages where we can't do printer-friendly view. *} -
- - - -
-{else} -{* Printer friendly link/icon. *} -
- - - -
-{/if} - -{*{include file="CRM/common/langSwitch.tpl"}*} - -{crmRegion name='page-header'} -{/crmRegion} -
- -{if isset($localTasks) and $localTasks} - {include file="CRM/common/localNav.tpl"} -{/if} - -
- {include file="CRM/common/status.tpl"} - {crmRegion name='page-body'} - {if isset($isForm) and $isForm and isset($formTpl)} - {include file="CRM/Form/$formTpl.tpl"} - {else} - {include file=$tplFile} - {/if} - {/crmRegion} -
- -{crmRegion name='page-footer'} -{if $urlIsPublic} - {include file="CRM/common/publicFooter.tpl"} -{else} - {include file="CRM/common/footer.tpl"} -{/if} -{/crmRegion} - -
{* end crm-container div *} +{include file="CRM/common/CMSPrint.tpl"} diff --git a/templates/CRM/common/drupal8.tpl b/templates/CRM/common/drupal8.tpl index ecb2906e0f..9c9369d1bd 100644 --- a/templates/CRM/common/drupal8.tpl +++ b/templates/CRM/common/drupal8.tpl @@ -23,56 +23,4 @@ | see the CiviCRM license FAQ at http://civicrm.org/licensing | +--------------------------------------------------------------------+ *} -{if $config->debug} -{include file="CRM/common/debug.tpl"} -{/if} - -
- - -{crmNavigationMenu is_default=1} - -{if isset($browserPrint) and $browserPrint} -{* Javascript window.print link. Used for public pages where we can't do printer-friendly view. *} -
- - - -
-{else} -{* Printer friendly link/icon. *} -
- - - -
-{/if} - -{crmRegion name='page-header'} -{/crmRegion} -
- -{if isset($localTasks) and $localTasks} - {include file="CRM/common/localNav.tpl"} -{/if} -
- {include file="CRM/common/status.tpl"} - {crmRegion name='page-body'} - {if isset($isForm) and $isForm and isset($formTpl)} - {include file="CRM/Form/$formTpl.tpl"} - {else} - {include file=$tplFile} - {/if} - {/crmRegion} -
- -{crmRegion name='page-footer'} -{if $urlIsPublic} - {include file="CRM/common/publicFooter.tpl"} -{else} - {include file="CRM/common/footer.tpl"} -{/if} -{/crmRegion} - - -
{* end crm-container div *} +{include file="CRM/common/CMSPrint.tpl"} diff --git a/templates/CRM/common/unittests.tpl b/templates/CRM/common/unittests.tpl index ecb2906e0f..9c9369d1bd 100644 --- a/templates/CRM/common/unittests.tpl +++ b/templates/CRM/common/unittests.tpl @@ -23,56 +23,4 @@ | see the CiviCRM license FAQ at http://civicrm.org/licensing | +--------------------------------------------------------------------+ *} -{if $config->debug} -{include file="CRM/common/debug.tpl"} -{/if} - -
- - -{crmNavigationMenu is_default=1} - -{if isset($browserPrint) and $browserPrint} -{* Javascript window.print link. Used for public pages where we can't do printer-friendly view. *} -
- - - -
-{else} -{* Printer friendly link/icon. *} -
- - - -
-{/if} - -{crmRegion name='page-header'} -{/crmRegion} -
- -{if isset($localTasks) and $localTasks} - {include file="CRM/common/localNav.tpl"} -{/if} -
- {include file="CRM/common/status.tpl"} - {crmRegion name='page-body'} - {if isset($isForm) and $isForm and isset($formTpl)} - {include file="CRM/Form/$formTpl.tpl"} - {else} - {include file=$tplFile} - {/if} - {/crmRegion} -
- -{crmRegion name='page-footer'} -{if $urlIsPublic} - {include file="CRM/common/publicFooter.tpl"} -{else} - {include file="CRM/common/footer.tpl"} -{/if} -{/crmRegion} - - -
{* end crm-container div *} +{include file="CRM/common/CMSPrint.tpl"} diff --git a/templates/CRM/common/wordpress.tpl b/templates/CRM/common/wordpress.tpl index c63582df97..9c9369d1bd 100644 --- a/templates/CRM/common/wordpress.tpl +++ b/templates/CRM/common/wordpress.tpl @@ -23,75 +23,4 @@ | see the CiviCRM license FAQ at http://civicrm.org/licensing | +--------------------------------------------------------------------+ *} -{if $config->debug} -{include file="CRM/common/debug.tpl"} -{/if} - -
- -{crmNavigationMenu is_default=1} - -{if $breadcrumb} - -{/if} - -{if isset($browserPrint) and $browserPrint} -{* Javascript window.print link. Used for public pages where we can't do printer-friendly view. *} -
- - - -
-{else} -{* Printer friendly link/icon. *} -
- - - -
-{/if} - -{if $pageTitle} -
-

{if $isDeleted}{/if}{$pageTitle}{if $isDeleted}{/if}

-
-{/if} - -{crmRegion name='page-header'} -{/crmRegion} -{*{include file="CRM/common/langSwitch.tpl"}*} - -
- -{if isset($localTasks) and $localTasks} - {include file="CRM/common/localNav.tpl"} -{/if} - -
- {include file="CRM/common/status.tpl"} - {crmRegion name='page-body'} - {if isset($isForm) and $isForm and isset($formTpl)} - {include file="CRM/Form/$formTpl.tpl"} - {else} - {include file=$tplFile} - {/if} - {/crmRegion} -
- - -{crmRegion name='page-footer'} -{if $urlIsPublic} - {include file="CRM/common/publicFooter.tpl"} -{else} - {include file="CRM/common/footer.tpl"} -{/if} -{/crmRegion} - -
{* end crm-container div *} +{include file="CRM/common/CMSPrint.tpl"} -- 2.25.1