From 7700ae8305d4a0c444d049e7500c0e6ba4362ff2 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Fri, 24 Oct 2014 16:59:43 -0400 Subject: [PATCH] communications: Copy and tweak the groups template from civi core. * templates/CRM/Memberdashboard/Page/Communications.tpl: Render custom groups template. * templates/CRM/Memberdashboard/Page/Element/Group.tpl: New file. --- .../Memberdashboard/Page/Communications.tpl | 2 +- .../Memberdashboard/Page/Element/Group.tpl | 120 ++++++++++++++++++ 2 files changed, 121 insertions(+), 1 deletion(-) create mode 100644 templates/CRM/Memberdashboard/Page/Element/Group.tpl diff --git a/templates/CRM/Memberdashboard/Page/Communications.tpl b/templates/CRM/Memberdashboard/Page/Communications.tpl index 4ea3255..3f9b22d 100644 --- a/templates/CRM/Memberdashboard/Page/Communications.tpl +++ b/templates/CRM/Memberdashboard/Page/Communications.tpl @@ -23,7 +23,7 @@
{ts}Your Group(s){/ts}
- {include file="CRM/Contact/Page/View/UserDashBoard/GroupContact.tpl"} + {include file="CRM/Memberdashboard/Page/Element/Group.tpl"}
diff --git a/templates/CRM/Memberdashboard/Page/Element/Group.tpl b/templates/CRM/Memberdashboard/Page/Element/Group.tpl new file mode 100644 index 0000000..3166209 --- /dev/null +++ b/templates/CRM/Memberdashboard/Page/Element/Group.tpl @@ -0,0 +1,120 @@ +{* + +--------------------------------------------------------------------+ + | 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 $groupCount eq 0 } +
+
+ {ts}You are not currently subscribed to any Groups.{/ts} +
+ {/if} + + {if $groupIn } +
+
+ {strip} + + + + + + + + {foreach from=$groupIn item=row} + + + + + + + {/foreach} +
{ts}Group{/ts}{ts}Status{/ts}{ts}Date Added{/ts}
{$row.title}{ts 1=$row.in_method}Added (by %1){/ts}{$row.in_date|crmDate}[ {ts}Unsubscribe{/ts} ]
+ {/strip} +
+
+ {/if} + + {if $groupPending } +
+
{ts}Pending Subscriptions{/ts}
+
{ts}Your subscription to these group(s) is pending confirmation.{/ts}
+
+ {strip} + + + + + + {if $edit} + + {/if} + + {foreach from=$groupPending item=row} + + + + + {if $edit} + + {/if} + + {/foreach} +
{ts}Group{/ts}{ts}Status{/ts}{ts}Date Pending{/ts}
{$row.title}{ts 1=$row.pending_method}Pending (by %1){/ts}{$row.pending_date|crmDate}[ {ts}Confirm{/ts} ]
+ {/strip} +
+
+ {/if} + + {if $groupOut } +
+
{ts}Unsubscribed Groups{/ts}
+
{ts}You are no longer subscribed to these group(s). Click Rejoin Group if you want to re-subscribe.{/ts}
+
+ {strip} + + + + + + + + + {foreach from=$groupOut item=row} + + + + + + + + {/foreach} +
{ts}Group{/ts}{ts}Status{/ts}{ts}Date Added{/ts}{ts}Date Removed{/ts}
{$row.title}{ts 1=$row.out_method}Removed (by %1){/ts}{$row.date_added|crmDate}{$row.out_date|crmDate}[ {ts}Rejoin Group{/ts} ]
+ {/strip} +
+
+ {/if} +
+
-- 2.25.1