nih-cfde / cfde-deriva

Collaboration point for miscellaneous CFDE-deriva scripts
Other
2 stars 3 forks source link

Add dbgap study id info to file recordset page #357

Closed jrchudy closed 2 years ago

jrchudy commented 2 years ago

This PR intends to add the dbgap study id information as a column in the File table recordset view after Project and before File Format.

I used the same "display name" that is displayed in record page. I used the same tooltip too as the comment but truncated it to remove some extra text. Tooltip used for record page:

I attached a markdown pattern for the dbgap study id to show the file access info for the current logged in user to the file recordset and record displays. The template should read as following:

if $session.client:
  if $session.client.extensions:
    if $session.client.extensions.has_ras_permissions:
      if (lookup $session.extensions.ras_dbgap_phs_ids dbgap_study_id):
        green circle - User has access to this file.
      else:
        yellow circle - User does not have access to this file.
      endif
    else:
      // extensions defined but has_ras_permissions is false
      grey circle - User access to this file undetermined, check log in credentials.
    endif
  endif
endif