UofS-Pulse-Binfo / analyzedphenotypes

Tripal/Drupal support for analyzed phenotypic data including data loaders, exporters, trait pages and summaries on germplasm pages.
GNU General Public License v2.0
0 stars 1 forks source link

Add optional watermark to phenotype charts #82

Closed laceysanderson closed 5 years ago

laceysanderson commented 5 years ago

Metadata

Documentation:

Description

This PR adds an configurable watermark to the trait distribution charts. This is helpful in the situation were data is not yet published and you want to protect it. The watermark is applied using the Tripal d3.js API and configurable at Tripal > Extensions > Analyzed Phenotypes > Configure. Additionally, this PR moves the ontology configuration into a Set-up since it only needs to be done once.

Dependencies

This PR is not dependant on anything.

Testing?

On a site already containing analyzed phenotypic data:

  1. Before configuring the watermark, open up a trait distribution chart at [yoursite]/phenotypes/trait-distribution, a project and a germplasm with which have a hp__phenotypic_variability field.
    • You should see the default tripald3 watermark.
  2. Turn off the watermark at Tripal > Extensions > Analyzed Phenotypes > Configure. Now refresh those previously opened pages and the watermark should disappear.
  3. Turn back on the watermark and add an image path. Now refresh those previously opened pages and your custom watermark should appear. Note: the image must exist already on the server.
reynoldtan commented 5 years ago

Works perfectly 👍 Good job!

One suggestion, I think we should emphasize the part where it says anyone with advanced html and css knowledge will be able to remove.. and the part should take extra steps... to make this important warning loud and clear 📢