Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #96
See demo on the ONTIE DROID: https://droid.ontodev.com/ONTIE/branches/html-search-demo/views/src/scripts/tree.sh?id=DOID%3A0060499&db=ontie
If you type in the search box, typeahead will still display predictive text. If you click one of the search results from typeahead or press the down arrow and hit enter while one of those search results is highlighted, it will take you directly to that term. Alternatively, if you type in some text and hit enter without highlighting a search result, it will take you to a search result page: https://droid.ontodev.com/ONTIE/branches/html-search-demo/views/src/scripts/tree.sh?search_text=immune&db=ontie
From there, you can click on a term to go to that term's page. This is the same way that the OLS search bar works, as far as I can tell.
This is a first pass at the HTML display for search results, I'm happy to update this page as needed. Here's some info from the docs on using it in the command line. There are quite a few new args, but you can ignore them if you're using the JSON output.
gizmos.search
- HTMLYou can also return the search results as an HTML page. The module includes a few additional options to do this, but minimally, you need to include
-f
/--format
:The additional options for use with the HTML output are:
-H
/--href
: the query string format to use in links to search results, see Tree Linksd
/--db-name
: the name of the database if you want to include it in yourhref
-r
/--include-search
: flag to include a search bar at the top of the search results page-c
/--contents-only
: flag to only produce HTML content without the<html>
and<body>
tags... and here's how I've implemented it for ONTIE in a
tree.sh
script: https://github.com/IEDB/ONTIE/blob/html-search-demo/src/scripts/tree.shThe relevant code is that the search bar now directs to
?search_text=[SEARCH_TEXT]&db=[DB]
(if a db name has been provided) when you hit enter without highlighting a typeahead result.