Commit 466913fc authored by Andrew Hunt's avatar Andrew Hunt

CRM-14486 add empowered by CiviCRM as public footer

----------------------------------------
* CRM-14486: Empowered by CiviCRM - footer added to all public pages (with option to disable)
  https://issues.civicrm.org/jira/browse/CRM-14486
parent 46df0219
......@@ -44,6 +44,7 @@ class CRM_Admin_Form_Setting_Miscellaneous extends CRM_Admin_Form_Setting {
'contact_undelete' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
'versionAlert' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
'versionCheck' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
'empoweredBy' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
'maxFileSize' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
'doNotAttachPDFReceipt' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
'secondDegRelPermissions' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
......
......@@ -331,6 +331,13 @@ class CRM_Core_Config_Variables extends CRM_Core_Config_Defaults {
*/
public $versionCheck = TRUE;
/**
* Whether public pages should display "empowered by CiviCRM"
*
* @var boolean
*/
public $empoweredBy = TRUE;
/**
* Array of enabled add-on components (e.g. CiviContribute, CiviMail...)
*
......
......@@ -814,6 +814,20 @@ When enabled, statistics about your CiviCRM installation are reported anonymousl
'description' => 'Prevent the stylesheet \"civicrm.css\" from being loaded.',
'help_text' => '',
),
'empoweredBy' => array(
'group_name' => 'CiviCRM Preferences',
'group' => 'core',
'name' => 'empoweredBy',
'type' => 'Boolean',
'quick_form_type' => 'YesNo',
'default' => 1,
'add' => '4.5',
'title' => 'Display "empowered by CiviCRM"',
'is_domain' => 1,
'is_contact' => 0,
'description' => 'When enabled, "empowered by CiviCRM" is displayed at the bottom of public forms.',
'help_text' => '',
),
'debug_enabled' => array(
'group_name' => 'Developer Preferences',
'group' => 'developer',
......
......@@ -705,6 +705,19 @@ input.crm-form-entityref {
text-align: center;
}
.crm-container #civicrm-footer.crm-public-footer {
vertical-align: middle;
text-align: right;
font-size: 16px;
padding: 0.8em 0;
}
.crm-container img.empowered-by-logo {
vertical-align: baseline;
position: relative;
top: 9px;
}
#crm-record-log {
padding: 0.8em 0.8em 0em 0em;
text-align: right;
......@@ -3349,13 +3362,13 @@ div#crm-container form {
/* For the Conditional-CSS grading rows */
/*
Colour calculations (based off the main row colours)
Colour calculations (based off the main row colours)
Level 1:
dd > c4
ee > d5
Level 2:
dd > d1
ee > e2
dd > c4
ee > d5
Level 2:
dd > d1
ee > e2
*/
.crm-container tr.odd.gradeA td.sorting_1 {
background-color: #c4ffc4;
......
......@@ -698,4 +698,18 @@ When enabled, statistics about your CiviCRM installation are reported anonymousl
'description' => 'Prevent the stylesheet "civicrm.css" from being loaded.',
'help_text' => NULL,
),
'empoweredBy' => array(
'group_name' => 'CiviCRM Preferences',
'group' => 'core',
'name' => 'empoweredBy',
'type' => 'Boolean',
'quick_form_type' => 'YesNo',
'default' => 1,
'add' => '4.5',
'title' => 'Display "empowered by CiviCRM"',
'is_domain' => 1,
'is_contact' => 0,
'description' => 'When enabled, "empowered by CiviCRM" is displayed at the bottom of public forms.',
'help_text' => null,
),
);
......@@ -82,6 +82,11 @@
<td>{$form.versionCheck.html}<br />
<p class="description">{ts}When enabled, statistics about your CiviCRM installation are reported anonymously to the CiviCRM team to assist in prioritizing ongoing development efforts. The following information is gathered: CiviCRM version, versions of PHP, MySQL and framework (Drupal/Joomla/standalone), and default language. Counts (but no actual data) of the following record types are reported: contacts, activities, cases, relationships, contributions, contribution pages, contribution products, contribution widgets, discounts, price sets, profiles, events, participants, tell-a-friend pages, grants, mailings, memberships, membership blocks, pledges, pledge blocks and active payment processor types.{/ts}</p></td>
</tr>
<tr class="crm-miscellaneous-form-block-empoweredBy">
<td class="label">{$form.empoweredBy.label}</td>
<td>{$form.empoweredBy.html}<br />
<p class="description">{ts}When enabled, "empowered by CiviCRM" is displayed at the bottom of public forms.{/ts}</p></td>
</tr>
<tr class="crm-miscellaneous-form-block-max_attachments">
<td class="label">{$form.max_attachments.label}</td>
<td>{$form.max_attachments.html}<br />
......
......@@ -71,8 +71,10 @@
</div>
{crmRegion name='page-footer'}
{if ! $urlIsPublic}
{include file="CRM/common/footer.tpl"}
{if $urlIsPublic}
{include file="CRM/common/publicFooter.tpl"}
{else}
{include file="CRM/common/footer.tpl"}
{/if}
{/crmRegion}
......
......@@ -73,8 +73,10 @@
</div>
{crmRegion name='page-footer'}
{if ! $urlIsPublic}
{include file="CRM/common/footer.tpl"}
{if $urlIsPublic}
{include file="CRM/common/publicFooter.tpl"}
{else}
{include file="CRM/common/footer.tpl"}
{/if}
{/crmRegion}
......
......@@ -94,8 +94,10 @@
</div>
{crmRegion name='page-footer'}
{if ! $urlIsPublic}
{include file="CRM/common/footer.tpl"}
{if $urlIsPublic}
{include file="CRM/common/publicFooter.tpl"}
{else}
{include file="CRM/common/footer.tpl"}
{/if}
{/crmRegion}
......
{*
+--------------------------------------------------------------------+
| CiviCRM version 4.5 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| 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->empoweredBy}
<div class="crm-public-footer" id="civicrm-footer">
empowered by <img class="empowered-by-logo" src="{$config->userFrameworkResourceURL}/i/civi99.png" alt="CiviCRM" />
</div>
{/if}
......@@ -91,8 +91,10 @@
{crmRegion name='page-footer'}
{if ! $urlIsPublic}
{include file="CRM/common/footer.tpl"}
{if $urlIsPublic}
{include file="CRM/common/publicFooter.tpl"}
{else}
{include file="CRM/common/footer.tpl"}
{/if}
{/crmRegion}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment