From 70ec7bcc8cbc1a54c165810e926ab0225672648b Mon Sep 17 00:00:00 2001 From: kurund Date: Thu, 22 Aug 2013 16:13:54 +0530 Subject: [PATCH] cleanup --- CRM/Contact/Form/Search/Custom/FullText.php | 2 +- .../Contact/Form/Search/Custom/FullText.tpl | 526 ++++++++++-------- 2 files changed, 302 insertions(+), 226 deletions(-) diff --git a/CRM/Contact/Form/Search/Custom/FullText.php b/CRM/Contact/Form/Search/Custom/FullText.php index b382e79e52..7e39a444a5 100644 --- a/CRM/Contact/Form/Search/Custom/FullText.php +++ b/CRM/Contact/Form/Search/Custom/FullText.php @@ -84,7 +84,7 @@ class CRM_Contact_Form_Search_Custom_FullText implements CRM_Contact_Form_Search } } - // fix text to include wild card characters at begining and end + // fix text to include wild card characters at beginning and end if ($this->_text) { if (is_numeric($this->_text)) { $this->_textID = $this->_text; diff --git a/templates/CRM/Contact/Form/Search/Custom/FullText.tpl b/templates/CRM/Contact/Form/Search/Custom/FullText.tpl index 9e4562ddc6..943fdf5e29 100644 --- a/templates/CRM/Contact/Form/Search/Custom/FullText.tpl +++ b/templates/CRM/Contact/Form/Search/Custom/FullText.tpl @@ -25,276 +25,352 @@ *} {* Template for Full-text search component. *}
-
+
- +
- - - + + + + + -
{$form.text.label}{$form.text.html}{ts}in...{/ts}{$form.table.html}{$form.buttons.html} {help id="id-fullText"}{$form.text.label}{$form.text.html}{ts}in...{/ts}{$form.table.html}{$form.buttons.html} {help id="id-fullText"}
+
-
+
{include file="CRM/common/pager.tpl" location="top"} {include file="CRM/common/jsortable.tpl"} {if $rowsEmpty} - {include file="CRM/Contact/Form/Search/Custom/EmptyResults.tpl"} + {include file="CRM/Contact/Form/Search/Custom/EmptyResults.tpl"} {/if} {assign var=table value=$form.table.value.0} {assign var=text value=$form.text.value} {if !empty($summary.Contact) } -
+
{* Search request has returned 1 or more matching rows. Display results. *} -

{ts}Contacts{/ts}: {if !$table}{if $summary.Count.Contact <= $limit}{$summary.Count.Contact}{else}{ts 1=$limit}%1 or more{/ts}{/if}{else}{$summary.Count.Contact}{/if}

- {if $table}{include file="CRM/common/pager.tpl" location="top"}{/if} - {* This section displays the rows along and includes the paging controls *} - {strip} - - - - - - - - {foreach from=$summary.Contact item=row} - - - - - {/foreach} -
{ts}Name{/ts}
{$row.sort_name}{ts}View{/ts}
- {/strip} - {if !$table and $summary.addShowAllLink.Contact}{/if} - {* note we using location="below" because we don't want to use rows per page for now. And therefore don't put location="bottom" for now. *} - {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if} +

{ts}Contacts{/ts} + : {if !$table}{if $summary.Count.Contact <= $limit}{$summary.Count.Contact}{else}{ts 1=$limit}%1 or more{/ts}{/if}{else}{$summary.Count.Contact}{/if}

+ {if $table}{include file="CRM/common/pager.tpl" location="top"}{/if} + {* This section displays the rows along and includes the paging controls *} + {strip} + + + + + + + + {foreach from=$summary.Contact item=row} + + + + + {/foreach} +
{ts}Name{/ts}
{$row.sort_name}{ts}View{/ts} +
+ {/strip} + {if !$table and $summary.addShowAllLink.Contact} + {/if} + {* note we using location="below" because we don't want to use rows per page for now. And therefore don't put location="bottom" for now. *} + {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if} {* END Actions/Results section *} -
+
{/if} {if !empty($summary.Activity) } -
+
{* Search request has returned 1 or more matching rows. Display results. *} -

{ts}Activities{/ts}: {if !$table}{if $summary.Count.Activity <= $limit}{$summary.Count.Activity}{else}{ts 1=$limit}%1 or more{/ts}{/if}{else}{$summary.Count.Activity}{/if}

- {if $table}{include file="CRM/common/pager.tpl" location="top"}{/if} - {* This section displays the rows along and includes the paging controls *} - {strip} - - - - - - - - - - - - - {foreach from=$summary.Activity item=row} - - - - - - - - - - {/foreach} -
{ts}Type{/ts}{ts}Subject{/ts}{ts}Details{/ts}{ts}Added By{/ts}{ts}With{/ts}{ts}Assignee{/ts}
{$row.activity_type}{$row.subject|mb_truncate:40}{$row.details|escape}{$row.sort_name}{$row.target_sort_name}{$row.assignee_sort_name} - {if $row.case_id } - - {else} - - {/if} - {ts}View{/ts} -
- {/strip} - {if !$table and $summary.addShowAllLink.Activity}{/if} - {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if} +

{ts}Activities{/ts} + : {if !$table}{if $summary.Count.Activity <= $limit}{$summary.Count.Activity}{else}{ts 1=$limit}%1 or more{/ts}{/if}{else}{$summary.Count.Activity}{/if}

+ {if $table}{include file="CRM/common/pager.tpl" location="top"}{/if} + {* This section displays the rows along and includes the paging controls *} + {strip} + + + + + + + + + + + + + {foreach from=$summary.Activity item=row} + + + + + + + + + + {/foreach} +
{ts}Type{/ts}{ts}Subject{/ts}{ts}Details{/ts}{ts}Added By{/ts}{ts}With{/ts}{ts}Assignee{/ts}
{$row.activity_type}{$row.subject|mb_truncate:40}{$row.details|escape} + {$row.sort_name} + + {$row.target_sort_name} + + {$row.assignee_sort_name} + + {if $row.case_id } + + {else} + + {/if} + {ts}View{/ts} +
+ {/strip} + {if !$table and $summary.addShowAllLink.Activity} + + {/if} + {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if} {* END Actions/Results section *} -
+
{/if} {if !empty($summary.Case) } -
- +
{* Search request has returned 1 or more matching rows. Display results. *} - -

{ts}Cases{/ts}: {if !$table}{if $summary.Count.Case <= $limit}{$summary.Count.Case}{else}{ts 1=$limit}%1 or more{/ts}{/if}{else}{$summary.Count.Case}{/if}

- {if $table}{include file="CRM/common/pager.tpl" location="top"}{/if} - {* This section displays the rows along and includes the paging controls *} - {strip} - - - - - - - - - - - - - {foreach from=$summary.Case item=row} - - - - - - {if $row.case_is_deleted} - - {else} - - {/if} - - - - {/foreach} -
{ts}Client Name{/ts}{ts}Start Date{/ts}{ts}End Date{/ts}{ts}Case ID{/ts}
{$row.sort_name}{$row.case_start_date|crmDate:"%b %d, %Y %l:%M %P"}{$row.case_end_date|crmDate:"%b %d, %Y %l:%M %P"}{$row.case_id}{ts}Restore Case{/ts}{ts}Manage{/ts}{$row.case_start_date|crmDate}{$row.case_end_date|crmDate}
- {/strip} - {if !$table and $summary.addShowAllLink.Case}{/if} - {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if} +

{ts}Cases{/ts} + : {if !$table}{if $summary.Count.Case <= $limit}{$summary.Count.Case}{else}{ts 1=$limit}%1 or more{/ts}{/if}{else}{$summary.Count.Case}{/if}

+ {if $table}{include file="CRM/common/pager.tpl" location="top"}{/if} + {* This section displays the rows along and includes the paging controls *} + {strip} + + + + + + + + + + + + + {foreach from=$summary.Case item=row} + + + + + + {if $row.case_is_deleted} + + {else} + + {/if} + + + + {/foreach} +
{ts}Client Name{/ts}{ts}Start Date{/ts}{ts}End Date{/ts}{ts}Case ID{/ts}
+ {$row.sort_name} + {$row.case_start_date|crmDate:"%b %d, %Y %l:%M %P"}{$row.case_end_date|crmDate:"%b %d, %Y %l:%M %P"}{$row.case_id} + {ts}Restore Case{/ts} + + {ts}Manage{/ts} + {$row.case_start_date|crmDate}{$row.case_end_date|crmDate}
+ {/strip} + {if !$table and $summary.addShowAllLink.Case} + + {/if} + {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if} {* END Actions/Results section *} -
+
{/if} {if !empty($summary.Contribution) } -
+
{* Search request has returned 1 or more matching rows. Display results. *} -

{ts}Contributions{/ts}: {if !$table}{if $summary.Count.Contribution <= $limit}{$summary.Count.Contribution}{else}{ts 1=$limit}%1 or more{/ts}{/if}{else}{$summary.Count.Contribution}{/if}

- {if $table}{include file="CRM/common/pager.tpl" location="top"}{/if} - {* This section displays the rows along and includes the paging controls *} - {strip} - - - - - - - - - - - - - - - {foreach from=$summary.Contribution item=row} - - - - - - - - - - - {/foreach} -
{ts}Contributor's Name{/ts}{ts}Amount{/ts}{ts}Financial Type{/ts}{ts}Source{/ts}{ts}Received{/ts}{ts}Status{/ts}
{$row.sort_name}{$row.contribution_total_amount|crmMoney}{$row.financial_type}{$row.contribution_source}{$row.contribution_receive_date|crmDate:"%b %d, %Y %l:%M %P"}{$row.contribution_status}{ts}View{/ts}{$row.contribution_receive_date|crmDate}
- {/strip} - {if !$table and $summary.addShowAllLink.Contribution}{/if} - {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if} +

{ts}Contributions{/ts} + : {if !$table}{if $summary.Count.Contribution <= $limit}{$summary.Count.Contribution}{else}{ts 1=$limit}%1 or more{/ts}{/if}{else}{$summary.Count.Contribution}{/if}

+ {if $table}{include file="CRM/common/pager.tpl" location="top"}{/if} + {* This section displays the rows along and includes the paging controls *} + {strip} + + + + + + + + + + + + + + {foreach from=$summary.Contribution item=row} + + + + + + + + + + + {/foreach} +
{ts}Contributor's Name{/ts}{ts}Amount{/ts}{ts}Financial Type{/ts}{ts}Source{/ts}{ts}Received{/ts}{ts}Status{/ts}
+ {$row.sort_name} + {$row.contribution_total_amount|crmMoney}{$row.financial_type}{$row.contribution_source}{$row.contribution_receive_date|crmDate:"%b %d, %Y %l:%M %P"}{$row.contribution_status} + {ts}View{/ts} + {$row.contribution_receive_date|crmDate}
+ {/strip} + {if !$table and $summary.addShowAllLink.Contribution} + + {/if} + {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if} {* END Actions/Results section *} -
+
{/if} {if !empty($summary.Participant) } -
+
{* Search request has returned 1 or more matching rows. *} -

{ts}Event Participants{/ts}: {if !$table}{if $summary.Count.Participant <= $limit}{$summary.Count.Participant}{else}{ts 1=$limit}%1 or more{/ts}{/if}{else}{$summary.Count.Participant}{/if}

- {if $table}{include file="CRM/common/pager.tpl" location="top"}{/if} - {* This section displays the rows along and includes the paging controls *} - {strip} - - - - - - - - - - - - - - - - {foreach from=$summary.Participant item=row} - - - - - - - - - - - - - {/foreach} -
{ts}Participant's Name{/ts}{ts}Event{/ts}{ts}Fee Level{/ts}{ts}Fee Amount{/ts}{ts}Register Date{/ts}{ts}Source{/ts}{ts}Status{/ts}{ts}Role{/ts}
{$row.sort_name}{$row.event_title}{$row.participant_fee_level}{$row.participant_fee_amount|crmMoney}{$row.participant_register_date|crmDate:"%b %d, %Y %l:%M %P"}{$row.participant_source}{$row.participant_status}{$row.participant_role}{ts}View{/ts}{$row.participant_register_date|crmDate}
- {/strip} - {if !$table and $summary.addShowAllLink.Participant}{/if} - {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if} +

{ts}Event Participants{/ts} + : {if !$table}{if $summary.Count.Participant <= $limit}{$summary.Count.Participant}{else}{ts 1=$limit}%1 or more{/ts}{/if}{else}{$summary.Count.Participant}{/if}

+ {if $table}{include file="CRM/common/pager.tpl" location="top"}{/if} + {* This section displays the rows along and includes the paging controls *} + {strip} + + + + + + + + + + + + + + + + {foreach from=$summary.Participant item=row} + + + + + + + + + + + + + {/foreach} +
{ts}Participant's Name{/ts}{ts}Event{/ts}{ts}Fee Level{/ts}{ts}Fee Amount{/ts}{ts}Register Date{/ts}{ts}Source{/ts}{ts}Status{/ts}{ts}Role{/ts}
+ {$row.sort_name} + {$row.event_title}{$row.participant_fee_level}{$row.participant_fee_amount|crmMoney}{$row.participant_register_date|crmDate:"%b %d, %Y %l:%M %P"}{$row.participant_source}{$row.participant_status}{$row.participant_role} + {ts}View{/ts} + {$row.participant_register_date|crmDate}
+ {/strip} + {if !$table and $summary.addShowAllLink.Participant} + {/if} + {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if} {* END Actions/Results section *} -
+
{/if} {if !empty($summary.Membership) } -
+
{* Search request has returned 1 or more matching rows. *} -

{ts}Memberships{/ts}: {if !$table}{if $summary.Count.Membership <= $limit}{$summary.Count.Membership}{else}{ts 1=$limit}%1 or more{/ts}{/if}{else}{$summary.Count.Membership}{/if}

- {if $table}{include file="CRM/common/pager.tpl" location="top"}{/if} - {* This section displays the rows along and includes the paging controls *} - {strip} - - - - - - - - - - - - - - - - {foreach from=$summary.Membership item=row} - - - - - - - - - - - - - {/foreach} -
{ts}Member's Name{/ts}{ts}Membership Type{/ts}{ts}Membership Fee{/ts}{ts}Membership Start Date{/ts}{ts}Membership End Date{/ts}{ts}Source{/ts}{ts}Status{/ts}
{$row.sort_name}{$row.membership_type}{$row.membership_fee|crmMoney}{$row.membership_start_date|crmDate:"%b %d, %Y %l:%M %P"}{$row.membership_end_date|crmDate:"%b %d, %Y %l:%M %P"}{$row.membership_source}{$row.membership_status}{ts}View{/ts}{$row.membership_start_date|crmDate}{$row.membership_end_date|crmDate}
- {/strip} - {if !$table and $summary.addShowAllLink.Membership}{/if} - {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if} +

{ts}Memberships{/ts} + : {if !$table}{if $summary.Count.Membership <= $limit}{$summary.Count.Membership}{else}{ts 1=$limit}%1 or more{/ts}{/if}{else}{$summary.Count.Membership}{/if}

+ {if $table}{include file="CRM/common/pager.tpl" location="top"}{/if} + {* This section displays the rows along and includes the paging controls *} + {strip} + + + + + + + + + + + + + + + + {foreach from=$summary.Membership item=row} + + + + + + + + + + + + + {/foreach} +
{ts}Member's Name{/ts}{ts}Membership Type{/ts}{ts}Membership Fee{/ts}{ts}Membership Start Date{/ts}{ts}Membership End Date{/ts}{ts}Source{/ts}{ts}Status{/ts}
+ {$row.sort_name} + {$row.membership_type}{$row.membership_fee|crmMoney}{$row.membership_start_date|crmDate:"%b %d, %Y %l:%M %P"}{$row.membership_end_date|crmDate:"%b %d, %Y %l:%M %P"}{$row.membership_source}{$row.membership_status} + {ts}View{/ts} + {$row.membership_start_date|crmDate}{$row.membership_end_date|crmDate}
+ {/strip} + {if !$table and $summary.addShowAllLink.Membership} + + {/if} + {if $table}{include file="CRM/common/pager.tpl" location="below"}{/if} {* END Actions/Results section *} -
+
{/if} {include file="CRM/common/pager.tpl" location="bottom"}
-- 2.25.1