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

Create PDF Letter - support for single contact mode via URL

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.2.1
    • Fix Version/s: 3.2.2
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      Some sites use 'Create PDF Letter' quite a bit and would like to add that as an available action in the Actions button.

      Modify the PDF and PDFLetterCommon classes to fully support 'single' mode (when a cid is passed in the GET params).

      The URL pattern for this is:

      civicrm/contact/pdf?action=add&reset=1&cid=$contactId&selectedChild=activity

      Here's an example of adding that action to the Actions button by customizing CRM/Activity/Form/ActivityLinks.tpl:

      <ul>

      {foreach from=$activityTypes key=k item=link}

      <li class="crm-activity-type_{$k}"><a href="{$url}{$k}">

      {if $k NEQ 3} {ts}Record {/ts}{/if}{$link}</a></li> {/foreach}
      {* Adding button for Create PDF here. *}
      <li class="crm-activity-pdf">
      <a href="{crmURL p='civicrm/contact/pdf' q="action=add&reset=1&cid=`$contactId`&selectedChild=activity"}" title="{ts}

      Create PDF Letter

      {/ts}">{ts}Create PDF Letter{/ts}

      </a>
      </li>
      </ul>

      I think you could also add to the Actions button using the "links" hook, but I didn't try that out.

      See also discussion on this forum post:
      http://forum.civicrm.org/index.php/topic,15025.0.html

        Attachments

          Activity

            People

            • Assignee:
              dgg David Greenberg
              Reporter:
              dgg David Greenberg
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: