diff options
-rw-r--r-- | gn2/wqflask/templates/wiki/genewiki.html | 6 | ||||
-rw-r--r-- | gn2/wqflask/views.py | 3 |
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()], |