Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-21125

permit class assignment on links in reports

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.24
    • Fix Version/s: 4.7.25
    • Component/s: CiviReport
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code
    • Verified?:
      No

      Description

      It's possible to assign a link url & a hover text to a cell in a report. This minor pr  adds the ability to add a class. I don't love it, but there is precedent for this format in the way _hover & _link are handled & in the Overview.tpl

      Note the usecase is to add the crm-summary-link class to a contact - allowing for the link to display in a hover-box rather than needing to click on it, per search result handling

       

      ```

      $url = CRM_Utils_System::url('civicrm/profile/view',
      'reset=1&snippet=4&gid=' . $this->summaryOverlayProfileId . '&id=' . $row['civicrm_contact_1'],
      $this->_absoluteUrl
      );
      $rows[$rowNum]['civicrm_contact_1_link'] = $url;
      $rows[$rowNum]['civicrm_contact_1_hover'] = ts("View contact details for this record.");
      $rows[$rowNum]['civicrm_contact_1_class'] ="crm-summary-link";

      ```

        Attachments

          Activity

            People

            • Assignee:
              monish.deb Monish Deb
              Reporter:
              eileen Eileen McNaughton
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: