aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Nduli2024-09-16 11:28:44 +0300
committerBonfaceKilz2024-09-17 11:40:42 +0300
commit02b2ac384953f2d69479a1ea53a071043394b590 (patch)
treef3d6f48e26f3544f1f35ccd9b95556d8ea314e21
parent44d3ab8d7070317241f0348edcf57fb4c3b044ca (diff)
downloadgenenetwork2-02b2ac384953f2d69479a1ea53a071043394b590.tar.gz
fix: ui redesign with history button and ignore default web_url value
-rw-r--r--gn2/wqflask/templates/wiki/genewiki.html6
-rw-r--r--gn2/wqflask/views.py3
2 files changed, 6 insertions, 3 deletions
diff --git a/gn2/wqflask/templates/wiki/genewiki.html b/gn2/wqflask/templates/wiki/genewiki.html
index f0d6675f..b07e86e0 100644
--- a/gn2/wqflask/templates/wiki/genewiki.html
+++ b/gn2/wqflask/templates/wiki/genewiki.html
@@ -26,14 +26,14 @@
{% endif %}
</div>
- {% if is_logged_in %}
<div class="col-sm-2">
+ {% if is_logged_in %}
<a href="{{ url_for('edit_wiki', comment_id=entry['id']) }}">
<span class="glyphicon glyphicon-edit" aria-hidden="true"></span>
</a>
+ {% endif %}
+ <sup><small>[<a href="/genewiki/{{ entry.id }}/history" target="_blank">history</a>]</small></sup>
</div>
- {% endif %}
- <sup><small>[<a href="/genewiki/{{ entry.id }}/history" target="_blank">history</a>]</small></sup>
</div>
</li>
{% endfor %}
diff --git a/gn2/wqflask/views.py b/gn2/wqflask/views.py
index 5c856b77..29df7596 100644
--- a/gn2/wqflask/views.py
+++ b/gn2/wqflask/views.py
@@ -1620,6 +1620,9 @@ def edit_wiki(comment_id: int):
)
if request.method == "POST":
post_data = request.form
+ web_url = post_data["web_url"]
+ if web_url == "http://": # default prefilled value in form
+ web_url = ""
payload = {
"symbol": post_data["symbol"],
"pubmed_ids": [x.strip() for x in post_data["pubmed_ids"].split()],