Merge pull request #17981 from eileenmcnaughton/merge_form
[civicrm-core.git] / templates / CRM / Contact / Page / View / UserDashBoard / GroupContact.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | Copyright CiviCRM LLC. All rights reserved. |
4 | |
5 | This work is published under the GNU AGPLv3 license with some |
6 | permitted exceptions and without any warranty. For full license |
7 | and copyright information, see https://civicrm.org/licensing |
8 +--------------------------------------------------------------------+
9 *}
10 {if $userChecksum}
11 {assign var=edit value='0'}
12 {/if}
13 {crmRegion name="crm-contact-userdashboard-groupcontact-pre"}
14 {/crmRegion}
15 <div id="groupContact">
16 <div class="view-content">
17 {if $groupCount eq 0 }
18 <div class="messages status no-popup">
19 {icon icon="fa-info-circle"}{/icon}
20 {ts}You are not currently subscribed to any Groups.{/ts}
21 </div>
22 {/if}
23
24 {if $groupIn }
25 <div class="form-item">
26 <div>
27 {strip}
28 <table class="selector">
29 <tr class="columnheader">
30 <th>{ts}Group{/ts}</th>
31 <th>{ts}Status{/ts}</th>
32 <th>{ts}Date Added{/ts}</th>
33 {if $edit}
34 <th></th>
35 {/if}
36 </tr>
37 {foreach from=$groupIn item=row}
38 <tr class="{cycle values="odd-row,even-row"}">
39 <td><strong>{$row.title}</strong></td>
40 <td>{ts 1=$row.in_method}Added (by %1){/ts}</td>
41 <td>{$row.in_date|crmDate}</td>
42 {if $edit}
43 <td><a href="{crmURL p='civicrm/user/group' q="gcid=`$row.id`&action=delete&st=o"}" onclick ="return confirm('{ts 1=$row.title}Are you sure you want to unsubscribe from %1?{/ts}');">[ {ts}Unsubscribe{/ts} ]</a></td>
44 {/if}
45 </tr>
46 {/foreach}
47 </table>
48 {/strip}
49 </div>
50 </div>
51 {/if}
52
53 {if $edit}
54 {* Include 'Join a Group' form *}
55 {include file="CRM/Contact/Form/GroupContact.tpl"}
56 {/if}
57
58 {if $groupPending }
59 <div class="form-item">
60 <div class="label status-pending">{ts}Pending Subscriptions{/ts}</div>
61 <div class="description">{ts}Your subscription to these group(s) is pending confirmation.{/ts}</div>
62 <div>
63 {strip}
64 <table class="selector">
65 <tr class="columnheader">
66 <th>{ts}Group{/ts}</th>
67 <th>{ts}Status{/ts}</th>
68 <th>{ts}Date Pending{/ts}</th>
69 {if $edit}
70 <th></th>
71 {/if}
72 </tr>
73 {foreach from=$groupPending item=row}
74 <tr class="{cycle values="odd-row,even-row"}">
75 <td><strong>{$row.title}</strong></td>
76 <td>{ts 1=$row.pending_method}Pending (by %1){/ts}</td>
77 <td>{$row.pending_date|crmDate}</td>
78 {if $edit}
79 <td><a href="{crmURL p='civicrm/user/group' q="gcid=`$row.id`&action=delete&st=i"}" onclick ="return confirm('{ts 1=$row.title}Are you sure you want to confirm subscription for %1?{/ts}');">[ {ts}Confirm{/ts} ]</a></td>
80 {/if}
81 </tr>
82 {/foreach}
83 </table>
84 {/strip}
85 </div>
86 </div>
87 {/if}
88
89 {if $groupOut }
90 <div class="form-item">
91 <div class="label status-removed">{ts}Unsubscribed Groups{/ts}</div>
92 <div class="description">{ts}You are no longer subscribed to these group(s). Click Rejoin Group if you want to re-subscribe.{/ts}</div>
93 <div>
94 {strip}
95 <table class="selector">
96 <tr class="columnheader">
97 <th>{ts}Group{/ts}</th>
98 <th>{ts}Status{/ts}</th>
99 <th>{ts}Date Added{/ts}</th>
100 <th>{ts}Date Removed{/ts}</th>
101 {if $edit}
102 <th></th>
103 {/if}
104 </tr>
105 {foreach from=$groupOut item=row}
106 <tr class="{cycle values="odd-row,even-row"}">
107 <td><strong>{$row.title}</strong></td>
108 <td class="status-removed">{ts 1=$row.out_method}Removed (by %1){/ts}</td>
109 <td>{$row.date_added|crmDate}</td>
110 <td>{$row.out_date|crmDate}</td>
111 {if $edit}
112 <td><a href="{crmURL p='civicrm/user/group' q="gcid=`$row.id`&action=delete&st=i"}" onclick ="return confirm('{ts 1=$row.title}Are you sure you want to add back into %1?{/ts}');">[ {ts}Rejoin Group{/ts} ]</a></td>
113 {/if}
114 </tr>
115 {/foreach}
116 </table>
117 {/strip}
118 </div>
119 </div>
120 {/if}
121 </div>
122 </div>
123 {crmRegion name="crm-contact-userdashboard-groupcontact-post"}
124 {/crmRegion}