Highlight Pending Records

  • By Jim Michael 2 Years Ago

By default, Rock presents a very clean UI on the Person Profile page. This can be seen in the way it shows a person's Record Status. Only a status of Inactive causes a red badge to show up... statuses of Active or Pending are not visible or obvious unless you edit the person.

In our environment the preference is to highlight Pending records so they are easily noticeable. This is largely due to the way our prior ChMS worked where we have lots of muscle memory, and we're willing to give up a tiny bit of "clean" to gain more visibility into the Record Status.

Luckily this is a super-simple fix because there is an existing Inactive Record Status Person Profile Badge that handles the display of the red Inactive badge. We'll just add some logic to this badge to meet our needs.

  • Go to Admin Tools|General Settings|Person Profile Badges and edit the Inactive Record Status badge.

  • Replace the existing Lava with this:

{% assign RecStatus = Person.RecordStatusValue.Value %}
{% if RecStatus != empty and RecStatus == "Inactive" %}
    <span class="label label-danger" title="{{ Person.RecordStatusReasonValue.Value }}" data-toggle="tooltip">{{ RecStatus }}</span> 
{% elseif RecStatus == "Pending" %}
    <span class="label label-warning">{{ RecStatus }}</span>
{% endif -%}
  • Save the badge.

Now visit a pending record and you should see this:

You can add a style="color:#xxxxxx" to the label with a text color of your choice if you don't like white on yellow. You could also extend the concept further to show the the badge for Active records (or any other statuses you've added), but with only three statuses it's not necessary as no badge implies Active.

The Crossing
St. Louis, MO

IT Manager at The Crossing in St. Louis. Lover of all things Rock!