mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-27 03:51:08 +00:00
Show search result context for inventaire results
This commit is contained in:
parent
d1b788b61f
commit
095b60bff1
2 changed files with 8 additions and 1 deletions
|
@ -86,6 +86,7 @@ class Connector(AbstractConnector):
|
|||
return SearchResult(
|
||||
title=search_result.get("label"),
|
||||
key=self.get_remote_id(search_result.get("uri")),
|
||||
author=search_result.get("description"),
|
||||
view_link="{:s}/entity/{:s}".format(
|
||||
self.base_url, search_result.get("uri")
|
||||
),
|
||||
|
@ -108,6 +109,7 @@ class Connector(AbstractConnector):
|
|||
return SearchResult(
|
||||
title=title[0],
|
||||
key=self.get_remote_id(search_result.get("uri")),
|
||||
author=search_result.get("description"),
|
||||
view_link="{:s}/entity/{:s}".format(
|
||||
self.base_url, search_result.get("uri")
|
||||
),
|
||||
|
|
|
@ -18,8 +18,13 @@
|
|||
<strong>
|
||||
<a href="{{ result.view_link|default:result.key }}"{% if remote_result %} rel=”noopener” target="_blank"{% endif %}>{{ result.title }}</a>
|
||||
</strong>
|
||||
</p>
|
||||
<p>
|
||||
{% if result.author %}
|
||||
{% blocktrans with author=result.author %}by {{ author }}{% endblocktrans %}{% endif %}{% if result.year %} ({{ result.year }})
|
||||
{{ result.author }}
|
||||
{% endif %}
|
||||
{% if result.year %}
|
||||
({{ result.year }})
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
|
|
Loading…
Reference in a new issue