-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement referenceonlist view
This commit introduces a `referenceonlist` view. This view lists all references on a specific model instance. It reuses the existing `reference_list.html` template, but splits out the actual list into a partial. The view by default returns the whole html page, but for ajax/htmx requests returns only the partial.
- Loading branch information
Showing
4 changed files
with
31 additions
and
9 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
apis_bibsonomy/templates/apis_bibsonomy/partials/reference_list.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<ul> | ||
{% for reference in object_list %} | ||
<li> | ||
<a href="{{ reference.get_absolute_url }}">{{ reference }} ({{ reference.id }})</a> | ||
</li> | ||
{% empty %} | ||
<li>No references yet.</li> | ||
{% endfor %} | ||
</ul> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters