From c1c6e20c6828f50e2b82bc50201e7cfced45c3c6 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Wed, 26 Feb 2014 11:50:31 -0500 Subject: [PATCH] CiviCase tpl cleanup --- templates/CRM/Case/Form/CaseView.tpl | 26 ++++--------- templates/CRM/Case/Form/ViewRelatedCases.tpl | 41 ++++++++++++++++++++ 2 files changed, 48 insertions(+), 19 deletions(-) create mode 100644 templates/CRM/Case/Form/ViewRelatedCases.tpl diff --git a/templates/CRM/Case/Form/CaseView.tpl b/templates/CRM/Case/Form/CaseView.tpl index a73e207a53..94892a5ba4 100644 --- a/templates/CRM/Case/Form/CaseView.tpl +++ b/templates/CRM/Case/Form/CaseView.tpl @@ -25,26 +25,14 @@ *} {* CiviCase - view case screen*} -{* here we are showing related cases w/ jquery dialog *}
-{if $showRelatedCases} - - - - - - - {foreach from=$relatedCases item=row key=caseId} - - - - - - {/foreach} -
{ts}Client Name{/ts}{ts}Case Type{/ts}
{$row.client_name}{$row.case_type}{$row.links}
+{* here we are showing related cases w/ jquery dialog *} +{if $showRelatedCases} + {include file="CRM/Case/Form/ViewRelatedCases.tpl"} - {else} +{* Main case view *} +{else}

{ts}Summary{/ts}

@@ -307,7 +295,7 @@ cj("#dialog").show( ); cj("#dialog").dialog({ - title: "Add Client to the Case", + title: "{/literal}{ts escape="js"}Add Client to the Case{/ts}{literal}", modal: true, bgiframe: true, close : function(event, ui) { cj("#rel_contact").unautocomplete( ); }, @@ -334,7 +322,7 @@ var contactID = cj("#rel_contact_id").val( ); if ( !cj("#rel_contact").val( ) || !contactID ) { - cj("#rel_contact").crmError('{/literal}{ts escape="js"}Select valid contact from the list{/ts}{literal}.'); + cj("#rel_contact").crmError('{/literal}{ts escape="js"}Select valid contact from the list.{/ts}{literal}'); return false; } cj.post( postUrl, {contactID: contactID,caseID: caseID, diff --git a/templates/CRM/Case/Form/ViewRelatedCases.tpl b/templates/CRM/Case/Form/ViewRelatedCases.tpl new file mode 100644 index 0000000000..c867d49459 --- /dev/null +++ b/templates/CRM/Case/Form/ViewRelatedCases.tpl @@ -0,0 +1,41 @@ +{* + +--------------------------------------------------------------------+ + | CiviCRM version 4.4 | + +--------------------------------------------------------------------+ + | Copyright CiviCRM LLC (c) 2004-2013 | + +--------------------------------------------------------------------+ + | 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 | + +--------------------------------------------------------------------+ +*} +{* Ajax-loaded list of related cases *} +
+ + + + + + + {foreach from=$relatedCases item=row key=caseId} + + + + + + {/foreach} +
{ts}Client Name{/ts}{ts}Case Type{/ts}
{$row.client_name}{$row.case_type}{$row.links}
-- 2.25.1