-
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.
hide relationships from package_show on search and read pages
- Loading branch information
Showing
14 changed files
with
232 additions
and
60 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
version: 1 | ||
groups: | ||
- annotation: ckanext-mbie-erms-shared | ||
options: | ||
- key: ckanext.relationship.views_without_relationships_in_package_show | ||
type: list | ||
default: search read | ||
description: | | ||
Adding relationships to the package show result can be time-consuming and | ||
may decrease the performance of pages where this action is called multiple | ||
times, such as the search page. Therefore, by default, relationships are | ||
hidden from the package show for both the search page and the package read | ||
page. To include relationships in the package_show action, you must add the | ||
flag with_relationships=True to the data_dict. |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,3 +110,4 @@ def _entity_name_by_id(entity_id): | |
) | ||
if pkg: | ||
return group.name | ||
return None |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
scheming_version: 1 | ||
dataset_type: package_with_relationship | ||
about_url: http://github.com/ckan/ckanext-relationship | ||
|
||
dataset_fields: | ||
- field_name: related_packages | ||
validators: relationship_related_entity | ||
current_entity: package | ||
current_entity_type: package_with_relationship | ||
related_entity: package | ||
related_entity_type: package_with_relationship | ||
relation_type: related_to | ||
|
||
resource_fields: | ||
|
||
- field_name: url | ||
label: URL | ||
preset: resource_url_upload | ||
|
||
- field_name: name | ||
label: Name | ||
form_placeholder: eg. January 2011 Gold Prices | ||
|
||
- field_name: description | ||
label: Description | ||
form_snippet: markdown.html | ||
form_placeholder: Some useful notes about the data | ||
|
||
- field_name: format | ||
label: Format | ||
preset: resource_format_autocomplete |
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 |
---|---|---|
|
@@ -63,3 +63,4 @@ def entity_name_by_id(entity_id: str) -> str: | |
return entity.get("name") | ||
except NotFound: | ||
pass | ||
return None |
Oops, something went wrong.