From: Pratik Joshi Date: Tue, 27 Aug 2013 14:10:00 +0000 (+0530) Subject: CRM-13026 fix X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=2cc569f204c2327c5904249d2ef414692a307659;p=civicrm-core.git CRM-13026 fix --- diff --git a/CRM/Contact/Form/Search.php b/CRM/Contact/Form/Search.php index ba5f08eed1..adb3c512ef 100644 --- a/CRM/Contact/Form/Search.php +++ b/CRM/Contact/Form/Search.php @@ -324,6 +324,15 @@ class CRM_Contact_Form_Search extends CRM_Core_Form { 'resultContext' => NULL, 'taskClassName' => 'CRM_Contact_Task', ), + 8 => array( + 'selectorName' => 'CRM_Mailing_Selector_Search', + 'selectorLabel' => ts('Mailings'), + 'taskFile' => "CRM/common/searchResultTasks.tpl", + 'taskContext' => NULL, + 'resultFile' => 'CRM/Mailing/Form/Selector.tpl', + 'resultContext' => 'Search', + 'taskClassName' => 'CRM_Mailing_Task', + ), ); } } diff --git a/CRM/Mailing/BAO/Query.php b/CRM/Mailing/BAO/Query.php index 1ede65d832..8636f41185 100644 --- a/CRM/Mailing/BAO/Query.php +++ b/CRM/Mailing/BAO/Query.php @@ -44,7 +44,9 @@ class CRM_Mailing_BAO_Query { 'where' => 'civicrm_mailing.id', ); } + return self::$_mailingFields; + } /** @@ -58,8 +60,59 @@ class CRM_Mailing_BAO_Query { if ($query->_mode & CRM_Contact_BAO_Query::MODE_MAILING) { $query->_select['mailing_id'] = "civicrm_mailing.id as mailing_id"; $query->_element['mailing_id'] = 1; + $query->_tables['civicrm_mailing'] = 1; $query->_whereTables['civicrm_mailing'] = 1; + + // during display search strictly display contacts inside mailing + $query->_tables['civicrm_mailing_event_queue'] = $query->_whereTables['civicrm_mailing_event_queue'] = + " INNER JOIN civicrm_mailing_event_queue ON civicrm_mailing_event_queue.contact_id = contact_a.id "; + + $query->_tables['civicrm_mailing_job'] = $query->_whereTables['civicrm_mailing_job'] = 1; + + // get mailing name + if (CRM_Utils_Array::value('mailing_name', $query->_returnProperties)) { + $query->_select['mailing_name'] = "civicrm_mailing.name as mailing_name"; + $query->_element['mailing_name'] = 1; + } + + // get mailing subject + if (CRM_Utils_Array::value('mailing_subject', $query->_returnProperties)) { + $query->_select['mailing_subject'] = "civicrm_mailing.subject as mailing_subject"; + $query->_element['mailing_subject'] = 1; + } + + // get mailing status + if (CRM_Utils_Array::value('mailing_job_status', $query->_returnProperties)) { + $query->_select['mailing_job_status'] = "civicrm_mailing_job.status as mailing_job_status"; + $query->_element['mailing_job_status'] = 1; + } + + // get email on hold + if (CRM_Utils_Array::value('email_on_hold', $query->_returnProperties)) { + $query->_select['email_on_hold'] = "recipient_email.on_hold as email_on_hold"; + $query->_element['email_on_hold'] = 1; + $query->_tables['recipient_email'] = $query->_whereTables['recipient_email'] = 1; + } + + // get recipient email + if (CRM_Utils_Array::value('email', $query->_returnProperties)) { + $query->_select['email'] = "recipient_email.email as email"; + $query->_element['email'] = 1; + $query->_tables['recipient_email'] = $query->_whereTables['recipient_email'] = 1; + } + + // get user opt out + if (CRM_Utils_Array::value('contact_opt_out', $query->_returnProperties)) { + $query->_select['contact_opt_out'] = "contact_a.is_opt_out as contact_opt_out"; + $query->_element['contact_opt_out'] = 1; + } + + // mailing job end date / completed date + if (CRM_Utils_Array::value('mailing_job_end_date', $query->_returnProperties)) { + $query->_select['mailing_job_end_date'] = "civicrm_mailing_job.end_date as mailing_job_end_date"; + $query->_element['mailing_job_end_date'] = 1; + } } } @@ -81,6 +134,7 @@ class CRM_Mailing_BAO_Query { static function from($name, $mode, $side) { $from = NULL; + switch ($name) { case 'civicrm_mailing_event_queue': $from = " $side JOIN civicrm_mailing_event_queue ON civicrm_mailing_event_queue.contact_id = contact_a.id"; @@ -103,6 +157,9 @@ class CRM_Mailing_BAO_Query { case 'civicrm_mailing_event_trackable_url_open': $from = " $side JOIN $name ON $name.event_queue_id = civicrm_mailing_event_queue.id"; break; + + case 'recipient_email': + $from = " $side JOIN civicrm_email recipient_email ON recipient_email.id = civicrm_mailing_event_queue.email_id"; } return $from; @@ -114,7 +171,19 @@ class CRM_Mailing_BAO_Query { $properties = NULL; if ($mode & CRM_Contact_BAO_Query::MODE_MAILING) { - $properties = array('mailing_id' => 1); + $properties = array( + 'mailing_id' => 1, + 'mailing_name' => 1, + 'sort_name' => 1, + 'email' => 1, + 'mailing_subject' => 1, + 'email_on_hold' => 1, + 'contact_opt_out' => 1, + 'mailing_job_status' => 1, + 'mailing_job_end_date' => 1, + 'contact_type' => 1, + 'contact_sub_type' => 1 + ); } return $properties; } diff --git a/CRM/Mailing/Form/Task.php b/CRM/Mailing/Form/Task.php new file mode 100644 index 0000000000..7076b296c7 --- /dev/null +++ b/CRM/Mailing/Form/Task.php @@ -0,0 +1,165 @@ +_contactIds = array(); + + $values = $form->controller->exportValues($form->get('searchFormName')); + + $form->_task = CRM_Utils_Array::value('task', $values); + $mailingTasks = CRM_Mailing_Task::tasks(); + $form->assign('taskName', CRM_Utils_Array::value('task', $values)); + + $ids = array(); + if ($values['radio_ts'] == 'ts_sel') { + foreach ($values as $name => $value) { + if (substr($name, 0, CRM_Core_Form::CB_PREFIX_LEN) == CRM_Core_Form::CB_PREFIX) { + $ids[] = substr($name, CRM_Core_Form::CB_PREFIX_LEN); + } + } + } + else { + $queryParams = $form->get('queryParams'); + $sortOrder = null; + if ( $form->get( CRM_Utils_Sort::SORT_ORDER ) ) { + $sortOrder = $form->get( CRM_Utils_Sort::SORT_ORDER ); + } + + $query = new CRM_Contact_BAO_Query($queryParams, NULL, NULL, FALSE, FALSE, + CRM_Contact_BAO_Query::MODE_MAILING + ); + + $result = $query->searchQuery(0, 0, $sortOrder); + while ($result->fetch()) { + $ids[] = $result->contact_id; + } + $form->assign('totalSelectedMailingRecipients', $form->get('rowCount')); + } + + if (!empty($ids)) { + $form->_componentClause = ' contact_a.id IN ( ' . implode(',', $ids) . ' ) '; + } + + $form->_contactIds = $ids; + //set the context for redirection for any task actions + $session = CRM_Core_Session::singleton(); + + $fragment = 'search'; + if ($form->_action == CRM_Core_Action::ADVANCED) { + $fragment .= '/advanced'; + } + + $qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $form); + $urlParams = 'force=1'; + if (CRM_Utils_Rule::qfKey($qfKey)) { + $urlParams .= "&qfKey=$qfKey"; + } + + $url = CRM_Utils_System::url('civicrm/contact/' . $fragment, $urlParams); + $session = CRM_Core_Session::singleton(); + $session->replaceUserContext($url); + } + + /** + * simple shell that derived classes can call to add buttons to + * the form with a customized title for the main Submit + * + * @param string $title title of the main button + * @param string $type button type for the form after processing + * + * @return void + * @access public + */ + function addDefaultButtons($title, $nextType = 'next', $backType = 'back', $submitOnce = FALSE) { + $this->addButtons(array( + array( + 'type' => $nextType, + 'name' => $title, + 'isDefault' => TRUE, + ), + array( + 'type' => $backType, + 'name' => ts('Cancel'), + ), + ) + ); + } +} \ No newline at end of file diff --git a/CRM/Mailing/Form/Task/Print.php b/CRM/Mailing/Form/Task/Print.php new file mode 100644 index 0000000000..8743b7bb9a --- /dev/null +++ b/CRM/Mailing/Form/Task/Print.php @@ -0,0 +1,107 @@ +controller->setPrint(1); + + // get the formatted params + $queryParams = $this->get('queryParams'); + + $sortID = NULL; + if ($this->get(CRM_Utils_Sort::SORT_ID)) { + $sortID = CRM_Utils_Sort::sortIDValue($this->get(CRM_Utils_Sort::SORT_ID), + $this->get(CRM_Utils_Sort::SORT_DIRECTION) + ); + } + + $selector = new CRM_Mailing_Selector_Search($queryParams, $this->_action, $this->_componentClause); + $controller = new CRM_Core_Selector_Controller($selector, NULL, $sortID, CRM_Core_Action::VIEW, $this, CRM_Core_Selector_Controller::SCREEN); + $controller->setEmbedded(TRUE); + $controller->run(); + } + + /** + * Build the form - it consists of + * - displaying the QILL (query in local language) + * - displaying elements for saving the search + * + * @access public + * + * @return void + */ + function buildQuickForm() { + // + // just need to add a javacript to popup the window for printing + // + $this->addButtons(array( + array( + 'type' => 'next', + 'name' => ts('Print Mailing Recipients'), + 'js' => array('onclick' => 'window.print()'), + 'isDefault' => TRUE, + ), + array( + 'type' => 'back', + 'name' => ts('Done'), + ), + ) + ); + } + + /** + * process the form after the input has been submitted and validated + * + * @access public + * + * @return void + */ + public function postProcess() { + // redirect to the main search page after printing is over + } +} \ No newline at end of file diff --git a/CRM/Mailing/Selector/Search.php b/CRM/Mailing/Selector/Search.php new file mode 100644 index 0000000000..e9b20e2b30 --- /dev/null +++ b/CRM/Mailing/Selector/Search.php @@ -0,0 +1,401 @@ +_queryParams = &$queryParams; + + $this->_single = $single; + $this->_limit = $limit; + $this->_context = $context; + $this->_compContext = $compContext; + + $this->_mailingClause = $mailingClause; + + // type of selector + $this->_action = $action; + + $this->_query = new CRM_Contact_BAO_Query($this->_queryParams, + CRM_Mailing_BAO_Query::defaultReturnProperties(CRM_Contact_BAO_Query::MODE_MAILING, + FALSE + ), + NULL, FALSE, FALSE, + CRM_Contact_BAO_Query::MODE_MAILING + ); + } + //end of constructor + + /** + * This method returns the links that are given for each search row. + * currently the links added for each row are + * + * - View + * - Edit + * + * @return array + * @access public + * + */ + static function &links() { + if (!(self::$_links)) { + list($context, $key) = func_get_args(); + $extraParams = ($key) ? "&key={$key}" : NULL; + $searchContext = ($context) ? "&context=$context" : NULL; + + self::$_links = array( + CRM_Core_Action::VIEW => array( + 'name' => ts('View'), + 'url' => 'civicrm/contact/view', + 'qs' => "reset=1&cid=%%cid%%{$searchContext}{$extraParams}", + 'title' => ts('View Contact Details'), + ), + CRM_Core_Action::UPDATE => array( + 'name' => ts('Edit'), + 'url' => 'civicrm/contact/add', + 'qs' => "reset=1&action=update&cid=%%cid%%{$searchContext}{$extraParams}", + 'title' => ts('Edit Contact Details'), + ), + CRM_Core_Action::DELETE => array( + 'name' => ts('Delete'), + 'url' => 'civicrm/contact/view/delete', + 'qs' => "reset=1&delete=1&cid=%%cid%%{$searchContext}{$extraParams}", + 'title' => ts('Delete Contact'), + ), + ); + } + return self::$_links; + } + //end of function + + /** + * getter for array of the parameters required for creating pager. + * + * @param + * @access public + */ + function getPagerParams($action, &$params) { + $params['status'] = ts('Mailing Recipient') . ' %%StatusMessage%%'; + $params['csvString'] = NULL; + if ($this->_limit) { + $params['rowCount'] = $this->_limit; + } + else { + $params['rowCount'] = CRM_Utils_Pager::ROWCOUNT; + } + + $params['buttonTop'] = 'PagerTopButton'; + $params['buttonBottom'] = 'PagerBottomButton'; + } + //end of function + + /** + * Returns total number of rows for the query. + * + * @param + * + * @return int Total number of rows + * @access public + */ + function getTotalCount($action) { + return $this->_query->searchQuery(0, 0, NULL, + TRUE, FALSE, + FALSE, FALSE, + FALSE, + $this->_mailingClause + ); + } + + /** + * returns all the rows in the given offset and rowCount + * + * @param enum $action the action being performed + * @param int $offset the row number to start from + * @param int $rowCount the number of rows to return + * @param string $sort the sql string that describes the sort order + * @param enum $output what should the result set include (web/email/csv) + * + * @return int the total number of rows for this action + */ + function &getRows($action, $offset, $rowCount, $sort, $output = NULL) { + $result = $this->_query->searchQuery($offset, $rowCount, $sort, + FALSE, FALSE, + FALSE, FALSE, + FALSE, + $this->_mailingClause + ); + + // process the result of the query + $rows = array(); + $permissions = array(CRM_Core_Permission::getPermission()); + if (CRM_Core_Permission::check('delete contacts')) { + $permissions[] = CRM_Core_Permission::DELETE; + } + $mask = CRM_Core_Action::mask($permissions); + $qfKey = $this->_key; + + While ($result->fetch()) { + $row = array(); + // the columns we are interested in + foreach (self::$_properties as $property) { + if (property_exists($result, $property)) { + $row[$property] = $result->$property; + } + } + + $row['checkbox'] = CRM_Core_Form::CB_PREFIX . $result->contact_id; + + $actions = array( + 'cid' => $result->contact_id, + 'cxt' => $this->_context, + ); + + $row['action'] = CRM_Core_Action::formLink( + self::links($qfKey, $this->_context), + $mask, $actions + ); + $row['contact_type'] = CRM_Contact_BAO_Contact_Utils::getImage($result->contact_sub_type ? + $result->contact_sub_type : $result->contact_type, FALSE, $result->contact_id + ); + + $rows[] = $row; + } + return $rows; + } + + /** + * + * @return array $qill which contains an array of strings + * @access public + */ + + // the current internationalisation is bad, but should more or less work + // for most of "European" languages + public function getQILL() { + return $this->_query->qill(); + } + + /** + * returns the column headers as an array of tuples: + * (name, sortName (key to the sort array)) + * + * @param string $action the action being performed + * @param enum $output what should the result set include (web/email/csv) + * + * @return array the column headers that need to be displayed + * @access public + */ + public function &getColumnHeaders($action = NULL, $output = NULL) { + if (!isset(self::$_columnHeaders)) { + self::$_columnHeaders = array( + array('desc' => ts('Contact Type')), + array( + 'name' => ts('Name'), + 'sort' => 'sort_name', + 'direction' => CRM_Utils_Sort::DONTCARE, + ), + array( + 'name' => ts('Email'), + 'sort' => 'email', + 'direction' => CRM_Utils_Sort::DONTCARE, + ), + array( + 'name' => ts('Mailing Name'), + 'sort' => 'mailing_name', + 'direction' => CRM_Utils_Sort::DONTCARE, + ), + array( + 'name' => ts('Mailing Subject'), + 'sort' => 'mailing_subject', + 'direction' => CRM_Utils_Sort::DONTCARE, + ), + array( + 'name' => ts('Mailing Status'), + 'sort' => 'mailing_job_status', + 'direction' => CRM_Utils_Sort::DONTCARE, + ), + array( + 'name' => ts('Completed Date'), + 'sort' => 'mailing_job_end_date', + 'direction' => CRM_Utils_Sort::DONTCARE, + ), + array('desc' => ts('Actions')), + ); + } + return self::$_columnHeaders; + } + + function alphabetQuery() { + return $this->_query->searchQuery(NULL, NULL, NULL, FALSE, FALSE, TRUE); + } + + function &getQuery() { + return $this->_query; + } + + /** + * name of export file. + * + * @param string $output type of output + * + * @return string name of the file + */ + function getExportFileName($output = 'csv') { + return ts('CiviCRM Mailing Search'); + } +} \ No newline at end of file diff --git a/CRM/Mailing/Task.php b/CRM/Mailing/Task.php new file mode 100644 index 0000000000..746f1aa66d --- /dev/null +++ b/CRM/Mailing/Task.php @@ -0,0 +1,129 @@ + array('title' => ts('Print Mailing Recipients'), + 'class' => 'CRM_Mailing_Form_Task_Print', + 'result' => FALSE, + ), + ); + + CRM_Utils_Hook::searchTasks('mailing', self::$_tasks); + asort(self::$_tasks); + } + + return self::$_tasks; + } + + /** + * These tasks are the core set of task titles + * on contributors + * + * @return array the set of task titles + * @static + * @access public + */ + static function &taskTitles() { + return array(); + } + + /** + * show tasks selectively based on the permission level + * of the user + * + * @param int $permission + * + * @return array set of tasks that are valid for the user + * @access public + */ + static function &permissionedTaskTitles($permission) { + $task = array(); + return $task; + } + + /** + * These tasks are the core set of tasks that the user can perform + * on contributors + * + * @param int $value + * + * @return array the set of tasks for a group of contributors + * @static + * @access public + */ + static function getTask($value) { + self::tasks(); + if (!$value || !CRM_Utils_Array::value($value, self::$_tasks)) { + // make the print task by default + $value = 1; + } + return array( + self::$_tasks[$value]['class'], + self::$_tasks[$value]['result'], + ); + } +} \ No newline at end of file diff --git a/templates/CRM/Contact/Form/Search/AdvancedCriteria.tpl b/templates/CRM/Contact/Form/Search/AdvancedCriteria.tpl index e309a4e97c..8782a520c8 100644 --- a/templates/CRM/Contact/Form/Search/AdvancedCriteria.tpl +++ b/templates/CRM/Contact/Form/Search/AdvancedCriteria.tpl @@ -63,6 +63,7 @@ cj(function($) { '4': 'activity', '5': 'CiviMember', '6': 'CiviCase', + '8': 'CiviMail' }; // Handle change of results mode $('#component_mode').change(function() { diff --git a/templates/CRM/Mailing/Form/Selector.tpl b/templates/CRM/Mailing/Form/Selector.tpl new file mode 100644 index 0000000000..824e64c4e0 --- /dev/null +++ b/templates/CRM/Mailing/Form/Selector.tpl @@ -0,0 +1,80 @@ +{* + +--------------------------------------------------------------------+ + | 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 | + +--------------------------------------------------------------------+ +*} +{if $context EQ 'Search'} + {include file="CRM/common/pager.tpl" location="top"} +{/if} + +{strip} + + + + {if $context eq 'Search' } + + {/if} + {foreach from=$columnHeaders item=header} + + {/foreach} + + + + {counter start=0 skip=1 print=false} + {foreach from=$rows item=row} + + {if $context eq 'Search'} + {assign var=cbName value=$row.checkbox} + + {/if} + + + + + + + + + + {/foreach} +
{$form.toggleSelect.html} + {if $header.sort} + {assign var='key' value=$header.sort} + {$sort->_response.$key.link} + {else} + {$header.name} + {/if} +
{$form.$cbName.html}{$row.contact_type}{$row.sort_name}{$row.email}{$row.mailing_name}{$row.mailing_subject}{$row.mailing_job_status}{$row.mailing_job_end_date|crmDate}{$row.action|replace:'xx':$row.contact_id}
+{/strip} + +{if $context EQ 'Search'} + +{/if} + +{if $context EQ 'Search'} + {include file="CRM/common/pager.tpl" location="bottom"} +{/if} diff --git a/templates/CRM/Mailing/Form/Task.tpl b/templates/CRM/Mailing/Form/Task.tpl new file mode 100644 index 0000000000..d976e32ea1 --- /dev/null +++ b/templates/CRM/Mailing/Form/Task.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 | + +--------------------------------------------------------------------+ +*} +{ts 1=$totalSelectedMailingRecipients}Number of selected Mailing Recipients: %1{/ts} + +{if $rows } +
+ + + + +{foreach from=$rows item=row} + + + +{/foreach} +
{ts}Name{/ts}
{$row.displayName}
+
+{/if} diff --git a/templates/CRM/Mailing/Form/Task/Print.tpl b/templates/CRM/Mailing/Form/Task/Print.tpl new file mode 100644 index 0000000000..07a850e949 --- /dev/null +++ b/templates/CRM/Mailing/Form/Task/Print.tpl @@ -0,0 +1,65 @@ +{* + +--------------------------------------------------------------------+ + | 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 | + +--------------------------------------------------------------------+ +*} +

+ +{if $rows} +

+ {$form.buttons.html} +
+
+
+

+ + + + + + + + + +{foreach from=$rows item=row} + + + + + + + + +{/foreach} +
{ts}Name{/ts}{ts}Email{/ts}{ts}Mailing Name{/ts}{ts}Mailing Subject{/ts}{ts}Mailing Status{/ts}{ts}Completed Date{/ts}
{$row.sort_name}{$row.email}{$row.mailing_name}{$row.mailing_subject}{$row.mailing_job_status}{$row.mailing_job_end_date|crmDate}
+ +

+ {$form.buttons.html} +
+ +{else} +
+
+ {ts}There are no records selected for Print.{/ts} +
+{/if} diff --git a/templates/CRM/common/searchResultTasks.tpl b/templates/CRM/common/searchResultTasks.tpl index 9e372473af..5c22ff479f 100644 --- a/templates/CRM/common/searchResultTasks.tpl +++ b/templates/CRM/common/searchResultTasks.tpl @@ -62,12 +62,15 @@ {else} {$form._qf_Search_next_print.html}     {/if} - {$form.task.html} - {if $actionButtonName} - {$form.$actionButtonName.html}     - {else} - {$form._qf_Search_next_action.html} - {/if} + + + {$form.task.html} + {if $actionButtonName} + {$form.$actionButtonName.html}     + {else} + {$form._qf_Search_next_action.html} + {/if} + @@ -75,5 +78,10 @@ {literal} {/literal}