CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Removing and adding fields from the Activity tab selector?
Pages: [1]

Author Topic: Removing and adding fields from the Activity tab selector?  (Read 760 times)

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Removing and adding fields from the Activity tab selector?
January 16, 2013, 01:57:13 pm
I'd like to remove "Assigned to" and add "Location" as a column under the activities tab.  I understand this is probably done in the file CRM/Activity/Selector/Selector.tpl but my attempts to switch the column names result it in still displaying 'assigned to'.

I've tried this change below, but it doesn't do anything.  I've confirmed this is the right file.

Code: [Select]
<table id="contact-activity-selector-{$context}">
    <thead>
        <tr>
            <th class='crm-contact-activity-activity_type'>{ts}Type{/ts}</th>
            <th class='crm-contact-activity_subject'>{ts}Subject{/ts}</th>
            <th class='crm-contact-activity-source_contact'>{ts}Added By{/ts}</th>
            <th class='crm-contact-activity-target_contact nosort'>{ts}With{/ts}</th>
            <th class='crm-contact-activity-location nosort'>{ts}Location{/ts}</th>
            <th class='crm-contact-activity-activity_date'>{ts}Date{/ts}</th>
            <th class='crm-contact-activity-activity_status'>{ts}Status{/ts}</th>
            <th class='crm-contact-activity-links nosort'>&nbsp;</th>
            <th class='hiddenElement'>&nbsp;</th>
        </tr>
    </thead>
</table>

What's up?  Any ideas?

How would I get rid of assigned to and insert location instead?  Thanks! ;D
Try CiviTeacher: the online video tutorial CiviCRM learning library.

totten

  • Administrator
  • Ask me questions
  • *****
  • Posts: 695
  • Karma: 64
Re: Removing and adding fields from the Activity tab selector?
January 16, 2013, 03:13:49 pm
I don't recall exactly, but I'm pretty sure the activities tab is produced through a different process than most data-tables -- eg it uses an AJAX callback (civicrm/ajax/contactactivity -- CRM_Activity_Page_AJAX::getContactActivity). I think you have to update some combinaation of the <TABLE>, the Javascript, and/or the AJAX helper.

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: Removing and adding fields from the Activity tab selector?
January 17, 2013, 12:47:12 pm
Thanks Tim.  I've added 'location' after assignee contact in the table and jQuery of Selector.tpl  I figure first I'll add location and get that working first THEN I can remove assignee.

I also added 'location' in a few places including CRM_Activity_Page_AJAX::getContactActivity in ways that I thought made sense, but maybe I did it wrong.   The column shows up now but is blank.  Location data is not displayed.

Maybe I should ask Xavier about this, he made this code didn't he?

Here's my changes: http://paste2.org/p/2763466
Try CiviTeacher: the online video tutorial CiviCRM learning library.

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Removing and adding fields from the Activity tab selector?
January 20, 2013, 10:20:39 am
Stuart:

Check the attached patch, it is generated against trunk(4.3). It won't be difficult to backport.

Hth
Kurund
Found this reply helpful? Support CiviCRM

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Removing and adding fields from the Activity tab selector?

This forum was archived on 2017-11-26.