Skip to content

Commit

Permalink
Add library item search template (#1116)
Browse files Browse the repository at this point in the history
  • Loading branch information
brylie committed Sep 18, 2024
1 parent 2420df1 commit 5894d0c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions library/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ def get_queryset(cls):
),
]

search_template = "search/library_item.html"

search_fields = Page.search_fields + [
index.SearchField("body"),
index.RelatedFields(
Expand Down
11 changes: 11 additions & 0 deletions search/templates/search/library_item.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{% load wagtailcore_tags %}

<div class="card my-1">
<div class="card-body">
<h2 class="card-title h5">
<a href="{% pageurl entity %}">
{{ entity.title }}
</a>
</h2>
</div>
</div>

0 comments on commit 5894d0c

Please sign in to comment.