diff --git a/ckanext/odsh/i18n/de/LC_MESSAGES/ckanext-odsh.po b/ckanext/odsh/i18n/de/LC_MESSAGES/ckanext-odsh.po index 15630acb997dd6a9f5110d937d07656a47488f18..02b017a1084f21a03e4f934c6c0ad5f1d2b3b300 100644 --- a/ckanext/odsh/i18n/de/LC_MESSAGES/ckanext-odsh.po +++ b/ckanext/odsh/i18n/de/LC_MESSAGES/ckanext-odsh.po @@ -192,7 +192,7 @@ msgstr "Bitte geben Sie einen Namen ein" msgid "Titel: Fehlender Wert" msgstr "Bitte geben Sie einen Titel ein" -msgid "odsh_publish_date_error_label" +msgid "odsh_issued_error_label" msgstr "Bitte wählen Sie ein Veröffentlichungsdatum" msgid "Tag string: Fehlender Wert" diff --git a/ckanext/odsh/templates/package/snippets/info.html b/ckanext/odsh/templates/package/snippets/info.html index cbd86cbe119c5221b39c8fb246d707a36b9fc8ed..15db411b37129b00065415488d7f1d4565ba2360 100644 --- a/ckanext/odsh/templates/package/snippets/info.html +++ b/ckanext/odsh/templates/package/snippets/info.html @@ -44,7 +44,7 @@ Example: <div class="license-detail info-detail"> <div>{{ _('License') }}:</div> {%set lic=pkg.license_title if pkg.license_title else '-'%} - {%set name=' (' + pkg.licenseAttributionByText +')' if pkg.licenseAttributionByText else '!!!'%} + {%set name=' (' + pkg.licenseAttributionByText +')' if pkg.licenseAttributionByText else ''%} <p>{{ lic }}{{ name }}</p> </div> {% endblock %} diff --git a/ckanext/odsh/templates/package/snippets/package_basic_fields.html b/ckanext/odsh/templates/package/snippets/package_basic_fields.html index eebe17024787ec399372b7416cb3c82eca258f94..276525bfa1e5604b5c79b3e65d0017e1a6ee29d7 100644 --- a/ckanext/odsh/templates/package/snippets/package_basic_fields.html +++ b/ckanext/odsh/templates/package/snippets/package_basic_fields.html @@ -54,8 +54,8 @@ is_required=true,placeholder=_('Enter title')) }} </div> <div class='span3'> <!-- field Namensnennung --> - {{ form.input_raw('access_constraints', id='field-licence-name', value=data.access_constraints, - error=errors.access_constraints, + {{ form.input_raw('licenseAttributionByText', id='field-licence-name', value=data.licenseAttributionByText, + error=errors.licenseAttributionByText, classes=['control-full'],type='text',is_required=true,attrs={'disabled':true, 'data-module':"odsh_form", 'data-module-licensetoggle':'true' }, placeholder=_('enter name')) }} </div> @@ -75,7 +75,8 @@ is_required=true,placeholder=_('Enter title')) }} <div id='start-end' class='span3'> <!-- field temporal_start --> {% set temporal_start_label=_('odsh_temporal_start_label') %} - {{ form.input_raw('temporal_start', id='field-temporal-start', value=data.temporal_start, + {% set data_temporal_start = data.temporal_start.split('T')[0] if data.temporal_start else None %} + {{ form.input_raw('temporal_start', id='field-temporal-start', value=data_temporal_start, error=errors.temporal_start, classes=['control-full'],type='date',is_required=true,placeholder=_('from')) }} @@ -83,7 +84,8 @@ is_required=true,placeholder=_('Enter title')) }} <div class='span3'> <!-- field temporal_end --> {% set temporal_end_label='Ende des Zeitraumes' %} - {{ form.input_raw('temporal_end', id='field-temporal-end', value=data.temporal_end, + {% set data_temporal_end = data.temporal_end.split('T')[0] if data.temporal_end else None %} + {{ form.input_raw('temporal_end', id='field-temporal-end', value=data_temporal_end, error=errors.temporal_end, classes=['control-full'],type='date',is_required=true, placeholder=_('to')) }} </div> @@ -92,15 +94,12 @@ is_required=true,placeholder=_('Enter title')) }} </div> </div> - <!-- field publish date --> - {% set publish_date_value=h.odsh_now() %} - {% set error_string = _('odsh_publish_date_error_label') if errors.publish_date %} - <!-- if form_style != 'edit' && !%} --> - <!-- value=data.get('extras').publish_date, --> - {% set publish_date_label='Veröffentlichungsdatum'%} - {{ form.input('publish_date', id='field-publish-date', label=publish_date_label, - value=publish_date_value, - error=error_string, classes=['control-full'],type='date',is_required=true) }} + <!-- field issued --> + {% set issued_value=data.issued if data.issued else h.odsh_now() %} + {% set error_string = _('odsh_issued_error_label') if errors.issued %} + {% set issued_label='Veröffentlichungsdatum'%} + {{ form.input('issued', id='field-issued', label=issued_label, value=issued_value, + error=error_string, classes=['control-full'], type='date', is_required=true) }} <!-- field tags --> @@ -201,4 +200,4 @@ is_required=true,placeholder=_('Enter title')) }} </div> </div> </div> - {% endif %} \ No newline at end of file + {% endif %}