Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-21125 allow class assignment on report row links #10922

Merged
merged 1 commit into from
Sep 11, 2017

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Aug 30, 2017

Overview

Allows report writers to assign a class when defining a link on a cell

Before

Not possible to assign a link

After

Possible, but no change in any existing reports / behaviour. Extra steps are required in the reports themselves to leverage

Technical Details

an example usage is on JIRA


@eileenmcnaughton eileenmcnaughton changed the title CRM-21125 allow class assignment on row links CRM-21125 allow class assignment on report row links Sep 4, 2017
<td class="crm-report-{$field}{if $header.type eq 1024 OR $header.type eq 1 OR $header.type eq 512} report-contents-right{elseif $row.$field eq 'Subtotal'} report-label{/if}">
{if $row.$fieldLink}
<a title="{$row.$fieldHover}" href="{$row.$fieldLink}">
<a title="{$row.$fieldHover}" href="{$row.$fieldLink}" {if $row.$fieldClass} class="{$row.$fieldClass}"{/if}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eileenmcnaughton won't there always be $row.$fieldClass so to omit IF condition, as we are already ensuring the fieldName to be present at L115?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm but if empty it would be class="" - would that be ok?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if empty then we don't have that link at all

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the data would look like this

$row => array(
  'financial_type_id' => 'Donation',
  'financial_type_id_link' => 'https....',
  'contact_type' => 'Individual',
  'contact_type_link' => 'https....',
  'contact_type_hover' => 'Click to popup contact',
  'contact_type_class' => 'crm-pop-up',
);




@monishdeb
Copy link
Member

Tested, working fine

@monishdeb monishdeb merged commit 57a1fc3 into civicrm:master Sep 11, 2017
@eileenmcnaughton
Copy link
Contributor Author

thanks @monishdeb

eileenmcnaughton added a commit to eileenmcnaughton/civicrm-core that referenced this pull request Feb 1, 2018
Assists with dedupe analysis as I am using this to provide pop-ups on
analysis reports rather than forcing click throughs to see more.

civicrm#10922

Change-Id: I5369a58035fef294b58c2dd1a89519c069d46443
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants