From aa0d914330cc627928c5a297eb04a1bcd98aeded Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Thu, 12 Nov 2015 16:36:13 -0500 Subject: [PATCH] CRM-16415 - Use crmButton on contact summary screen --- templates/CRM/Contact/Page/View/Summary.tpl | 49 +++++++++------------ 1 file changed, 22 insertions(+), 27 deletions(-) diff --git a/templates/CRM/Contact/Page/View/Summary.tpl b/templates/CRM/Contact/Page/View/Summary.tpl index 602f801249..8553daf743 100644 --- a/templates/CRM/Contact/Page/View/Summary.tpl +++ b/templates/CRM/Contact/Page/View/Summary.tpl @@ -55,37 +55,34 @@ {* Include Edit button if contact has 'edit contacts' permission OR user is viewing their own contact AND has 'edit my contact' permission. CRM_Contact_Page_View::checkUserPermission handles this and assigns $permission true as needed. *} {if $permission EQ 'edit'}
  • - {assign var='editParams' value=$urlParams|cat:"&action=update&cid=$contactId"} - - {ts}Edit{/ts} - + {crmButton p='civicrm/contact/add' q="$urlParams&action=update&cid=$contactId" class="edit"} + {ts}Edit{/ts} + {/crmButton}
  • {/if} {/if} {* Check for permissions to provide Restore and Delete Permanently buttons for contacts that are in the trash. *} - {if (call_user_func(array('CRM_Core_Permission','check'), 'access deleted contacts') and - $is_deleted)} + {if call_user_func(array('CRM_Core_Permission','check'), 'access deleted contacts') and $is_deleted}
  • - - {ts}Restore from Trash{/ts} - + {crmButton p='civicrm/contact/view/delete' q="reset=1&cid=$contactId&restore=1" class="delete" icon="undo"} + {ts}Restore from Trash{/ts} + {/crmButton}
  • {if call_user_func(array('CRM_Core_Permission','check'), 'delete contacts')}
  • - - {ts}Delete Permanently{/ts} - + {crmButton p='civicrm/contact/view/delete' q="reset=1&delete=1&cid=$contactId&skip_undelete=1" class="delete" icon="trash"} + {ts}Delete Permanently{/ts} + {/crmButton}
  • {/if} {elseif call_user_func(array('CRM_Core_Permission','check'), 'delete contacts')} - {assign var='deleteParams' value="&reset=1&delete=1&cid=$contactId"}
  • - - {ts}Delete Contact{/ts} - + {crmButton p='civicrm/contact/view/delete' q="&reset=1&delete=1&cid=$contactId" class="delete" icon="trash"} + {ts}Delete Contact{/ts} + {/crmButton}
  • {/if} @@ -96,28 +93,26 @@ {else} {if $nextContactID} - {assign var='viewParams' value=$urlParams|cat:"&cid=$nextContactID"}
  • - - {ts}Next{/ts} - + {crmButton p='civicrm/contact/view' q="$urlParams&cid=$nextContactID" class="view" title=$nextContactName icon="chevron-right"} + {ts}Next{/ts} + {/crmButton}
  • {/if} {if $prevContactID} - {assign var='viewParams' value=$urlParams|cat:"&cid=$prevContactID"}
  • - - {ts}Previous{/ts} - + {crmButton p='civicrm/contact/view' q="$urlParams&cid=$prevContactID" class="view" title=$prevContactName icon="chevron-left"} + {ts}Previous{/ts} + {/crmButton}
  • {/if} {/if} {if !empty($groupOrganizationUrl)}
  • - - {ts}Associated Multi-Org Group{/ts} - + {crmButton href=$groupOrganizationUrl class="associated-groups" icon="cubes"} + {ts}Associated Multi-Org Group{/ts} + {/crmButton}
  • {/if} -- 2.25.1