Skip to content

Commit

Permalink
pragmatic fix for popup on specificity results
Browse files Browse the repository at this point in the history
  • Loading branch information
proost committed Sep 19, 2017
1 parent 655f0fa commit 6d913f9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions planet/controllers/help.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from flask import Blueprint, render_template, abort

from planet import cache

# Dict containing all keywords and the template with the information
__TOPICS = {"gene_family": "modals/help/gene_family.html",
"interpro_domain": "modals/help/interpro_domain.html",
Expand All @@ -23,6 +25,7 @@


@help.route('/<topic>')
@cache.cached()
def help_topic(topic):
"""
Generic function to get help modals.
Expand All @@ -37,6 +40,7 @@ def help_topic(topic):


@help.route('/popup/<topic>')
@cache.cached()
def help_popup(topic):
"""
Generic function to get help popups
Expand Down
6 changes: 3 additions & 3 deletions planet/templates/search_specific_profiles.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ <h1><em>{{species.name}}</em> profiles specific for <strong>{{condition}}</stron
<th data-sort="float"><span class="sort-icon"></span><abbr title="Click to show help" href="{{ url_for('help.help_topic', topic='spm') }}" data-target="#helpModal">SPM</abbr> score</th>
<th data-sort="float"><span class="sort-icon"></span><abbr title="Click to show help" href="{{ url_for('help.help_topic', topic='entropy') }}" data-target="#helpModal">Entropy</abbr> score</th>
<th data-sort="float"><span class="sort-icon"></span><abbr title="Click to show help" href="{{ url_for('help.help_topic', topic='tau') }}" data-target="#helpModal">Tau</abbr> score</th>
<th data-sort="float">Action</th>
<th>Info</th>
<th>Action</th>
</tr>
</thead>
<tbody>
Expand All @@ -91,10 +91,10 @@ <h1><em>{{species.name}}</em> profiles specific for <strong>{{condition}}</stron
<td>{{ r.score|round(2) }}</td>
<td>{{ r.entropy|round(2) }}</td>
<td>{% if r.tau %}{{ r.tau|round(2) }}{% else %}<span class="text-muted">None</span>{% endif %}</td>
<td><a href="{{url_for('expression_profile.expression_profile_view', profile_id=r.profile_id)}}">view profile</a></td>
<td>{% if r.profile.low_abundance %}<span class="warning-message qtip_tooltip"
qtip_href="{{ url_for('help.help_popup', topic='lowabundance') }}"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i></span>{% endif %}</td>
</tr>
<td><a href="{{url_for('expression_profile.expression_profile_view', profile_id=r.profile_id)}}">view profile</a></td>
</tr>
{% endif %}
{% endfor %}
</tbody>
Expand Down

0 comments on commit 6d913f9

Please sign in to comment.