aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorBonfaceKilz2021-07-10 09:55:12 +0300
committerBonfaceKilz2021-07-12 09:02:16 +0300
commitd01b1aadcd3604e4f592f64ce7d9eb010d4c7230 (patch)
tree4311b225abdc79e18f6b75d842144de52a7a5336 /wqflask
parent76b4cb3cfa945c0016fa083bb672e42816707572 (diff)
downloadgenenetwork2-d01b1aadcd3604e4f592f64ce7d9eb010d4c7230.tar.gz
templates: show_trait_details: Show edit buttons conditionally
* wqflask/wqflask/templates/show_trait_details.html: Check the data type, and load different edit buttons.
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/templates/show_trait_details.html6
1 files changed, 6 insertions, 0 deletions
diff --git a/wqflask/wqflask/templates/show_trait_details.html b/wqflask/wqflask/templates/show_trait_details.html
index 83f7b0ac..bb30c54c 100644
--- a/wqflask/wqflask/templates/show_trait_details.html
+++ b/wqflask/wqflask/templates/show_trait_details.html
@@ -235,8 +235,14 @@
{% endif %}
<button type="button" id="view_in_gn1" class="btn btn-primary" title="View Trait in GN1" onclick="window.open('http://gn1.genenetwork.org/webqtl/main.py?cmd=show&db={{ this_trait.dataset.name }}&probeset={{ this_trait.name }}', '_blank')">Go to GN1</button>
{% if admin_status == "owner" or admin_status == "edit-admins" or admin_status == "edit-access" %}
+ {% if this_trait.dataset.type == 'Publish' %}
<button type="button" id="edit_resource" class="btn btn-success" title="Edit Resource" onclick="window.open('/trait/{{ this_trait.name }}/edit/{{ this_trait.dataset.id }}', '_blank')">Edit</button>
{% endif %}
+
+ {% if this_trait.dataset.type == 'ProbeSet' %}
+ <button type="button" id="edit_resource" class="btn btn-success" title="Edit Resource" onclick="window.open('/trait/edit/probeset-name/{{ this_trait.name }}', '_blank')">Edit</button>
+ {% endif %}
+ {% endif %}
</div>
</div>