diff options
-rw-r--r-- | gn2/wqflask/__init__.py | 2 | ||||
-rw-r--r-- | gn2/wqflask/api/markdown.py | 8 | ||||
-rw-r--r-- | gn2/wqflask/templates/base.html | 2 | ||||
-rw-r--r-- | gn2/wqflask/templates/search-syntax.html | 24 |
4 files changed, 35 insertions, 1 deletions
diff --git a/gn2/wqflask/__init__.py b/gn2/wqflask/__init__.py index e3708b0b..d651005a 100644 --- a/gn2/wqflask/__init__.py +++ b/gn2/wqflask/__init__.py @@ -33,6 +33,7 @@ from gn2.wqflask.api.markdown import environments_blueprint from gn2.wqflask.api.markdown import facilities_blueprint from gn2.wqflask.api.markdown import blogs_blueprint from gn2.wqflask.api.markdown import news_blueprint +from gn2.wqflask.api.markdown import xapian_syntax_blueprint from gn2.wqflask.api.jobs import jobs as jobs_bp from gn2.wqflask.oauth2.routes import oauth2 from gn2.wqflask.oauth2.client import user_logged_in @@ -127,6 +128,7 @@ app.register_blueprint(environments_blueprint, url_prefix="/environments") app.register_blueprint(facilities_blueprint, url_prefix="/facilities") app.register_blueprint(blogs_blueprint, url_prefix="/blogs") app.register_blueprint(news_blueprint, url_prefix="/news") +app.register_blueprint(xapian_syntax_blueprint, url_prefix="/search-syntax") app.register_blueprint(jupyter_notebooks, url_prefix="/jupyter_notebooks") app.register_blueprint(resource_management, url_prefix="/resource-management") diff --git a/gn2/wqflask/api/markdown.py b/gn2/wqflask/api/markdown.py index 580b9ac0..aa7dd3c4 100644 --- a/gn2/wqflask/api/markdown.py +++ b/gn2/wqflask/api/markdown.py @@ -24,6 +24,7 @@ links_blueprint = Blueprint("links_blueprint", __name__) policies_blueprint = Blueprint("policies_blueprint", __name__) facilities_blueprint = Blueprint("facilities_blueprint", __name__) news_blueprint = Blueprint("news_blueprint", __name__) +xapian_syntax_blueprint = Blueprint("xapian_syntax_blueprint", __name__) blogs_blueprint = Blueprint("blogs_blueprint", __name__) @@ -117,6 +118,13 @@ def news(): rendered_markdown=render_markdown("general/news/news.md")), 200 +@xapian_syntax_blueprint.route('/') +def xapian(): + return render_template( + "search-syntax.html", + rendered_markdown=render_markdown("general/search/xapian_syntax.md")), 200 + + @environments_blueprint.route("/") def environments(): diff --git a/gn2/wqflask/templates/base.html b/gn2/wqflask/templates/base.html index 14b484a5..eb4e9e91 100644 --- a/gn2/wqflask/templates/base.html +++ b/gn2/wqflask/templates/base.html @@ -189,7 +189,7 @@ </span> --> <span style="padding: 5px;margin-left: 65px;" > - <a style="text-decoration: none" target="_blank" href="https://issues.genenetwork.org/topics/xapian/xapian-search-queries"> + <a style="text-decoration: none" target="_blank" href="/search-syntax"> <i style="text-align: center;color:#336699;;" class="fa fa-question-circle fa-2x" title="see more search hints" aria-hidden="true"></i> </a> </span> diff --git a/gn2/wqflask/templates/search-syntax.html b/gn2/wqflask/templates/search-syntax.html new file mode 100644 index 00000000..52538826 --- /dev/null +++ b/gn2/wqflask/templates/search-syntax.html @@ -0,0 +1,24 @@ +{% extends "base.html" %} + +{% block title %}Global Search Syntax{% endblock %} + +{% block css %} +<link rel="stylesheet" type="text/css" href="/static/new/css/markdown.css" /> +{% endblock %} + +{% block content %} + + <div class="github-btn-container"> + <div class="github-btn"> + <a href="https://github.com/genenetwork/gn-docs/blob/master/general/search/xapian_syntax.md"> + Edit Text + <img src="/static/images/edit.png"> + </a> + </div> +</div> +<div id="markdown" class="container"> + {{ rendered_markdown|safe }} + +</div> + +{% endblock %}
\ No newline at end of file |