From a01b001fe40a3890e1d9f3bfe65720c3c558b333 Mon Sep 17 00:00:00 2001 From: poliphilochu Date: Tue, 30 Jul 2024 23:26:05 +0800 Subject: [PATCH] refs #41238. Correct raised amount display on PCP page --- css/civicrm.css | 12 ++++++++---- templates/CRM/Contribute/Page/PCPInfo.tpl | 9 +++++---- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/css/civicrm.css b/css/civicrm.css index 5c41431dc..27763f4eb 100644 --- a/css/civicrm.css +++ b/css/civicrm.css @@ -2040,7 +2040,8 @@ table.campaign td, text-align: center; font-size: 1rem; } -.crm-container .pcp-amount-goal-top { +.crm-container .pcp-amount-goal-top, +.crm-container .pcp-amount-raised-top { position: relative; margin: 50px 0 0 0; padding: 0; @@ -2048,13 +2049,16 @@ table.campaign td, font-weight: bold; font-size: 20px; } -.crm-container .pcp-amount-goal-top .counter { +.crm-container .pcp-amount-goal-top .counter, +.crm-container .pcp-amount-raised-top .counter { color: var(--color-crm-special-contribute-primary); } -.crm-container .pcp-amount-goal-top + .pcp-donate { +.crm-container .pcp-amount-goal-top + .pcp-donate, +.crm-container .pcp-amount-raised-top + .pcp-donate { margin: 20px 0 0 0; } -.crm-container .pcp-amount-goal-top + .pcp-donate + .pcp-donate-desc { +.crm-container .pcp-amount-goal-top + .pcp-donate + .pcp-donate-desc, +.crm-container .pcp-amount-raised-top + .pcp-donate + .pcp-donate-desc { margin-bottom: 30px; } .crm-container .pcp-campaign { diff --git a/templates/CRM/Contribute/Page/PCPInfo.tpl b/templates/CRM/Contribute/Page/PCPInfo.tpl index f631ca8e6..f1c211a71 100644 --- a/templates/CRM/Contribute/Page/PCPInfo.tpl +++ b/templates/CRM/Contribute/Page/PCPInfo.tpl @@ -80,11 +80,12 @@ {if $progress.display == "2"} {* Display amount raised only *} {if $progress.type} -
+
{if $progress.type|strstr:"amount"} - {$progress.label} {$progress.goal|crmMoney} - {elseif $progress.type == "recurring"} - {$progress.label} {$progress.goal}{ts}People{/ts} + {capture assign=amount_achieved}{$progress.current|crmMoney}{/capture} + {ts 1=$amount_achieved}Raised %1{/ts} + {else} + {$progress.current} {ts}People{/ts} {/if}
{/if}