-
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: register collection-explorer collection in debug mode
- Loading branch information
1 parent
feaa86c
commit 42e547f
Showing
10 changed files
with
124 additions
and
15 deletions.
There are no files selected for viewing
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
20 changes: 20 additions & 0 deletions
20
ckanext/collection/templates/collection/serialize/collection_explorer/main.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,20 @@ | ||
{% if not request.headers["hx-request"] %} | ||
{% extends "page.html" %} | ||
{% asset "collection/htmx" %} | ||
{% endif %} | ||
|
||
{% block main_content %} | ||
<ul hx-boost="true" hx-target="#collection-outlet" hx-push-url="false"> | ||
{%- for record in collection %} | ||
<li> | ||
<a href="{{ h.url_for('ckanext-collection.render', name=record) }}"> | ||
{{ record }} | ||
</a> | ||
</li> | ||
{% endfor -%} | ||
</ul> | ||
|
||
<div id="collection-outlet"> | ||
</div> | ||
|
||
{% endblock %} |
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,11 @@ | ||
import pytest | ||
|
||
from ckanext.collection import shared | ||
|
||
|
||
@pytest.fixture() | ||
def collection_registry(): | ||
"""Collection registry cleaned after each test.""" | ||
|
||
yield shared.collection_registry | ||
shared.collection_registry.reset() |
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
File renamed without changes.
File renamed without changes.