clinwiki-org / clinwiki

Crowd-source tool to annotate, rank and generally enhance the clarity and accuracy of clinical trial information.
https://www.clinwiki.org
MIT License
16 stars 16 forks source link

helper text crowd_keys with lookup #1058

Open williamhoos opened 3 years ago

williamhoos commented 3 years ago

Assumes #1062 is complete. The goal of this ticket is to support pulling and substituting the . #1059 will then support the equivalent functionality from crowd_values instead of crowd_keys

Steps

Sample : "displayName" : "Sample Display Name [span class="mm-tooltip"][u][i class="fa fa-info-circle"][/u][span class="mm-tooltiptext mm-tooltip-tr"]{{crowd_key_helper_text}}[/span]" (note: using ] and [ to avoid html in issue comments here from > and < .

Note the insertion of {{crowd_key_helper_text}} which would replace this with the value from the crowd_key_helper_text field value from the crowd_key table for the crowd_key that matches the the crowd_key that matches the "name" field in the island_config for the facet/agg being built

If no value, no error, just show blank.

Note: the benefit of mailmerge/handlebars is hard coding of helper text of aggs that don't have a crowd_key_helper_text look-up if code is shared. Also opens potential for other field values about crowd_key (like cardinal counts) and re-use of functionality in the crowd_values

If mailmerge/handlebars is not possible, let's discuss alternative approaches with new variables in island_config