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

UX: Show is_admin on relationships table

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.3.1
    • Fix Version/s: 3.4.alpha
    • Component/s: Usability
    • Labels:
      None

      Description

      The relationships tab on contact/view is not as effective as it could be. One improvement we have found is that users want to know when the relationship target contact is an admin for the contact being shown. To that end, we suggest the table in templates/CRM/Contact/Page/View/Relationship.tpl be amended:

      <code><table id="current_relationship" class="display">
      <thead>
      <tr>
      <th>

      {ts}Relationship{/ts}</th>
      <th></th>
      <th>{ts}

      Contact is Admin

      {/ts}</th>
      <th>{ts}Start{/ts}

      </th>
      <th>

      {ts}End{/ts}</th>
      <th>{ts}

      City

      {/ts}</th>
      <th>{ts}State/Prov{/ts}

      </th>
      <th>

      {ts}Email{/ts}</th>
      <th>{ts}

      Phone

      {/ts}

      </th>
      <th></th>
      </tr>
      </thead>

      {foreach from=$currentRelationships item=rel} {assign var = "rtype" value = "" }

      {*if $rel.contact_a eq $contactId }

      {assign var = "rtype" value = "a_b" } {else}
      {assign var = "rtype" value = "b_a" }
      {/if*}
      <tr id="rel_{$rel.id}" class="{cycle values="odd-row,even-row"}">
      {if $relationshipTabContext}
      <td class="bold"><a href="{crmURL p='civicrm/contact/view/rel' q="action=view&reset=1&selectedChild=rel&cid=`$contactId`&id=`$rel.id`&rtype=`$rel.rtype`"}">{$rel.relation}</a></td>
      <td><a href="{crmURL p='civicrm/contact/view' q="action=view&reset=1&cid=`$rel.cid`"}">{$rel.name}</a></td>
      {else}

      <td class="bold">{$rel.relation}</strong></td>
      <td>{$rel.name}</td>

      {/if}
      {if $rel.is_permission_a_b eq '1' and $rel.rtype eq 'b_a'}
      <td>Yes</td>
      {elseif $rel.is_permission_b_a eq '1' and $rel.rtype eq 'a_b'}
      <td>Yes</td>
      {else}
      <td></td>
      {/if}

      <td>{$rel.start_date|crmDate}</td>
      <td>{$rel.end_date|crmDate}</td>
      <td>{$rel.city}</td>
      <td>{$rel.state}</td>
      <td>{$rel.email}</td>
      <td>{$rel.phone}</td>
      <td class="nowrap">{$rel.action|replace:'xx':$rel.id}</td>
      </tr>

      {/foreach}

      </table></code>

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              scolson Stephen Colson
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: