-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#56] Consolidate and simplify publisher handling
Values for dct:publisher are obtained from the first one of these that are present: 1. A scheming `publisher` field (assuming the `euro_dcat_ap_scheming` profile is loaded) 2. The legacy `publisher_*` extras 3. The dataset's own organization For the last case, a sample schema for organizations has been added that implements all the publisher properties supported by the processors.
- Loading branch information
Showing
6 changed files
with
257 additions
and
42 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
scheming_version: 2 | ||
about_url: http://github.com/ckan/ckanext-dcat | ||
description: > | ||
An organization schema that implements the properties supported | ||
by default in the dct:publisher property of a dcat:Dataset | ||
fields: | ||
|
||
- field_name: title | ||
label: Name | ||
validators: ignore_missing unicode_safe | ||
form_snippet: large_text.html | ||
form_attrs: {data-module: slug-preview-target} | ||
|
||
- field_name: name | ||
label: URL | ||
validators: not_empty unicode_safe name_validator group_name_validator | ||
form_snippet: slug.html | ||
form_placeholder: my-theme | ||
|
||
- field_name: notes | ||
label: Description | ||
form_snippet: markdown.html | ||
form_placeholder: A little information about this organization. | ||
|
||
- field_name: email | ||
label: Email | ||
display_snippet: email.html | ||
|
||
- field_name: url | ||
label: URL | ||
display_snippet: link.html | ||
|
||
- field_name: dcat_type | ||
label: Type |
8 changes: 8 additions & 0 deletions
8
ckanext/dcat/templates/scheming/form_snippets/repeating_subfields.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,8 @@ | ||
{% ckan_extends %} | ||
|
||
{% block add_button %} | ||
{# Hide the Add button if we only want one set of subfields #} | ||
{% if not field.repeating_once %} | ||
{{ super() }} | ||
{% endif %} | ||
{% 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
Oops, something went wrong.