summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-09-03 19:35:07 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-09-03 19:35:07 -0700
commit56e30786ccf326ff69deee9a0dcf86b032d3b1ae (patch)
tree569f5f6325402824e4c2cc89b24c6d9159ecacce
parent37aadd7097f1405f05448bd601461786bdc342d4 (diff)
downloadfatcat-56e30786ccf326ff69deee9a0dcf86b032d3b1ae.tar.gz
fatcat-56e30786ccf326ff69deee9a0dcf86b032d3b1ae.zip
do release search by container_id, not issnl
-rw-r--r--python/fatcat_web/routes.py4
-rw-r--r--python/fatcat_web/templates/container_view.html3
2 files changed, 5 insertions, 2 deletions
diff --git a/python/fatcat_web/routes.py b/python/fatcat_web/routes.py
index 5789dc48..f313fce0 100644
--- a/python/fatcat_web/routes.py
+++ b/python/fatcat_web/routes.py
@@ -632,6 +632,10 @@ def release_search():
if issnl and query:
query += ' container_issnl:"{}"'.format(issnl)
+ container_id = request.args.get('container_id')
+ if container_id and query:
+ query += ' container_id:"{}"'.format(container_id)
+
if 'q' in request.args.keys():
# always do files for HTML
found = do_release_search(query, fulltext_only=fulltext_only)
diff --git a/python/fatcat_web/templates/container_view.html b/python/fatcat_web/templates/container_view.html
index 1998bc68..c2731db2 100644
--- a/python/fatcat_web/templates/container_view.html
+++ b/python/fatcat_web/templates/container_view.html
@@ -23,13 +23,12 @@
Published by {{ container.publisher }}
{% endif %}
-{% if container.issnl %}
<h3>Search Releases from this Container</h3>
<form class="" role="search" action="/release/search" method="get">
<div class="ui form">
<div class="ui action input large fluid">
<input type="text" placeholder="Search Articles..." name="q" aria-label="search release metadata">
- <input type="hidden" name="container_issnl" value="{{ container.issnl }}">
+ <input type="hidden" name="container_id" value="{{ container.ident }}">
<button class="ui button">Search</button>
</div>
</div>