template cleanip
authorKurund Jalmi <kurund@civicrm.org>
Sun, 19 May 2013 02:33:03 +0000 (22:33 -0400)
committerKurund Jalmi <kurund@civicrm.org>
Tue, 21 May 2013 00:52:21 +0000 (20:52 -0400)
templates/CRM/Contact/Page/View/GroupContact.tpl

index cee0b16ce9ea6158fac3d5297583d9f61b8598fe..b33ed1f57b0d79c40c27c3fdfb2b984f0f9ca282 100644 (file)
  +--------------------------------------------------------------------+
 *}
 <div class="view-content">
-{if $groupCount eq 0 AND ! $groupSmart AND ! $groupParent}
-  <div class="messages status no-popup">
-    <div class="icon inform-icon"></div>&nbsp;{ts}This contact does not currently belong to any groups.{/ts}
-  </div>
- {/if}
+  {if $groupCount eq 0 AND ! $groupSmart AND ! $groupParent}
+    <div class="messages status no-popup">
+      <div class="icon inform-icon"></div>
+      &nbsp;{ts}This contact does not currently belong to any groups.{/ts}
+    </div>
+  {/if}
 
-{include file="CRM/common/jsortable.tpl"}
+  {include file="CRM/common/jsortable.tpl"}
 
-{* Include 'add to new group' form if session has edit contact permissions *}
-{if $permission EQ 'edit'}
-  {include file="CRM/Contact/Form/GroupContact.tpl"}
-{/if}
+  {* Include 'add to new group' form if session has edit contact permissions *}
+  {if $permission EQ 'edit'}
+    {include file="CRM/Contact/Form/GroupContact.tpl"}
+  {/if}
 
-{if $groupIn }
-  <div class="ht-one"></div>
-  <h3>{ts}Regular Groups{/ts}</h3>
-  <div class="description">{ts 1=$displayName}%1 has joined or been added to these group(s).{/ts}</div>
-  {strip}
-    <table id="current_group" class="display">
-    <thead>
+  {if $groupIn }
+    <div class="ht-one"></div>
+    <h3>{ts}Regular Groups{/ts}</h3>
+    <div class="description">{ts 1=$displayName}%1 has joined or been added to these group(s).{/ts}</div>
+    {strip}
+      <table id="current_group" class="display">
+        <thead>
         <tr>
-    <th>{ts}Group{/ts}</th>
-    <th>{ts}Status{/ts}</th>
-    <th>{ts}Date Added{/ts}</th>
-    <th></th>
-  </tr>
-    </thead>
-         {foreach from=$groupIn item=row}
-        <tr id="grp_{$row.id}" class="{cycle values="odd-row,even-row"}">
-          <td class="bold"><a href="{crmURL p='civicrm/group/search' q="reset=1&force=1&context=smog&gid=`$row.group_id`"}">{$row.title}</a></td>
-        <td>{ts 1=$row.in_method}Added (by %1){/ts}</td>
-            <td>{$row.in_date|crmDate}</td>
-          <td>{if $permission EQ 'edit'}<a href="{crmURL p='civicrm/contact/view/group' q="gcid=`$row.id`&action=delete&st=o"}" onclick ="return confirm('{ts 1=$displayName 2=$row.title}Are you sure you want to remove %1 from %2?{/ts}');" title="{ts}Remove contact from this group (status in this group will be changed to 'Removed').{/ts}">[ {ts}Remove{/ts} ]</a>{/if}
-              {if $permission EQ 'edit'}<a href="{crmURL p='civicrm/contact/view/group' q="gcid=`$row.id`&action=delete&st=d"}" onclick ="return confirm('{ts 1=$displayName 2=$row.title}Are you sure you want to delete %1 from %2?{/ts}');" title="{ts}Remove contact from this group AND delete their group status record.{/ts}">[ {ts}Delete{/ts} ]</a>{/if}
-          </td>
+          <th>{ts}Group{/ts}</th>
+          <th>{ts}Status{/ts}</th>
+          <th>{ts}Date Added{/ts}</th>
+          <th></th>
         </tr>
-       {/foreach}
-        </table>
-  {/strip}
-{/if}
+        </thead>
+        {foreach from=$groupIn item=row}
+          <tr id="grp_{$row.id}" class="{cycle values="odd-row,even-row"}">
+            <td class="bold">
+              <a href="{crmURL p='civicrm/group/search' q="reset=1&force=1&context=smog&gid=`$row.group_id`"}">
+                {$row.title}
+              </a>
+            </td>
+            <td>{ts 1=$row.in_method}Added (by %1){/ts}</td>
+            <td>{$row.in_date|crmDate}</td>
+            <td>
+              {if $permission EQ 'edit'}
+              <a href="{crmURL p='civicrm/contact/view/group' q="gcid=`$row.id`&action=delete&st=o"}"
+                onclick="return confirm('{ts 1=$displayName 2=$row.title}Are you sure you want to remove %1 from %2?{/ts}');"
+                title="{ts}Remove contact from this group (status in this group will be changed to 'Removed').{/ts}">
+                [ {ts}Remove{/ts} ]</a>
+              {/if}
+              {if $permission EQ 'edit'}
+                <a href="{crmURL p='civicrm/contact/view/group' q="gcid=`$row.id`&action=delete&st=d"}"
+                onclick="return confirm('{ts 1=$displayName 2=$row.title}Are you sure you want to delete %1 from %2?{/ts}');"
+                title="{ts}Remove contact from this group AND delete their group status record.{/ts}">[ {ts}Delete{/ts}
+                ]</a>
+              {/if}
+            </td>
+          </tr>
+        {/foreach}
+      </table>
+    {/strip}
+  {/if}
 
-{if $groupSmart}
-  <div class="ht-one"></div>
-  <h3>{ts}Smart Groups{/ts}</h3>
-  <div class="description">{ts 1=$displayName}%1 is currently included in these Smart group(s) (e.g. saved searches).{/ts}</div>
-  {strip}
-    <table id="smart_group" class="display">
-    <thead>
-    <tr>
-    <th>{ts}Group{/ts}</th>
-    <th>{ts}Description{/ts}</th>
-    </tr>
-    </thead>
-   {foreach from=$groupSmart item=row}
-        <tr id="grp_{$row.id}" class="{cycle values="odd-row,even-row"}">
-          <td class="bold"><a href="{crmURL p='civicrm/group/search' q="reset=1&force=1&context=smog&gid=`$row.id`"}">{$row.title}</a></td>
-          <td>{$row.description}</td>
+  {if $groupSmart}
+    <div class="ht-one"></div>
+    <h3>{ts}Smart Groups{/ts}</h3>
+    <div class="description">
+      {ts 1=$displayName}%1 is currently included in these Smart group(s) (e.g. saved searches).{/ts}
+    </div>
+    {strip}
+      <table id="smart_group" class="display">
+        <thead>
+        <tr>
+          <th>{ts}Group{/ts}</th>
+          <th>{ts}Description{/ts}</th>
         </tr>
-       {/foreach}
-    </table>
-  {/strip}
-{/if}
+        </thead>
+        {foreach from=$groupSmart item=row}
+          <tr id="grp_{$row.id}" class="{cycle values="odd-row,even-row"}">
+            <td class="bold">
+              <a href="{crmURL p='civicrm/group/search' q="reset=1&force=1&context=smog&gid=`$row.id`"}">
+                {$row.title}
+              </a>
+            </td>
+            <td>{$row.description}</td>
+          </tr>
+        {/foreach}
+      </table>
+    {/strip}
+  {/if}
 
-{if $groupParent}
-  <div class="ht-one"></div>
-  <h3>{ts}Parent Groups{/ts}</h3>
-  <div class="description">{ts 1=$displayName}%1 is included in these Parent group(s) based on belonging to group(s) which are their children.{/ts}</div>
-  {strip}
-    <table id="parent_group" class="display">
-    <thead>
-    <tr>
-    <th>{ts}Group{/ts}</th>
-    </tr>
-    </thead>
-   {foreach from=$groupParent item=row}
-        <tr id="grp_{$row.id}" class="{cycle values="odd-row,even-row"}">
-          <td class="bold"><a href="{crmURL p='civicrm/group/search' q="reset=1&force=1&context=smog&gid=`$row.id`"}">{$row.title}</a></td>
+  {if $groupParent}
+    <div class="ht-one"></div>
+    <h3>{ts}Parent Groups{/ts}</h3>
+    <div class="description">
+      {ts 1=$displayName}%1 is included in these Parent group(s) based on belonging to group(s) which are their
+        children.{/ts}
+    </div>
+    {strip}
+      <table id="parent_group" class="display">
+        <thead>
+        <tr>
+          <th>{ts}Group{/ts}</th>
         </tr>
-       {/foreach}
-    </table>
-  {/strip}
-{/if}
+        </thead>
+        {foreach from=$groupParent item=row}
+          <tr id="grp_{$row.id}" class="{cycle values="odd-row,even-row"}">
+            <td class="bold">
+              <a href="{crmURL p='civicrm/group/search' q="reset=1&force=1&context=smog&gid=`$row.id`"}">
+                {$row.title}
+              </a>
+            </td>
+          </tr>
+        {/foreach}
+      </table>
+    {/strip}
+  {/if}
 
-{if $groupPending }
-  <div class="ht-one"></div>
-  <h3 class="status-pending">{ts}Pending{/ts}</h3>
-  <div class="description">{ts}Joining these group(s) is pending confirmation by this contact.{/ts}</div>
-  {strip}
-    <table id="pending_group" class="display">
-    <thead>
-  <tr>
-    <th>{ts}Group{/ts}</th>
-    <th>{ts}Status{/ts}</th>
-    <th>{ts}Date Pending{/ts}</th>
-    <th></th>
-  </tr>
-    </thead>
-     {foreach from=$groupPending item=row}
-        <tr class="{cycle values="odd-row,even-row"}">
-            <td class="bold"><a href="{crmURL p='civicrm/group/search' q="reset=1&force=1&context=smog&gid=`$row.group_id`"}">{$row.title}</a></td>
+  {if $groupPending }
+    <div class="ht-one"></div>
+    <h3 class="status-pending">{ts}Pending{/ts}</h3>
+    <div class="description">{ts}Joining these group(s) is pending confirmation by this contact.{/ts}</div>
+    {strip}
+      <table id="pending_group" class="display">
+        <thead>
+        <tr>
+          <th>{ts}Group{/ts}</th>
+          <th>{ts}Status{/ts}</th>
+          <th>{ts}Date Pending{/ts}</th>
+          <th></th>
+        </tr>
+        </thead>
+        {foreach from=$groupPending item=row}
+          <tr class="{cycle values="odd-row,even-row"}">
+            <td class="bold">
+              <a href="{crmURL p='civicrm/group/search' q="reset=1&force=1&context=smog&gid=`$row.group_id`"}">
+                {$row.title}
+              </a>
+            </td>
             <td>{ts 1=$row.pending_method}Pending (by %1){/ts}</td>
             <td>{$row.pending_date|crmDate}</td>
-            <td>{if $permission EQ 'edit'}<a href="{crmURL p='civicrm/contact/view/group' q="gcid=`$row.id`&action=delete&st=o"}" onclick ="return confirm('{ts 1=$displayName 2=$row.title}Are you sure you want to remove %1 from %2?{/ts}');"  title="{ts}Remove contact from this group (status in this group will be changed to 'Removed').{/ts}">[ {ts}Remove{/ts} ]</a>{/if}
-                {if $permission EQ 'edit'}<a href="{crmURL p='civicrm/contact/view/group' q="gcid=`$row.id`&action=delete&st=d"}" onclick ="return confirm('{ts 1=$displayName 2=$row.title}Are you sure you want to delete %1 from %2?{/ts}');"  title="{ts}Delete the group status record (this group will no longer be listed under Pending Groups).{/ts}">[ {ts}Delete{/ts} ]</a>{/if}
+            <td>
+              {if $permission EQ 'edit'}
+              <a href="{crmURL p='civicrm/contact/view/group' q="gcid=`$row.id`&action=delete&st=o"}"
+                onclick="return confirm('{ts 1=$displayName 2=$row.title}Are you sure you want to remove %1 from %2?{/ts}');"
+                title="{ts}Remove contact from this group (status in this group will be changed to 'Removed').{/ts}">
+                [ {ts}Remove{/ts} ]</a>
+              {/if}
+              {if $permission EQ 'edit'}
+              <a href="{crmURL p='civicrm/contact/view/group' q="gcid=`$row.id`&action=delete&st=d"}"
+                onclick="return confirm('{ts 1=$displayName 2=$row.title}Are you sure you want to delete %1 from %2?{/ts}');"
+                title="{ts}Delete the group status record (this group will no longer be listed under Pending Groups).{/ts}">
+                [ {ts}Delete{/ts} ]</a>
+              {/if}
             </td>
-      </tr>
-       {/foreach}
-  </table>
-  {/strip}
-{/if}
+          </tr>
+        {/foreach}
+      </table>
+    {/strip}
+  {/if}
 
-{if $groupOut }
-  <div class="ht-one"></div>
-  <h3 class="status-removed">{ts}Past Groups{/ts}</h3>
+  {if $groupOut}
+    <div class="ht-one"></div>
+    <h3 class="status-removed">{ts}Past Groups{/ts}</h3>
     <div class="description">{ts 1=$displayName}%1 is no longer part of these group(s).{/ts}</div>
     {strip}
-    <table id="past_group" class="display">
-    <thead>
-  <tr>
-    <th>{ts}Group{/ts}</th>
-    <th>{ts}Status{/ts}</th>
-        <th>{ts}Date Added{/ts}</th>
-    <th>{ts}Date Removed{/ts}</th>
-    <th></th>
-  </tr>
-    </thead>
-    {foreach from=$groupOut item=row}
-        <tr class="{cycle values="odd-row,even-row"}">
-            <td class="bold"><a href="{crmURL p='civicrm/group/search' q="reset=1&force=1&context=smog&gid=`$row.group_id`"}">{$row.title}</a></td>
-        <td class="status-removed">{ts 1=$row.out_method}Removed (by %1){/ts}</td>
+      <table id="past_group" class="display">
+        <thead>
+        <tr>
+          <th>{ts}Group{/ts}</th>
+          <th>{ts}Status{/ts}</th>
+          <th>{ts}Date Added{/ts}</th>
+          <th>{ts}Date Removed{/ts}</th>
+          <th></th>
+        </tr>
+        </thead>
+        {foreach from=$groupOut item=row}
+          <tr class="{cycle values="odd-row,even-row"}">
+            <td class="bold">
+              <a href="{crmURL p='civicrm/group/search' q="reset=1&force=1&context=smog&gid=`$row.group_id`"}">
+                {$row.title}
+              </a>
+            </td>
+            <td class="status-removed">{ts 1=$row.out_method}Removed (by %1){/ts}</td>
             <td>{$row.date_added|crmDate}</td>
             <td>{$row.out_date|crmDate}</td>
-          <td>{if $permission EQ 'edit'}<a href="{crmURL p='civicrm/contact/view/group' q="gcid=`$row.id`&action=delete&st=i"}" onclick ="return confirm('{ts 1=$displayName 2=$row.title}Are you sure you want to add %1 back into %2?{/ts}');">[ {ts}Rejoin Group{/ts} ]</a>{/if}
-              {if $permission EQ 'edit'}<a href="{crmURL p='civicrm/contact/view/group' q="gcid=`$row.id`&action=delete&st=d"}" onclick ="return confirm('{ts 1=$displayName 2=$row.title}Are you sure you want to delete %1 from %2?{/ts}');" title="{ts}Delete the group status record (this group will no longer be listed under Past Groups).{/ts}">[ {ts}Delete{/ts} ]</a>{/if}
-          </td>
-      </tr>
-    {/foreach}
-     </table>
-  {/strip}
+            <td>{if $permission EQ 'edit'}
+              <a href="{crmURL p='civicrm/contact/view/group' q="gcid=`$row.id`&action=delete&st=i"}"
+                onclick="return confirm('{ts 1=$displayName 2=$row.title}Are you sure you want to add %1 back into %2?{/ts}');">
+                [ {ts}Rejoin Group{/ts} ]</a>{/if}
+              {if $permission EQ 'edit'}
+              <a href="{crmURL p='civicrm/contact/view/group' q="gcid=`$row.id`&action=delete&st=d"}"
+                onclick="return confirm('{ts 1=$displayName 2=$row.title}Are you sure you want to delete %1 from %2?{/ts}');"
+                title="{ts}Delete the group status record (this group will no longer be listed under Past Groups).{/ts}">
+                [ {ts}Delete{/ts} ]</a>{/if}
+            </td>
+          </tr>
+        {/foreach}
+      </table>
+    {/strip}
   {/if}
 </div>
 </div>
\ No newline at end of file