diff --git a/CHANGELOG.md b/CHANGELOG.md index ae55ee8a957164171a7c63d5f61c0c40a4c357d5..328feecccf5f2d112bfeedf6d2875cef086fb840 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,45 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.3.0] + +### Added + +- CSRF inputs are now included in template forms. +- Introducing a new helper function: `format_resource_format`. This function is used to format a resource format string. +- Resource descriptions are now displayed below the resource title in the resources list. + +### Removed + +- Completely removed data requests. +- Avoided the usage of the global context variable c where possible. +- Removed deprecated subject mappings JSON template. +- Removed deprecated activities feature (CKAN activities have been extracted into a separate activity plugin). + +### Changed + +- Updated minimum CKAN version requirement from `2.9` to `2.10`. Please run `ckan db upgrade` after updating. +- Replaced `is_okd_compliant` with `od_conformance` and `is_osi_compliant` with `osd_conformance` in the [licenses.json](./ckanext/odsh/resources/licenses.json) file. +- Deprecated methods replaced with their respective new versions from plugin interfaces: + - `ckan.plugins.interfaces.IResourceController`: + - Replaced `before_create` with `before_resource_create` + - Replaced `after_create` with `after_resource_create` + - Replaced `before_update` with `before_resource_update` + - Replaced `after_update` with `after_resource_update` + - Replaced `before_delete` with `before_resource_delete` + - Replaced `after_delete` with `after_resource_delete` + - Replaced `before_show` with `before_resource_show` + - `ckan.plugins.interfaces.IPackageController`: + - Replaced `after_create` with `after_dataset_create` + - Replaced `after_update` with `after_dataset_update` + - Replaced `after_delete` with `after_dataset_delete` + - Replaced `after_show` with `after_dataset_show` + - Replaced `before_search` with `before_dataset_search` + - Replaced `after_search` with `after_dataset_search` + - Replaced `before_index` with `before_dataset_index` +- Updated minimu version of ckanext-spatial extension to `2.0.0`. +- Moved `fanstatic` webassets to `assets` directory. + ## [2.2.0] ### Added @@ -54,6 +93,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed +- Removed support for old CKAN versions prior 2.9. - Python 2 support has been dropped to align with the latest standards and focus on Python 3 compatibility. - ICAP support has been removed. Please note that the functionality associated with ICAP is no longer available. - Matomo support has been discontinued. Matomo-related features will no longer be accessible. diff --git a/README.md b/README.md index 330ab15567a138e92885185c63115c277659f086..10e552829915b7ce75ebecb9845749729b317092 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,6 @@ the config file is located at `/etc/ckan/default/production.ini`). odsh_collections qa archiver - recline_view report spatial_metadata spatial_query @@ -100,6 +99,12 @@ Parameter | Type | Default | Description `ckanext.odsh.testuser` | `string` | `None` | Name of user for testing. `ckanext.odsh.testuserpass` | `string` | `None` | Password of user for testing. +Additionaly you might want to set the following configuration parameters: + +```ini +licenses_group_url = file://<path_to_ckan>/default/src/ckanext-odsh/ckanext/odsh/resources/licenses.json +``` + ### Testing To ensure the quality and functionality of the `ckanext-odsh` extension, a comprehensive @@ -132,7 +137,7 @@ To enable internationalization of strings, follow these steps: python setup.py extract_messages ``` -This command will generate a template PO file named `ckanext/odsh/i18n/ckanext-odsh.pot`. You can utilize tools like POEdit to work with this file. +This command will generate a template PO file named `ckanext/odsh/i18n/ckanext-odsh.pot`. You can utilize tools like [POEdit](https://poedit.net/) to work with this file. For detailed instructions on internationalizing strings in extensions, refer to CKAN's official guide on [translating extensions](https://docs.ckan.org/en/latest/extensions/translating-extensions.html). diff --git a/ckanext/odsh/fanstatic/.gitignore b/ckanext/odsh/assets/.gitignore similarity index 100% rename from ckanext/odsh/fanstatic/.gitignore rename to ckanext/odsh/assets/.gitignore diff --git a/ckanext/odsh/fanstatic/autocomplete.css b/ckanext/odsh/assets/autocomplete.css similarity index 100% rename from ckanext/odsh/fanstatic/autocomplete.css rename to ckanext/odsh/assets/autocomplete.css diff --git a/ckanext/odsh/fanstatic/autocomplete.js b/ckanext/odsh/assets/autocomplete.js similarity index 100% rename from ckanext/odsh/fanstatic/autocomplete.js rename to ckanext/odsh/assets/autocomplete.js diff --git a/ckanext/odsh/fanstatic/bootstrap-datepicker.js b/ckanext/odsh/assets/bootstrap-datepicker.js similarity index 100% rename from ckanext/odsh/fanstatic/bootstrap-datepicker.js rename to ckanext/odsh/assets/bootstrap-datepicker.js diff --git a/ckanext/odsh/fanstatic/bootstrap-multiselect.css b/ckanext/odsh/assets/bootstrap-multiselect.css similarity index 100% rename from ckanext/odsh/fanstatic/bootstrap-multiselect.css rename to ckanext/odsh/assets/bootstrap-multiselect.css diff --git a/ckanext/odsh/fanstatic/bootstrap-multiselect.js b/ckanext/odsh/assets/bootstrap-multiselect.js similarity index 99% rename from ckanext/odsh/fanstatic/bootstrap-multiselect.js rename to ckanext/odsh/assets/bootstrap-multiselect.js index 10ece14647d0b3d8a4618eabfd2a50611985d356..c4753719b909c7fec25256878df5f7d86e0daa67 100644 --- a/ckanext/odsh/fanstatic/bootstrap-multiselect.js +++ b/ckanext/odsh/assets/bootstrap-multiselect.js @@ -461,7 +461,7 @@ }, enableHTML: false, - buttonClass: 'btn btn-default', + buttonClass: 'form-select', inheritClass: false, buttonWidth: 'auto', buttonContainer: '<div class="btn-group" />', @@ -500,7 +500,7 @@ includeResetDivider: false, resetText: 'Reset', templates: { - button: '<button type="button" class="multiselect dropdown-toggle" data-toggle="dropdown"><span class="multiselect-selected-text"></span> <b class="caret"></b></button>', + button: '<button type="button" class="multiselect dropdown-toggle" data-bs-toggle="dropdown"><span class="multiselect-selected-text"></span></button>', ul: '<ul class="multiselect-container dropdown-menu"></ul>', filter: '<li class="multiselect-item multiselect-filter"><div class="input-group"><span class="input-group-addon"><i class="glyphicon glyphicon-search"></i></span><input class="form-control multiselect-search" type="text" /></div></li>', filterClearBtn: '<span class="input-group-btn"><button class="btn btn-default multiselect-clear-filter" type="button"><i class="glyphicon glyphicon-remove-circle"></i></button></span>', diff --git a/ckanext/odsh/fanstatic/common_map.js b/ckanext/odsh/assets/common_map.js similarity index 100% rename from ckanext/odsh/fanstatic/common_map.js rename to ckanext/odsh/assets/common_map.js diff --git a/ckanext/odsh/fanstatic/dataset_map.css b/ckanext/odsh/assets/dataset_map.css similarity index 100% rename from ckanext/odsh/fanstatic/dataset_map.css rename to ckanext/odsh/assets/dataset_map.css diff --git a/ckanext/odsh/fanstatic/datepicker.css b/ckanext/odsh/assets/datepicker.css similarity index 100% rename from ckanext/odsh/fanstatic/datepicker.css rename to ckanext/odsh/assets/datepicker.css diff --git a/ckanext/odsh/fanstatic/img/pencil.png b/ckanext/odsh/assets/img/pencil.png similarity index 100% rename from ckanext/odsh/fanstatic/img/pencil.png rename to ckanext/odsh/assets/img/pencil.png diff --git a/ckanext/odsh/fanstatic/leaflet.css b/ckanext/odsh/assets/leaflet.css similarity index 100% rename from ckanext/odsh/fanstatic/leaflet.css rename to ckanext/odsh/assets/leaflet.css diff --git a/ckanext/odsh/fanstatic/leaflet.draw.css b/ckanext/odsh/assets/leaflet.draw.css similarity index 100% rename from ckanext/odsh/fanstatic/leaflet.draw.css rename to ckanext/odsh/assets/leaflet.draw.css diff --git a/ckanext/odsh/fanstatic/moment.js b/ckanext/odsh/assets/moment.js similarity index 100% rename from ckanext/odsh/fanstatic/moment.js rename to ckanext/odsh/assets/moment.js diff --git a/ckanext/odsh/fanstatic/odsh.css b/ckanext/odsh/assets/odsh.css similarity index 91% rename from ckanext/odsh/fanstatic/odsh.css rename to ckanext/odsh/assets/odsh.css index 75044105b589c92d3a07043ff3e48373f992a778..fc32a357d990bc682709db9bf5cbc8b4126bc358 100644 --- a/ckanext/odsh/fanstatic/odsh.css +++ b/ckanext/odsh/assets/odsh.css @@ -1,3 +1,14 @@ +/* Variables */ +:root { + --odsh-color-sh-red: #d4004b; + --odsh-color-sh-blue: #003064; + --odsh-color-sh-blue-light: #e4f2f8; + --odsh-color-sh-blue-2: #0089ca; + --odsh-color-sh-blue-grey: #657592; + --odsh-color-sh-blue-dark: #001E49; +} + + /* FONTS */ @font-face { @@ -6,8 +17,6 @@ src: url("/base/fonts/Fonts/905300/fd479df2-01b0-4e3a-a411-915c477f1352.eot?#iefix") format("eot"), url("/base/fonts/Fonts/905300/1d3191cd-ae8c-45e2-bb04-11e96d8fa974.woff2") format("woff2"), url("/base/fonts/Fonts/905300/b252d464-65cb-4950-88f7-ac0a1bf79b75.woff") format("woff"), url("/base/fonts/Fonts/905300/b3d18117-6517-4d3f-afc1-774086ff5fc1.ttf") format("truetype"); } - - /* css allgemein (body, etc.) */ body { @@ -17,7 +26,7 @@ body { line-height: 1.2; font-size: 16px; background: none; - /* background-color: #d4004b; */ + /* background-color: var(--odsh-color-sh-red); */ } html { @@ -90,7 +99,7 @@ h3, } h1 { - color: #003064; + color: var(--odsh-color-sh-blue); font-size: 38px; font-weight: 500; } @@ -144,6 +153,10 @@ h3 { max-width: 100%; width: auto; } + + .navbar > .container { + justify-content: flex-start; + } } @media (max-width: 767px) { @@ -236,7 +249,7 @@ img { margin: 0; border: 1px; background-color: #f2f2f2; - color: #003064; + color: var(--odsh-color-sh-blue); } .search-form h2, @@ -247,7 +260,7 @@ img { margin-right: 22px; font-size: 24px; letter-spacing: 0.01em; - color: #003064; + color: var(--odsh-color-sh-blue); font-weight: 300; line-height: 28px; } @@ -411,7 +424,7 @@ section#dataset-collection .button-container img { .page-heading { font-size: 25px; - color: #003064; + color: var(--odsh-color-sh-blue); font-weight: 300; border-bottom: 4px solid #dbdbdb; padding-bottom: 10px @@ -447,6 +460,7 @@ input[type=checkbox] { .secondary.span3 { box-sizing: border-box; + width: initial; min-width: 300px; max-width: 300px; padding: 40.66px 16px 0px; @@ -484,7 +498,7 @@ input[type=checkbox] { @media (max-width: 1023px) { .primary { - padding-left: 0px; + padding: 0px; width: 100%; margin-left: 0; } @@ -514,6 +528,7 @@ input[type=checkbox] { } .filter-reset { + display: inline-block; padding: 0px 0px 10px 0px; margin-top: 18px; } @@ -533,7 +548,7 @@ input[type=checkbox] { .filter-reset-box a { font-size: 12px; - color: #003064; + color: var(--odsh-color-sh-blue); } .filters section nav { @@ -781,7 +796,7 @@ label.rangesearch.disabled { } .pill.error .remove .fa.fa-times { - background-color: #d4004b; + background-color: var(--odsh-color-sh-red); } .odsh-dataset-item { @@ -824,11 +839,12 @@ label.rangesearch.disabled { } .organization-item { + display: block; padding: 5px 0px 5px 0px; border-bottom: 2px solid #DBDBDB; } -a .organization-item { +a.organization-item { color: black; } @@ -865,6 +881,7 @@ a:focus.organization-item { font-weight: normal; font-size: 20px; word-wrap: break-word; + word-break: break-word; width: 100%; margin-bottom: 12px; } @@ -936,15 +953,12 @@ ul.dataset-resources { } .dataformat-label { - background-color: #003064 !important; - padding: 3px 3px 1px 3px; - font-size: 14px; - margin-right: 4px; + background-color: var(--odsh-color-sh-blue) !important; } .dataformat-label:hover { - background-color: #d4004b !important; + background-color: var(--odsh-color-sh-red) !important; } @@ -993,10 +1007,6 @@ a.odsh-star:hover { vertical-align: middle; } -.dataformat-label:hover { - background-color: #d4004b !important; -} - .dataset-info p { font-size: 12px; margin-bottom: 1px; @@ -1008,6 +1018,10 @@ a.odsh-star:hover { .dataset-info.issued {} +.toolbar .breadcrumb .home { + padding-left: 0px; +} + .toolbar .breadcrumb>li a { font-weight: normal !important; font-size: 15px; @@ -1021,6 +1035,7 @@ a.odsh-star:hover { label { font-size: 16px; font-weight: normal; + margin-bottom: 5px; } label:after { @@ -1045,7 +1060,7 @@ label:after { border-color: #77879f; border-radius: 0; font-size: 14px; - color: #657592; + color: var(--odsh-color-sh-blue-grey); font-style: italic } @@ -1063,7 +1078,7 @@ input#field-username { .control-group.error select, .control-group.error .select2-choices, .control-group.error textarea { - border-color: #d4004b; + border-color: var(--odsh-color-sh-red); /* SH Rot */ } @@ -1080,11 +1095,15 @@ select, textarea, input[type="text"], input[type="password"], input[type="dateti .alert-danger, .alert-error { background-color: transparent; - border-color: #d4004b; - /* SH Rot */ - color: #d4004b; + border-color: var(--odsh-color-sh-red); /* SH Rot */ - font-style: italic; + color: var(--odsh-color-sh-red); +} + +.alert-info, .alert-primary { + color: #31708f; + background-color: var(--odsh-color-sh-blue-light); + border: none; } .alert { @@ -1103,7 +1122,7 @@ select, textarea, input[type="text"], input[type="password"], input[type="dateti } .control-group.error .input-prepend .add-on { - border-color: #d4004b; + border-color: var(--odsh-color-sh-red); /* SH Rot */ background-color: #F6F7F9; } @@ -1119,59 +1138,59 @@ select, textarea, input[type="text"], input[type="password"], input[type="dateti } .select2-default { - color: #657592 !important; + color: var(--odsh-color-sh-blue-grey) !important; } .select2-container-multi .select2-choices .select2-search-choice { - color: #657592 !important; + color: var(--odsh-color-sh-blue-grey) !important; } /* placeholders cannot be combined... */ .controls input::-webkit-input-placeholder { - color: #657592 !important + color: var(--odsh-color-sh-blue-grey) !important } .controls input::-webkit-input-placeholder { - color: #657592 !important + color: var(--odsh-color-sh-blue-grey) !important } .controls input::-moz-placeholder { - color: #657592 !important + color: var(--odsh-color-sh-blue-grey) !important } .controls input::-ms-placeholder { - color: #657592 !important + color: var(--odsh-color-sh-blue-grey) !important } .controls input::placeholder { - color: #657592 !important + color: var(--odsh-color-sh-blue-grey) !important } .controls textarea::-webkit-input-placeholder { - color: #657592 !important + color: var(--odsh-color-sh-blue-grey) !important } .controls textarea::-webkit-input-placeholder { - color: #657592 !important + color: var(--odsh-color-sh-blue-grey) !important } .controls textarea::-moz-placeholder { - color: #657592 !important + color: var(--odsh-color-sh-blue-grey) !important } .controls textarea::-ms-placeholder { - color: #657592 !important + color: var(--odsh-color-sh-blue-grey) !important } .controls textarea::placeholder { - color: #657592 !important + color: var(--odsh-color-sh-blue-grey) !important } .slug-preview .btn.btn-mini, .btn.btn-primary { background-image: none; - background-color: #0089ca; + background-color: var(--odsh-color-sh-blue-2); border: none; border-radius: 0; font-size: 18px; @@ -1233,7 +1252,7 @@ select, textarea, input[type="text"], input[type="password"], input[type="dateti .image-upload a.btn.disabled:hover, .image-upload .btn.disabled:hover, .btn.disabled.btn-primary:hover { - background-color: #0089ca; + background-color: var(--odsh-color-sh-blue-2); color: white; } @@ -1250,12 +1269,12 @@ select, textarea, input[type="text"], input[type="password"], input[type="dateti -moz-border-radius: 0; border-radius: 0; border-bottom-color: transparent; - border: 1px solid #0089ca; + border: 1px solid var(--odsh-color-sh-blue-2); background-image: none; background-color: white; text-shadow: none; padding: 9px 12px; - color: #0089ca; + color: var(--odsh-color-sh-blue-2); font-weight: normal; font-size: 16px; } @@ -1271,7 +1290,7 @@ select, textarea, input[type="text"], input[type="password"], input[type="dateti } .btn:hover { - background-color: #0089ca; + background-color: var(--odsh-color-sh-blue-2); color: white; } @@ -1282,7 +1301,7 @@ select, textarea, input[type="text"], input[type="password"], input[type="dateti .image-upload .btn { color: white; - background-color: #0089ca; + background-color: var(--odsh-color-sh-blue-2); border: none; } @@ -1293,7 +1312,7 @@ select, textarea, input[type="text"], input[type="password"], input[type="dateti margin-left: 2px; margin-top: 4px; display: inline-block; - color: #003064; + color: var(--odsh-color-sh-blue); } /* remove icon in upload button */ @@ -1330,12 +1349,12 @@ select, textarea, input[type="text"], input[type="password"], input[type="dateti .stages li.active .highlight { color: #ffffff; - background: #003064; + background: var(--odsh-color-sh-blue); } /* .stages li.last.uncomplete::after, */ .stages li.uncomplete .highlight { - color: #003064; + color: var(--odsh-color-sh-blue); background: rgb(204, 214, 224); } @@ -1345,13 +1364,13 @@ select, textarea, input[type="text"], input[type="password"], input[type="dateti } .stages li.complete .highlight { - color: #003064; + color: var(--odsh-color-sh-blue); background: rgb(204, 214, 224); } .stages li.active:after { - border-top-color: #003064; - border-bottom-color: #003064; + border-top-color: var(--odsh-color-sh-blue); + border-bottom-color: var(--odsh-color-sh-blue); } .stages li.complete:after { @@ -1381,7 +1400,7 @@ select, textarea, input[type="text"], input[type="password"], input[type="dateti .footer { color: white; border-top: 60px solid #f2f2f2; - background: #d4004b; + background: var(--odsh-color-sh-red); max-width: 1280px; margin: auto; } @@ -1490,15 +1509,15 @@ body { } } -.toolbar .breadcrumb>li+li::before { - padding: 0 9px; +.toolbar .breadcrumb li:not(:first-child)::before { + float: left; + padding-right: 9px; background-image: url(/base/images/arrow-right.png); background-repeat: no-repeat; background-size: 8px 12px; - background-position: 4px 1px; - display: inline-block; - width: 12px; - height: 12px; + background-position: 4px 5px; + width: 22px; + height: 20px; content: ""; } @@ -1546,7 +1565,7 @@ body { } .inline-error { - color: #d4004b; + color: var(--odsh-color-sh-red); margin-top: 5px; } @@ -1624,7 +1643,7 @@ body { margin-bottom: 30px; font-size: 20px; color: white; - background-color: #D4004B; + background-color: var(--odsh-color-sh-red); padding: 0.5rem 1rem; } @@ -1663,10 +1682,6 @@ body { text-align: center; } -.dataformat-label:hover { - background-color: #d4004b !important; -} - .resource-title { float: left; margin-left: 5px; @@ -1696,19 +1711,6 @@ body { text-decoration: none } -.resource-title p:first-of-type { - font-size: 12px; - letter-spacing: 0.12px; - padding-top: 12px; - margin-bottom: 0; -} - -.resource-title p { - font-size: 12px; - letter-spacing: 0.12px; - padding-top: 0; -} - .resource-title-container { display: flex; justify-content: space-between; @@ -1717,16 +1719,16 @@ body { } .resource-title-container .dataformat-label:hover { - background-color: #003064 !important; + background-color: var(--odsh-color-sh-blue) !important; } -.resource-description-container { - margin-top: 8px; -} - -.resource-description-container .description { - line-height: 1.3; - color: black; +.resource-description { + width: 100%; + font-size: 12px; + letter-spacing: 0.12px; + padding-top: 12px; + margin-bottom: 10px; + margin-left: 5px; } .is-table-row .resource-details-left { @@ -1786,11 +1788,11 @@ body { .resource-icons a { - color: #003064; + color: var(--odsh-color-sh-blue); } .resource-icons a:hover { - color: #d4004b; + color: var(--odsh-color-sh-red); text-decoration: none; } @@ -1801,11 +1803,12 @@ body { .search-box-container { box-sizing: border-box; - width: auto; + width: 100%; height: 40px; max-width: 470px; margin-bottom: 60px; margin-left: 330px; + padding: 0; } .search-field { @@ -1826,8 +1829,8 @@ body { width: 100%; min-width: 210px; line-height: 1.1; - border: 1px solid #003064 !important; - color: #003064; + border: 1px solid var(--odsh-color-sh-blue) !important; + color: var(--odsh-color-sh-blue); background: rgb(246, 247, 249); box-shadow: none !important; height: 40px; @@ -1853,7 +1856,7 @@ body { } .simple-input .field .btn-search:focus { - border-color: #003064; + border-color: var(--odsh-color-sh-blue); border-width: 1px; border-style: dotted; } @@ -1898,39 +1901,39 @@ body { /* do not group these rules */ .login-form .controls ::-webkit-input-placeholder, #field-sitewide-search::-webkit-input-placeholder { - color: #003064 !important; + color: var(--odsh-color-sh-blue) !important; } .login-form .controls :-moz-placeholder, #field-sitewide-search:-moz-placeholder { /* FF 4-18 */ - color: #003064 !important; + color: var(--odsh-color-sh-blue) !important; opacity: 1 !important; } .login-form .controls ::-moz-placeholder, #field-sitewide-search::-moz-placeholder { /* FF 19+ */ - color: #003064 !important; + color: var(--odsh-color-sh-blue) !important; opacity: 1 !important; } .login-form .controls :-ms-input-placeholder, #field-sitewide-search:-ms-input-placeholder { /* IE 10+ */ - color: #003064 !important; + color: var(--odsh-color-sh-blue) !important; } .login-form .controls ::-ms-input-placeholder, #field-sitewide-search::-ms-input-placeholder { /* Microsoft Edge */ - color: #003064 !important; + color: var(--odsh-color-sh-blue) !important; } .login-form .controls ::placeholder, #field-sitewide-search::placeholder { /* modern browser */ - color: #003064 !important; + color: var(--odsh-color-sh-blue) !important; } #field-sitewide-search:focus { @@ -1996,7 +1999,7 @@ ul.pagination>li:last-child.active>a, ul.pagination>li:last-child.active>span, ul.pagination>li:last-child.active>a:hover, ul.pagination>li:last-child.active>span:hover { - background-color: #003064; + background-color: var(--odsh-color-sh-blue) !important; color: white; } @@ -2137,7 +2140,7 @@ ul.pagination>li:last-child>span:hover { background-image: none; border-radius: 0px; font-size: 14px; - color: #657592; + color: var(--odsh-color-sh-blue-grey); font-style: italic; border-color: #77879f; } @@ -2167,7 +2170,6 @@ ul.pagination>li:last-child>span:hover { @media (max-width: 767px) { .logo { - display: initial; width: 250px; margin-left: 10px; } @@ -2183,7 +2185,6 @@ ul.pagination>li:last-child>span:hover { .topline { margin-bottom: 25px; - margin-right: 0; } @media (max-width: 767px) { @@ -2193,15 +2194,14 @@ ul.pagination>li:last-child>span:hover { } .site-title { - color: #003064; + color: var(--odsh-color-sh-blue); font-size: 38px; - position: absolute; - left: 340px; - text-align: left; line-height: 1.47; font-weight: 500; letter-spacing: 0.38px; - padding-top: 24px; + padding-top: 7px; + margin-right: 55px; + margin-left: 30px; } @media (max-width: 1023px) { @@ -2226,11 +2226,13 @@ ul.pagination>li:last-child>span:hover { #menu-button-and-title { display: none; + width: 100%; } @media (max-width: 767px) { #menu-button-and-title { display: flex; + width: 100%; align-items: center; padding-left: 15px; padding-right: 15px; @@ -2239,14 +2241,15 @@ ul.pagination>li:last-child>span:hover { } #menu-button-and-title span { + cursor: pointer; display: inline-block; - color: #003064; - padding-right: 20px; + color: var(--odsh-color-sh-blue); } #menu-button-and-title h1 { display: inline-block; margin: 10px 0; + padding-left: 20px; } @@ -2263,7 +2266,7 @@ ul.pagination>li:last-child>span:hover { .filter-list .filtered.pill, .filter-list .filtered.pill .fa { - background-color: #003064; + background-color: var(--odsh-color-sh-blue); color: white; } @@ -2275,7 +2278,7 @@ ul.pagination>li:last-child>span:hover { } .filtered.pill.error { - background-color: #d4004b; + background-color: var(--odsh-color-sh-red); } @@ -2288,7 +2291,7 @@ ul.pagination>li:last-child>span:hover { .share-links a { font-size: 22px; margin-top: 5px; - color: #003064; + color: var(--odsh-color-sh-blue); } .share-links img { @@ -2298,7 +2301,7 @@ ul.pagination>li:last-child>span:hover { .home-title { font-size: 32px; font-weight: normal; - color: #003064; + color: var(--odsh-color-sh-blue); } .home-button { @@ -2347,7 +2350,7 @@ ul.pagination>li:last-child>span:hover { .home-groups-title a { width: 242px; - color: #003064; + color: var(--odsh-color-sh-blue); } .home-groups-img { @@ -2358,7 +2361,7 @@ ul.pagination>li:last-child>span:hover { } .home-groups-img img { - stroke: #003064; + stroke: var(--odsh-color-sh-blue); left: 150px; top: 50px; width: 100px; @@ -2373,7 +2376,7 @@ ul.pagination>li:last-child>span:hover { } .error-reange-search { - color: #d4004b; + color: var(--odsh-color-sh-red); margin-top: -5px; font-size: 12px; margin-bottom: 5px; @@ -2580,6 +2583,7 @@ a:hover.tooltips_cls span { .control-group { margin-bottom: 10px; + padding: 0; } @media (max-width: 767px) { @@ -2686,15 +2690,23 @@ p.package-info-issued { } .multiselect.btn.btn-default .caret { - border-top: 6px solid #657592; + border-top: 6px solid var(--odsh-color-sh-blue-grey); border-right: 3px solid transparent; border-left: 3px solid transparent; float: right; margin-right: 5px; } +.multiselect-container li > a { + display: block; +} + +.multiselect-container > li.active > a > label { + color: white; +} + .control-group.error .multiselect-container>li>a>label { - color: #003064; + color: var(--odsh-color-sh-blue); } .control-group.error .multiselect-container>li>a>label:hover { @@ -2707,7 +2719,7 @@ p.package-info-issued { .select2-container .select2-choice .select2-arrow b { background: none; - border-top: 6px solid #657592; + border-top: 6px solid var(--odsh-color-sh-blue-grey); border-right: 3px solid transparent; border-left: 3px solid transparent; display: inline-block; @@ -2723,13 +2735,13 @@ p.package-info-issued { background-image: none; border: none; background-color: #F6F7F9; - color: #657592; + color: var(--odsh-color-sh-blue-grey); } .multiselect-container.dropdown-menu { padding-top: 10px; border-top: none; - border-color: #657592; + border-color: var(--odsh-color-sh-blue-grey); border-radius: 0px; top: 26px; width: 429px; @@ -2755,7 +2767,8 @@ p.package-info-issued { .dropdown-menu>li>a:focus, .dropdown-submenu:hover>a, .dropdown-submenu:focus>a { - background-color: #003064; + background-color: var(--odsh-color-sh-blue); + color: white !important; background-image: none; } @@ -2768,7 +2781,7 @@ p.package-info-issued { } .select2-drop-active { - border-color: #657592; + border-color: var(--odsh-color-sh-blue-grey); } .controls .multiselect:focus, @@ -2789,7 +2802,7 @@ p.package-info-issued { } .search-form a { - color: #003064; + color: var(--odsh-color-sh-blue); margin-left: auto; margin-right: 22px; } @@ -2811,13 +2824,13 @@ p.package-info-issued { } .search-form a:focus i { - border-color: #003064; + border-color: var(--odsh-color-sh-blue); border-width: 1px; border-style: dotted; } .error-title { - color: #003064; + color: var(--odsh-color-sh-blue); font-size: 40px; margin-left: 10px; } @@ -2833,7 +2846,7 @@ p.package-info-issued { } .error-body a { - color: #003064; + color: var(--odsh-color-sh-blue); } .add_request_container { @@ -2843,37 +2856,18 @@ p.package-info-issued { } -.label.label-open { +.badge.label-open { color: white; - background-color: #003064; + background-color: var(--odsh-color-sh-blue); } -.label.label-closed { +.badge.label-closed { color: white; background-color: #DBDBDB; } -.datarequest .dataset-heading .label { - vertical-align: top; -} - -.datarequest-subtitle { - font-size: 12px; - line-height: 12px; - height: 12px; -} - -.datarequest-item-open-time { - padding-right: 4px; - border-right: 1px solid; -} - -.datarequest-item-autor-name { - padding-left: 4px; -} - .new-dataset-label { - background-color: #d4004b !important; + background-color: var(--odsh-color-sh-red) !important; ; padding: 3px 3px 1px 3px; font-size: 14px; @@ -2919,58 +2913,6 @@ p.package-info-issued { font-size: 13px; } -.datarequest-info.table, -.datarequest-info.table th, -.datarequest-info.table td { - border: none; -} - -.datarequest .additional-info { - font-weight: normal; - font-size: 13px; - display: table-cell; - width: 220px; - padding-left: 25px; -} - -.datarequest-primary { - display: table-cell; - width: 715px; -} - -.datarequest .primary.span9 { - width: 960px; - padding-left: 0px; -} - -.datarequest .additional-info .dataset-details { - display: inline-block; -} - -.datarequest .additional-info .label { - margin: 8px; -} - -.datarequest .dataset-meta { - padding-left: 25px; -} - -.datarequest .dataset-heading { - max-width: 100%; -} - -.datarequest .dataset-content .icon-comment { - margin-top: 10px; -} - -.datarequest .dataset-form { - width: 715px; -} - -.datarequest .dataset-form .row-fluid .span6 { - width: 715px; -} - @media (max-width: 1023px) { [role=main] .secondary.span3 { max-width: 300px; @@ -3003,6 +2945,7 @@ p.package-info-issued { position: absolute; top: 18px; right: 18px; + cursor: pointer; } @media (max-width: 767px) { @@ -3054,17 +2997,13 @@ body.filters-modal div.row>aside.secondary.span3 { .js .show-filters.btn { box-sizing: border-box; display: inline-block; - background-image: url("/base/images/icon_funnel.svg"); - background-size: 18px 18px; - background-repeat: no-repeat; - background-position: 15px center; - padding-left: 49px; - margin-right: 28px; - display: inline-block; + width: auto; height: 40px; - background-color: #0089CA; + background-color: var(--odsh-color-sh-blue-2); color: white; font-size: 18px; + line-height: 22px; + margin-right: 28px; margin-bottom: 12px; } diff --git a/ckanext/odsh/fanstatic/odsh.js b/ckanext/odsh/assets/odsh.js similarity index 100% rename from ckanext/odsh/fanstatic/odsh.js rename to ckanext/odsh/assets/odsh.js diff --git a/ckanext/odsh/fanstatic/odsh_dataset_map.js b/ckanext/odsh/assets/odsh_dataset_map.js similarity index 100% rename from ckanext/odsh/fanstatic/odsh_dataset_map.js rename to ckanext/odsh/assets/odsh_dataset_map.js diff --git a/ckanext/odsh/fanstatic/odsh_datepicker.js b/ckanext/odsh/assets/odsh_datepicker.js similarity index 100% rename from ckanext/odsh/fanstatic/odsh_datepicker.js rename to ckanext/odsh/assets/odsh_datepicker.js diff --git a/ckanext/odsh/fanstatic/odsh_form.js b/ckanext/odsh/assets/odsh_form.js similarity index 100% rename from ckanext/odsh/fanstatic/odsh_form.js rename to ckanext/odsh/assets/odsh_form.js diff --git a/ckanext/odsh/fanstatic/odsh_guessformat.js b/ckanext/odsh/assets/odsh_guessformat.js similarity index 100% rename from ckanext/odsh/fanstatic/odsh_guessformat.js rename to ckanext/odsh/assets/odsh_guessformat.js diff --git a/ckanext/odsh/fanstatic/odsh_header.css b/ckanext/odsh/assets/odsh_header.css similarity index 95% rename from ckanext/odsh/fanstatic/odsh_header.css rename to ckanext/odsh/assets/odsh_header.css index 7f1ac57cdcb43577dd4b98517cbcfc95a4ddc9b6..ee07f28aa8fd61f5b52ab6ab6419c834e81e178f 100644 --- a/ckanext/odsh/fanstatic/odsh_header.css +++ b/ckanext/odsh/assets/odsh_header.css @@ -7,6 +7,7 @@ } .navbar-static-top .container.navigation-container { + position: relative; width: 100%; max-width: 1280px; } @@ -18,6 +19,10 @@ } } +.p-2, .masthead { + padding: 0 !important; +} + [class*="span"] { margin-left: 0px; } @@ -28,6 +33,7 @@ } .span3.span-navigation { + padding-left: 0; width: auto; } @@ -37,7 +43,7 @@ } .header-image { - padding-right: 0; + display: inline-block; position: relative; top: 0; padding: 1em 0; @@ -49,14 +55,17 @@ } */ .language-switch { - float: right !important; background-color: #f2f2f2; padding: 6px 10px; - margin-left: 20px !important; + margin-left: 0px !important; height: 55px; /* dirty fix to make it the same height as schleswig-holstein.de */ } +.navbar-right { + margin-left: auto !important; +} + .language-switch ul { margin: 0; padding-left: 0; @@ -172,6 +181,7 @@ .navbar.masthead .navigation { margin-right: 0px; + padding: 0; } .navbar .nav { @@ -182,6 +192,11 @@ display: none; } +.nav > li > a { + position: relative; + display: block; +} + @media (max-width: 767px) { .menu-modal .navbar.masthead .nav>li.header-menu-mobile, @@ -203,6 +218,7 @@ margin-top: -10px; top: 50%; right: 17px; + cursor: pointer; } } @@ -224,6 +240,7 @@ position: absolute; top: 8px; left: 0; + padding: 0; } .menu-modal .navbar.masthead .navigation ul.nav-pills>li { @@ -263,6 +280,10 @@ background-color: #003064 !important; } +.nav-pills li:hover .user-icon, .nav-pills li:active .user-icon { + fill: white; +} + @media (min-width: 768px) { .navbar.masthead .navigation .nav-pills li:not(:nth-child(2)) { margin-left: 22px; @@ -369,10 +390,6 @@ vertical-align: middle; } -.navbar.masthead .navigation .nav-pills li.dropdown { - float: right; -} - .navbar.masthead .navigation .nav-pills li.dropdown>.dropdown-toggle { padding-bottom: 13px; padding-top: 15px; diff --git a/ckanext/odsh/fanstatic/odsh_image-upload.js b/ckanext/odsh/assets/odsh_image-upload.js similarity index 100% rename from ckanext/odsh/fanstatic/odsh_image-upload.js rename to ckanext/odsh/assets/odsh_image-upload.js diff --git a/ckanext/odsh/fanstatic/odsh_map.js b/ckanext/odsh/assets/odsh_map.js similarity index 100% rename from ckanext/odsh/fanstatic/odsh_map.js rename to ckanext/odsh/assets/odsh_map.js diff --git a/ckanext/odsh/fanstatic/odsh_popover.js b/ckanext/odsh/assets/odsh_popover.js similarity index 100% rename from ckanext/odsh/fanstatic/odsh_popover.js rename to ckanext/odsh/assets/odsh_popover.js diff --git a/ckanext/odsh/fanstatic/odsh_populate_tags.js b/ckanext/odsh/assets/odsh_populate_tags.js similarity index 100% rename from ckanext/odsh/fanstatic/odsh_populate_tags.js rename to ckanext/odsh/assets/odsh_populate_tags.js diff --git a/ckanext/odsh/fanstatic/odsh_spatial_query.js b/ckanext/odsh/assets/odsh_spatial_query.js similarity index 100% rename from ckanext/odsh/fanstatic/odsh_spatial_query.js rename to ckanext/odsh/assets/odsh_spatial_query.js diff --git a/ckanext/odsh/fanstatic/odsh_toggle_menu.js b/ckanext/odsh/assets/odsh_toggle_menu.js similarity index 100% rename from ckanext/odsh/fanstatic/odsh_toggle_menu.js rename to ckanext/odsh/assets/odsh_toggle_menu.js diff --git a/ckanext/odsh/fanstatic/odsh_validate_password.js b/ckanext/odsh/assets/odsh_validate_password.js similarity index 100% rename from ckanext/odsh/fanstatic/odsh_validate_password.js rename to ckanext/odsh/assets/odsh_validate_password.js diff --git a/ckanext/odsh/fanstatic/resource.config b/ckanext/odsh/assets/resource.config similarity index 100% rename from ckanext/odsh/fanstatic/resource.config rename to ckanext/odsh/assets/resource.config diff --git a/ckanext/odsh/fanstatic/spatial_query.css b/ckanext/odsh/assets/spatial_query.css similarity index 100% rename from ckanext/odsh/fanstatic/spatial_query.css rename to ckanext/odsh/assets/spatial_query.css diff --git a/ckanext/odsh/fanstatic/vendor/jquery-ui-autocomplete/AUTHORS.txt b/ckanext/odsh/assets/vendor/jquery-ui-autocomplete/AUTHORS.txt similarity index 100% rename from ckanext/odsh/fanstatic/vendor/jquery-ui-autocomplete/AUTHORS.txt rename to ckanext/odsh/assets/vendor/jquery-ui-autocomplete/AUTHORS.txt diff --git a/ckanext/odsh/fanstatic/vendor/jquery-ui-autocomplete/LICENSE.txt b/ckanext/odsh/assets/vendor/jquery-ui-autocomplete/LICENSE.txt similarity index 100% rename from ckanext/odsh/fanstatic/vendor/jquery-ui-autocomplete/LICENSE.txt rename to ckanext/odsh/assets/vendor/jquery-ui-autocomplete/LICENSE.txt diff --git a/ckanext/odsh/fanstatic/vendor/jquery-ui-autocomplete/jquery-ui.css b/ckanext/odsh/assets/vendor/jquery-ui-autocomplete/jquery-ui.css similarity index 100% rename from ckanext/odsh/fanstatic/vendor/jquery-ui-autocomplete/jquery-ui.css rename to ckanext/odsh/assets/vendor/jquery-ui-autocomplete/jquery-ui.css diff --git a/ckanext/odsh/fanstatic/vendor/jquery-ui-autocomplete/jquery-ui.js b/ckanext/odsh/assets/vendor/jquery-ui-autocomplete/jquery-ui.js similarity index 100% rename from ckanext/odsh/fanstatic/vendor/jquery-ui-autocomplete/jquery-ui.js rename to ckanext/odsh/assets/vendor/jquery-ui-autocomplete/jquery-ui.js diff --git a/ckanext/odsh/fanstatic/vendor/jquery-ui-autocomplete/jquery-ui.structure.css b/ckanext/odsh/assets/vendor/jquery-ui-autocomplete/jquery-ui.structure.css similarity index 100% rename from ckanext/odsh/fanstatic/vendor/jquery-ui-autocomplete/jquery-ui.structure.css rename to ckanext/odsh/assets/vendor/jquery-ui-autocomplete/jquery-ui.structure.css diff --git a/ckanext/odsh/fanstatic/vendor/jquery-ui-autocomplete/jquery-ui.theme.css b/ckanext/odsh/assets/vendor/jquery-ui-autocomplete/jquery-ui.theme.css similarity index 100% rename from ckanext/odsh/fanstatic/vendor/jquery-ui-autocomplete/jquery-ui.theme.css rename to ckanext/odsh/assets/vendor/jquery-ui-autocomplete/jquery-ui.theme.css diff --git a/ckanext/odsh/fanstatic/vendor/leaflet.draw.js b/ckanext/odsh/assets/vendor/leaflet.draw.js similarity index 100% rename from ckanext/odsh/fanstatic/vendor/leaflet.draw.js rename to ckanext/odsh/assets/vendor/leaflet.draw.js diff --git a/ckanext/odsh/fanstatic/vendor/leaflet.js b/ckanext/odsh/assets/vendor/leaflet.js similarity index 100% rename from ckanext/odsh/fanstatic/vendor/leaflet.js rename to ckanext/odsh/assets/vendor/leaflet.js diff --git a/ckanext/odsh/fanstatic/vendor/proj4-compressed.js b/ckanext/odsh/assets/vendor/proj4-compressed.js similarity index 100% rename from ckanext/odsh/fanstatic/vendor/proj4-compressed.js rename to ckanext/odsh/assets/vendor/proj4-compressed.js diff --git a/ckanext/odsh/fanstatic/vendor/proj4leaflet.js b/ckanext/odsh/assets/vendor/proj4leaflet.js similarity index 100% rename from ckanext/odsh/fanstatic/vendor/proj4leaflet.js rename to ckanext/odsh/assets/vendor/proj4leaflet.js diff --git a/ckanext/odsh/fanstatic/webassets.yml b/ckanext/odsh/assets/webassets.yml similarity index 100% rename from ckanext/odsh/fanstatic/webassets.yml rename to ckanext/odsh/assets/webassets.yml diff --git a/ckanext/odsh/collection/helpers.py b/ckanext/odsh/collection/helpers.py index cd3f4052e16b1313384d937c8f4f0ce76a60925e..860d2c324194a2626781e8bacb25bb0641d0e222 100644 --- a/ckanext/odsh/collection/helpers.py +++ b/ckanext/odsh/collection/helpers.py @@ -174,5 +174,7 @@ def get_latest_resources_for_format(collection_name, resource_format): if not resources: return None resources_with_asked_type = [r for r in resources if r.get('format').upper() == resource_format.upper()] + if not resources_with_asked_type: + return None resources_sorted = sorted(resources_with_asked_type, key=itemgetter('id','created'), reverse=True) return resources_sorted[-1] diff --git a/ckanext/odsh/collection/plugin.py b/ckanext/odsh/collection/plugin.py index 501f5cade95647b6ac7443ef86fecdabb3d27802..f4265498f966c32d0d64cd874e2cfbcffad22bf1 100644 --- a/ckanext/odsh/collection/plugin.py +++ b/ckanext/odsh/collection/plugin.py @@ -57,7 +57,7 @@ class CollectionsPlugin(plugins.SingletonPlugin, DefaultDatasetForm): url_type = latest_resources.get('url_type') if url_type is None: resource_url = latest_resources.get('url') - toolkit.redirect_to(resource_url) + return toolkit.redirect_to(resource_url) if url_type == 'upload': download_package_id = latest_resources.get('package_id') download_resource_id = latest_resources.get('id') diff --git a/ckanext/odsh/harvest_templates/source/search.html b/ckanext/odsh/harvest_templates/source/search.html index 19e25c4346c540eaffa74b7ec50ae8143a226ef3..5f7b3769dc59a61e78871430cc2d82a47e46059d 100644 --- a/ckanext/odsh/harvest_templates/source/search.html +++ b/ckanext/odsh/harvest_templates/source/search.html @@ -14,32 +14,17 @@ <li class="active">{{ h.nav_link(_('Harvest Sources'), named_route='{0}_search'.format(c.dataset_type)) }}</li> {% endblock %} -{% if g.ckan_base_version.startswith('2.0') %} - {# CKAN 2.0 #} - - {% block add_action_content %} - {{ h.snippet('snippets/add_source_button.html', dataset_type=c.dataset_type) }} - {% endblock %} -{% endif %} {% block primary_content %} {% if c.userobj.sysadmin %} - {% if g.ckan_base_version.startswith('2.0') %} - {# CKAN 2.0 #} - - {% include 'source/search_2.0.html' %} - - {% else %} - {# > CKAN 2.0 #} - <section class="module"> <div class="module-content"> - {# {% block page_primary_action %} <div class="page_primary_action"> {{ h.snippet('snippets/add_source_button.html', dataset_type=c.dataset_type) }} </div> {% endblock %} + {% set facets = { 'fields': c.fields_grouped, 'search': c.search_facets, @@ -55,7 +40,6 @@ (_('Popular'), 'views_recent desc') if g.tracking_enabled else (false, false) ] %} {% snippet 'snippets/search_form.html', type='harvest', query=c.q, sorting=sorting, sorting_selected=c.sort_by_selected, count=c.page.item_count, facets=facets, show_empty=request.args, error=c.query_error, placeholder=_("Search harvest sources...") %} - #} {{ h.snippet('snippets/source_list.html', sources=c.page.items, show_organization=true) }} @@ -63,37 +47,27 @@ {{ c.page.pager(q=c.q) }} </section> - - {% endif %} {% else %} <div class="module-content error-page"> - <div class="error-title"> - HTTP Status 404 - <div class="error-body"><h2>Seite nicht gefunden</h2> - <h3>Wie finde ich die gesuchten Inhalte im Landesportal?</h3> + <div class="error-title"> + {{ _('HTTP Status 404') }} + <div class="error-body"> + <h2>{{ _('Page not found') }}</h2> + <h3>{{ _('How do I find the content I am looking for in the state portal?') }}</h3> - <p><a class="" href="http://www.schleswig-holstein.de/odpstart" title="Zur Startseite">Zur Startseite des Open-Data-Portals</a></p> + <p><a class="" href="{{ h.odsh_public_url() }}" title="{{ _('To home page') }}">{{ _('To the home page of the open data portal') }}</a></p> - <h3>Kontakt</h3> - <p>Bei Fragen oder Problemen mit dem Open-Data-Portal schicken Sie bitte eine E-Mail an die Adresse opendata@lr.landsh.de oder verwenden das Kontaktformular:</p> - <p><a class="" href="https://www.schleswig-holstein.de/odpkontakt" title="Kontakt">Zum Kontaktformular</a></p> - </div> + <h3>{{ _('Contact') }}</h3> + <p>{{ _('If you have any questions or problems with the open data portal, please send an email to opendata@lr.landsh.de or use the contact form:') }}</p> + <p><a class="" href="https://www.schleswig-holstein.de/odpkontakt" title="{{ _('Contact') }}">{{ _('To contact form') }}</a></p> </div> + </div> </div> {% endif %} - {% endblock %} -{% block breadcrumb %} -{% endblock %} - -{% block secondary %}{% endblock %} -{# {% block secondary_content %} - {% if c.userobj.sysadmin %} {% for facet in c.facet_titles %} - {{ h.snippet('snippets/facet_list.html', title=c.facet_titles[facet], name=facet, alternative_url=h.url_for('{0}_search'.format(c.dataset_type))) }} + {{ h.snippet('snippets/facet_list.html', title=c.facet_titles[facet], name=facet, alternative_url=h.url_for('{0}.search'.format(c.dataset_type))) }} {% endfor %} - {% endif %} {% endblock %} -#} \ No newline at end of file diff --git a/ckanext/odsh/helpers.py b/ckanext/odsh/helpers.py index 54940abe69bd28ac233194289b2b5f6a20b9019d..968b901f4965716fe073b04afe17933bdb61ccc1 100644 --- a/ckanext/odsh/helpers.py +++ b/ckanext/odsh/helpers.py @@ -8,16 +8,15 @@ import ckan.logic as logic import ckan.model as model import ckan.lib.helpers as helpers import json -from ckan.common import c import datetime from dateutil import parser -from ckan.common import config -import urllib.request, urllib.parse, urllib.error +import urllib.request +import urllib.parse +import urllib.error import hashlib import re import csv -import urllib.request, urllib.error, urllib.parse -from ckan.common import request +from ckan.common import config, request, g, c from urllib.parse import urlsplit, urlunsplit import ckan.lib.helpers as helpers from collections import OrderedDict @@ -31,11 +30,11 @@ log = logging.getLogger(__name__) def odsh_openness_score_dataset_html(dataset): - score = -1 - #dataset = json.loads(dataset) + score = -1 + # dataset = json.loads(dataset) resources = dataset.get('resources') if resources is None: - return score + return score for resource in resources: r_qa = resource.get('qa') if r_qa: @@ -121,19 +120,21 @@ def odsh_get_spatial_text(pkg_dict): return spatial return None + def extend_search_convert_local_to_utc_timestamp(str_timestamp): if not str_timestamp: - return None + return None if not re.match(r'\d\d\d\d-\d\d-\d\d', str_timestamp): raise ValueError('wrong format') - + dt = parser.parse(str_timestamp, dayfirst=False).isoformat() return dt+"Z" + def odsh_render_datetime(datetime_, fromIso=True): - date_format='{0.day:02d}.{0.month:02d}.{0.year:04d}' + date_format = '{0.day:02d}.{0.month:02d}.{0.year:04d}' if not datetime_: return '' if not re.match(r'\d\d\d\d-\d\d-\d\d', datetime_): @@ -151,7 +152,7 @@ def odsh_render_datetime(datetime_, fromIso=True): return '' -def odsh_resource_formats(as_simple_list = False): +def odsh_resource_formats(as_simple_list=False): """ Retrieves a list of file formats from an RDF file using string manipulation and sorts them alphabetically. @@ -180,13 +181,13 @@ def odsh_resource_formats(as_simple_list = False): # Iterate over the matches and add key-value pairs to the list for match in matches: file_formats.append({'key': match, 'value': match}) - + # Sort the list alphabetically based on the file format values file_formats = sorted(file_formats, key=lambda x: x['value']) - if(as_simple_list): + if (as_simple_list): file_formats = [obj['value'] for obj in file_formats] - + return file_formats @@ -209,13 +210,15 @@ def odsh_extract_error(key, errors, field='extras'): if error.startswith(key): return error + def odsh_extract_error_new(key, errors): if not errors or not ('__extras' in errors): return None - error = errors['__extras'][0].get(key,None) + error = errors['__extras'][0].get(key, None) if error: return key + ': ' + error + def odsh_extract_value_from_extras(extras, key): if not extras: return None @@ -235,23 +238,23 @@ def presorted_license_options(existing_license_id=None): license_ids = [license.id for license in licenses] if existing_license_id and existing_license_id not in license_ids: license_ids.insert(0, existing_license_id) - return [('','')]+[ + return [('', '')]+[ (license_id, register[license_id].title if license_id in register else license_id) for license_id in license_ids] -def odsh_has_more_facets(facet, limit=None, exclude_active=False): +def odsh_has_more_facets(facet, search_facets, limit=None, exclude_active=False): facets = [] - for facet_item in c.search_facets.get(facet)['items']: - if not len(facet_item['name'].strip()) or facet_item['count']==0: + for facet_item in search_facets.get(facet)['items']: + if not len(facet_item['name'].strip()) or facet_item['count'] == 0: continue if not (facet, facet_item['name']) in list(request.args.items()): facets.append(dict(active=False, **facet_item)) elif not exclude_active: facets.append(dict(active=True, **facet_item)) - if c.search_facets_limits and limit is None: - limit = c.search_facets_limits.get(facet) + if getattr(g, 'search_facets_limits', None) and limit is None: + limit = g.search_facets_limits.get(facet) if limit is not None and len(facets) > limit: return True return False @@ -260,9 +263,11 @@ def odsh_has_more_facets(facet, limit=None, exclude_active=False): def odsh_public_url(): return config.get('ckanext.odsh.public_url') + def spatial_extends_available(): extension_path = pkg_resources.resource_filename('ckanext.odsh', '') - file_path = config.get('ckanext.odsh.spatial.mapping', extension_path + '/resources/schleswig-holstein_geojson.csv') + file_path = config.get('ckanext.odsh.spatial.mapping', + extension_path + '/resources/schleswig-holstein_geojson.csv') try: mapping_file = urllib.request.urlopen(file_path) @@ -278,9 +283,10 @@ def spatial_extends_available(): result.append(spatial_text.decode('UTF-8')) return result + def odsh_public_resource_url(res): home = config.get('ckanext.odsh.public_url') - if res.get('url_type',None) == 'upload' and 'url' in res: + if res.get('url_type', None) == 'upload' and 'url' in res: f = urlsplit(res['url']) return urlunsplit(('', '', f[2], f[3], f[4])) else: @@ -288,17 +294,17 @@ def odsh_public_resource_url(res): def odsh_show_testbanner(): - return config.get('ckanext.odsh.showtestbanner', False) == True + return config.get('ckanext.odsh.showtestbanner', False) == 'True' -def odsh_get_facet_items_dict(name, limit=None): +def odsh_get_facet_items_dict(name, search_facets, limit=None): ''' Gets all facets like 'get_facet_items_dict' but sorted alphabetically instead by count. ''' if name == 'groups': limit = 20 - facets = helpers.get_facet_items_dict(name, None, limit) + facets = helpers.get_facet_items_dict(name, search_facets, limit) facets.sort(key=lambda it: (it['display_name'].lower(), -it['count'])) return facets @@ -351,11 +357,12 @@ def is_within_last_month(date, date_ref=None): if date_ref is not specified, the date of today is used this method is needed by the method OdshPlugin.before_view in plugin.py ''' - + if not date_ref: date_ref = datetime.date.today() - - [year_ref, month_ref, day_ref] = [date_ref.year, date_ref.month, date_ref.day] + + [year_ref, month_ref, day_ref] = [ + date_ref.year, date_ref.month, date_ref.day] try: if month_ref > 1: @@ -364,88 +371,108 @@ def is_within_last_month(date, date_ref=None): one_month_ago = datetime.date(year_ref-1, 12, day_ref) except ValueError: # this happens if month before month_ref has less days than month_ref - one_month_ago = datetime.date(year_ref, month_ref, 1) - datetime.timedelta(days=1) - + one_month_ago = datetime.date( + year_ref, month_ref, 1) - datetime.timedelta(days=1) + if date > one_month_ago: return True return False + def get_all_datasets_belonging_to_collection(context, collection_name): rel_collection_dict = dict({"id": collection_name}) name_list = list() try: - list_rel_collection = get_action('package_relationships_list')(context, rel_collection_dict) + list_rel_collection = get_action( + 'package_relationships_list')(context, rel_collection_dict) except AssertionError: - #if there does not exist an relationship, returns an empty list - return name_list + # if there does not exist an relationship, returns an empty list + return name_list for item in list_rel_collection: - item_object = item.get('object') + item_object = item.get('object') name_list.append(item_object) return name_list + def get_all_datasets_belonging_to_collection_by_dataset(context, dataset_name): collection_name = get_collection_name_by_dataset(context, dataset_name) if collection_name: - name_list = get_all_datasets_belonging_to_collection(context, collection_name) + name_list = get_all_datasets_belonging_to_collection( + context, collection_name) return name_list return list() + def get_collection_name_by_dataset(context, dataset_name): - rel_dataset_dict = dict({"id" : dataset_name}) - list_rel_dataset = toolkit.get_action('package_relationships_list')(context, rel_dataset_dict) + rel_dataset_dict = dict({"id": dataset_name}) + list_rel_dataset = toolkit.get_action( + 'package_relationships_list')(context, rel_dataset_dict) if not len(list_rel_dataset): - return None + return None collection_name = list_rel_dataset[0]['object'] return collection_name + def get_successor_and_predecessor_dataset(context, pkg_dict): dataset_name = pkg_dict.get('name') - siblings_dicts_with_access = _get_siblings_dicts_with_access(context, pkg_dict) + siblings_dicts_with_access = _get_siblings_dicts_with_access( + context, pkg_dict) if siblings_dicts_with_access: n_siblings = len(siblings_dicts_with_access) - siblings_dicts_sorted_by_date_issued = _sort_siblings_by_name_and_date(siblings_dicts_with_access) - siblings_names_sorted_by_date_issued = [d['name'] for d in siblings_dicts_sorted_by_date_issued] - id_current_dataset = siblings_names_sorted_by_date_issued.index(dataset_name) + siblings_dicts_sorted_by_date_issued = _sort_siblings_by_name_and_date( + siblings_dicts_with_access) + siblings_names_sorted_by_date_issued = [ + d['name'] for d in siblings_dicts_sorted_by_date_issued] + id_current_dataset = siblings_names_sorted_by_date_issued.index( + dataset_name) predecessor_name = ( - siblings_names_sorted_by_date_issued[id_current_dataset-1] if (id_current_dataset > 0) + siblings_names_sorted_by_date_issued[id_current_dataset-1] if (id_current_dataset > 0) else None ) successor_name = ( - siblings_names_sorted_by_date_issued[id_current_dataset+1] if (id_current_dataset < n_siblings-1) + siblings_names_sorted_by_date_issued[id_current_dataset+1] if (id_current_dataset < n_siblings-1) else None ) else: predecessor_name, successor_name = None, None return successor_name, predecessor_name + def _get_siblings_dicts_with_access(context, pkg_dict): dataset_name = pkg_dict.get('name') - list_of_siblings = get_all_datasets_belonging_to_collection_by_dataset(context, dataset_name) + list_of_siblings = get_all_datasets_belonging_to_collection_by_dataset( + context, dataset_name) n_siblings = len(list_of_siblings) - if n_siblings>0: + if n_siblings > 0: siblings_dicts = [get_package_dict(name) for name in list_of_siblings] - user_has_access = lambda pkg_dict:helpers.check_access('package_show', pkg_dict) - siblings_dicts_with_access = list(filter(user_has_access, siblings_dicts)) + def user_has_access(pkg_dict): return helpers.check_access( + 'package_show', pkg_dict) + siblings_dicts_with_access = list( + filter(user_has_access, siblings_dicts)) return siblings_dicts_with_access return None - + def _sort_siblings_by_name_and_date(siblings_dicts): ''' sort by name first and then by date to have a fallback if dates are the same ''' - _get_name = lambda pkg_dict:pkg_dict.get('name') - _get_issued = lambda pkg_dict:odsh_extract_value_from_extras(pkg_dict.get('extras'), 'issued') + def _get_name(pkg_dict): return pkg_dict.get('name') + def _get_issued(pkg_dict): return odsh_extract_value_from_extras( + pkg_dict.get('extras'), 'issued') siblings_dicts_sorted_by_name = sorted(siblings_dicts, key=_get_name) - siblings_dicts_sorted_by_date_issued = sorted(siblings_dicts_sorted_by_name, key=_get_issued) + siblings_dicts_sorted_by_date_issued = sorted( + siblings_dicts_sorted_by_name, key=_get_issued) return siblings_dicts_sorted_by_date_issued def get_package_dict(name): return model.Package.get(name).as_dict() + def get_successor_and_predecessor_urls(context, pkg_dict): - successor_name, predecessor_name = get_successor_and_predecessor_dataset(context, pkg_dict) + successor_name, predecessor_name = get_successor_and_predecessor_dataset( + context, pkg_dict) successor_url, predecessor_url = ( helpers.url_for('dataset.read', id=name) if name is not None @@ -454,6 +481,7 @@ def get_successor_and_predecessor_urls(context, pkg_dict): ) return successor_url, predecessor_url + def short_name_for_category(category_name): translations = { 'soci': 'Bevölkerung', @@ -472,10 +500,11 @@ def short_name_for_category(category_name): } return translations.get(category_name) + def odsh_load_mdk_sample_dataset(): ''' Load sample dataset (Musterkatalog/Musterdatensatz). - + See https://bertelsmannstift.github.io/Musterdatenkatalog/def/musterdatensatz.rdf and corresponding mapping in mdk_mapping.json file. ''' @@ -484,13 +513,15 @@ def odsh_load_mdk_sample_dataset(): default_sample_data_file_path = extension_path + '/resources/mdk_mapping.json' sample_data_file_path = config.get( 'ckanext.odsh.sample_data_file_path', default_sample_data_file_path) - + try: with open(sample_data_file_path) as mapping_json: - MDK_MAPPING = json.loads(mapping_json.read(), object_pairs_hook=OrderedDict) - default = [{'value': 'Musterdatensatz wählen..', 'key': ''}] - mdk = [{'key': key, 'value': MDK_MAPPING[key]} for key in MDK_MAPPING] - result = default+mdk + MDK_MAPPING = json.loads( + mapping_json.read(), object_pairs_hook=OrderedDict) + default = [{'value': 'Musterdatensatz wählen..', 'key': ''}] + mdk = [{'key': key, 'value': MDK_MAPPING[key]} + for key in MDK_MAPPING] + result = default+mdk except IOError as err: log.error( 'Could not load sample dataset mapping file from {}' @@ -505,10 +536,11 @@ def odsh_load_mdk_sample_dataset(): raise return result + def odsh_load_raw_mdk_sample_dataset(): ''' Load sample dataset (Musterkatalog/Musterdatensatz). - + See https://bertelsmannstift.github.io/Musterdatenkatalog/def/musterdatensatz.rdf and corresponding mapping in mdk_mapping.json file. ''' @@ -517,10 +549,11 @@ def odsh_load_raw_mdk_sample_dataset(): default_sample_data_file_path = extension_path + '/resources/mdk_mapping.json' sample_data_file_path = config.get( 'ckanext.odsh.sample_data_file_path', default_sample_data_file_path) - + try: with open(sample_data_file_path) as mapping_json: - result = json.loads(mapping_json.read(), object_pairs_hook=OrderedDict) + result = json.loads(mapping_json.read(), + object_pairs_hook=OrderedDict) except IOError as err: log.error( 'Could not load sample dataset mapping file from {}' @@ -544,15 +577,18 @@ def map_dct_type_to_ckan_type(dct_type): ckan_type = CKAN_TYPES.get(dct_type) return ckan_type + def map_ckan_type_to_dct_type(ckan_type): DCT_TYPES = _revert_dict(CKAN_TYPES) dct_type = DCT_TYPES.get(ckan_type) return dct_type + def _revert_dict(d): d_inverse = {v: k for k, v in d.items()} return d_inverse + def add_pkg_to_collection(id_pkg, id_collection): if id_pkg and id_collection: relationship_dict = { @@ -560,7 +596,9 @@ def add_pkg_to_collection(id_pkg, id_collection): 'object': id_collection, 'type': 'child_of', } - toolkit.get_action('package_relationship_create')(None, relationship_dict) + toolkit.get_action('package_relationship_create')( + None, relationship_dict) + def correct_missing_relationship(pkg_dict, pkg_relationships_from_model): ''' @@ -585,23 +623,29 @@ def correct_missing_relationship(pkg_dict, pkg_relationships_from_model): 'id': relationship_from_model.id, 'type': relationship_from_model.type, } - pkg_dict['relationships_as_subject'].append(relationship_for_package) + pkg_dict['relationships_as_subject'].append( + relationship_for_package) return pkg_dict + def get_pkg_relationships_from_model(pkg_dict): pkg_id = pkg_dict.get('id') return model.Package.get(pkg_id).get_relationships() + def load_language_mapping(): extension_path = pkg_resources.resource_filename('ckanext.odsh', '') - file_path = config.get('ckanext.odsh.language_mapping', extension_path + '/resources/language_mapping.json') + file_path = config.get('ckanext.odsh.language_mapping', + extension_path + '/resources/language_mapping.json') with open(file_path) as language_mapping_json: LANGUAGE_MAPPING = json.loads(language_mapping_json.read()) return LANGUAGE_MAPPING + def load_json_to_ordered_dict(json_str): return json.loads(json_str, object_pairs_hook=OrderedDict) + def get_language_of_package(pkg_dict): LANGUAGE_MAPPING = load_language_mapping() language_id = _get_language_id(pkg_dict) @@ -610,6 +654,7 @@ def get_language_of_package(pkg_dict): language = LANGUAGE_MAPPING.get(language_id) return language + def get_language_icon(pkg_dict): ICONS = { "http://publications.europa.eu/resource/authority/language/DAN": '/base/images/icon_lang_danish.png', @@ -618,10 +663,12 @@ def get_language_icon(pkg_dict): language_id = _get_language_id(pkg_dict) if not language_id: return None - return ICONS.get(language_id) + return ICONS.get(language_id) + def _get_language_id(pkg_dict): - language_id = odsh_extract_value_from_extras(pkg_dict.get('extras'), 'language') + language_id = odsh_extract_value_from_extras( + pkg_dict.get('extras'), 'language') language_id = pkg_dict.get('language') if not language_id: language_id = odsh_extract_value_from_extras( @@ -632,9 +679,11 @@ def _get_language_id(pkg_dict): language_id_cleaned = re.sub('[\[\]\"]', '', language_id) return language_id_cleaned + def get_spatial_for_selection(): extension_path = pkg_resources.resource_filename('ckanext.odsh', '') - file_path = config.get('ckanext.odsh.spatial.mapping', extension_path + '/resources/schleswig-holstein_geojson.csv') + file_path = config.get('ckanext.odsh.spatial.mapping', + extension_path + '/resources/schleswig-holstein_geojson.csv') with open(file_path, newline='') as mapping_file: cr = csv.reader(mapping_file, delimiter="\t") spatial_mapping = list(cr) @@ -650,13 +699,15 @@ def get_spatial_for_selection(): else: # Check if there is a municipality key entry for the value municipality_entry = next( - (entry for entry in spatial_mapping if entry[1] == value and "municipalityKey" in entry[0]), + (entry for entry in spatial_mapping if entry[1] + == value and "municipalityKey" in entry[0]), None ) if municipality_entry: # If a municipality key entry exists, use it instead of the current key - unique_mapping.append({'key': municipality_entry[0], 'value': value}) + unique_mapping.append( + {'key': municipality_entry[0], 'value': value}) else: # Otherwise, use the current key unique_mapping.append({'key': key, 'value': value}) @@ -669,9 +720,11 @@ def get_spatial_for_selection(): def get_language_for_selection(): LANGUAGE_MAPPING = load_language_mapping() - dict_for_select_box = [{'key': key, 'value': LANGUAGE_MAPPING[key]} for key in LANGUAGE_MAPPING] + dict_for_select_box = [ + {'key': key, 'value': LANGUAGE_MAPPING[key]} for key in LANGUAGE_MAPPING] return dict_for_select_box + def get_package_dict(name): ''' raises ckan.logic.NotFound if not found @@ -679,17 +732,19 @@ def get_package_dict(name): package_dict = toolkit.get_action('package_show')(None, {'id': name}) return package_dict + def size_of_fmt(num, suffix='B'): - for unit in ['',' k',' M',' G',' T',' P',' E',' Z']: + for unit in ['', ' k', ' M', ' G', ' T', ' P', ' E', ' Z']: if abs(num) < 1000.0: return "%3.1f%s%s" % (num, unit, suffix) num /= 1000.0 return "%.1f%s%s" % (num, 'Y', suffix) + def get_resource_size(resource): resource_size = resource.get('size') if resource_size: - return size_of_fmt(resource_size) + return size_of_fmt(resource_size) def get_address_org(organization): @@ -698,21 +753,41 @@ def get_address_org(organization): if not list_extras: return address for extra in list_extras: - address.update({extra.get('key'):extra.get('value')}) + address.update({extra.get('key'): extra.get('value')}) web = address.get('web') if web and not web.startswith('http'): - web = 'http://' + web - address.update({'web':web}) + web = 'http://' + web + address.update({'web': web}) return address def get_body_mail(organization, package): package_name = package.get('name') - url = helpers.url_for('dataset.read', id=package_name, qualified = True) + url = helpers.url_for('dataset.read', id=package_name, qualified=True) title = package.get('title') - anrede = "Sehr geehrte Damen und Herren," + "%0D%0A" + "%0D%0A" + "zu folgendem Eintrag habe ich eine Anmerkung/Frage:" + "%0D%0A" + "%0D%0A" - mail_titel = "Titel: " + title + "%0D%0A" - mail_document = "Dokument-ID: " + package_name + "%0D%0A" - mail_url = "URL: " + url + "%0D%0A" + "%0D%0A" - message = mail_titel + mail_document + mail_url + "Mein Kommentar:" + "%0D%0A" + "%0D%0A" + "%0D%0A" + "%0D%0A" + anrede = "Sehr geehrte Damen und Herren," + "%0D%0A" + "%0D%0A" + \ + "zu folgendem Eintrag habe ich eine Anmerkung/Frage:" + "%0D%0A" + "%0D%0A" + mail_titel = "Titel: " + title + "%0D%0A" + mail_document = "Dokument-ID: " + package_name + "%0D%0A" + mail_url = "URL: " + url + "%0D%0A" + "%0D%0A" + message = mail_titel + mail_document + mail_url + \ + "Mein Kommentar:" + "%0D%0A" + "%0D%0A" + "%0D%0A" + "%0D%0A" return anrede + message + + +def format_resource_format(format_str): + """ + This function takes a format string as input and removes the trailing '_SRVC' + from it if present. If '_SRVC' is not found, the original format string is returned. + + Args: + format_str (str): The format string to be processed. + + Returns: + str: The processed format string with '_SRVC' removed if present. + """ + + if format_str.endswith('_SRVC'): + return format_str[:-5] + else: + return format_str diff --git a/ckanext/odsh/i18n/ckanext-odsh.pot b/ckanext/odsh/i18n/ckanext-odsh.pot index cc5e4c2784281f4e216acec33e6ba979b84bec64..919c1502fb758494a99934f68622b71e34f012dc 100644 --- a/ckanext/odsh/i18n/ckanext-odsh.pot +++ b/ckanext/odsh/i18n/ckanext-odsh.pot @@ -6,37 +6,37 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: ckanext-odsh 2.0.0\n" +"Project-Id-Version: ckanext-odsh 2.3.0\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2023-07-03 13:39+0200\n" +"POT-Creation-Date: 2023-08-02 11:41+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.7.0\n" +"Generated-By: Babel 2.10.3\n" -#: ckanext/odsh/plugin.py:239 ckanext/odsh/plugin.py:248 ckanext/odsh/plugin.py:254 -#: ckanext/odsh/templates/header.html:45 +#: ckanext/odsh/plugin.py:234 ckanext/odsh/plugin.py:243 ckanext/odsh/plugin.py:249 +#: ckanext/odsh/templates/header.html:40 #: ckanext/odsh/templates/organization/index.html:3 #: ckanext/odsh/templates/organization/index.html:6 -#: ckanext/odsh/templates/organization/index.html:33 +#: ckanext/odsh/templates/organization/index.html:32 #: ckanext/odsh/templates/organization/read_base.html:3 #: ckanext/odsh/templates/organization/read_base.html:6 #: ckanext/odsh/templates/package/base.html:14 msgid "Organizations" msgstr "" -#: ckanext/odsh/plugin.py:240 ckanext/odsh/plugin.py:251 ckanext/odsh/plugin.py:257 +#: ckanext/odsh/plugin.py:235 ckanext/odsh/plugin.py:246 ckanext/odsh/plugin.py:252 msgid "Category" msgstr "" -#: ckanext/odsh/plugin.py:241 ckanext/odsh/plugin.py:249 ckanext/odsh/plugin.py:255 +#: ckanext/odsh/plugin.py:236 ckanext/odsh/plugin.py:244 ckanext/odsh/plugin.py:250 msgid "File format" msgstr "" -#: ckanext/odsh/plugin.py:242 ckanext/odsh/plugin.py:250 ckanext/odsh/plugin.py:256 +#: ckanext/odsh/plugin.py:237 ckanext/odsh/plugin.py:245 ckanext/odsh/plugin.py:251 #: ckanext/odsh/templates/package/resource_read.html:170 #: ckanext/odsh/templates/package/snippets/info.html:75 #: ckanext/odsh/templates/package/snippets/package_basic_fields.html:91 @@ -44,118 +44,217 @@ msgstr "" msgid "License" msgstr "" -#: ckanext/odsh/plugin.py:244 +#: ckanext/odsh/plugin.py:239 msgid "Open-Data-Eigenschaften" msgstr "" -#: ckanext/odsh/validation.py:308 +#: ckanext/odsh/validation.py:286 msgid "Only formats on the list of the EU Publications Office are allowed." msgstr "" -#: ckanext/odsh/validation.py:324 -#, python-format -msgid "Tag \"%s\" length is less than minimum %s" -msgstr "" - -#: ckanext/odsh/validation.py:328 -#, python-format -msgid "Tag \"%s\" length is more than maximum %i" -msgstr "" - -#: ckanext/odsh/validation.py:338 +#: ckanext/odsh/validation.py:296 #, python-format msgid "Invalid tag: \"%s\". Tags cannot contain line breaks." msgstr "" -#: ckanext/odsh/fanstatic/moment.js:6 +#: ckanext/odsh/assets/moment.js:6 msgid "Weeks" msgstr "" -#: ckanext/odsh/fanstatic/odsh_image-upload.js:63 +#: ckanext/odsh/assets/odsh_image-upload.js:63 msgid "Link" msgstr "" -#: ckanext/odsh/fanstatic/odsh_image-upload.js:64 +#: ckanext/odsh/assets/odsh_image-upload.js:64 msgid "Link to a URL on the internet (you can also link to an API)" msgstr "" -#: ckanext/odsh/fanstatic/odsh_image-upload.js:71 -#: ckanext/odsh/templates/header.html:56 +#: ckanext/odsh/assets/odsh_image-upload.js:71 +#: ckanext/odsh/templates/header.html:51 msgid "Upload" msgstr "" -#: ckanext/odsh/fanstatic/odsh_image-upload.js:75 +#: ckanext/odsh/assets/odsh_image-upload.js:75 #: ckanext/odsh/templates/macros/form.html:357 msgid "Remove" msgstr "" -#: ckanext/odsh/fanstatic/odsh_image-upload.js:83 +#: ckanext/odsh/assets/odsh_image-upload.js:83 #: ckanext/odsh/templates/macros/form.html:564 msgid "Image" msgstr "" -#: ckanext/odsh/fanstatic/odsh_image-upload.js:90 +#: ckanext/odsh/assets/odsh_image-upload.js:90 msgid "Upload a file on your computer" msgstr "" -#: ckanext/odsh/fanstatic/odsh_image-upload.js:115 -#: ckanext/odsh/fanstatic/odsh_image-upload.js:186 -#: ckanext/odsh/templates/organization/snippets/organization_form.html:18 -#: ckanext/odsh/templates/package/snippets/resource_form.html:30 +#: ckanext/odsh/assets/odsh_image-upload.js:115 +#: ckanext/odsh/assets/odsh_image-upload.js:186 +#: ckanext/odsh/templates/organization/snippets/organization_form.html:19 +#: ckanext/odsh/templates/package/snippets/resource_form.html:31 msgid "URL" msgstr "" -#: ckanext/odsh/fanstatic/odsh_image-upload.js:125 -#: ckanext/odsh/fanstatic/odsh_image-upload.js:221 +#: ckanext/odsh/assets/odsh_image-upload.js:125 +#: ckanext/odsh/assets/odsh_image-upload.js:221 msgid "File" msgstr "" -#: ckanext/odsh/templates/header.html:38 +#: ckanext/odsh/harvest_templates/source/search.html:6 +msgid "Harvest sources" +msgstr "" + +#: ckanext/odsh/harvest_templates/source/search.html:8 +#, python-format +msgid "Error %(error_code)s" +msgstr "" + +#: ckanext/odsh/harvest_templates/source/search.html:14 +msgid "Harvest Sources" +msgstr "" + +#: ckanext/odsh/harvest_templates/source/search.html:36 +#: ckanext/odsh/templates/organization/read.html:27 +#: ckanext/odsh/templates/snippets/search_form.html:9 +msgid "Relevance" +msgstr "" + +#: ckanext/odsh/harvest_templates/source/search.html:37 +#: ckanext/odsh/templates/organization/index.html:35 +#: ckanext/odsh/templates/organization/read.html:28 +#: ckanext/odsh/templates/snippets/search_form.html:6 +#: ckanext/odsh/templates/snippets/search_form.html:10 +msgid "Name Ascending" +msgstr "" + +#: ckanext/odsh/harvest_templates/source/search.html:38 +#: ckanext/odsh/templates/organization/index.html:35 +#: ckanext/odsh/templates/organization/read.html:29 +#: ckanext/odsh/templates/snippets/search_form.html:6 +#: ckanext/odsh/templates/snippets/search_form.html:11 +msgid "Name Descending" +msgstr "" + +#: ckanext/odsh/harvest_templates/source/search.html:39 +#: ckanext/odsh/templates/package/snippets/resource_form.html:51 +msgid "Last Modified" +msgstr "" + +#: ckanext/odsh/harvest_templates/source/search.html:40 +#: ckanext/odsh/templates/organization/read.html:32 +#: ckanext/odsh/templates/snippets/package_item.html:91 +#: ckanext/odsh/templates/snippets/search_form.html:18 +msgid "Popular" +msgstr "" + +#: ckanext/odsh/harvest_templates/source/search.html:42 +msgid "Search harvest sources..." +msgstr "" + +#: ckanext/odsh/harvest_templates/source/search.html:53 +msgid "HTTP Status 404" +msgstr "" + +#: ckanext/odsh/harvest_templates/source/search.html:55 +msgid "Page not found" +msgstr "" + +#: ckanext/odsh/harvest_templates/source/search.html:56 +msgid "How do I find the content I am looking for in the state portal?" +msgstr "" + +#: ckanext/odsh/harvest_templates/source/search.html:58 +msgid "To home page" +msgstr "" + +#: ckanext/odsh/harvest_templates/source/search.html:58 +msgid "To the home page of the open data portal" +msgstr "" + +#: ckanext/odsh/harvest_templates/source/search.html:60 +#: ckanext/odsh/harvest_templates/source/search.html:62 +#: ckanext/odsh/templates/footer.html:12 +msgid "Contact" +msgstr "" + +#: ckanext/odsh/harvest_templates/source/search.html:61 +msgid "" +"If you have any questions or problems with the open data portal, please send " +"an email to opendata@lr.landsh.de or use the contact form:" +msgstr "" + +#: ckanext/odsh/harvest_templates/source/search.html:62 +msgid "To contact form" +msgstr "" + +#: ckanext/odsh/templates/footer.html:13 +msgid "Imprint" +msgstr "" + +#: ckanext/odsh/templates/footer.html:14 +msgid "Accessibility" +msgstr "" + +#: ckanext/odsh/templates/footer.html:15 +msgid "Data protection" +msgstr "" + +#: ckanext/odsh/templates/header.html:22 +msgid "Toggle menu" +msgstr "" + +#: ckanext/odsh/templates/header.html:33 msgid "Menu" msgstr "" -#: ckanext/odsh/templates/header.html:44 -#: ckanext/odsh/templates/organization/read.html:33 +#: ckanext/odsh/templates/header.html:34 +msgid "Close menu" +msgstr "" + +#: ckanext/odsh/templates/header.html:39 +#: ckanext/odsh/templates/organization/read.html:34 #: ckanext/odsh/templates/package/base.html:7 #: ckanext/odsh/templates/package/base.html:17 #: ckanext/odsh/templates/package/base.html:22 #: ckanext/odsh/templates/package/read.html:21 -#: ckanext/odsh/templates/package/read.html:26 +#: ckanext/odsh/templates/package/read.html:25 #: ckanext/odsh/templates/package/search.html:10 msgid "Datasets" msgstr "" -#: ckanext/odsh/templates/header.html:49 +#: ckanext/odsh/templates/header.html:44 msgid "Infos" msgstr "" -#: ckanext/odsh/templates/header.html:53 +#: ckanext/odsh/templates/header.html:48 msgid "Harvester" msgstr "" -#: ckanext/odsh/templates/header.html:77 +#: ckanext/odsh/templates/header.html:70 ckanext/odsh/templates/header.html:72 msgid "View profile" msgstr "" -#: ckanext/odsh/templates/header.html:85 +#: ckanext/odsh/templates/header.html:77 ckanext/odsh/templates/header.html:80 msgid "Edit profile" msgstr "" -#: ckanext/odsh/templates/header.html:92 ckanext/odsh/templates/user/logout.html:4 +#: ckanext/odsh/templates/header.html:85 ckanext/odsh/templates/header.html:87 +#: ckanext/odsh/templates/user/logout.html:4 msgid "Logout" msgstr "" -#: ckanext/odsh/templates/header.html:101 ckanext/odsh/templates/user/login.html:3 +#: ckanext/odsh/templates/header.html:95 ckanext/odsh/templates/header.html:96 +#: ckanext/odsh/templates/user/login.html:3 #: ckanext/odsh/templates/user/login.html:10 #: ckanext/odsh/templates/user/login.html:16 msgid "Login" msgstr "" -#: ckanext/odsh/templates/header.html:106 +#: ckanext/odsh/templates/header.html:101 msgid "Sign language" msgstr "" -#: ckanext/odsh/templates/header.html:109 +#: ckanext/odsh/templates/header.html:104 msgid "Simple language" msgstr "" @@ -296,172 +395,8 @@ msgstr "" msgid "Name: Diese URL ist bereits vergeben" msgstr "" -#: ckanext/odsh/templates/datarequests/base.html:12 -#: ckanext/odsh/templates/datarequests/close.html:6 -#: ckanext/odsh/templates/datarequests/edit.html:6 -#: ckanext/odsh/templates/datarequests/new.html:6 -msgid "Data Proposal" -msgstr "" - -#: ckanext/odsh/templates/datarequests/close.html:3 -#: ckanext/odsh/templates/datarequests/close.html:8 -#: ckanext/odsh/templates/datarequests/close.html:12 -msgid "Close Data Proposal" -msgstr "" - -#: ckanext/odsh/templates/datarequests/comment.html:18 -#: ckanext/odsh/templates/datarequests/show.html:15 -#: ckanext/odsh/templates/organization/read_base.html:18 -#: ckanext/odsh/templates/package/resource_read.html:31 -msgid "Manage" -msgstr "" - -#: ckanext/odsh/templates/datarequests/comment.html:22 -#: ckanext/odsh/templates/datarequests/show.html:19 -#: ckanext/odsh/templates/organization/read.html:58 -#: ckanext/odsh/templates/package/snippets/close_mobile_sidebar_button.html:2 -msgid "Close" -msgstr "" - -#: ckanext/odsh/templates/datarequests/comment.html:37 -#: ckanext/odsh/templates/datarequests/snippets/comment_form.html:24 -#: ckanext/odsh/templates/datarequests/snippets/datarequest_item.html:38 -msgid "Add New Comment" -msgstr "" - -#: ckanext/odsh/templates/datarequests/comment.html:53 -msgid "Released" -msgstr "" - -#: ckanext/odsh/templates/datarequests/comment.html:54 -msgid "Suggester" -msgstr "" - -#: ckanext/odsh/templates/datarequests/comment.html:54 -msgid "None" -msgstr "" - -#: ckanext/odsh/templates/datarequests/comment.html:56 -msgid "Status" -msgstr "" - -#: ckanext/odsh/templates/datarequests/comment.html:60 -#: ckanext/odsh/templates/datarequests/snippets/datarequest_item.html:13 -msgid "Done" -msgstr "" - -#: ckanext/odsh/templates/datarequests/comment.html:64 -#: ckanext/odsh/templates/datarequests/show.html:40 -#: ckanext/odsh/templates/datarequests/snippets/datarequest_item.html:17 -msgid "Open" -msgstr "" - -#: ckanext/odsh/templates/datarequests/edit.html:3 -#: ckanext/odsh/templates/datarequests/edit.html:8 -#: ckanext/odsh/templates/datarequests/edit.html:12 -msgid "Edit Data Proposal" -msgstr "" - -#: ckanext/odsh/templates/datarequests/index.html:8 -msgid "Search Data Requests..." -msgstr "" - -#: ckanext/odsh/templates/datarequests/index.html:12 -msgid "Add Request" -msgstr "" - -#: ckanext/odsh/templates/datarequests/new.html:3 -#: ckanext/odsh/templates/datarequests/snippets/datarequest_form.html:33 -msgid "Create Data Request" -msgstr "" - -#: ckanext/odsh/templates/datarequests/new.html:7 -msgid "Create Data Proposal" -msgstr "" - -#: ckanext/odsh/templates/datarequests/new.html:11 -msgid "Create New Data Request" -msgstr "" - -#: ckanext/odsh/templates/datarequests/show.html:3 -#: ckanext/odsh/templates/datarequests/show.html:25 -msgid "Data Request" -msgstr "" - -#: ckanext/odsh/templates/datarequests/show.html:8 -msgid "Data Requests" -msgstr "" - -#: ckanext/odsh/templates/datarequests/show.html:35 -msgid "Closed" -msgstr "" - -#: ckanext/odsh/templates/datarequests/show.html:64 -#: ckanext/odsh/templates/datarequests/snippets/comments.html:11 -msgid "This data request has not been commented yet" -msgstr "" - -#: ckanext/odsh/templates/datarequests/snippets/comment_form.html:16 -msgid "Add a new Comment" -msgstr "" - -#: ckanext/odsh/templates/datarequests/snippets/comment_form.html:21 -msgid "Cancel" -msgstr "" - -#: ckanext/odsh/templates/datarequests/snippets/comment_form.html:22 -msgid "Update Comment" -msgstr "" - -#: ckanext/odsh/templates/datarequests/snippets/comments.html:3 -msgid "Comments" -msgstr "" - -#: ckanext/odsh/templates/datarequests/snippets/datarequest_form.html:17 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:10 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:14 -msgid "Title" -msgstr "" - -#: ckanext/odsh/templates/datarequests/snippets/datarequest_form.html:17 -msgid "eg. Data Request Name" -msgstr "" - -#: ckanext/odsh/templates/datarequests/snippets/datarequest_form.html:21 -#: ckanext/odsh/templates/organization/snippets/organization_form.html:20 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:28 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:33 -msgid "Description" -msgstr "" - -#: ckanext/odsh/templates/datarequests/snippets/datarequest_form.html:21 -msgid "eg. Data Request description" -msgstr "" - -#: ckanext/odsh/templates/datarequests/snippets/datarequest_form.html:29 -msgid "Are you sure you want to delete this data request?" -msgstr "" - -#: ckanext/odsh/templates/datarequests/snippets/datarequest_form.html:30 -#: ckanext/odsh/templates/organization/snippets/organization_form.html:86 -#: ckanext/odsh/templates/package/edit_view.html:19 -#: ckanext/odsh/templates/package/snippets/package_form.html:33 -#: ckanext/odsh/templates/package/snippets/resource_form.html:91 -#: ckanext/odsh/templates/user/edit_user_form.html:46 -msgid "Delete" -msgstr "" - -#: ckanext/odsh/templates/datarequests/snippets/datarequest_list.html:11 -msgid "No Data Requests found with the given criteria" -msgstr "" - -#: ckanext/odsh/templates/datarequests/snippets/datarequest_list.html:13 -#: ckanext/odsh/templates/organization/index.html:48 -msgid "How about creating one?" -msgstr "" - -#: ckanext/odsh/templates/datarequests/snippets/new_datarequest_form.html:7 -msgid "Suggest New Data Request" +#: ckanext/odsh/templates/page.html:5 +msgid "Skip to content." msgstr "" #: ckanext/odsh/templates/home/index.html:4 @@ -481,8 +416,8 @@ msgstr "" #: ckanext/odsh/templates/package/snippets/package_basic_fields.html:92 #: ckanext/odsh/templates/package/snippets/package_basic_fields.html:143 #: ckanext/odsh/templates/package/snippets/package_basic_fields.html:189 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:245 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:292 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:240 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:287 msgid "This field is required" msgstr "" @@ -506,122 +441,137 @@ msgstr "" msgid "Search organizations" msgstr "" +#: ckanext/odsh/templates/organization/index.html:18 +#: ckanext/odsh/templates/snippets/search_box.html:6 +msgid "Search" +msgstr "" + #: ckanext/odsh/templates/organization/index.html:30 msgid "Add Organization" msgstr "" -#: ckanext/odsh/templates/organization/index.html:36 +#: ckanext/odsh/templates/organization/index.html:35 msgid "Search organizations..." msgstr "" -#: ckanext/odsh/templates/organization/index.html:36 -#: ckanext/odsh/templates/organization/read.html:27 -#: ckanext/odsh/templates/snippets/search_form.html:6 -#: ckanext/odsh/templates/snippets/search_form.html:12 -msgid "Name Ascending" -msgstr "" - -#: ckanext/odsh/templates/organization/index.html:36 -#: ckanext/odsh/templates/organization/read.html:28 -#: ckanext/odsh/templates/snippets/search_form.html:6 -#: ckanext/odsh/templates/snippets/search_form.html:13 -msgid "Name Descending" +#: ckanext/odsh/templates/organization/index.html:45 +msgid "There are currently no organizations for this site" msgstr "" -#: ckanext/odsh/templates/organization/index.html:46 -msgid "There are currently no organizations for this site" +#: ckanext/odsh/templates/organization/index.html:47 +msgid "How about creating one?" msgstr "" -#: ckanext/odsh/templates/organization/read.html:5 +#: ckanext/odsh/templates/organization/read.html:6 #: ckanext/odsh/templates/package/snippets/stages.html:30 #: ckanext/odsh/templates/package/snippets/stages.html:34 #: ckanext/odsh/templates/package/snippets/stages.html:36 msgid "Add dataset" msgstr "" -#: ckanext/odsh/templates/organization/read.html:26 -#: ckanext/odsh/templates/snippets/search_form.html:11 -msgid "Relevance" -msgstr "" - -#: ckanext/odsh/templates/organization/read.html:29 -#: ckanext/odsh/templates/snippets/search_form.html:14 -msgid "Issued Ascending" -msgstr "" - #: ckanext/odsh/templates/organization/read.html:30 -#: ckanext/odsh/templates/snippets/search_form.html:15 -msgid "Issued Descending" +#: ckanext/odsh/templates/snippets/search_form.html:12 +msgid "Issued Ascending" msgstr "" #: ckanext/odsh/templates/organization/read.html:31 -#: ckanext/odsh/templates/snippets/package_item.html:89 -#: ckanext/odsh/templates/snippets/search_form.html:20 -msgid "Popular" +#: ckanext/odsh/templates/snippets/search_form.html:13 +msgid "Issued Descending" msgstr "" -#: ckanext/odsh/templates/organization/read.html:33 +#: ckanext/odsh/templates/organization/read.html:34 #: ckanext/odsh/templates/snippets/search_form.html:3 msgid "Search datasets..." msgstr "" -#: ckanext/odsh/templates/organization/read.html:49 +#: ckanext/odsh/templates/organization/read.html:50 #: ckanext/odsh/templates/package/search.html:18 #: ckanext/odsh/templates/package/search.html:51 msgid "Filter" msgstr "" -#: ckanext/odsh/templates/organization/read.html:50 +#: ckanext/odsh/templates/organization/read.html:51 #: ckanext/odsh/templates/package/search.html:53 msgid "Reset" msgstr "" +#: ckanext/odsh/templates/organization/read.html:58 +#: ckanext/odsh/templates/package/snippets/close_mobile_sidebar_button.html:2 +msgid "Close" +msgstr "" + +#: ckanext/odsh/templates/organization/read_base.html:18 +#: ckanext/odsh/templates/package/resource_read.html:31 +msgid "Manage" +msgstr "" + #: ckanext/odsh/templates/organization/read_base.html:29 #: ckanext/odsh/templates/snippets/organization.html:90 msgid "There is no description for this organization" msgstr "" -#: ckanext/odsh/templates/organization/snippets/organization_form.html:10 -#: ckanext/odsh/templates/package/snippets/resource_form.html:36 +#: ckanext/odsh/templates/organization/snippets/organization_form.html:11 +#: ckanext/odsh/templates/package/snippets/resource_form.html:37 msgid "Name" msgstr "" -#: ckanext/odsh/templates/organization/snippets/organization_form.html:10 -#: ckanext/odsh/templates/organization/snippets/organization_form.html:18 +#: ckanext/odsh/templates/organization/snippets/organization_form.html:11 +#: ckanext/odsh/templates/organization/snippets/organization_form.html:19 msgid "My Organization" msgstr "" -#: ckanext/odsh/templates/organization/snippets/organization_form.html:20 +#: ckanext/odsh/templates/organization/snippets/organization_form.html:21 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:28 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:33 +msgid "Description" +msgstr "" + +#: ckanext/odsh/templates/organization/snippets/organization_form.html:21 msgid "A little information about my organization..." msgstr "" -#: ckanext/odsh/templates/organization/snippets/organization_form.html:55 -#: ckanext/odsh/templates/organization/snippets/organization_form.html:73 +#: ckanext/odsh/templates/organization/snippets/organization_form.html:57 +#: ckanext/odsh/templates/organization/snippets/organization_form.html:75 msgid "Custom Field" msgstr "" -#: ckanext/odsh/templates/organization/snippets/organization_form.html:86 +#: ckanext/odsh/templates/organization/snippets/organization_form.html:88 msgid "" "Are you sure you want to delete this Organization? Note*: Deleting cannot be " "performed while public or private datasets belong to this organization." msgstr "" -#: ckanext/odsh/templates/organization/snippets/organization_form.html:89 +#: ckanext/odsh/templates/organization/snippets/organization_form.html:88 +#: ckanext/odsh/templates/package/edit_view.html:19 +#: ckanext/odsh/templates/package/snippets/package_form.html:33 +#: ckanext/odsh/templates/package/snippets/resource_form.html:92 +#: ckanext/odsh/templates/user/edit_user_form.html:84 +msgid "Delete" +msgstr "" + +#: ckanext/odsh/templates/organization/snippets/organization_form.html:91 msgid "Save Organization" msgstr "" #: ckanext/odsh/templates/organization/snippets/organization_item.html:15 -#: ckanext/odsh/templates/snippets/package_item.html:75 +#: ckanext/odsh/templates/snippets/package_item.html:76 msgid "View {organization_name}" msgstr "" #: ckanext/odsh/templates/package/base.html:23 #: ckanext/odsh/templates/package/edit_base.html:9 -#: ckanext/odsh/templates/package/new_package_form.html:8 -#: ckanext/odsh/templates/package/read.html:27 +#: ckanext/odsh/templates/package/new_package_form.html:6 +#: ckanext/odsh/templates/package/read.html:26 msgid "Create Dataset" msgstr "" +#: ckanext/odsh/templates/package/collection_read.html:19 +#, python-format +msgid "" +"This is the overview page of the \"%(title)s\" series. It contains the " +"following datasets (newer datasets first):" +msgstr "" + #: ckanext/odsh/templates/package/edit_base.html:7 #: ckanext/odsh/templates/package/resource_edit.html:3 #: ckanext/odsh/templates/package/resource_edit_base.html:12 @@ -630,7 +580,7 @@ msgstr "" #: ckanext/odsh/templates/package/edit_base.html:23 #: ckanext/odsh/templates/package/resource_edit_base.html:28 -#: ckanext/odsh/templates/package/snippets/resource_form.html:77 +#: ckanext/odsh/templates/package/snippets/resource_form.html:78 msgid "Back" msgstr "" @@ -650,11 +600,11 @@ msgstr "" msgid "Update" msgstr "" -#: ckanext/odsh/templates/package/new_package_form.html:18 +#: ckanext/odsh/templates/package/new_package_form.html:14 msgid "next" msgstr "" -#: ckanext/odsh/templates/package/new_package_form.html:20 +#: ckanext/odsh/templates/package/new_package_form.html:16 msgid "Update Dataset" msgstr "" @@ -689,65 +639,72 @@ msgid "" msgstr "" #: ckanext/odsh/templates/package/new_view.html:32 -#: ckanext/odsh/templates/package/snippets/resource_form.html:112 +#: ckanext/odsh/templates/package/snippets/resource_form.html:113 msgid "Add" msgstr "" -#: ckanext/odsh/templates/package/read.html:39 -#: ckanext/odsh/templates/snippets/package_item.html:79 +#: ckanext/odsh/templates/package/read.html:38 +#: ckanext/odsh/templates/snippets/package_item.html:81 msgid "Draft" msgstr "" -#: ckanext/odsh/templates/package/read.html:42 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:275 +#: ckanext/odsh/templates/package/read.html:41 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:270 #: ckanext/odsh/templates/snippets/organization.html:24 -#: ckanext/odsh/templates/snippets/package_item.html:81 +#: ckanext/odsh/templates/snippets/package_item.html:83 msgid "Deleted" msgstr "" -#: ckanext/odsh/templates/package/read.html:48 +#: ckanext/odsh/templates/package/read.html:47 msgid "Manage Dataset" msgstr "" -#: ckanext/odsh/templates/package/read.html:55 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:251 +#: ckanext/odsh/templates/package/read.html:54 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:246 #: ckanext/odsh/templates/snippets/package_item.html:70 msgid "Private" msgstr "" -#: ckanext/odsh/templates/package/read.html:73 +#: ckanext/odsh/templates/package/read.html:70 msgid "Detailed information" msgstr "" -#: ckanext/odsh/templates/package/read.html:77 +#: ckanext/odsh/templates/package/read.html:74 #, python-format msgid "" "Note: A <a href=\"%(latest_collection_member)s\">newer version</a> of this " "dataset is available." msgstr "" -#: ckanext/odsh/templates/package/read.html:84 +#: ckanext/odsh/templates/package/read.html:81 #, python-format msgid "" "Note: This dataset has been replaced with a <a " "href=\"%(is_replaced_by)s\">newer version</a>." msgstr "" -#: ckanext/odsh/templates/package/read.html:105 +#: ckanext/odsh/templates/package/read.html:103 msgid "Add new resource" msgstr "" -#: ckanext/odsh/templates/package/read.html:122 +#: ckanext/odsh/templates/package/read.html:113 +#, python-format +msgid "" +"This record is part of the series <a href=\"%(url)s\">%(title)s</a>. You can " +"browse to older and newer records." +msgstr "" + +#: ckanext/odsh/templates/package/read.html:121 msgid "latest collection member" msgstr "" -#: ckanext/odsh/templates/package/read.html:127 -#: ckanext/odsh/templates/package/read.html:132 +#: ckanext/odsh/templates/package/read.html:126 +#: ckanext/odsh/templates/package/read.html:131 msgid "predecessor" msgstr "" -#: ckanext/odsh/templates/package/read.html:137 -#: ckanext/odsh/templates/package/read.html:142 +#: ckanext/odsh/templates/package/read.html:136 +#: ckanext/odsh/templates/package/read.html:141 msgid "successor" msgstr "" @@ -848,7 +805,7 @@ msgid "Created" msgstr "" #: ckanext/odsh/templates/package/resource_read.html:166 -#: ckanext/odsh/templates/package/snippets/resource_form.html:68 +#: ckanext/odsh/templates/package/snippets/resource_form.html:69 #: ckanext/odsh/templates/package/snippets/resource_info.html:26 msgid "Format" msgstr "" @@ -861,7 +818,7 @@ msgstr "" #: ckanext/odsh/templates/package/search.html:79 #: ckanext/odsh/templates/package/snippets/package_basic_fields.html:156 -#: ckanext/odsh/templates/snippets/search_form.html:117 +#: ckanext/odsh/templates/snippets/search_form.html:115 msgid "from" msgstr "" @@ -875,13 +832,13 @@ msgid "Date" msgstr "" #: ckanext/odsh/templates/package/search.html:90 -#: ckanext/odsh/templates/snippets/search_form.html:130 +#: ckanext/odsh/templates/snippets/search_form.html:128 msgid "wrong_start_date_for_search" msgstr "" #: ckanext/odsh/templates/package/search.html:94 #: ckanext/odsh/templates/package/snippets/package_basic_fields.html:170 -#: ckanext/odsh/templates/snippets/search_form.html:144 +#: ckanext/odsh/templates/snippets/search_form.html:142 msgid "to" msgstr "" @@ -890,7 +847,7 @@ msgid "date end" msgstr "" #: ckanext/odsh/templates/package/search.html:105 -#: ckanext/odsh/templates/snippets/search_form.html:157 +#: ckanext/odsh/templates/snippets/search_form.html:155 msgid "wrong_end_date_for_search" msgstr "" @@ -910,19 +867,15 @@ msgstr "" msgid "View preview" msgstr "" -#: ckanext/odsh/templates/package/snippets/close_mobile_sidebar_button.html:2 -msgid "Filterdialog schließen" -msgstr "" - #: ckanext/odsh/templates/package/snippets/info.html:28 -#: ckanext/odsh/templates/snippets/package_item.html:97 +#: ckanext/odsh/templates/snippets/package_item.html:99 msgid "Category:" msgid_plural "Categories:" msgstr[0] "" msgstr[1] "" #: ckanext/odsh/templates/package/snippets/info.html:63 -#: ckanext/odsh/templates/snippets/package_item.html:143 +#: ckanext/odsh/templates/snippets/package_item.html:146 msgid "Issued" msgstr "" @@ -931,12 +884,12 @@ msgid "Modified" msgstr "" #: ckanext/odsh/templates/package/snippets/info.html:89 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:334 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:329 msgid "Musterdatensatz" msgstr "" #: ckanext/odsh/templates/package/snippets/info.html:99 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:239 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:234 msgid "Spatial uri" msgstr "" @@ -964,6 +917,11 @@ msgstr "" msgid "DCAT-AP.de metadata" msgstr "" +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:10 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:14 +msgid "Title" +msgstr "" + #: ckanext/odsh/templates/package/snippets/package_basic_fields.html:20 msgid "Enter title" msgstr "" @@ -995,23 +953,19 @@ msgstr "" msgid "odsh tags placeholder" msgstr "" -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:233 -msgid "language" -msgstr "" - -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:244 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:239 msgid "Visibility" msgstr "" -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:251 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:246 msgid "Public" msgstr "" -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:265 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:260 msgid "State" msgstr "" -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:272 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:267 msgid "Active" msgstr "" @@ -1024,7 +978,7 @@ msgid "Next: Add Data" msgstr "" #: ckanext/odsh/templates/package/snippets/package_form.html:46 -#: ckanext/odsh/templates/package/snippets/resource_form.html:118 +#: ckanext/odsh/templates/package/snippets/resource_form.html:119 msgid "Required information" msgstr "" @@ -1032,86 +986,82 @@ msgstr "" msgid "Versioning" msgstr "" -#: ckanext/odsh/templates/package/snippets/package_metadata_fields.html:9 -msgid "Is replaced by" +#: ckanext/odsh/templates/package/snippets/package_metadata_fields.html:10 +msgid "Version notes" msgstr "" -#: ckanext/odsh/templates/package/snippets/package_metadata_fields.html:9 -msgid "https://" +#: ckanext/odsh/templates/package/snippets/package_metadata_fields.html:15 +msgid "Is replaced by" msgstr "" -#: ckanext/odsh/templates/package/snippets/package_metadata_fields.html:14 -msgid "Version notes" +#: ckanext/odsh/templates/package/snippets/package_metadata_fields.html:15 +msgid "https://" msgstr "" -#: ckanext/odsh/templates/package/snippets/resource_form.html:11 +#: ckanext/odsh/templates/package/snippets/resource_form.html:12 msgid "odsh Create Dataset" msgstr "" -#: ckanext/odsh/templates/package/snippets/resource_form.html:27 +#: ckanext/odsh/templates/package/snippets/resource_form.html:28 msgid "odsh_resource_upload_error_label" msgstr "" -#: ckanext/odsh/templates/package/snippets/resource_form.html:30 +#: ckanext/odsh/templates/package/snippets/resource_form.html:31 msgid "Data-Upload" msgstr "" -#: ckanext/odsh/templates/package/snippets/resource_form.html:30 +#: ckanext/odsh/templates/package/snippets/resource_form.html:31 msgid "http://example.com/external-data.csv" msgstr "" -#: ckanext/odsh/templates/package/snippets/resource_form.html:35 +#: ckanext/odsh/templates/package/snippets/resource_form.html:36 msgid "odsh_resource_name_error_label" msgstr "" -#: ckanext/odsh/templates/package/snippets/resource_form.html:36 +#: ckanext/odsh/templates/package/snippets/resource_form.html:37 msgid "Enter name of the dataset" msgstr "" -#: ckanext/odsh/templates/package/snippets/resource_form.html:50 -msgid "Last Modified" -msgstr "" - -#: ckanext/odsh/templates/package/snippets/resource_form.html:50 +#: ckanext/odsh/templates/package/snippets/resource_form.html:51 msgid "eg. 2012-06-05" msgstr "" -#: ckanext/odsh/templates/package/snippets/resource_form.html:53 +#: ckanext/odsh/templates/package/snippets/resource_form.html:54 msgid "File Size" msgstr "" -#: ckanext/odsh/templates/package/snippets/resource_form.html:53 +#: ckanext/odsh/templates/package/snippets/resource_form.html:54 msgid "eg. 1024" msgstr "" -#: ckanext/odsh/templates/package/snippets/resource_form.html:56 -#: ckanext/odsh/templates/package/snippets/resource_form.html:59 +#: ckanext/odsh/templates/package/snippets/resource_form.html:57 +#: ckanext/odsh/templates/package/snippets/resource_form.html:60 msgid "MIME Type" msgstr "" -#: ckanext/odsh/templates/package/snippets/resource_form.html:56 +#: ckanext/odsh/templates/package/snippets/resource_form.html:57 msgid "eg. application/json" msgstr "" -#: ckanext/odsh/templates/package/snippets/resource_form.html:59 +#: ckanext/odsh/templates/package/snippets/resource_form.html:60 msgid "" "eg.\n" " application/json" msgstr "" -#: ckanext/odsh/templates/package/snippets/resource_form.html:66 +#: ckanext/odsh/templates/package/snippets/resource_form.html:67 msgid "odsh_resource_format_error_label" msgstr "" -#: ckanext/odsh/templates/package/snippets/resource_form.html:80 +#: ckanext/odsh/templates/package/snippets/resource_form.html:81 msgid "Another dataset" msgstr "" -#: ckanext/odsh/templates/package/snippets/resource_form.html:88 +#: ckanext/odsh/templates/package/snippets/resource_form.html:89 msgid "Are you sure you want to delete this resource?" msgstr "" -#: ckanext/odsh/templates/package/snippets/resource_form.html:105 +#: ckanext/odsh/templates/package/snippets/resource_form.html:106 msgid "Upload dataset" msgstr "" @@ -1136,7 +1086,6 @@ msgid "Number of pages" msgstr "" #: ckanext/odsh/templates/package/snippets/resource_item.html:29 -#: ckanext/odsh/templates/package/snippets/resource_item.html:51 msgid "download file" msgstr "" @@ -1181,31 +1130,11 @@ msgid "LD = Linked Data" msgstr "" #: ckanext/odsh/templates/qa/stars.html:37 -msgid "Sterne" +msgid "Stars" msgstr "" #: ckanext/odsh/templates/qa/stars.html:37 -msgid "5-Sterne-Modell für Offene Daten" -msgstr "" - -#: ckanext/odsh/templates/snippets/custom_search_form.html:6 -msgid "{number} data request found for \"{query}\"" -msgid_plural "{number} data requests found for \"{query}\"" -msgstr[0] "" -msgstr[1] "" - -#: ckanext/odsh/templates/snippets/custom_search_form.html:7 -msgid "No data requests found for \"{query}\"" -msgstr "" - -#: ckanext/odsh/templates/snippets/custom_search_form.html:8 -msgid "{number} data proposal found" -msgid_plural "{number} data proposals found" -msgstr[0] "" -msgstr[1] "" - -#: ckanext/odsh/templates/snippets/custom_search_form.html:9 -msgid "No data proposal found" +msgid "5-Star Model for Open Data" msgstr "" #: ckanext/odsh/templates/snippets/facet_list.html:68 @@ -1261,11 +1190,6 @@ msgid "NEW" msgstr "" #: ckanext/odsh/templates/snippets/search_box.html:5 -msgid "Enter search query for datasets" -msgstr "" - -#: ckanext/odsh/templates/snippets/search_box.html:11 -#: ckanext/odsh/templates/snippets/search_box.html:13 msgid "Search dataset" msgstr "" @@ -1273,77 +1197,73 @@ msgstr "" msgid "Order by" msgstr "" -#: ckanext/odsh/templates/snippets/search_form.html:8 -msgid "Date Ascending" -msgstr "" - -#: ckanext/odsh/templates/snippets/search_form.html:8 -msgid "Date Descending" -msgstr "" - -#: ckanext/odsh/templates/snippets/search_form.html:16 +#: ckanext/odsh/templates/snippets/search_form.html:14 msgid "Start Date Ascending" msgstr "" -#: ckanext/odsh/templates/snippets/search_form.html:17 +#: ckanext/odsh/templates/snippets/search_form.html:15 msgid "Start Date Descending" msgstr "" -#: ckanext/odsh/templates/snippets/search_form.html:18 +#: ckanext/odsh/templates/snippets/search_form.html:16 msgid "End Date Ascending" msgstr "" -#: ckanext/odsh/templates/snippets/search_form.html:19 +#: ckanext/odsh/templates/snippets/search_form.html:17 msgid "End Date Descending" msgstr "" -#: ckanext/odsh/templates/snippets/search_form.html:45 +#: ckanext/odsh/templates/snippets/search_form.html:43 msgid "rss feeds" msgstr "" -#: ckanext/odsh/templates/snippets/search_form.html:67 +#: ckanext/odsh/templates/snippets/search_form.html:49 +msgid "Error" +msgstr "" + +#: ckanext/odsh/templates/snippets/search_form.html:65 msgid "Go" msgstr "" -#: ckanext/odsh/templates/snippets/search_form.html:93 -#: ckanext/odsh/templates/snippets/search_form.html:94 -#: ckanext/odsh/templates/snippets/search_form.html:121 -#: ckanext/odsh/templates/snippets/search_form.html:122 -#: ckanext/odsh/templates/snippets/search_form.html:134 -#: ckanext/odsh/templates/snippets/search_form.html:135 -#: ckanext/odsh/templates/snippets/search_form.html:148 -#: ckanext/odsh/templates/snippets/search_form.html:149 -#: ckanext/odsh/templates/snippets/search_form.html:161 -#: ckanext/odsh/templates/snippets/search_form.html:162 -#: ckanext/odsh/templates/snippets/search_form.html:182 -#: ckanext/odsh/templates/snippets/search_form.html:183 +#: ckanext/odsh/templates/snippets/search_form.html:91 +#: ckanext/odsh/templates/snippets/search_form.html:92 +#: ckanext/odsh/templates/snippets/search_form.html:119 +#: ckanext/odsh/templates/snippets/search_form.html:120 +#: ckanext/odsh/templates/snippets/search_form.html:132 +#: ckanext/odsh/templates/snippets/search_form.html:133 +#: ckanext/odsh/templates/snippets/search_form.html:146 +#: ckanext/odsh/templates/snippets/search_form.html:147 +#: ckanext/odsh/templates/snippets/search_form.html:159 +#: ckanext/odsh/templates/snippets/search_form.html:160 +#: ckanext/odsh/templates/snippets/search_form.html:180 +#: ckanext/odsh/templates/snippets/search_form.html:181 msgid "Remove filters" msgstr "" -#: ckanext/odsh/templates/snippets/search_form.html:102 +#: ckanext/odsh/templates/snippets/search_form.html:100 msgid "Filter Results" msgstr "" -#: ckanext/odsh/templates/snippets/search_form.html:117 -#: ckanext/odsh/templates/snippets/search_form.html:130 -#: ckanext/odsh/templates/snippets/search_form.html:144 -#: ckanext/odsh/templates/snippets/search_form.html:157 +#: ckanext/odsh/templates/snippets/search_form.html:115 +#: ckanext/odsh/templates/snippets/search_form.html:128 +#: ckanext/odsh/templates/snippets/search_form.html:142 +#: ckanext/odsh/templates/snippets/search_form.html:155 msgid "daterange" msgstr "" -#: ckanext/odsh/templates/snippets/search_form.html:178 +#: ckanext/odsh/templates/snippets/search_form.html:176 msgid "map search active" msgstr "" -#: ckanext/odsh/templates/snippets/search_form.html:196 +#: ckanext/odsh/templates/snippets/search_form.html:194 msgid "Please try another search." msgstr "" -#: ckanext/odsh/templates/snippets/search_form.html:200 +#: ckanext/odsh/templates/snippets/search_form.html:198 msgid "There was an error while searching." msgstr "" -#: ckanext/odsh/templates/snippets/search_form.html:200 +#: ckanext/odsh/templates/snippets/search_form.html:198 msgid "Please try again." msgstr "" @@ -1391,7 +1311,7 @@ msgstr "" msgid "{number} organization found for \"{query}\"" msgid_plural "" "{number} organizations found for\n" -"\"{query}\"" +" \"{query}\"" msgstr[0] "" msgstr[1] "" @@ -1409,78 +1329,86 @@ msgstr[1] "" msgid "No organizations found" msgstr "" -#: ckanext/odsh/templates/user/edit_user_form.html:7 +#: ckanext/odsh/templates/user/edit_user_form.html:10 msgid "Change details" msgstr "" -#: ckanext/odsh/templates/user/edit_user_form.html:8 +#: ckanext/odsh/templates/user/edit_user_form.html:11 #: ckanext/odsh/templates/user/snippets/login_form.html:22 msgid "Username" msgstr "" -#: ckanext/odsh/templates/user/edit_user_form.html:10 +#: ckanext/odsh/templates/user/edit_user_form.html:13 msgid "Full name" msgstr "" -#: ckanext/odsh/templates/user/edit_user_form.html:10 +#: ckanext/odsh/templates/user/edit_user_form.html:13 msgid "eg. Joe Bloggs" msgstr "" -#: ckanext/odsh/templates/user/edit_user_form.html:12 +#: ckanext/odsh/templates/user/edit_user_form.html:15 msgid "Email" msgstr "" -#: ckanext/odsh/templates/user/edit_user_form.html:12 +#: ckanext/odsh/templates/user/edit_user_form.html:15 msgid "eg. joe@example.com" msgstr "" -#: ckanext/odsh/templates/user/edit_user_form.html:14 +#: ckanext/odsh/templates/user/edit_user_form.html:17 msgid "About" msgstr "" -#: ckanext/odsh/templates/user/edit_user_form.html:14 +#: ckanext/odsh/templates/user/edit_user_form.html:17 msgid "A little information about yourself" msgstr "" -#: ckanext/odsh/templates/user/edit_user_form.html:17 -msgid "Subscribe to notification emails" +#: ckanext/odsh/templates/user/edit_user_form.html:23 +msgid "Reactivate User" msgstr "" -#: ckanext/odsh/templates/user/edit_user_form.html:26 -#: ckanext/odsh/templates/user/login.html:32 -msgid "Change password" +#: ckanext/odsh/templates/user/edit_user_form.html:24 +msgid "" +"This account is deactivated, if you want to reactivate it, please click on " +"checkbox." msgstr "" -#: ckanext/odsh/templates/user/edit_user_form.html:29 -msgid "Sysadmin Password" +#: ckanext/odsh/templates/user/edit_user_form.html:34 +#: ckanext/odsh/templates/user/edit_user_form.html:69 +#: ckanext/odsh/templates/user/snippets/login_form.html:27 +msgid "Password" msgstr "" -#: ckanext/odsh/templates/user/edit_user_form.html:29 -msgid "Old Password" +#: ckanext/odsh/templates/user/edit_user_form.html:35 +#: ckanext/odsh/templates/user/edit_user_form.html:71 +msgid "Confirm Password" msgstr "" -#: ckanext/odsh/templates/user/edit_user_form.html:38 -#: ckanext/odsh/templates/user/snippets/login_form.html:27 -msgid "Password" +#: ckanext/odsh/templates/user/edit_user_form.html:41 +msgid "Sysadmin password" msgstr "" -#: ckanext/odsh/templates/user/edit_user_form.html:40 -msgid "Confirm Password" +#: ckanext/odsh/templates/user/edit_user_form.html:44 +msgid "Sysadmin Password" msgstr "" -#: ckanext/odsh/templates/user/edit_user_form.html:46 -msgid "Are you sure you want to delete this User?" +#: ckanext/odsh/templates/user/edit_user_form.html:57 +#: ckanext/odsh/templates/user/login.html:32 +msgid "Change password" msgstr "" -#: ckanext/odsh/templates/user/edit_user_form.html:51 -msgid "Are you sure you want to regenerate the API key?" +#: ckanext/odsh/templates/user/edit_user_form.html:60 +msgid "Old Password" msgstr "" -#: ckanext/odsh/templates/user/edit_user_form.html:51 -msgid "Regenerate API Key" +#: ckanext/odsh/templates/user/edit_user_form.html:84 +msgid "Are you sure you want to delete this User?" msgstr "" -#: ckanext/odsh/templates/user/edit_user_form.html:55 +#: ckanext/odsh/templates/user/edit_user_form.html:88 +msgid "Reactivate Profile" +msgstr "" + +#: ckanext/odsh/templates/user/edit_user_form.html:88 msgid "Update Profile" msgstr "" @@ -1509,3 +1437,7 @@ msgstr "" msgid "do Login" msgstr "" +#: ckanext/odsh/views/dashboard.py:16 +msgid "Not authorized to see this page" +msgstr "" + diff --git a/ckanext/odsh/i18n/de/LC_MESSAGES/ckanext-odsh.mo b/ckanext/odsh/i18n/de/LC_MESSAGES/ckanext-odsh.mo index b2f63eef571a5d446f424ee914123bd8b93ea1e9..19048e0f8754ccf02e9f6e0403cc210429c5b592 100644 Binary files a/ckanext/odsh/i18n/de/LC_MESSAGES/ckanext-odsh.mo and b/ckanext/odsh/i18n/de/LC_MESSAGES/ckanext-odsh.mo differ diff --git a/ckanext/odsh/i18n/de/LC_MESSAGES/ckanext-odsh.po b/ckanext/odsh/i18n/de/LC_MESSAGES/ckanext-odsh.po index 3cb802d7b1ccfd71c92053c00f5c7e9a3daabc0f..649b47969882fa4f3cc0625005a3409d26dd50af 100644 --- a/ckanext/odsh/i18n/de/LC_MESSAGES/ckanext-odsh.po +++ b/ckanext/odsh/i18n/de/LC_MESSAGES/ckanext-odsh.po @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: ckanext-odsh 2.0.0\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2023-07-03 13:39+0200\n" -"PO-Revision-Date: 2023-07-03 13:48+0200\n" +"POT-Creation-Date: 2023-08-02 11:41+0200\n" +"PO-Revision-Date: 2023-08-02 11:41+0200\n" "Last-Translator: \n" "Language-Team: de <LL@li.org>\n" "Language: de\n" @@ -20,29 +20,29 @@ msgstr "" "Generated-By: Babel 2.3.4\n" "X-Generator: Poedit 2.3\n" -#: ckanext/odsh/plugin.py:239 ckanext/odsh/plugin.py:248 -#: ckanext/odsh/plugin.py:254 ckanext/odsh/templates/header.html:45 +#: ckanext/odsh/plugin.py:234 ckanext/odsh/plugin.py:243 +#: ckanext/odsh/plugin.py:249 ckanext/odsh/templates/header.html:40 #: ckanext/odsh/templates/organization/index.html:3 #: ckanext/odsh/templates/organization/index.html:6 -#: ckanext/odsh/templates/organization/index.html:33 +#: ckanext/odsh/templates/organization/index.html:32 #: ckanext/odsh/templates/organization/read_base.html:3 #: ckanext/odsh/templates/organization/read_base.html:6 #: ckanext/odsh/templates/package/base.html:14 msgid "Organizations" msgstr "Herausgeber" -#: ckanext/odsh/plugin.py:240 ckanext/odsh/plugin.py:251 -#: ckanext/odsh/plugin.py:257 +#: ckanext/odsh/plugin.py:235 ckanext/odsh/plugin.py:246 +#: ckanext/odsh/plugin.py:252 msgid "Category" msgstr "Kategorie" -#: ckanext/odsh/plugin.py:241 ckanext/odsh/plugin.py:249 -#: ckanext/odsh/plugin.py:255 +#: ckanext/odsh/plugin.py:236 ckanext/odsh/plugin.py:244 +#: ckanext/odsh/plugin.py:250 msgid "File format" msgstr "Dateiformat" -#: ckanext/odsh/plugin.py:242 ckanext/odsh/plugin.py:250 -#: ckanext/odsh/plugin.py:256 +#: ckanext/odsh/plugin.py:237 ckanext/odsh/plugin.py:245 +#: ckanext/odsh/plugin.py:251 #: ckanext/odsh/templates/package/resource_read.html:170 #: ckanext/odsh/templates/package/snippets/info.html:75 #: ckanext/odsh/templates/package/snippets/package_basic_fields.html:91 @@ -50,124 +50,223 @@ msgstr "Dateiformat" msgid "License" msgstr "Lizenz" -#: ckanext/odsh/plugin.py:244 +#: ckanext/odsh/plugin.py:239 msgid "Open-Data-Eigenschaften" msgstr "Open-Data-Eigenschaften" -#: ckanext/odsh/validation.py:308 +#: ckanext/odsh/validation.py:286 msgid "Only formats on the list of the EU Publications Office are allowed." msgstr "" "Es sind nur Formate zulässig, die in der Liste des EU Publications Office " "aufgeführt sind." -#: ckanext/odsh/validation.py:324 -#, python-format -msgid "Tag \"%s\" length is less than minimum %s" -msgstr "Die Länge des Tags \"%s\" ist kleiner als das Minimum %s" - -#: ckanext/odsh/validation.py:328 -#, python-format -msgid "Tag \"%s\" length is more than maximum %i" -msgstr "Die Länge des Tags \"%s\" ist größer als das Maximum %i" - -#: ckanext/odsh/validation.py:338 +#: ckanext/odsh/validation.py:296 #, python-format msgid "Invalid tag: \"%s\". Tags cannot contain line breaks." msgstr "Ungültiges Tag: \"%s\". Tags können keine Zeilenumbrüche enthalten." -#: ckanext/odsh/fanstatic/moment.js:6 +#: ckanext/odsh/assets/moment.js:6 msgid "Weeks" msgstr "Wochen" -#: ckanext/odsh/fanstatic/odsh_image-upload.js:63 +#: ckanext/odsh/assets/odsh_image-upload.js:63 msgid "Link" msgstr "Link" -#: ckanext/odsh/fanstatic/odsh_image-upload.js:64 +#: ckanext/odsh/assets/odsh_image-upload.js:64 msgid "Link to a URL on the internet (you can also link to an API)" msgstr "" "Link zu einer URL im Internet (Sie können auch einen Link zu einer API " "erstellen)" -#: ckanext/odsh/fanstatic/odsh_image-upload.js:71 -#: ckanext/odsh/templates/header.html:56 +#: ckanext/odsh/assets/odsh_image-upload.js:71 +#: ckanext/odsh/templates/header.html:51 msgid "Upload" msgstr "Upload" -#: ckanext/odsh/fanstatic/odsh_image-upload.js:75 +#: ckanext/odsh/assets/odsh_image-upload.js:75 #: ckanext/odsh/templates/macros/form.html:357 msgid "Remove" msgstr "Entfernen" -#: ckanext/odsh/fanstatic/odsh_image-upload.js:83 +#: ckanext/odsh/assets/odsh_image-upload.js:83 #: ckanext/odsh/templates/macros/form.html:564 msgid "Image" msgstr "Bild" -#: ckanext/odsh/fanstatic/odsh_image-upload.js:90 +#: ckanext/odsh/assets/odsh_image-upload.js:90 msgid "Upload a file on your computer" msgstr "Hochladen einer Datei auf Ihren Computer" -#: ckanext/odsh/fanstatic/odsh_image-upload.js:115 -#: ckanext/odsh/fanstatic/odsh_image-upload.js:186 -#: ckanext/odsh/templates/organization/snippets/organization_form.html:18 -#: ckanext/odsh/templates/package/snippets/resource_form.html:30 +#: ckanext/odsh/assets/odsh_image-upload.js:115 +#: ckanext/odsh/assets/odsh_image-upload.js:186 +#: ckanext/odsh/templates/organization/snippets/organization_form.html:19 +#: ckanext/odsh/templates/package/snippets/resource_form.html:31 msgid "URL" msgstr "URL" -#: ckanext/odsh/fanstatic/odsh_image-upload.js:125 -#: ckanext/odsh/fanstatic/odsh_image-upload.js:221 +#: ckanext/odsh/assets/odsh_image-upload.js:125 +#: ckanext/odsh/assets/odsh_image-upload.js:221 msgid "File" msgstr "Datei" -#: ckanext/odsh/templates/header.html:38 +#: ckanext/odsh/harvest_templates/source/search.html:6 +msgid "Harvest sources" +msgstr "Harvester" + +#: ckanext/odsh/harvest_templates/source/search.html:8 +#, python-format +msgid "Error %(error_code)s" +msgstr "Fehler %(error_code)s" + +#: ckanext/odsh/harvest_templates/source/search.html:14 +msgid "Harvest Sources" +msgstr "Harvester" + +#: ckanext/odsh/harvest_templates/source/search.html:36 +#: ckanext/odsh/templates/organization/read.html:27 +#: ckanext/odsh/templates/snippets/search_form.html:9 +msgid "Relevance" +msgstr "Relevanz" + +#: ckanext/odsh/harvest_templates/source/search.html:37 +#: ckanext/odsh/templates/organization/index.html:35 +#: ckanext/odsh/templates/organization/read.html:28 +#: ckanext/odsh/templates/snippets/search_form.html:6 +#: ckanext/odsh/templates/snippets/search_form.html:10 +msgid "Name Ascending" +msgstr "Name: A – Z" + +#: ckanext/odsh/harvest_templates/source/search.html:38 +#: ckanext/odsh/templates/organization/index.html:35 +#: ckanext/odsh/templates/organization/read.html:29 +#: ckanext/odsh/templates/snippets/search_form.html:6 +#: ckanext/odsh/templates/snippets/search_form.html:11 +msgid "Name Descending" +msgstr "Name: Z – A" + +#: ckanext/odsh/harvest_templates/source/search.html:39 +#: ckanext/odsh/templates/package/snippets/resource_form.html:51 +msgid "Last Modified" +msgstr "Zuletzt bearbeitet" + +#: ckanext/odsh/harvest_templates/source/search.html:40 +#: ckanext/odsh/templates/organization/read.html:32 +#: ckanext/odsh/templates/snippets/package_item.html:91 +#: ckanext/odsh/templates/snippets/search_form.html:18 +msgid "Popular" +msgstr "Beliebt" + +#: ckanext/odsh/harvest_templates/source/search.html:42 +msgid "Search harvest sources..." +msgstr "Nach Harvestern suchen" + +#: ckanext/odsh/harvest_templates/source/search.html:53 +msgid "HTTP Status 404" +msgstr "HTTP Status 404" + +#: ckanext/odsh/harvest_templates/source/search.html:55 +msgid "Page not found" +msgstr "Seite nicht gefunden" + +#: ckanext/odsh/harvest_templates/source/search.html:56 +msgid "How do I find the content I am looking for in the state portal?" +msgstr "Wie finde ich die gesuchten Inhalte in dem Landesportal?" + +#: ckanext/odsh/harvest_templates/source/search.html:58 +msgid "To home page" +msgstr "Zur Startseite" + +#: ckanext/odsh/harvest_templates/source/search.html:58 +msgid "To the home page of the open data portal" +msgstr "Zur Startseite des Open-Data-Portals" + +#: ckanext/odsh/harvest_templates/source/search.html:60 +#: ckanext/odsh/harvest_templates/source/search.html:62 +#: ckanext/odsh/templates/footer.html:12 +msgid "Contact" +msgstr "Kontakt" + +#: ckanext/odsh/harvest_templates/source/search.html:61 +msgid "" +"If you have any questions or problems with the open data portal, please send " +"an email to opendata@lr.landsh.de or use the contact form:" +msgstr "" +"Bei Fragen oder Problemen mit dem Open-Data-Portal schicken Sie bitte eine E-" +"Mail an die Adresse opendata@lr.landsh.de oder verwenden das Kontaktformular:" + +#: ckanext/odsh/harvest_templates/source/search.html:62 +msgid "To contact form" +msgstr "Zum Kontaktformular" + +#: ckanext/odsh/templates/footer.html:13 +msgid "Imprint" +msgstr "Impressum" + +#: ckanext/odsh/templates/footer.html:14 +msgid "Accessibility" +msgstr "Barrierefreiheit" + +#: ckanext/odsh/templates/footer.html:15 +msgid "Data protection" +msgstr "Datenschutz" + +#: ckanext/odsh/templates/header.html:22 +msgid "Toggle menu" +msgstr "Menü umschalten" + +#: ckanext/odsh/templates/header.html:33 msgid "Menu" msgstr "Menü" -#: ckanext/odsh/templates/header.html:44 -#: ckanext/odsh/templates/organization/read.html:33 +#: ckanext/odsh/templates/header.html:34 +msgid "Close menu" +msgstr "Schließen" + +#: ckanext/odsh/templates/header.html:39 +#: ckanext/odsh/templates/organization/read.html:34 #: ckanext/odsh/templates/package/base.html:7 #: ckanext/odsh/templates/package/base.html:17 #: ckanext/odsh/templates/package/base.html:22 #: ckanext/odsh/templates/package/read.html:21 -#: ckanext/odsh/templates/package/read.html:26 +#: ckanext/odsh/templates/package/read.html:25 #: ckanext/odsh/templates/package/search.html:10 msgid "Datasets" msgstr "Datensätze" -#: ckanext/odsh/templates/header.html:49 +#: ckanext/odsh/templates/header.html:44 msgid "Infos" msgstr "Infos" -#: ckanext/odsh/templates/header.html:53 +#: ckanext/odsh/templates/header.html:48 msgid "Harvester" msgstr "Harvester" -#: ckanext/odsh/templates/header.html:77 +#: ckanext/odsh/templates/header.html:70 ckanext/odsh/templates/header.html:72 msgid "View profile" msgstr "Mein Profil einsehen" -#: ckanext/odsh/templates/header.html:85 +#: ckanext/odsh/templates/header.html:77 ckanext/odsh/templates/header.html:80 msgid "Edit profile" msgstr "Mein Profil bearbeiten" -#: ckanext/odsh/templates/header.html:92 +#: ckanext/odsh/templates/header.html:85 ckanext/odsh/templates/header.html:87 #: ckanext/odsh/templates/user/logout.html:4 msgid "Logout" msgstr "Logout" -#: ckanext/odsh/templates/header.html:101 +#: ckanext/odsh/templates/header.html:95 ckanext/odsh/templates/header.html:96 #: ckanext/odsh/templates/user/login.html:3 #: ckanext/odsh/templates/user/login.html:10 #: ckanext/odsh/templates/user/login.html:16 msgid "Login" msgstr "Login" -#: ckanext/odsh/templates/header.html:106 +#: ckanext/odsh/templates/header.html:101 msgid "Sign language" msgstr "Gebärdensprache" -#: ckanext/odsh/templates/header.html:109 +#: ckanext/odsh/templates/header.html:104 msgid "Simple language" msgstr "Einfache Sprache" @@ -310,173 +409,9 @@ msgstr "Ein Name ist bei dieser Lizenz nicht zulässig" msgid "Name: Diese URL ist bereits vergeben" msgstr "Diese URL ist bereits vergeben" -#: ckanext/odsh/templates/datarequests/base.html:12 -#: ckanext/odsh/templates/datarequests/close.html:6 -#: ckanext/odsh/templates/datarequests/edit.html:6 -#: ckanext/odsh/templates/datarequests/new.html:6 -msgid "Data Proposal" -msgstr "Datenvorschlag" - -#: ckanext/odsh/templates/datarequests/close.html:3 -#: ckanext/odsh/templates/datarequests/close.html:8 -#: ckanext/odsh/templates/datarequests/close.html:12 -msgid "Close Data Proposal" -msgstr "Datenvorschlag abschließen" - -#: ckanext/odsh/templates/datarequests/comment.html:18 -#: ckanext/odsh/templates/datarequests/show.html:15 -#: ckanext/odsh/templates/organization/read_base.html:18 -#: ckanext/odsh/templates/package/resource_read.html:31 -msgid "Manage" -msgstr "Verwalten" - -#: ckanext/odsh/templates/datarequests/comment.html:22 -#: ckanext/odsh/templates/datarequests/show.html:19 -#: ckanext/odsh/templates/organization/read.html:58 -#: ckanext/odsh/templates/package/snippets/close_mobile_sidebar_button.html:2 -msgid "Close" -msgstr "Schließen" - -#: ckanext/odsh/templates/datarequests/comment.html:37 -#: ckanext/odsh/templates/datarequests/snippets/comment_form.html:24 -#: ckanext/odsh/templates/datarequests/snippets/datarequest_item.html:38 -msgid "Add New Comment" -msgstr "Kommentieren" - -#: ckanext/odsh/templates/datarequests/comment.html:53 -msgid "Released" -msgstr "Veröffentlicht" - -#: ckanext/odsh/templates/datarequests/comment.html:54 -msgid "Suggester" -msgstr "Vorschlagende" - -#: ckanext/odsh/templates/datarequests/comment.html:54 -msgid "None" -msgstr "Keine" - -#: ckanext/odsh/templates/datarequests/comment.html:56 -msgid "Status" -msgstr "Status" - -#: ckanext/odsh/templates/datarequests/comment.html:60 -#: ckanext/odsh/templates/datarequests/snippets/datarequest_item.html:13 -msgid "Done" -msgstr "Fertig" - -#: ckanext/odsh/templates/datarequests/comment.html:64 -#: ckanext/odsh/templates/datarequests/show.html:40 -#: ckanext/odsh/templates/datarequests/snippets/datarequest_item.html:17 -msgid "Open" -msgstr "Offen" - -#: ckanext/odsh/templates/datarequests/edit.html:3 -#: ckanext/odsh/templates/datarequests/edit.html:8 -#: ckanext/odsh/templates/datarequests/edit.html:12 -msgid "Edit Data Proposal" -msgstr "Datenvorschlag bearbeiten" - -#: ckanext/odsh/templates/datarequests/index.html:8 -msgid "Search Data Requests..." -msgstr "Datenanfragen suchen..." - -#: ckanext/odsh/templates/datarequests/index.html:12 -msgid "Add Request" -msgstr "Datensatz vorschlagen" - -#: ckanext/odsh/templates/datarequests/new.html:3 -#: ckanext/odsh/templates/datarequests/snippets/datarequest_form.html:33 -msgid "Create Data Request" -msgstr "Neuen Datensatz vorschlagen" - -#: ckanext/odsh/templates/datarequests/new.html:7 -msgid "Create Data Proposal" -msgstr "Datensatz vorschlagen" - -#: ckanext/odsh/templates/datarequests/new.html:11 -msgid "Create New Data Request" -msgstr "Neuen Datensatz vorschlagen" - -#: ckanext/odsh/templates/datarequests/show.html:3 -#: ckanext/odsh/templates/datarequests/show.html:25 -msgid "Data Request" -msgstr "Datenanfrage" - -#: ckanext/odsh/templates/datarequests/show.html:8 -msgid "Data Requests" -msgstr "Datenanfragen" - -#: ckanext/odsh/templates/datarequests/show.html:35 -msgid "Closed" -msgstr "Geschlossen" - -#: ckanext/odsh/templates/datarequests/show.html:64 -#: ckanext/odsh/templates/datarequests/snippets/comments.html:11 -msgid "This data request has not been commented yet" -msgstr "Diese Datenanfrage wurde noch nicht kommentiert" - -#: ckanext/odsh/templates/datarequests/snippets/comment_form.html:16 -msgid "Add a new Comment" -msgstr "Kommentieren" - -#: ckanext/odsh/templates/datarequests/snippets/comment_form.html:21 -msgid "Cancel" -msgstr "Abbrechen" - -#: ckanext/odsh/templates/datarequests/snippets/comment_form.html:22 -msgid "Update Comment" -msgstr "Kommentar aktualisieren" - -#: ckanext/odsh/templates/datarequests/snippets/comments.html:3 -msgid "Comments" -msgstr "Dokumente" - -#: ckanext/odsh/templates/datarequests/snippets/datarequest_form.html:17 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:10 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:14 -msgid "Title" -msgstr "Titel" - -#: ckanext/odsh/templates/datarequests/snippets/datarequest_form.html:17 -msgid "eg. Data Request Name" -msgstr "z.B. Datenanfrage Name" - -#: ckanext/odsh/templates/datarequests/snippets/datarequest_form.html:21 -#: ckanext/odsh/templates/organization/snippets/organization_form.html:20 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:28 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:33 -msgid "Description" -msgstr "Beschreibung" - -#: ckanext/odsh/templates/datarequests/snippets/datarequest_form.html:21 -msgid "eg. Data Request description" -msgstr "z.B. Beschreibung der Datenanforderung" - -#: ckanext/odsh/templates/datarequests/snippets/datarequest_form.html:29 -msgid "Are you sure you want to delete this data request?" -msgstr "Sind Sie sicher, dass Sie diese Datenabfrage löschen möchten?" - -#: ckanext/odsh/templates/datarequests/snippets/datarequest_form.html:30 -#: ckanext/odsh/templates/organization/snippets/organization_form.html:86 -#: ckanext/odsh/templates/package/edit_view.html:19 -#: ckanext/odsh/templates/package/snippets/package_form.html:33 -#: ckanext/odsh/templates/package/snippets/resource_form.html:91 -#: ckanext/odsh/templates/user/edit_user_form.html:46 -msgid "Delete" -msgstr "Löschen" - -#: ckanext/odsh/templates/datarequests/snippets/datarequest_list.html:11 -msgid "No Data Requests found with the given criteria" -msgstr "Keine Datenanfragen mit den angegebenen Kriterien gefunden" - -#: ckanext/odsh/templates/datarequests/snippets/datarequest_list.html:13 -#: ckanext/odsh/templates/organization/index.html:48 -msgid "How about creating one?" -msgstr "Wie wäre es, wenn Sie einen erstellen?" - -#: ckanext/odsh/templates/datarequests/snippets/new_datarequest_form.html:7 -msgid "Suggest New Data Request" -msgstr "Datensatz vorschlagen" +#: ckanext/odsh/templates/page.html:5 +msgid "Skip to content." +msgstr "Zum Inhalt springen." #: ckanext/odsh/templates/home/index.html:4 msgid "Welcome" @@ -495,8 +430,8 @@ msgstr "Benutzerdefiniert" #: ckanext/odsh/templates/package/snippets/package_basic_fields.html:92 #: ckanext/odsh/templates/package/snippets/package_basic_fields.html:143 #: ckanext/odsh/templates/package/snippets/package_basic_fields.html:189 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:245 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:292 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:240 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:287 msgid "This field is required" msgstr "Dieses Feld ist erforderlich" @@ -520,107 +455,101 @@ msgstr "Upload zurücksetzen" msgid "Search organizations" msgstr "Nach Herausgeber suchen" +#: ckanext/odsh/templates/organization/index.html:18 +#: ckanext/odsh/templates/snippets/search_box.html:6 +msgid "Search" +msgstr "Nach Datensätzen suchen" + #: ckanext/odsh/templates/organization/index.html:30 msgid "Add Organization" msgstr "Herausgeber hinzufügen" -#: ckanext/odsh/templates/organization/index.html:36 +#: ckanext/odsh/templates/organization/index.html:35 msgid "Search organizations..." msgstr "Nach Herausgeber suchen" -#: ckanext/odsh/templates/organization/index.html:36 -#: ckanext/odsh/templates/organization/read.html:27 -#: ckanext/odsh/templates/snippets/search_form.html:6 -#: ckanext/odsh/templates/snippets/search_form.html:12 -msgid "Name Ascending" -msgstr "Name: A – Z" - -#: ckanext/odsh/templates/organization/index.html:36 -#: ckanext/odsh/templates/organization/read.html:28 -#: ckanext/odsh/templates/snippets/search_form.html:6 -#: ckanext/odsh/templates/snippets/search_form.html:13 -msgid "Name Descending" -msgstr "Name: Z – A" - -#: ckanext/odsh/templates/organization/index.html:46 +#: ckanext/odsh/templates/organization/index.html:45 msgid "There are currently no organizations for this site" msgstr "Derzeit gibt es keine Herausgeber für diese Seite" -#: ckanext/odsh/templates/organization/read.html:5 +#: ckanext/odsh/templates/organization/index.html:47 +msgid "How about creating one?" +msgstr "Wie wäre es, wenn Sie einen erstellen?" + +#: ckanext/odsh/templates/organization/read.html:6 #: ckanext/odsh/templates/package/snippets/stages.html:30 #: ckanext/odsh/templates/package/snippets/stages.html:34 #: ckanext/odsh/templates/package/snippets/stages.html:36 msgid "Add dataset" msgstr "Distribution hinzufügen" -#: ckanext/odsh/templates/organization/read.html:26 -#: ckanext/odsh/templates/snippets/search_form.html:11 -msgid "Relevance" -msgstr "Relevanz" - -#: ckanext/odsh/templates/organization/read.html:29 -#: ckanext/odsh/templates/snippets/search_form.html:14 +#: ckanext/odsh/templates/organization/read.html:30 +#: ckanext/odsh/templates/snippets/search_form.html:12 msgid "Issued Ascending" msgstr "Veröffentlichungsdatum: Älteste zuerst" -#: ckanext/odsh/templates/organization/read.html:30 -#: ckanext/odsh/templates/snippets/search_form.html:15 +#: ckanext/odsh/templates/organization/read.html:31 +#: ckanext/odsh/templates/snippets/search_form.html:13 msgid "Issued Descending" msgstr "Veröffentlichungsdatum: Neueste zuerst" -#: ckanext/odsh/templates/organization/read.html:31 -#: ckanext/odsh/templates/snippets/package_item.html:89 -#: ckanext/odsh/templates/snippets/search_form.html:20 -msgid "Popular" -msgstr "Beliebt" - -#: ckanext/odsh/templates/organization/read.html:33 +#: ckanext/odsh/templates/organization/read.html:34 #: ckanext/odsh/templates/snippets/search_form.html:3 msgid "Search datasets..." msgstr "Nach Datensätzen suchen" -#: ckanext/odsh/templates/organization/read.html:49 +#: ckanext/odsh/templates/organization/read.html:50 #: ckanext/odsh/templates/package/search.html:18 #: ckanext/odsh/templates/package/search.html:51 msgid "Filter" msgstr "Filter" -#: ckanext/odsh/templates/organization/read.html:50 +#: ckanext/odsh/templates/organization/read.html:51 #: ckanext/odsh/templates/package/search.html:53 msgid "Reset" msgstr "Zurücksetzen" +#: ckanext/odsh/templates/organization/read.html:58 +#: ckanext/odsh/templates/package/snippets/close_mobile_sidebar_button.html:2 +msgid "Close" +msgstr "Schließen" + +#: ckanext/odsh/templates/organization/read_base.html:18 +#: ckanext/odsh/templates/package/resource_read.html:31 +msgid "Manage" +msgstr "Verwalten" + #: ckanext/odsh/templates/organization/read_base.html:29 #: ckanext/odsh/templates/snippets/organization.html:90 msgid "There is no description for this organization" msgstr "Es gibt keine Beschreibung für diesen Herausgeber" -#: ckanext/odsh/templates/organization/snippets/organization_form.html:10 -#: ckanext/odsh/templates/package/snippets/resource_form.html:36 +#: ckanext/odsh/templates/organization/snippets/organization_form.html:11 +#: ckanext/odsh/templates/package/snippets/resource_form.html:37 msgid "Name" msgstr "Name" -#: ckanext/odsh/templates/organization/snippets/organization_form.html:10 -#: ckanext/odsh/templates/organization/snippets/organization_form.html:18 +#: ckanext/odsh/templates/organization/snippets/organization_form.html:11 +#: ckanext/odsh/templates/organization/snippets/organization_form.html:19 msgid "My Organization" msgstr "Herausgeber" -#: ckanext/odsh/templates/organization/snippets/organization_form.html:20 +#: ckanext/odsh/templates/organization/snippets/organization_form.html:21 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:28 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:33 +msgid "Description" +msgstr "Beschreibung" + +#: ckanext/odsh/templates/organization/snippets/organization_form.html:21 msgid "A little information about my organization..." msgstr "Ein paar Informationen über diesen Herausgeber..." -#: ckanext/odsh/templates/organization/snippets/organization_form.html:55 -#: ckanext/odsh/templates/organization/snippets/organization_form.html:73 -#, fuzzy -#| msgid "Custom" +#: ckanext/odsh/templates/organization/snippets/organization_form.html:57 +#: ckanext/odsh/templates/organization/snippets/organization_form.html:75 msgid "Custom Field" msgstr "Benutzerdefiniert" -#: ckanext/odsh/templates/organization/snippets/organization_form.html:86 -#, fuzzy -#| msgid "" -#| "Are you sure you want to delete this Organization? This will delete all " -#| "the public and private datasets belonging to this organization." +#: ckanext/odsh/templates/organization/snippets/organization_form.html:88 msgid "" "Are you sure you want to delete this Organization? Note*: Deleting cannot be " "performed while public or private datasets belong to this organization." @@ -629,22 +558,39 @@ msgstr "" "alle öffentlichen und privaten Datensätze, die zu diesem Herausgeber " "gehören, gelöscht." -#: ckanext/odsh/templates/organization/snippets/organization_form.html:89 +#: ckanext/odsh/templates/organization/snippets/organization_form.html:88 +#: ckanext/odsh/templates/package/edit_view.html:19 +#: ckanext/odsh/templates/package/snippets/package_form.html:33 +#: ckanext/odsh/templates/package/snippets/resource_form.html:92 +#: ckanext/odsh/templates/user/edit_user_form.html:84 +msgid "Delete" +msgstr "Löschen" + +#: ckanext/odsh/templates/organization/snippets/organization_form.html:91 msgid "Save Organization" msgstr "Herausgeber speichern" #: ckanext/odsh/templates/organization/snippets/organization_item.html:15 -#: ckanext/odsh/templates/snippets/package_item.html:75 +#: ckanext/odsh/templates/snippets/package_item.html:76 msgid "View {organization_name}" msgstr "{organization_name} anzeigen" #: ckanext/odsh/templates/package/base.html:23 #: ckanext/odsh/templates/package/edit_base.html:9 -#: ckanext/odsh/templates/package/new_package_form.html:8 -#: ckanext/odsh/templates/package/read.html:27 +#: ckanext/odsh/templates/package/new_package_form.html:6 +#: ckanext/odsh/templates/package/read.html:26 msgid "Create Dataset" msgstr "Datensatz-Upload" +#: ckanext/odsh/templates/package/collection_read.html:19 +#, python-format +msgid "" +"This is the overview page of the \"%(title)s\" series. It contains the " +"following datasets (newer datasets first):" +msgstr "" +"Dies ist die Übersichtsseite der Reihe \"%(title)s\". Sie enthält die " +"folgenden Datensätze (neuere Datensätze zuerst):" + #: ckanext/odsh/templates/package/edit_base.html:7 #: ckanext/odsh/templates/package/resource_edit.html:3 #: ckanext/odsh/templates/package/resource_edit_base.html:12 @@ -653,7 +599,7 @@ msgstr "Bearbeiten" #: ckanext/odsh/templates/package/edit_base.html:23 #: ckanext/odsh/templates/package/resource_edit_base.html:28 -#: ckanext/odsh/templates/package/snippets/resource_form.html:77 +#: ckanext/odsh/templates/package/snippets/resource_form.html:78 msgid "Back" msgstr "Zurück" @@ -673,11 +619,11 @@ msgstr "Vorschau" msgid "Update" msgstr "Aktualisieren" -#: ckanext/odsh/templates/package/new_package_form.html:18 +#: ckanext/odsh/templates/package/new_package_form.html:14 msgid "next" msgstr "weiter" -#: ckanext/odsh/templates/package/new_package_form.html:20 +#: ckanext/odsh/templates/package/new_package_form.html:16 msgid "Update Dataset" msgstr "Datensatz aktualisieren" @@ -716,37 +662,37 @@ msgstr "" "Explorer Dokumentation</a>." #: ckanext/odsh/templates/package/new_view.html:32 -#: ckanext/odsh/templates/package/snippets/resource_form.html:112 +#: ckanext/odsh/templates/package/snippets/resource_form.html:113 msgid "Add" msgstr "Hinzufügen" -#: ckanext/odsh/templates/package/read.html:39 -#: ckanext/odsh/templates/snippets/package_item.html:79 +#: ckanext/odsh/templates/package/read.html:38 +#: ckanext/odsh/templates/snippets/package_item.html:81 msgid "Draft" msgstr "Entwurf" -#: ckanext/odsh/templates/package/read.html:42 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:275 +#: ckanext/odsh/templates/package/read.html:41 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:270 #: ckanext/odsh/templates/snippets/organization.html:24 -#: ckanext/odsh/templates/snippets/package_item.html:81 +#: ckanext/odsh/templates/snippets/package_item.html:83 msgid "Deleted" msgstr "Gelöscht" -#: ckanext/odsh/templates/package/read.html:48 +#: ckanext/odsh/templates/package/read.html:47 msgid "Manage Dataset" msgstr "Datensatz bearbeiten" -#: ckanext/odsh/templates/package/read.html:55 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:251 +#: ckanext/odsh/templates/package/read.html:54 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:246 #: ckanext/odsh/templates/snippets/package_item.html:70 msgid "Private" msgstr "Privat" -#: ckanext/odsh/templates/package/read.html:73 +#: ckanext/odsh/templates/package/read.html:70 msgid "Detailed information" msgstr "Detailinformationen" -#: ckanext/odsh/templates/package/read.html:77 +#: ckanext/odsh/templates/package/read.html:74 #, python-format msgid "" "Note: A <a href=\"%(latest_collection_member)s\">newer version</a> of this " @@ -755,7 +701,7 @@ msgstr "" "Hinweis: Eine <a href=\"%(latest_collection_member)s\">neuere Version</a> " "dieses Datensatzes ist verfügbar." -#: ckanext/odsh/templates/package/read.html:84 +#: ckanext/odsh/templates/package/read.html:81 #, python-format msgid "" "Note: This dataset has been replaced with a <a href=\"%(is_replaced_by)s" @@ -764,21 +710,30 @@ msgstr "" "Hinweis: Dieser Datensatz wurde durch eine <a href=\"%(is_replaced_by)s" "\">neuere Version</a> ersetzt." -#: ckanext/odsh/templates/package/read.html:105 +#: ckanext/odsh/templates/package/read.html:103 msgid "Add new resource" msgstr "Neue Ressource hinzufügen" -#: ckanext/odsh/templates/package/read.html:122 +#: ckanext/odsh/templates/package/read.html:113 +#, python-format +msgid "" +"This record is part of the series <a href=\"%(url)s\">%(title)s</a>. You can " +"browse to older and newer records." +msgstr "" +"Dieser Datensatz ist Bestandteil der Reihe <a href=\"%(url)s\">%(title)s</" +"a>. Sie können zu älteren und neueren Datensätzen blättern." + +#: ckanext/odsh/templates/package/read.html:121 msgid "latest collection member" msgstr "Neuester Datensatz" -#: ckanext/odsh/templates/package/read.html:127 -#: ckanext/odsh/templates/package/read.html:132 +#: ckanext/odsh/templates/package/read.html:126 +#: ckanext/odsh/templates/package/read.html:131 msgid "predecessor" msgstr "Vorgänger" -#: ckanext/odsh/templates/package/read.html:137 -#: ckanext/odsh/templates/package/read.html:142 +#: ckanext/odsh/templates/package/read.html:136 +#: ckanext/odsh/templates/package/read.html:141 msgid "successor" msgstr "Nachfolger" @@ -887,7 +842,7 @@ msgid "Created" msgstr "Erstellt" #: ckanext/odsh/templates/package/resource_read.html:166 -#: ckanext/odsh/templates/package/snippets/resource_form.html:68 +#: ckanext/odsh/templates/package/snippets/resource_form.html:69 #: ckanext/odsh/templates/package/snippets/resource_info.html:26 msgid "Format" msgstr "Format" @@ -900,7 +855,7 @@ msgstr "Zeitraum" #: ckanext/odsh/templates/package/search.html:79 #: ckanext/odsh/templates/package/snippets/package_basic_fields.html:156 -#: ckanext/odsh/templates/snippets/search_form.html:117 +#: ckanext/odsh/templates/snippets/search_form.html:115 msgid "from" msgstr "von" @@ -914,13 +869,13 @@ msgid "Date" msgstr "Datum" #: ckanext/odsh/templates/package/search.html:90 -#: ckanext/odsh/templates/snippets/search_form.html:130 +#: ckanext/odsh/templates/snippets/search_form.html:128 msgid "wrong_start_date_for_search" msgstr "Das Startdatum ist ungültig" #: ckanext/odsh/templates/package/search.html:94 #: ckanext/odsh/templates/package/snippets/package_basic_fields.html:170 -#: ckanext/odsh/templates/snippets/search_form.html:144 +#: ckanext/odsh/templates/snippets/search_form.html:142 msgid "to" msgstr "bis" @@ -929,7 +884,7 @@ msgid "date end" msgstr "Enddatum" #: ckanext/odsh/templates/package/search.html:105 -#: ckanext/odsh/templates/snippets/search_form.html:157 +#: ckanext/odsh/templates/snippets/search_form.html:155 msgid "wrong_end_date_for_search" msgstr "Das Enddatum ist ungültig" @@ -949,19 +904,15 @@ msgstr "Ansicht anzeigen" msgid "View preview" msgstr "Vorschau ansehen" -#: ckanext/odsh/templates/package/snippets/close_mobile_sidebar_button.html:2 -msgid "Filterdialog schließen" -msgstr "Close filters" - #: ckanext/odsh/templates/package/snippets/info.html:28 -#: ckanext/odsh/templates/snippets/package_item.html:97 +#: ckanext/odsh/templates/snippets/package_item.html:99 msgid "Category:" msgid_plural "Categories:" msgstr[0] "Kategorie:" msgstr[1] "Kategorien:" #: ckanext/odsh/templates/package/snippets/info.html:63 -#: ckanext/odsh/templates/snippets/package_item.html:143 +#: ckanext/odsh/templates/snippets/package_item.html:146 msgid "Issued" msgstr "Veröffentlicht" @@ -970,12 +921,12 @@ msgid "Modified" msgstr "Zuletzt bearbeitet" #: ckanext/odsh/templates/package/snippets/info.html:89 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:334 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:329 msgid "Musterdatensatz" msgstr "Musterdatensatz" #: ckanext/odsh/templates/package/snippets/info.html:99 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:239 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:234 msgid "Spatial uri" msgstr "Raumbezug" @@ -1003,6 +954,11 @@ msgstr "im Süden" msgid "DCAT-AP.de metadata" msgstr "Metadaten nach DCAT-AP.de" +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:10 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:14 +msgid "Title" +msgstr "Titel" + #: ckanext/odsh/templates/package/snippets/package_basic_fields.html:20 msgid "Enter title" msgstr "Titel eingeben" @@ -1034,23 +990,19 @@ msgstr "Publikationsdatum" msgid "odsh tags placeholder" msgstr "z.B. Energie; Politik; Umwelt; Alle; ..." -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:233 -msgid "language" -msgstr "Sprache" - -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:244 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:239 msgid "Visibility" msgstr "Sichtbarkeit" -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:251 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:246 msgid "Public" msgstr "Öffentlich" -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:265 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:260 msgid "State" msgstr "Status" -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:272 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:267 msgid "Active" msgstr "Aktiv" @@ -1063,7 +1015,7 @@ msgid "Next: Add Data" msgstr "Weiter: Daten hinzufügen" #: ckanext/odsh/templates/package/snippets/package_form.html:46 -#: ckanext/odsh/templates/package/snippets/resource_form.html:118 +#: ckanext/odsh/templates/package/snippets/resource_form.html:119 msgid "Required information" msgstr "Pflichtangabe" @@ -1071,68 +1023,64 @@ msgstr "Pflichtangabe" msgid "Versioning" msgstr "Versionierung" -#: ckanext/odsh/templates/package/snippets/package_metadata_fields.html:9 +#: ckanext/odsh/templates/package/snippets/package_metadata_fields.html:10 +msgid "Version notes" +msgstr "Hinweise zur Version" + +#: ckanext/odsh/templates/package/snippets/package_metadata_fields.html:15 msgid "Is replaced by" msgstr "Wird ersetzt durch" -#: ckanext/odsh/templates/package/snippets/package_metadata_fields.html:9 +#: ckanext/odsh/templates/package/snippets/package_metadata_fields.html:15 msgid "https://" -msgstr "" +msgstr "https://" -#: ckanext/odsh/templates/package/snippets/package_metadata_fields.html:14 -msgid "Version notes" -msgstr "Hinweise zur Version" - -#: ckanext/odsh/templates/package/snippets/resource_form.html:11 +#: ckanext/odsh/templates/package/snippets/resource_form.html:12 msgid "odsh Create Dataset" msgstr "Datensatz-Upload" -#: ckanext/odsh/templates/package/snippets/resource_form.html:27 +#: ckanext/odsh/templates/package/snippets/resource_form.html:28 msgid "odsh_resource_upload_error_label" msgstr "Bitte laden Sie eine Distribution hoch" -#: ckanext/odsh/templates/package/snippets/resource_form.html:30 +#: ckanext/odsh/templates/package/snippets/resource_form.html:31 msgid "Data-Upload" msgstr "Datensatz-Upload" -#: ckanext/odsh/templates/package/snippets/resource_form.html:30 +#: ckanext/odsh/templates/package/snippets/resource_form.html:31 msgid "http://example.com/external-data.csv" msgstr "http://example.com/external-data.csv" -#: ckanext/odsh/templates/package/snippets/resource_form.html:35 +#: ckanext/odsh/templates/package/snippets/resource_form.html:36 msgid "odsh_resource_name_error_label" msgstr "Bitte geben sie einen Namen für den Datensatz ein" -#: ckanext/odsh/templates/package/snippets/resource_form.html:36 +#: ckanext/odsh/templates/package/snippets/resource_form.html:37 msgid "Enter name of the dataset" msgstr "Namen der Distribution eingeben" -#: ckanext/odsh/templates/package/snippets/resource_form.html:50 -msgid "Last Modified" -msgstr "Zuletzt bearbeitet" - -#: ckanext/odsh/templates/package/snippets/resource_form.html:50 +#: ckanext/odsh/templates/package/snippets/resource_form.html:51 msgid "eg. 2012-06-05" msgstr "z.B. 2012-06-05" -#: ckanext/odsh/templates/package/snippets/resource_form.html:53 +#: ckanext/odsh/templates/package/snippets/resource_form.html:54 msgid "File Size" msgstr "Dateigröße" -#: ckanext/odsh/templates/package/snippets/resource_form.html:53 +#: ckanext/odsh/templates/package/snippets/resource_form.html:54 msgid "eg. 1024" msgstr "z.B. 1024" -#: ckanext/odsh/templates/package/snippets/resource_form.html:56 -#: ckanext/odsh/templates/package/snippets/resource_form.html:59 +#: ckanext/odsh/templates/package/snippets/resource_form.html:57 +#: ckanext/odsh/templates/package/snippets/resource_form.html:60 msgid "MIME Type" msgstr "MIME-Typ" -#: ckanext/odsh/templates/package/snippets/resource_form.html:56 +#: ckanext/odsh/templates/package/snippets/resource_form.html:57 msgid "eg. application/json" msgstr "z.B. application/json" -#: ckanext/odsh/templates/package/snippets/resource_form.html:59 +#: ckanext/odsh/templates/package/snippets/resource_form.html:60 #, fuzzy #| msgid "" #| "eg.\n" @@ -1142,21 +1090,19 @@ msgid "" " application/json" msgstr "z.B. application/json" -#: ckanext/odsh/templates/package/snippets/resource_form.html:66 +#: ckanext/odsh/templates/package/snippets/resource_form.html:67 msgid "odsh_resource_format_error_label" msgstr "Bitte geben Sie ein Format an" -#: ckanext/odsh/templates/package/snippets/resource_form.html:80 -#, fuzzy -#| msgid "Another dataset" +#: ckanext/odsh/templates/package/snippets/resource_form.html:81 msgid "Another dataset" msgstr "weitere Distribution" -#: ckanext/odsh/templates/package/snippets/resource_form.html:88 +#: ckanext/odsh/templates/package/snippets/resource_form.html:89 msgid "Are you sure you want to delete this resource?" msgstr "Sind Sie sicher, dass Sie diese Ressource löschen wollen?" -#: ckanext/odsh/templates/package/snippets/resource_form.html:105 +#: ckanext/odsh/templates/package/snippets/resource_form.html:106 msgid "Upload dataset" msgstr "Hochladen" @@ -1181,7 +1127,6 @@ msgid "Number of pages" msgstr "Seitenanzahl" #: ckanext/odsh/templates/package/snippets/resource_item.html:29 -#: ckanext/odsh/templates/package/snippets/resource_item.html:51 msgid "download file" msgstr "Datei herunterladen" @@ -1228,35 +1173,12 @@ msgid "LD = Linked Data" msgstr "LD = Linked Data" #: ckanext/odsh/templates/qa/stars.html:37 -msgid "Sterne" -msgstr "Stars" +msgid "Stars" +msgstr "Sterne" #: ckanext/odsh/templates/qa/stars.html:37 -msgid "5-Sterne-Modell für Offene Daten" -msgstr "5-Star Model for Open Data" - -#: ckanext/odsh/templates/snippets/custom_search_form.html:6 -#, fuzzy -#| msgid "{number} dataset found for \"{query}\"" -#| msgid_plural "{number} datasets found for \"{query}\"" -msgid "{number} data request found for \"{query}\"" -msgid_plural "{number} data requests found for \"{query}\"" -msgstr[0] "{number} Ergebnis für \"{query}\"" -msgstr[1] "{number} Ergebnisse für \"{query}\"" - -#: ckanext/odsh/templates/snippets/custom_search_form.html:7 -msgid "No data requests found for \"{query}\"" -msgstr "Keine Ergebnisse für \"{query}\" gefunden" - -#: ckanext/odsh/templates/snippets/custom_search_form.html:8 -msgid "{number} data proposal found" -msgid_plural "{number} data proposals found" -msgstr[0] "{number} Ergebnis" -msgstr[1] "{number} Ergebnisse" - -#: ckanext/odsh/templates/snippets/custom_search_form.html:9 -msgid "No data proposal found" -msgstr "Kein Datenvorschlag gefunden" +msgid "5-Star Model for Open Data" +msgstr "5-Sterne-Modell für Offene Daten" #: ckanext/odsh/templates/snippets/facet_list.html:68 msgid "Show More" @@ -1311,11 +1233,6 @@ msgid "NEW" msgstr "NEU" #: ckanext/odsh/templates/snippets/search_box.html:5 -msgid "Enter search query for datasets" -msgstr "Suchanfrage für Datensätze eingeben" - -#: ckanext/odsh/templates/snippets/search_box.html:11 -#: ckanext/odsh/templates/snippets/search_box.html:13 msgid "Search dataset" msgstr "Nach Datensätzen suchen" @@ -1323,77 +1240,73 @@ msgstr "Nach Datensätzen suchen" msgid "Order by" msgstr "Sortieren nach" -#: ckanext/odsh/templates/snippets/search_form.html:8 -msgid "Date Ascending" -msgstr "Datum aufsteigend" - -#: ckanext/odsh/templates/snippets/search_form.html:8 -msgid "Date Descending" -msgstr "Datum absteigend" - -#: ckanext/odsh/templates/snippets/search_form.html:16 +#: ckanext/odsh/templates/snippets/search_form.html:14 msgid "Start Date Ascending" msgstr "Startdatum: Älteste zuerst" -#: ckanext/odsh/templates/snippets/search_form.html:17 +#: ckanext/odsh/templates/snippets/search_form.html:15 msgid "Start Date Descending" msgstr "Startdatum: Neueste zuerst" -#: ckanext/odsh/templates/snippets/search_form.html:18 +#: ckanext/odsh/templates/snippets/search_form.html:16 msgid "End Date Ascending" msgstr "Enddatum: Älteste zuerst" -#: ckanext/odsh/templates/snippets/search_form.html:19 +#: ckanext/odsh/templates/snippets/search_form.html:17 msgid "End Date Descending" msgstr "Enddatum: Neueste zuerst" -#: ckanext/odsh/templates/snippets/search_form.html:45 +#: ckanext/odsh/templates/snippets/search_form.html:43 msgid "rss feeds" msgstr "RSS-Feeds" -#: ckanext/odsh/templates/snippets/search_form.html:67 +#: ckanext/odsh/templates/snippets/search_form.html:49 +msgid "Error" +msgstr "Fehler" + +#: ckanext/odsh/templates/snippets/search_form.html:65 msgid "Go" msgstr "Weiter" -#: ckanext/odsh/templates/snippets/search_form.html:93 -#: ckanext/odsh/templates/snippets/search_form.html:94 -#: ckanext/odsh/templates/snippets/search_form.html:121 -#: ckanext/odsh/templates/snippets/search_form.html:122 -#: ckanext/odsh/templates/snippets/search_form.html:134 -#: ckanext/odsh/templates/snippets/search_form.html:135 -#: ckanext/odsh/templates/snippets/search_form.html:148 -#: ckanext/odsh/templates/snippets/search_form.html:149 -#: ckanext/odsh/templates/snippets/search_form.html:161 -#: ckanext/odsh/templates/snippets/search_form.html:162 -#: ckanext/odsh/templates/snippets/search_form.html:182 -#: ckanext/odsh/templates/snippets/search_form.html:183 +#: ckanext/odsh/templates/snippets/search_form.html:91 +#: ckanext/odsh/templates/snippets/search_form.html:92 +#: ckanext/odsh/templates/snippets/search_form.html:119 +#: ckanext/odsh/templates/snippets/search_form.html:120 +#: ckanext/odsh/templates/snippets/search_form.html:132 +#: ckanext/odsh/templates/snippets/search_form.html:133 +#: ckanext/odsh/templates/snippets/search_form.html:146 +#: ckanext/odsh/templates/snippets/search_form.html:147 +#: ckanext/odsh/templates/snippets/search_form.html:159 +#: ckanext/odsh/templates/snippets/search_form.html:160 +#: ckanext/odsh/templates/snippets/search_form.html:180 +#: ckanext/odsh/templates/snippets/search_form.html:181 msgid "Remove filters" msgstr "Filter deaktivieren" -#: ckanext/odsh/templates/snippets/search_form.html:102 +#: ckanext/odsh/templates/snippets/search_form.html:100 msgid "Filter Results" msgstr "Ergebnisse filtern" -#: ckanext/odsh/templates/snippets/search_form.html:117 -#: ckanext/odsh/templates/snippets/search_form.html:130 -#: ckanext/odsh/templates/snippets/search_form.html:144 -#: ckanext/odsh/templates/snippets/search_form.html:157 +#: ckanext/odsh/templates/snippets/search_form.html:115 +#: ckanext/odsh/templates/snippets/search_form.html:128 +#: ckanext/odsh/templates/snippets/search_form.html:142 +#: ckanext/odsh/templates/snippets/search_form.html:155 msgid "daterange" msgstr "Zeitbezug" -#: ckanext/odsh/templates/snippets/search_form.html:178 +#: ckanext/odsh/templates/snippets/search_form.html:176 msgid "map search active" msgstr "Kartensuche aktiv" -#: ckanext/odsh/templates/snippets/search_form.html:196 +#: ckanext/odsh/templates/snippets/search_form.html:194 msgid "Please try another search." msgstr "Bitte versuchen Sie eine andere Suchanfrage." -#: ckanext/odsh/templates/snippets/search_form.html:200 +#: ckanext/odsh/templates/snippets/search_form.html:198 msgid "There was an error while searching." msgstr "Bei der Suche ist ein Fehler aufgetreten." -#: ckanext/odsh/templates/snippets/search_form.html:200 +#: ckanext/odsh/templates/snippets/search_form.html:198 msgid "Please try again." msgstr "Bitte versuchen Sie es erneut." @@ -1418,9 +1331,6 @@ msgid "No datasets found" msgstr "Keine Datensätze gefunden" #: ckanext/odsh/templates/snippets/search_result_text.html:22 -#, fuzzy -#| msgid "{number} dataset found for \"{query}\"" -#| msgid_plural "{number} datasets found for \"{query}\"" msgid "{number} group found for \"{query}\"" msgid_plural "{number} groups found for \"{query}\"" msgstr[0] "{number} Ergebnis für \"{query}\"" @@ -1431,9 +1341,6 @@ msgid "No groups found for \"{query}\"" msgstr "Keine Gruppen gefunden für \"{query}\"" #: ckanext/odsh/templates/snippets/search_result_text.html:24 -#, fuzzy -#| msgid "{number} data proposal found" -#| msgid_plural "{number} data proposals found" msgid "{number} group found" msgid_plural "{number} groups found" msgstr[0] "{number} Ergebnis" @@ -1444,13 +1351,10 @@ msgid "No groups found" msgstr "Keine Gruppen gefunden." #: ckanext/odsh/templates/snippets/search_result_text.html:28 -#, fuzzy -#| msgid "{number} dataset found for \"{query}\"" -#| msgid_plural "{number} datasets found for \"{query}\"" msgid "{number} organization found for \"{query}\"" msgid_plural "" "{number} organizations found for\n" -"\"{query}\"" +" \"{query}\"" msgstr[0] "{number} Ergebnis für \"{query}\"" msgstr[1] "{number} Ergebnisse für \"{query}\"" @@ -1468,78 +1372,88 @@ msgstr[1] "{number} Herausgeber" msgid "No organizations found" msgstr "Keine Herausgeber gefunden" -#: ckanext/odsh/templates/user/edit_user_form.html:7 +#: ckanext/odsh/templates/user/edit_user_form.html:10 msgid "Change details" msgstr "Details ändern" -#: ckanext/odsh/templates/user/edit_user_form.html:8 +#: ckanext/odsh/templates/user/edit_user_form.html:11 #: ckanext/odsh/templates/user/snippets/login_form.html:22 msgid "Username" msgstr "Name" -#: ckanext/odsh/templates/user/edit_user_form.html:10 +#: ckanext/odsh/templates/user/edit_user_form.html:13 msgid "Full name" msgstr "Vollständiger Name" -#: ckanext/odsh/templates/user/edit_user_form.html:10 +#: ckanext/odsh/templates/user/edit_user_form.html:13 msgid "eg. Joe Bloggs" msgstr "z.B. Joe Bloggs" -#: ckanext/odsh/templates/user/edit_user_form.html:12 +#: ckanext/odsh/templates/user/edit_user_form.html:15 msgid "Email" msgstr "E-Mail" -#: ckanext/odsh/templates/user/edit_user_form.html:12 +#: ckanext/odsh/templates/user/edit_user_form.html:15 msgid "eg. joe@example.com" msgstr "z.B. joe@example.com" -#: ckanext/odsh/templates/user/edit_user_form.html:14 +#: ckanext/odsh/templates/user/edit_user_form.html:17 msgid "About" msgstr "Über" -#: ckanext/odsh/templates/user/edit_user_form.html:14 +#: ckanext/odsh/templates/user/edit_user_form.html:17 msgid "A little information about yourself" msgstr "Ein paar Informationen zu Ihren" -#: ckanext/odsh/templates/user/edit_user_form.html:17 -msgid "Subscribe to notification emails" -msgstr "Benachrichtigungs-E-Mails abonnieren" - -#: ckanext/odsh/templates/user/edit_user_form.html:26 -#: ckanext/odsh/templates/user/login.html:32 -msgid "Change password" -msgstr "Passwort ändern" - -#: ckanext/odsh/templates/user/edit_user_form.html:29 -msgid "Sysadmin Password" -msgstr "Sysadmin-Passwort" +#: ckanext/odsh/templates/user/edit_user_form.html:23 +msgid "Reactivate User" +msgstr "Benutzer reaktivieren" -#: ckanext/odsh/templates/user/edit_user_form.html:29 -msgid "Old Password" -msgstr "Altes Passwort" +#: ckanext/odsh/templates/user/edit_user_form.html:24 +msgid "" +"This account is deactivated, if you want to reactivate it, please click on " +"checkbox." +msgstr "" +"Dieses Konto ist deaktiviert. Wenn Sie es wieder aktivieren möchten, klicken " +"Sie bitte auf das Kontrollkästchen." -#: ckanext/odsh/templates/user/edit_user_form.html:38 +#: ckanext/odsh/templates/user/edit_user_form.html:34 +#: ckanext/odsh/templates/user/edit_user_form.html:69 #: ckanext/odsh/templates/user/snippets/login_form.html:27 msgid "Password" msgstr "Passwort" -#: ckanext/odsh/templates/user/edit_user_form.html:40 +#: ckanext/odsh/templates/user/edit_user_form.html:35 +#: ckanext/odsh/templates/user/edit_user_form.html:71 msgid "Confirm Password" msgstr "Passwort bestätigen" -#: ckanext/odsh/templates/user/edit_user_form.html:46 +#: ckanext/odsh/templates/user/edit_user_form.html:41 +msgid "Sysadmin password" +msgstr "Sysadmin-Passwort" + +#: ckanext/odsh/templates/user/edit_user_form.html:44 +msgid "Sysadmin Password" +msgstr "Sysadmin-Passwort" + +#: ckanext/odsh/templates/user/edit_user_form.html:57 +#: ckanext/odsh/templates/user/login.html:32 +msgid "Change password" +msgstr "Passwort ändern" + +#: ckanext/odsh/templates/user/edit_user_form.html:60 +msgid "Old Password" +msgstr "Altes Passwort" + +#: ckanext/odsh/templates/user/edit_user_form.html:84 msgid "Are you sure you want to delete this User?" msgstr "Sind Sie sicher, dass Sie diesen Benutzer löschen möchten?" -#: ckanext/odsh/templates/user/edit_user_form.html:51 -msgid "Are you sure you want to regenerate the API key?" -msgstr "Sind Sie sicher, dass Sie den API-Schlüssel neu generieren möchten?" - -#: ckanext/odsh/templates/user/edit_user_form.html:51 -msgid "Regenerate API Key" -msgstr "API-Schlüssel neu generieren" +#: ckanext/odsh/templates/user/edit_user_form.html:88 +msgid "Reactivate Profile" +msgstr "Profil reaktivieren" -#: ckanext/odsh/templates/user/edit_user_form.html:55 +#: ckanext/odsh/templates/user/edit_user_form.html:88 msgid "Update Profile" msgstr "Profil aktualisieren" @@ -1568,6 +1482,143 @@ msgstr "Passwort merken" msgid "do Login" msgstr "Einloggen" +#: ckanext/odsh/views/dashboard.py:16 +msgid "Not authorized to see this page" +msgstr "Nicht berechtigt, diese Seite zu sehen" + +#~ msgid "Enter search query for datasets" +#~ msgstr "Suchanfrage für Datensätze eingeben" + +#, fuzzy +#~| msgid "{number} dataset found for \"{query}\"" +#~| msgid_plural "{number} datasets found for \"{query}\"" +#~ msgid "{number} data request found for \"{query}\"" +#~ msgid_plural "{number} data requests found for \"{query}\"" +#~ msgstr[0] "{number} Ergebnis für \"{query}\"" +#~ msgstr[1] "{number} Ergebnisse für \"{query}\"" + +#~ msgid "No data requests found for \"{query}\"" +#~ msgstr "Keine Ergebnisse für \"{query}\" gefunden" + +#~ msgid "{number} data proposal found" +#~ msgid_plural "{number} data proposals found" +#~ msgstr[0] "{number} Ergebnis" +#~ msgstr[1] "{number} Ergebnisse" + +#~ msgid "No data proposal found" +#~ msgstr "Kein Datenvorschlag gefunden" + +#~ msgid "Tag \"%s\" length is less than minimum %s" +#~ msgstr "Die Länge des Tags \"%s\" ist kleiner als das Minimum %s" + +#~ msgid "Tag \"%s\" length is more than maximum %i" +#~ msgstr "Die Länge des Tags \"%s\" ist größer als das Maximum %i" + +#~ msgid "Data Proposal" +#~ msgstr "Datenvorschlag" + +#~ msgid "Close Data Proposal" +#~ msgstr "Datenvorschlag abschließen" + +#~ msgid "Add New Comment" +#~ msgstr "Kommentieren" + +#~ msgid "Released" +#~ msgstr "Veröffentlicht" + +#~ msgid "Suggester" +#~ msgstr "Vorschlagende" + +#~ msgid "None" +#~ msgstr "Keine" + +#~ msgid "Status" +#~ msgstr "Status" + +#~ msgid "Done" +#~ msgstr "Fertig" + +#~ msgid "Open" +#~ msgstr "Offen" + +#~ msgid "Edit Data Proposal" +#~ msgstr "Datenvorschlag bearbeiten" + +#~ msgid "Search Data Requests..." +#~ msgstr "Datenanfragen suchen..." + +#~ msgid "Add Request" +#~ msgstr "Datensatz vorschlagen" + +#~ msgid "Create Data Request" +#~ msgstr "Neuen Datensatz vorschlagen" + +#~ msgid "Create Data Proposal" +#~ msgstr "Datensatz vorschlagen" + +#~ msgid "Create New Data Request" +#~ msgstr "Neuen Datensatz vorschlagen" + +#~ msgid "Data Request" +#~ msgstr "Datenanfrage" + +#~ msgid "Data Requests" +#~ msgstr "Datenanfragen" + +#~ msgid "Closed" +#~ msgstr "Geschlossen" + +#~ msgid "This data request has not been commented yet" +#~ msgstr "Diese Datenanfrage wurde noch nicht kommentiert" + +#~ msgid "Add a new Comment" +#~ msgstr "Kommentieren" + +#~ msgid "Cancel" +#~ msgstr "Abbrechen" + +#~ msgid "Update Comment" +#~ msgstr "Kommentar aktualisieren" + +#~ msgid "Comments" +#~ msgstr "Dokumente" + +#~ msgid "eg. Data Request Name" +#~ msgstr "z.B. Datenanfrage Name" + +#~ msgid "eg. Data Request description" +#~ msgstr "z.B. Beschreibung der Datenanforderung" + +#~ msgid "Are you sure you want to delete this data request?" +#~ msgstr "Sind Sie sicher, dass Sie diese Datenabfrage löschen möchten?" + +#~ msgid "No Data Requests found with the given criteria" +#~ msgstr "Keine Datenanfragen mit den angegebenen Kriterien gefunden" + +#~ msgid "Suggest New Data Request" +#~ msgstr "Datensatz vorschlagen" + +#~ msgid "Filterdialog schließen" +#~ msgstr "Close filters" + +#~ msgid "language" +#~ msgstr "Sprache" + +#~ msgid "Date Ascending" +#~ msgstr "Datum aufsteigend" + +#~ msgid "Date Descending" +#~ msgstr "Datum absteigend" + +#~ msgid "Subscribe to notification emails" +#~ msgstr "Benachrichtigungs-E-Mails abonnieren" + +#~ msgid "Are you sure you want to regenerate the API key?" +#~ msgstr "Sind Sie sicher, dass Sie den API-Schlüssel neu generieren möchten?" + +#~ msgid "Regenerate API Key" +#~ msgstr "API-Schlüssel neu generieren" + #~ msgid "Tag \"%s\" must be alphanumeric characters or symbols: -_.:()" #~ msgstr "" #~ "Tags \"%s\" müssen aus alphnummerischen Zeichen oder diesen Symbolen " diff --git a/ckanext/odsh/model/statistiknord.py b/ckanext/odsh/model/statistiknord.py index 55cff9a835d2e98d486d4063b1bef86335921b10..0e3ba6830b4201100196eea7dd9e0ce014d1aa93 100755 --- a/ckanext/odsh/model/statistiknord.py +++ b/ckanext/odsh/model/statistiknord.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from ckanext.spatial.model.harvested_metadata import MappedXmlDocument, MappedXmlElement +from ckanext.spatial.harvested_metadata import MappedXmlDocument, MappedXmlElement class StatistikNordDocumentElement(MappedXmlElement): diff --git a/ckanext/odsh/pdf_to_thumbnail/plugin.py b/ckanext/odsh/pdf_to_thumbnail/plugin.py index 3181c39692850818fc4a00c06206c4bc3ebd6b09..f0c5f4c005e239853720d4d3b737ed49a346a17e 100644 --- a/ckanext/odsh/pdf_to_thumbnail/plugin.py +++ b/ckanext/odsh/pdf_to_thumbnail/plugin.py @@ -20,15 +20,15 @@ class ThumbnailPlugin(plugins.SingletonPlugin): #IResourceController - def after_create(self, context, resource): + def after_resource_create(self, context, resource): resources = thumbnail.resources_of_containing_package(resource) thumbnail.create_thumbnail_if_none_in_package(context, resources) - def after_update(self, context, resource): + def after_resource_update(self, context, resource): resources = thumbnail.resources_of_containing_package(resource) thumbnail.create_thumbnail_if_none_in_package(context, resources) - def after_delete(self, context, resources): + def after_resource_delete(self, context, resources): thumbnail.create_thumbnail_if_none_in_package(context, resources) #IConfigurer diff --git a/ckanext/odsh/plugin.py b/ckanext/odsh/plugin.py index e5ac0b02f97c10f0f72a24837a2cf200b05edb48..ee6126c9cdc4f7f31087f91f62c97652a725c421 100644 --- a/ckanext/odsh/plugin.py +++ b/ckanext/odsh/plugin.py @@ -74,19 +74,15 @@ class OdshPlugin(plugins.SingletonPlugin, DefaultTranslation, DefaultDatasetForm bp_user.add_url_rule(u'/user', endpoint='user_index', view_func=user.index, strict_slashes=False) # bp_user.add_url_rule(u'/user/register', view_func=user.register) - bp_user.add_url_rule(u'/user/activity/<id>', view_func=user.activity) - bp_user.add_url_rule(u'/user/activity/<id>/<int:offset>', view_func=user.activity) # Dashboard bp_dashboard = dashboard.blueprint bp_dashboard.add_url_rule( - u'/dashboard', view_func=dashboard.dashboard, strict_slashes=False, defaults={ - u'offset': 0 - }) + u'/dashboard/datasets', view_func=dashboard.datasets) bp_dashboard.add_url_rule( - u'/dashboard/datasets', view_func=dashboard.dashboard_datasets) + u'/dashboard/organizations', view_func=dashboard.organizations) bp_dashboard.add_url_rule( - u'/dashboard/<int:offset>', view_func=dashboard.dashboard) + u'/dashboard/groups', view_func=dashboard.groups) # Harvest bp_harvest = harvest.blueprint @@ -114,10 +110,11 @@ class OdshPlugin(plugins.SingletonPlugin, DefaultTranslation, DefaultDatasetForm def update_config(self, config_): toolkit.add_template_directory(config_, 'templates') toolkit.add_public_directory(config_, 'public') - toolkit.add_resource('fanstatic', 'ckanext-odsh') + toolkit.add_resource('assets', 'ckanext-odsh') def after_map(self, map): return map + def package_types(self): # This plugin doesn't handle any special package types, it just # registers itself as the default (above). @@ -254,7 +251,7 @@ class OdshPlugin(plugins.SingletonPlugin, DefaultTranslation, DefaultDatasetForm # IPackageController - def after_show(self, context, pkg_dict): + def after_dataset_show(self, context, pkg_dict): ''' corrects missing relationships in pkg dict adds the following key-value-pairs to pkg_dict: @@ -268,7 +265,7 @@ class OdshPlugin(plugins.SingletonPlugin, DefaultTranslation, DefaultDatasetForm return pkg_dict - def before_view(self, pkg_dict): + def before_dataset_view(self, pkg_dict): ''' adds the following key-value-pairs to pkg_dict: # key: 'is_new', value: True if the dataset has been created within the last month @@ -276,11 +273,11 @@ class OdshPlugin(plugins.SingletonPlugin, DefaultTranslation, DefaultDatasetForm self._update_is_new_in_pkg_dict(pkg_dict) return pkg_dict - def after_create(self, context, resource): + def after_dataset_create(self, context, resource): if resource.get('package_id'): tools.add_attributes_resources(context, resource) - def after_update(self, context, resource): + def after_dataset_update(self, context, resource): if resource.get('package_id'): tools.add_attributes_resources(context, resource) @@ -289,7 +286,7 @@ class OdshPlugin(plugins.SingletonPlugin, DefaultTranslation, DefaultDatasetForm is_new = HelperPgkDict(pkg_dict).is_package_new() pkg_dict.update({'is_new': is_new}) - def before_index(self, dict_pkg): + def before_dataset_index(self, dict_pkg): # make special date fields solr conform fields = ["issued", "temporal_start", "temporal_end"] for field in fields: @@ -301,7 +298,16 @@ class OdshPlugin(plugins.SingletonPlugin, DefaultTranslation, DefaultDatasetForm self.map_qa_score(dict_pkg) + if 'qa' in dict_pkg: + dict_pkg.pop('qa') + return dict_pkg + + # Add the custom parameters to Solr's facet queries + # use several daterange queries agains temporal_start and temporal_end field + # TODO: use field of type date_range in solr index instead + def before_dataset_search(self, search_params): + return search.before_dataset_search(search_params) # ITemplateHelpers @@ -311,38 +317,39 @@ class OdshPlugin(plugins.SingletonPlugin, DefaultTranslation, DefaultDatasetForm # other extensions. return { 'odsh_main_groups': helpers_odsh.odsh_main_groups, - 'odsh_now': helpers_odsh.odsh_now, - 'odsh_group_id_selected': helpers_odsh.odsh_group_id_selected, - 'odsh_get_facet_items_dict': helpers_odsh.odsh_get_facet_items_dict, - 'odsh_openness_score_dataset_html': helpers_odsh.odsh_openness_score_dataset_html, - 'odsh_get_resource_details': helpers_odsh.odsh_get_resource_details, - 'odsh_get_resource_views': helpers_odsh.odsh_get_resource_views, - 'odsh_get_bounding_box': helpers_odsh.odsh_get_bounding_box, - 'odsh_get_spatial_text': helpers_odsh.odsh_get_spatial_text, - 'odsh_render_datetime': helpers_odsh.odsh_render_datetime, - 'odsh_resource_formats': helpers_odsh.odsh_resource_formats, - 'odsh_encodeurl': helpers_odsh.odsh_encodeurl, - 'odsh_extract_error': helpers_odsh.odsh_extract_error, - 'odsh_extract_error_new': helpers_odsh.odsh_extract_error_new, - 'odsh_extract_value_from_extras': helpers_odsh.odsh_extract_value_from_extras, - 'odsh_create_checksum': helpers_odsh.odsh_create_checksum, - 'presorted_license_options': helpers_odsh.presorted_license_options, - 'odsh_has_more_facets': helpers_odsh.odsh_has_more_facets, - 'odsh_public_url': helpers_odsh.odsh_public_url, - 'odsh_spatial_extends_available': helpers_odsh.spatial_extends_available, - 'odsh_public_resource_url': helpers_odsh.odsh_public_resource_url, - 'odsh_show_testbanner': helpers_odsh.odsh_show_testbanner, - 'get_daterange_prettified': helper_pkg_dict.get_daterange_prettified, - 'get_language_of_package': helpers_odsh.get_language_of_package, - 'get_language_icon': helpers_odsh.get_language_icon, - 'short_name_for_category': helpers_odsh.short_name_for_category, - 'get_spatial_for_selection': helpers_odsh.get_spatial_for_selection, - 'get_language_for_selection': helpers_odsh.get_language_for_selection, - 'get_resource_size': helpers_odsh.get_resource_size, - 'get_address_org':helpers_odsh.get_address_org, - 'get_body_mail':helpers_odsh.get_body_mail, - 'odsh_load_mdk_sample_dataset': helpers_odsh.odsh_load_mdk_sample_dataset, - 'odsh_load_raw_mdk_sample_dataset': helpers_odsh.odsh_load_raw_mdk_sample_dataset, + 'odsh_now': helpers_odsh.odsh_now, + 'odsh_group_id_selected': helpers_odsh.odsh_group_id_selected, + 'odsh_get_facet_items_dict': helpers_odsh.odsh_get_facet_items_dict, + 'odsh_openness_score_dataset_html': helpers_odsh.odsh_openness_score_dataset_html, + 'odsh_get_resource_details': helpers_odsh.odsh_get_resource_details, + 'odsh_get_resource_views': helpers_odsh.odsh_get_resource_views, + 'odsh_get_bounding_box': helpers_odsh.odsh_get_bounding_box, + 'odsh_get_spatial_text': helpers_odsh.odsh_get_spatial_text, + 'odsh_render_datetime': helpers_odsh.odsh_render_datetime, + 'odsh_resource_formats': helpers_odsh.odsh_resource_formats, + 'odsh_encodeurl': helpers_odsh.odsh_encodeurl, + 'odsh_extract_error': helpers_odsh.odsh_extract_error, + 'odsh_extract_error_new': helpers_odsh.odsh_extract_error_new, + 'odsh_extract_value_from_extras': helpers_odsh.odsh_extract_value_from_extras, + 'odsh_create_checksum': helpers_odsh.odsh_create_checksum, + 'presorted_license_options': helpers_odsh.presorted_license_options, + 'odsh_has_more_facets': helpers_odsh.odsh_has_more_facets, + 'odsh_public_url': helpers_odsh.odsh_public_url, + 'odsh_spatial_extends_available': helpers_odsh.spatial_extends_available, + 'odsh_public_resource_url': helpers_odsh.odsh_public_resource_url, + 'odsh_show_testbanner': helpers_odsh.odsh_show_testbanner, + 'get_daterange_prettified': helper_pkg_dict.get_daterange_prettified, + 'get_language_of_package': helpers_odsh.get_language_of_package, + 'get_language_icon': helpers_odsh.get_language_icon, + 'short_name_for_category': helpers_odsh.short_name_for_category, + 'get_spatial_for_selection': helpers_odsh.get_spatial_for_selection, + 'get_language_for_selection': helpers_odsh.get_language_for_selection, + 'get_resource_size': helpers_odsh.get_resource_size, + 'get_address_org':helpers_odsh.get_address_org, + 'get_body_mail':helpers_odsh.get_body_mail, + 'odsh_load_mdk_sample_dataset': helpers_odsh.odsh_load_mdk_sample_dataset, + 'odsh_load_raw_mdk_sample_dataset': helpers_odsh.odsh_load_raw_mdk_sample_dataset, + 'format_resource_format': helpers_odsh.format_resource_format, } @@ -351,12 +358,6 @@ class OdshPlugin(plugins.SingletonPlugin, DefaultTranslation, DefaultDatasetForm def get_validators(self): return validation.get_validators() - # Add the custom parameters to Solr's facet queries - # use several daterange queries agains temporal_start and temporal_end field - # TODO: use field of type date_range in solr index instead - def before_search(self, search_params): - return search.before_search(search_params) - scores = [['0OL'], ['0OL', '1RE'], ['0OL', '1RE', '2OF'], [ '0OL', '1RE', '2OF', '3URI'], ['0OL', '1RE', '2OF', '3URI', '4LD']] diff --git a/ckanext/odsh/resources/licenses.json b/ckanext/odsh/resources/licenses.json index 9f54f4dfaeba1564965b3a52e37c9ac31f12c25c..d30b92ffcd3b5d01243c1d3f252ca915c44ae7ef 100644 --- a/ckanext/odsh/resources/licenses.json +++ b/ckanext/odsh/resources/licenses.json @@ -1,129 +1,128 @@ [ { "id": "http://dcat-ap.de/def/licenses/ccpdm/1.0", - "is_okd_compliant": true, - "is_osi_compliant": false, + "od_conformance": "approved", + "osd_conformance": "not reviewed", "status": "active", "title": "gemeinfrei", "url": "http://creativecommons.org/publicdomain/mark/1.0/" }, { "id": "http://dcat-ap.de/def/licenses/dl-zero-de/2.0", - "is_okd_compliant": true, - "is_osi_compliant": true, + "od_conformance": "approved", + "osd_conformance": "approved", "status": "active", "title": "Datenlizenz Deutschland – Zero – Version 2.0", "url": "https://www.govdata.de/dl-de/zero-2-0" }, { "id": "http://dcat-ap.de/def/licenses/dl-by-de/2.0", - "is_okd_compliant": true, - "is_osi_compliant": false, + "od_conformance": "approved", + "osd_conformance": "not reviewed", "status": "active", "title": "Datenlizenz Deutschland Namensnennung 2.0", "url": "https://www.govdata.de/dl-de/by-2-0" }, { "id": "http://dcat-ap.de/def/licenses/officialWork", - "is_okd_compliant": true, - "is_osi_compliant": false, + "od_conformance": "approved", + "osd_conformance": "not reviewed", "status": "active", "title": "Amtliches Werk, lizenzfrei nach §5 Abs. 1 UrhG", "url": "http://www.gesetze-im-internet.de/urhg/__5.html" }, { "id": "http://dcat-ap.de/def/licenses/cc-zero", - "title": "Creative Commons CC Zero License (cc-zero)", - "url": "http://www.opendefinition.org/licenses/cc-zero", + "od_conformance": "approved", + "osd_conformance": "not reviewed", "status": "active", - "is_okd_compliant": true, - "od_conformance": "not reviewed", - "osd_conformance": "not reviewed" + "title": "Creative Commons CC Zero License (cc-zero)", + "url": "http://www.opendefinition.org/licenses/cc-zero" }, { "id": "http://dcat-ap.de/def/licenses/cc-by/4.0", - "is_okd_compliant": true, - "is_osi_compliant": false, + "od_conformance": "approved", + "osd_conformance": "not reviewed", "status": "active", "title": "Creative Commons Namensnennung – 4.0 International (CC BY 4.0)", "url": "http://creativecommons.org/licenses/by/4.0/" }, { "id": "http://dcat-ap.de/def/licenses/cc-by-nd/4.0", - "is_okd_compliant": false, - "is_osi_compliant": false, + "od_conformance": "not reviewed", + "osd_conformance": "not reviewed", "status": "active", "title": "Creative Commons Namensnennung - - Keine Bearbeitung 4.0 International (CC BY-ND 4.0)", "url": "https://creativecommons.org/licenses/by-nd/4.0/" }, { "id": "http://dcat-ap.de/def/licenses/cc-by-sa/4.0", - "is_okd_compliant": true, - "is_osi_compliant": false, + "od_conformance": "approved", + "osd_conformance": "not reviewed", "status": "active", "title": "Creative Commons Namensnennung - Weitergabe unter gleichen Bedingungen 4.0 International (CC-BY-SA 4.0)", "url": "http://creativecommons.org/licenses/by-sa/4.0/" }, { "id": "http://dcat-ap.de/def/licenses/cc-by-nc/4.0", - "is_okd_compliant": false, - "is_osi_compliant": false, + "od_conformance": "not reviewed", + "osd_conformance": "not reviewed", "status": "active", "title": "Creative Commons Namensnennung - Nicht kommerziell 4.0 International (CC BY-NC 4.0)", "url": "http://creativecommons.org/licenses/by-nc/4.0/" }, { "id": "http://dcat-ap.de/def/licenses/odbl", - "is_okd_compliant": true, - "is_osi_compliant": false, + "od_conformance": "approved", + "osd_conformance": "not reviewed", "status": "active", "title": "Open Data Commons Open Database License (ODbL)", "url": "http://www.opendefinition.org/licenses/odc-odbl" }, { "id": "http://dcat-ap.de/def/licenses/odby", - "is_okd_compliant": true, - "is_osi_compliant": false, + "od_conformance": "approved", + "osd_conformance": "not reviewed", "status": "active", "title": "Open Data Commons Attribution License (ODC-BY 1.0)", "url": "http://www.opendefinition.org/licenses/odc-by" }, { "id": "http://dcat-ap.de/def/licenses/odcpddl", - "is_okd_compliant": true, - "is_osi_compliant": false, + "od_conformance": "approved", + "osd_conformance": "not reviewed", "status": "active", "title": "Open Data Commons Public Domain Dedication and Licence (ODC PDDL)", "url": "http://www.opendefinition.org/licenses/odc-pddl" }, { "id": "http://dcat-ap.de/def/licenses/apache", - "is_okd_compliant": false, - "is_osi_compliant": true, + "od_conformance": "not reviewed", + "osd_conformance": "approved", "status": "active", "title": "Freie Softwarelizenz der Apache Software Foundation", "url": "http://www.apache.org/licenses" }, { "id": "http://dcat-ap.de/def/licenses/bsd", - "is_okd_compliant": false, - "is_osi_compliant": true, + "od_conformance": "not reviewed", + "osd_conformance": "approved", "status": "active", "title": "BSD Lizenz", "url": "http://www.opensource.org/licenses/bsd-license.php" }, { "id": "http://dcat-ap.de/def/licenses/gpl/3.0", - "is_okd_compliant": false, - "is_osi_compliant": true, + "od_conformance": "not reviewed", + "osd_conformance": "approved", "status": "active", "title": "GNU General Public License version 3.0 (GPLv3)", "url": "http://www.opensource.org/licenses/gpl-3.0.html" }, { "id": "http://dcat-ap.de/def/licenses/mozilla", - "is_okd_compliant": false, - "is_osi_compliant": true, + "od_conformance": "not reviewed", + "osd_conformance": "approved", "status": "active", "tags": [], "title": "Mozilla Public License 2.0 (MPL)", @@ -131,24 +130,24 @@ }, { "id": "http://dcat-ap.de/def/licenses/gfdl", - "is_okd_compliant": true, - "is_osi_compliant": false, + "od_conformance": "approved", + "osd_conformance": "not reviewed", "status": "active", "title": "GNU Free Documentation License (GFDL)", "url": "http://www.opendefinition.org/licenses/gfdl" }, { "id": "http://dcat-ap.de/def/licenses/cc-by-de/3.0", - "is_okd_compliant": true, - "is_osi_compliant": false, + "od_conformance": "approved", + "osd_conformance": "not reviewed", "status": "active", "title": "Creative Commons Namensnennung 3.0 Deutschland (CC BY 3.0 DE)", "url": "https://creativecommons.org/licenses/by/3.0/de/" }, { "id": "http://dcat-ap.de/def/licenses/cc-by-nd/3.0", - "is_okd_compliant": false, - "is_osi_compliant": false, + "od_conformance": "not reviewed", + "osd_conformance": "not reviewed", "status": "active", "title": "Creative Commons Namensnennung -- Keine Bearbeitung 3.0 Unported (CC BY-ND 3.0)", "url": "http://creativecommons.org/licenses/by-nd/3.0/" @@ -163,72 +162,72 @@ }, { "id": "http://dcat-ap.de/def/licenses/cc-by-nc-de/3.0", - "is_okd_compliant": false, - "is_osi_compliant": false, + "od_conformance": "not reviewed", + "osd_conformance": "not reviewed", "status": "active", "title": "Creative Commons Namensnennung-Nicht kommerziell 3.0 Deutschland (CC BY-NC 3.0 DE)", "url": "https://creativecommons.org/licenses/by-nc/3.0/de/" }, { "id": "http://dcat-ap.de/def/licenses/geonutz/20130319", - "is_okd_compliant": true, - "is_osi_compliant": false, + "od_conformance": "approved", + "osd_conformance": "not reviewed", "status": "active", "title": "Nutzungsbestimmungen für die Bereitstellung von Geodaten des Bundes", "url": "http://www.geodatenzentrum.de/docpdf/geonutzv.pdf" }, { "id": "http://dcat-ap.de/def/licenses/other-closed", - "is_okd_compliant": false, - "is_osi_compliant": false, + "od_conformance": "not reviewed", + "osd_conformance": "not reviewed", "status": "active", "title": "Andere geschlossene Lizenz", "url": "" }, { "id": "http://dcat-ap.de/def/licenses/other-commercial", - "is_okd_compliant": false, - "is_osi_compliant": false, + "od_conformance": "not reviewed", + "osd_conformance": "not reviewed", "status": "active", "title": "Andere kommerzielle Lizenz", "url": "" }, { "id": "http://dcat-ap.de/def/licenses/other-freeware", - "is_okd_compliant": false, - "is_osi_compliant": false, + "od_conformance": "not reviewed", + "osd_conformance": "not reviewed", "status": "active", "title": "Andere Freeware Lizenz", "url": "" }, { "id": "http://dcat-ap.de/def/licenses/other-open", - "is_okd_compliant": true, - "is_osi_compliant": false, + "od_conformance": "approved", + "osd_conformance": "not reviewed", "status": "active", "title": "Andere offene Lizenz", "url": "" }, { "id": "http://dcat-ap.de/def/licenses/other-opensource", - "is_okd_compliant": false, - "is_osi_compliant": false, + "od_conformance": "not reviewed", + "osd_conformance": "not reviewed", "status": "active", "title": "Andere Open Source Lizenz", "url": "" }, { "id": "http://dcat-ap.de/def/licenses/dl-by-de/1.0", - "is_okd_compliant": true, - "is_osi_compliant": false, + "od_conformance": "approved", + "osd_conformance": "not reviewed", "status": "active", "title": "Datenlizenz Deutschland Namensnennung 1.0", "url": "https://www.govdata.de/dl-de/by-1-0" }, { "id": "http://dcat-ap.de/def/licenses/dl-by-nc-de/1.0", - "is_okd_compliant": false, - "is_osi_compliant": false, + "od_conformance": "not reviewed", + "osd_conformance": "not reviewed", "status": "active", "title": "Datenlizenz Deutschland Namensnennung nicht-kommerziell 1.0", "url": "https://www.govdata.de/dl-de/by-nc-1-0" diff --git a/ckanext/odsh/resources/resource_format_openness_scores.json b/ckanext/odsh/resources/resource_format_openness_scores.json index e357381d15ea46032d0d0083dd732b82f7b65a86..0bf54aabb28de1d4a5279d610f120e0fd3b16f35 100644 --- a/ckanext/odsh/resources/resource_format_openness_scores.json +++ b/ckanext/odsh/resources/resource_format_openness_scores.json @@ -12,9 +12,11 @@ ["TTL", 5], ["KML", 3], ["WCS", 3], + ["WCS_SRVC", 3], ["NetCDF", 3], ["TSV", 3], ["WFS", 3], + ["WFS_SRVC", 3], ["KMZ", 3], ["QGIS", 3], ["ODS", 3], @@ -24,7 +26,9 @@ ["ODG", 3], ["XML", 3], ["WMS", 3], + ["WMS_SRVC", 3], ["WMTS", 3], + ["WMTS_SRVC", 3], ["SVG", 3], ["JPEG", 3], ["CSV", 3], diff --git a/ckanext/odsh/resources/subject_mapping.json b/ckanext/odsh/resources/subject_mapping.json deleted file mode 100644 index 97ebe1718d106fb679478595aff84c4acab1c26d..0000000000000000000000000000000000000000 --- a/ckanext/odsh/resources/subject_mapping.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "http://transparenz.schleswig-holstein.de/informationsgegenstand#Verwaltungsvorschrift": "Verwaltungsvorschrift", - "http://transparenz.schleswig-holstein.de/informationsgegenstand#Organisationsplan": "Organisationsplan", - "http://transparenz.schleswig-holstein.de/informationsgegenstand#Geschaeftsverteilungsplan": "Geschäftsverteilungsplan", - "http://transparenz.schleswig-holstein.de/informationsgegenstand#Aktenplan": "Aktenplan", - "http://transparenz.schleswig-holstein.de/informationsgegenstand#Richtlinie": "Richtlinie und Runderlass", - "http://transparenz.schleswig-holstein.de/informationsgegenstand#Statistik": "amtliche Statistik", - "http://transparenz.schleswig-holstein.de/informationsgegenstand#Taetigkeitsbericht": "Tätigkeitsbericht", - "http://transparenz.schleswig-holstein.de/informationsgegenstand#Broschuere": "Broschüre", - "http://transparenz.schleswig-holstein.de/informationsgegenstand#Gutachten": "Gutachten", - "http://transparenz.schleswig-holstein.de/informationsgegenstand#Studie": "Studie", - "http://transparenz.schleswig-holstein.de/informationsgegenstand#Haushaltsplan": "Haushaltsplan", - "http://transparenz.schleswig-holstein.de/informationsgegenstand#Stellenplan": "Stellenplan", - "http://transparenz.schleswig-holstein.de/informationsgegenstand#Wirtschaftsplan": "Wirtschaftsplan", - "http://transparenz.schleswig-holstein.de/informationsgegenstand#ZuwendungAnPerson": "Übersicht über Zuwendungen an juristische Personen des Privatrechts", - "http://transparenz.schleswig-holstein.de/informationsgegenstand#ZuwendungAnLand": "Übersicht über Zuwendungen an das Land Schleswig-Holstein", - "http://transparenz.schleswig-holstein.de/informationsgegenstand#IZGAntwort": "IZG/GvgV-Auskunft", - "http://transparenz.schleswig-holstein.de/informationsgegenstand#Gerichtsurteil": "Gerichtsurteil", - "http://transparenz.schleswig-holstein.de/informationsgegenstand#GesetzvorlageLandtag": "Gesetzesvorlage an den Landtag", - "http://transparenz.schleswig-holstein.de/informationsgegenstand#MitteilungLandtag": "Mitteilung an den Landtag", - "http://transparenz.schleswig-holstein.de/informationsgegenstand#Unternehmensdaten": "wesentliche Unternehmensdaten von Beteiligungen des Landes", - "http://transparenz.schleswig-holstein.de/informationsgegenstand#VergütungsOG": "jährliche Vergütungen nach dem VergütungsOG", - "http://transparenz.schleswig-holstein.de/informationsgegenstand#Vertrag": "Vertrag", - "http://transparenz.schleswig-holstein.de/informationsgegenstand#sonstiges": "zusätzliche freiwillige Information" -} diff --git a/ckanext/odsh/search.py b/ckanext/odsh/search.py index 8d2a794ddbc20c71e01bf50aaba354629544794c..86894570dce3e93f6630dca7f55308fdfec0fa3b 100644 --- a/ckanext/odsh/search.py +++ b/ckanext/odsh/search.py @@ -1,6 +1,6 @@ import ckanext.odsh.helpers as odsh_helpers -def before_search(search_params): +def before_dataset_search(search_params): _update_facet_mincount(search_params) _update_daterange_query(search_params) return search_params diff --git a/ckanext/odsh/templates/datarequests/base.html b/ckanext/odsh/templates/datarequests/base.html deleted file mode 100644 index 5722356efbd3f3694eac9923b5566e5206a4495c..0000000000000000000000000000000000000000 --- a/ckanext/odsh/templates/datarequests/base.html +++ /dev/null @@ -1,55 +0,0 @@ -{% extends "page.html" %} - -{% block styles %} - {{ super() }} - <link rel="stylesheet" href="/datarequests.css" /> -{% endblock %} - -{% block subtitle %} -{% endblock %} - -{% block breadcrumb_content %} - <li class="active">{% link_for _('Data Proposal'), named_route='ckanext.datarequests.controllers.ui_controller:DataRequestsUI.index' %}</li> -{% endblock %} - - {% block main_content %} - - {% block flash %} - {{ super() }} - {% endblock %} - - {% block toolbar %} - {{ super() }} - {% endblock %} - - <div class="datarequest row wrapper{% block wrapper_class %}{% endblock %}{% if self.secondary()|trim == '' %} no-nav{% endif %} is-table-row"> - {# - The pre_primary block can be used to add content to before the - rendering of the main content columns of the page. - #} - {% block pre_primary %} - {% endblock %} - - - {% block primary %} - <div class="primary span9"> - {% block primary_content %} - {{ super() }} - {% endblock %} - </div> - {% endblock %} - - {% block secondary %} - <aside class="secondary span3"> - {% block secondary_content %} - {{ super() }} - {% endblock %} - </aside> - {% endblock %} - - </div> - {% block pre_wrap %} - {% endblock %} - {% endblock %} - </div> -</div> diff --git a/ckanext/odsh/templates/datarequests/close.html b/ckanext/odsh/templates/datarequests/close.html deleted file mode 100644 index 0b3e115cbf58638e539abd37db0ecf5c9f55b6d1..0000000000000000000000000000000000000000 --- a/ckanext/odsh/templates/datarequests/close.html +++ /dev/null @@ -1,16 +0,0 @@ -{% extends "datarequests/base.html" %} - -{% block subtitle %}{{ _('Close Data Proposal') }}{% endblock %} - -{% block breadcrumb_content %} - <li>{% link_for _('Data Proposal'), named_route='ckanext.datarequests.controllers.ui_controller:DataRequestsUI.index' %}</li> - <li>{% link_for c.datarequest.get('title')|truncate(30), named_route='ckanext.datarequests.controllers.ui_controller:DataRequestsUI.show', id=c.datarequest.get('id') %}</li> - <li class="active"><a href="">{{ _('Close Data Proposal') }}</a></li> -{% endblock %} - -{% block primary_content_inner %} - <h1 class="{% block page_heading_class %}page-heading{% endblock %}">{% block page_heading %}{{ _('Close Data Proposal') }}{% endblock %}</h1> - {% snippet "datarequests/snippets/close_datarequest_form.html", datarequest=c.datarequest, datasets=c.datasets, errors=c.errors, errors_summary=c.errors_summary %} -{% endblock %} - -{% block page_header %}{% endblock %} \ No newline at end of file diff --git a/ckanext/odsh/templates/datarequests/comment.html b/ckanext/odsh/templates/datarequests/comment.html deleted file mode 100644 index 01d29f12799717317f242578188f9e3e1c7995ca..0000000000000000000000000000000000000000 --- a/ckanext/odsh/templates/datarequests/comment.html +++ /dev/null @@ -1,85 +0,0 @@ -{% extends "datarequests/show.html" %} - -{% block breadcrumb_content %} - {{ super() }} -{% endblock %} - -{% block content_action %} -{% endblock %} - -{% block content_primary_nav %} -{% endblock %} - -{% block subtitle %} -{% endblock %} - -{% block primary_content_inner %} - {% if h.check_access('update_datarequest', {'id':datarequest_id }) %} - {% link_for _('Manage'), named_route='ckanext.datarequests.controllers.ui_controller:DataRequestsUI.update', id=datarequest_id, class_='btn btn-default', icon='wrench' %} - {% endif %} - - {% if h.check_access('close_datarequest', {'id':datarequest_id }) and not c.datarequest.closed %} - {% link_for _('Close'), named_route='ckanext.datarequests.controllers.ui_controller:DataRequestsUI.close', id=datarequest_id, class_='btn btn-danger', icon='lock' %} - {% endif %} - -<h2 class="page-heading"> - {% block page_heading %} - {{c.datarequest.title}} - {% endblock %} -</h2> - -<div class='datarequest-primary'> -{{ h.render_markdown(h.get_translated(c.datarequest, 'description')) }} - - {% snippet "datarequests/snippets/comments.html", comments=c.comments, datarequest=c.datarequest, errors=c.errors, errors_summary=c.errors_summary, updated_comment=c.updated_comment %} - - {% if h.check_access('comment_datarequest', {'id':c.datarequest.id }) %} - <h2 class='comments-heading'>{{_('Add New Comment')}}:</h2> - <div > - - {% set create_comment_error = c.updated_comment is defined and c.updated_comment.id == '' %} - - {% if create_comment_error %} - <a name="comment_focus"></a> - {% endif %} - - {% snippet "datarequests/snippets/comment_form.html", datarequest=c.datarequest, errors=c.errors, errors_summary=c.errors_summary, offering=c.offering, initial_text=c.updated_comment.comment if create_comment_error, focus=create_comment_error, current_user=c.userobj %} - </div> - {% endif %} -</div> - -<section class="additional-info"> - {% block package_additional_info %} - <div>{{ _('Released') }}: {{ h.odsh_render_datetime(c.datarequest.open_time) }}</div> - <div>{{ _('Suggester') }}: {{ c.datarequest.user['display_name'] if c.datarequest.user else _('None') }}</div> - {#<td class="dataset-details" title="{{ c.datarequest.close_time }}">{{ h.time_ago_from_timestamp(c.datarequest.close_time) if c.datarequest.close_time else _('Not closed yet') }}</td>#} - <div >{{ _('Status') }}: - <div class="dataset-details"> - {% if c.datarequest.get('closed', False) %} - <div class="label label-closed"> - {% trans %}Done{% endtrans %} - </div> - {% else %} - <div class="label label-open"> - {% trans %}Open{% endtrans %} - </div> - {% endif %} - </div> - {#{% if c.datarequest.closed %} - <tr> - <th scope="row" class="dataset-label">{{ _('Accepted Dataset') }}</th> - <td class="dataset-details"> - {% if c.datarequest.accepted_dataset %} - {% link_for c.datarequest.accepted_dataset['title'], named_route='dataset.read', id=c.datarequest.accepted_dataset.get('id') %} - {% else %} - {{ _('None') }} - {% endif %} - </td> - </tr> - {% endif %} - #} - <div class='comment-count-wrapper'><i class="icon-comment fa fa-comment"></i> {{ h.get_comments_number(c.datarequest.get('id', '')) }}</span> </div> - {% endblock %} -</section> - -{% endblock %} \ No newline at end of file diff --git a/ckanext/odsh/templates/datarequests/edit.html b/ckanext/odsh/templates/datarequests/edit.html deleted file mode 100644 index ae3013703449b03a41d4687384428d435650967d..0000000000000000000000000000000000000000 --- a/ckanext/odsh/templates/datarequests/edit.html +++ /dev/null @@ -1,16 +0,0 @@ -{% extends "datarequests/base.html" %} - -{% block subtitle %}{{ _('Edit Data Proposal') }}{% endblock %} - -{% block breadcrumb_content %} - <li>{% link_for _('Data Proposal'), named_route='ckanext.datarequests.controllers.ui_controller:DataRequestsUI.index' %}</li> - <li>{% link_for c.original_title|truncate(30), named_route='ckanext.datarequests.controllers.ui_controller:DataRequestsUI.show', id=c.datarequest.get('id') %}</li> - <li class="active"><a href="">{{ _('Edit Data Proposal') }}</a></li> -{% endblock %} - -{% block primary_content_inner %} - <h1 class="{% block page_heading_class %}page-heading{% endblock %}">{% block page_heading %}{{ _('Edit Data Proposal') }}{% endblock %}</h1> - {% snippet "datarequests/snippets/edit_datarequest_form.html", data=c.datarequest, errors=c.errors, errors_summary=c.errors_summary, offering=c.offering %} -{% endblock %} - -{% block page_header %}{% endblock %} \ No newline at end of file diff --git a/ckanext/odsh/templates/datarequests/index.html b/ckanext/odsh/templates/datarequests/index.html deleted file mode 100644 index d44ea2180a4c6d2e3803d0a26c76d6ce65a6b2ed..0000000000000000000000000000000000000000 --- a/ckanext/odsh/templates/datarequests/index.html +++ /dev/null @@ -1,32 +0,0 @@ -{% extends "datarequests/base.html" %} - -{% block primary_content %} - <section class="module"> - <div class="module-content"> - {% block page_primary_action %} - <form id='datarequest-search-form' method="get" data-module="select-switch"> - {% snippet 'snippets/custom_search_form.html', form_id='datarequest-search-form', query=c.q, fields=(('organization', c.organization), ('state', c.state)), sorting=c.filters, sorting_selected=c.sort, placeholder=_('Search Data Requests...'), no_bottom_border=false, count=c.datarequest_count, no_title=True, type='datarequest' %} - {{ h.snippet('datarequests/snippets/datarequest_list.html', datarequest_count=c.datarequest_count, datarequests=c.datarequests, page=c.page, q=c.q)}} - {% if h.check_access('create_datarequest') %} - <div class="add_request_container"> - {% link_for _('Add Request'), named_route='ckanext.datarequests.controllers.ui_controller:DataRequestsUI.new', class_='btn btn-primary', icon=h.get_plus_icon() %} - </div> - {% endif %} - {% endblock %} - </div> - </section> -{% endblock %} - -{% block secondary%} -{% endblock %} - -{#{% block secondary_content %} - {{ super() }} - {% for facet in c.facet_titles %} - {{ h.snippet('snippets/facet_list.html', title=c.facet_titles[facet], name=facet) }} - {% endfor %} -{% endblock %}#} - -{% block pre_wrap %} -</form> -{% endblock %} \ No newline at end of file diff --git a/ckanext/odsh/templates/datarequests/new.html b/ckanext/odsh/templates/datarequests/new.html deleted file mode 100644 index 1cf63c2e0c15eaecc5cb421a741dde40f846957b..0000000000000000000000000000000000000000 --- a/ckanext/odsh/templates/datarequests/new.html +++ /dev/null @@ -1,18 +0,0 @@ -{% extends "datarequests/base.html" %} - -{% block subtitle %}{{ _('Create Data Request') }}{% endblock %} - -{% block breadcrumb_content %} - <li>{% link_for _('Data Proposal'), named_route='ckanext.datarequests.controllers.ui_controller:DataRequestsUI.index' %}</li> - <li class="active"><a href="">{{ _('Create Data Proposal') }}</a></li> -{% endblock %} - -{% block primary_content_inner %} - <h1 class="{% block page_heading_class %}page-heading{% endblock %}">{% block page_heading %}{{ _('Create New Data Request') }}{% endblock %}</h1> - {% snippet "datarequests/snippets/new_datarequest_form.html", data=c.datarequest, errors=c.errors, errors_summary=c.errors_summary, offering=c.offering %} -{% endblock %} - -{% block secondary %} -{% endblock %} - -{% block page_header %}{% endblock %} \ No newline at end of file diff --git a/ckanext/odsh/templates/datarequests/show.html b/ckanext/odsh/templates/datarequests/show.html deleted file mode 100644 index 60a25beb81f795865221b80e4ba3aa65634d559b..0000000000000000000000000000000000000000 --- a/ckanext/odsh/templates/datarequests/show.html +++ /dev/null @@ -1,68 +0,0 @@ -{% extends "datarequests/base.html" %} - -{% block title %}{{_('Data Request')}} {{c.datarequest.get('title', '')}}{% endblock %} - -{% set datarequest_id = c.datarequest.get('id') %} - -{% block breadcrumb_content %} - <li>{% link_for _('Data Requests'), named_route='ckanext.datarequests.controllers.ui_controller:DataRequestsUI.index' %}</li> - <li>{% link_for c.datarequest.get('title'), named_route='ckanext.datarequests.controllers.ui_controller:DataRequestsUI.show', id=datarequest_id %}</li> -{% endblock %} - -{% block content_action %} - - {% if h.check_access('update_datarequest', {'id':datarequest_id }) %} - {% link_for _('Manage'), named_route='ckanext.datarequests.controllers.ui_controller:DataRequestsUI.update', id=datarequest_id, class_='btn btn-default', icon='wrench' %} - {% endif %} - - {% if h.check_access('close_datarequest', {'id':datarequest_id }) and not c.datarequest.closed %} - {% link_for _('Close'), named_route='ckanext.datarequests.controllers.ui_controller:DataRequestsUI.close', id=datarequest_id, class_='btn btn-danger', icon='lock' %} - {% endif %} - -{% endblock %} - -{% block content_primary_nav %} - {{ h.build_nav_icon('show_datarequest', _('Data Request'), id=datarequest_id) }} -{% endblock %} - -{% block secondary %} -{% endblock %} - -{% block primary_content_inner %} - {% if c.datarequest.closed %} - <span class="uppercase label label-closed pull-right"> - <i class="icon-lock fa fa-lock"></i> - {{ _('Closed') }} - </span> - {% else %} - <span class="uppercase label label-open pull-right"> - <i class="icon-unlock fa fa-unlock"></i> - {{ _('Open') }} - </span> - {% endif %} - - <h1 class="{% block page_heading_class %}page-heading{% endblock %}">{% block page_heading %}{{ c.datarequest.get('title') }}{% endblock %}</h1> - - {% block datarequest_description %} - {% if c.datarequest.get('description') %} - <div class="notes embedded-content"> - {{ h.render_markdown(c.datarequest.get('description')) }} - </div> - {% endif %} - {% endblock %} - - {% block datarequest_additional_info %} - {% snippet "datarequests/snippets/additional_info.html", datarequest=c.datarequest %} - {% endblock %} - -{% if c.comments %} -{% for comment in c.comments %} -{% snippet "datarequests/snippets/comment_item.html", comment=c.comment, datarequest=c.datarequest, errors=c.errors, errors_summary=c.errors_summary, updated_comment=c.updated_comment %} -{% endfor %} -{% else %} -<p class="empty"> -{{ _('This data request has not been commented yet') }} -</p> -{% endif %} - -{% endblock %} diff --git a/ckanext/odsh/templates/datarequests/snippets/comment_form.html b/ckanext/odsh/templates/datarequests/snippets/comment_form.html deleted file mode 100644 index b768f40b43e9091911211c1a516b177ed9a299ee..0000000000000000000000000000000000000000 --- a/ckanext/odsh/templates/datarequests/snippets/comment_form.html +++ /dev/null @@ -1,28 +0,0 @@ -{% import 'macros/form.html' as form %} - -<form class="dataset-form {{ 'comment-edit-form' if comment_id else 'odsh-comment-wrapper' }} {{ 'hide' if comment_id and not (focus and errors) }} form-horizontal" id="comment-form{{ '-' + comment_id if comment_id }}" method="post" data-module="basic-form" action enctype="multipart/form-data"> - - - {% if focus %} - {% block errors %}{{ form.errors(errors_summary) }}{% endblock %} - {% endif %} - - - <input type="hidden" name="datarequest-id" value="{{ datarequest.get('id', '') }}" /> - <input type="hidden" name="comment-id" value="{{ comment_id if comment_id }}" /> - - <div class="controls control-full control-large control-group {{ 'error' if errors and errors.get('Comment') and focus }} editor"> - {% set markdown_tooltip = "<pre><p>__Bold text__ or _italic text_</p><p># title<br>## secondary title<br>### etc</p><p>* list<br>* of<br>* items</p><p>http://auto.link.ed/</p></pre><p><b><a href='http://daringfireball.net/projects/markdown/syntax' target='_blank'>Full markdown syntax</a></b></p><p class='muted'><b>Please note:</b> HTML tags are stripped out for security reasons</p>" %} - <textarea name="comment" cols="20" rows="9" placeholder="{{ _('Add a new Comment') if not comment_id }}">{{ initial_text }}</textarea> - </div> - - <div class="comment-form-actions"> - {% if comment_id %} - <button id="comment-discard-{{ comment_id }}" class="btn btn-danger" name="discard">{{ _('Cancel') }}</button> - <button class="btn btn-primary" type="submit" name="update">{{ _('Update Comment') }}</button> - {% else %} - <button class="btn btn-primary btn-arrow-right" type="submit" name="add">{{ _('Add New Comment') }}</button> - {% endif %} - </div> - -</form> diff --git a/ckanext/odsh/templates/datarequests/snippets/comment_item.html b/ckanext/odsh/templates/datarequests/snippets/comment_item.html deleted file mode 100644 index 625676a83b2940b6d1874ef2642c2cf3bdc90dd3..0000000000000000000000000000000000000000 --- a/ckanext/odsh/templates/datarequests/snippets/comment_item.html +++ /dev/null @@ -1,47 +0,0 @@ -{% set focus = updated_comment is not none and updated_comment.id == comment.id %} -{% set can_update = h.check_access('update_datarequest_comment', {'id':comment.id }) %} - -{% if focus %} - <a name="comment_focus"></a> -{% endif %} - -<div class="odsh-comment-wrapper"> - {# <a href="{{ h.url_for('user.read', id=comment.user.get('name')) }}" - class="comment-avatar"> - {{ h.gravatar(comment.user.get('email_hash'), 48) }} - </a> - #} - <div class=""> - <div class="odsh-comment-header"> - <div class="comment-actions"> - {# - {% if h.check_access('delete_datarequest_comment', {'id':comment.id }) %} - <div class="comment-action"> - {% set locale = h.dump_json({'content': _('Are you sure you want to delete this comment?')}) %} - <a class="subtle-btn" id="delete-comment-{{ comment.id }}" href="{% url_for 'ckanext.datarequests.controllers.ui_controller:DataRequestsUI.delete_comment', datarequest_id=datarequest.id, comment_id=comment.id %}" data-module="confirm-action" data-module-i18n="{{ locale }}"><i class="icon-remove fa fa-times"></i></a> - </div> - {% endif %} - {% if can_update %} - <div class="comment-action" id="edit-button"> - <button class="subtle-btn" id="update-comment-{{ comment.id }}" href=""><i class="icon-pencil fa fa-pencil"></i></button> - </div> - {% endif %} - #} - <div class="comment-header-text"> - <i class="icon-comment fa fa-comment"></i> - <a href="{{ h.url_for('user.read', id=comment.user.get('name')) }}" class="comment-author">{{ comment.user.get('display_name') }}</a> - <span class='comment-date' title="{{comment.time}}">{{ h.odsh_render_datetime(comment.time).lower() }}</span> - </div> - </div> - </div> - - <div class="odsh-comment-content {{ 'hide' if focus and errors }}" id="comment-{{ comment.id }}"> - {{ h.render_markdown(comment.comment|safe) }} - </div> - - {% if can_update %} - {% snippet "datarequests/snippets/comment_form.html", comment_id=comment.id, datarequest=datarequest, errors=errors, errors_summary=errors_summary, initial_text=updated_comment.comment if focus else comment.comment, focus=focus %} - {% endif %} - - </div> -</div> \ No newline at end of file diff --git a/ckanext/odsh/templates/datarequests/snippets/comments.html b/ckanext/odsh/templates/datarequests/snippets/comments.html deleted file mode 100644 index 56f89e815b14940618571adcb93340ba1fe756ac..0000000000000000000000000000000000000000 --- a/ckanext/odsh/templates/datarequests/snippets/comments.html +++ /dev/null @@ -1,14 +0,0 @@ - - -<h2 class='comments-heading'>{{_('Comments')}}:</h2> - -{% if comments %} - {% for comment in comments %} - {% snippet "datarequests/snippets/comment_item.html", comment=comment, datarequest=datarequest, errors=errors, errors_summary=errors_summary, updated_comment=updated_comment %} - {% endfor %} -{% else %} - <p class="empty"> - {{ _('This data request has not been commented yet') }} - </p> -{% endif %} - diff --git a/ckanext/odsh/templates/datarequests/snippets/datarequest_form.html b/ckanext/odsh/templates/datarequests/snippets/datarequest_form.html deleted file mode 100644 index a92d25aeb592e15a7493dd3363a2af33b1f4be07..0000000000000000000000000000000000000000 --- a/ckanext/odsh/templates/datarequests/snippets/datarequest_form.html +++ /dev/null @@ -1,37 +0,0 @@ -{% import 'macros/form.html' as form %} - -{% set title = data.get('title', '') %} -{% set description = data.get('description', '') %} -{% set organization_id = data.get('organization_id', h.get_request_param('organization')) %} -{% set organizations_available = h.organizations_available('read') %} - -{# This provides a full page that renders a form for publishing a dataset. It can -then itself be extended to add/remove blocks of functionality. #} -<form class="dataset-form" method="post" data-module="basic-form" action enctype="multipart/form-data"> - - <input type="hidden" id="id" name="id" value="{{ data.get('id', '') }}" /> - - {% block errors %}{{ form.errors(errors_summary) }}{% endblock %} - - {% block offering_title %} - {{ form.input('title', id='field-title', label=_('Title'), placeholder=_('eg. Data Request Name'), value=title, error=errors['Title'], classes=['control-full'], is_required=true) }} - {% endblock %} - - {% block offering_description %} - {{ form.markdown('description', id='field-description', label=_('Description'), placeholder=_('eg. Data Request description'), value=description, error=errors['Description'], is_required=true) }} - {% endblock %} - - - {% block form_actions %} - <div class="form-actions"> - {% block delete_button %} - {% if h.check_access('delete_datarequest', {'id': data.get('id', '')}) and not data.state == 'deleted' %} - {% set locale = h.dump_json({'content': _('Are you sure you want to delete this data request?')}) %} - <a class="btn btn-danger pull-left" href="{% url_for 'ckanext.datarequests.controllers.ui_controller:DataRequestsUI.delete', id=data.get('id') %}" data-module="confirm-action" data-module-i18n="{{ locale }}">{% block delete_button_text %}{{ _('Delete') }}{% endblock %}</a> - {% endif %} - {% endblock %} - <button class="btn btn-primary btn-arrow-right" type="submit" name="save">{% block save_button_text %}{{ _('Create Data Request') }}{% endblock %}</button> - </div> - {% endblock %} - -</form> \ No newline at end of file diff --git a/ckanext/odsh/templates/datarequests/snippets/datarequest_item.html b/ckanext/odsh/templates/datarequests/snippets/datarequest_item.html deleted file mode 100644 index 7c57d2ebe61eb7233b8bb94cb1121f12bc031c1e..0000000000000000000000000000000000000000 --- a/ckanext/odsh/templates/datarequests/snippets/datarequest_item.html +++ /dev/null @@ -1,42 +0,0 @@ -{% set truncate = truncate or 180 %} -{% set truncate_title = truncate_title or 80 %} -{% set title = datarequest.get('title', '') %} -{% set description = h.markdown_extract(datarequest.get('description', ''), extract_length=truncate) %} - -<div class="container-fluid odsh-dataset-item"> - {% block package_item_content %} - <div class="dataset-content"> - <div class="dataset-heading "> - <div class="span1"> - {% if datarequest.get('closed', False) %} - <div class="label label-closed"> - {% trans %}Done{% endtrans %} - </div> - {% else %} - <div class="label label-open"> - {% trans %}Open{% endtrans %} - </div> - {% endif %} - </div> - <div class='span9'> - <div class='datarequest-subtitle'> - <span class="datarequest-item-open-time">{{h.odsh_render_datetime(datarequest.open_time)}}</span> - <span class="datarequest-item-autor-name">{{datarequest.user['display_name']}}</span> - </div> - {{ h.link_to(h.truncate(title, truncate_title), h.url_for(controller='ckanext.datarequests.controllers.ui_controller:DataRequestsUI', action='show', id=datarequest.get('id', ''))) }} - </div> - </div> - {% if description %} - <div>{{ description }}</div> - {% endif %} - {% if h.show_comments_tab() %} - <i class="icon-comment fa fa-comment"></i> {{ h.get_comments_number(datarequest.get('id', '')) }}</span> - {% endif %} - </div> - <div class="dataset-meta"> - {% if h.show_comments_tab() %} - {% link_for _('Add New Comment'), controller='ckanext.datarequests.controllers.ui_controller:DataRequestsUI', action='comment', id=datarequest.get('id',''), class_='btn btn-primary btn-arrow-right' %} - {% endif %} - </div> - {% endblock %} -</div> \ No newline at end of file diff --git a/ckanext/odsh/templates/datarequests/snippets/datarequest_list.html b/ckanext/odsh/templates/datarequests/snippets/datarequest_list.html deleted file mode 100644 index c2ef8dac56cfa3121bc8f3eb1bd836bc3133fb3f..0000000000000000000000000000000000000000 --- a/ckanext/odsh/templates/datarequests/snippets/datarequest_list.html +++ /dev/null @@ -1,20 +0,0 @@ - -{% block datarequest_search_results_list %} - {% if datarequests %} - <div class="dataset-list unstyled"> - {% for datarequest in datarequests %} - {{ h.snippet('datarequests/snippets/datarequest_item.html', datarequest=datarequest, facet_titles=facet_titles) }} - {% endfor %} - </div> - {% else %} - <p class="empty"> - {{ _('No Data Requests found with the given criteria') }}. - {% if h.check_access('create_datarequest') %} - {% link_for _('How about creating one?'), named_route='ckanext.datarequests.controllers.ui_controller:DataRequestsUI.new' %}</a> - {% endif %} - </p> - {% endif %} -{% endblock %} -{% block page_pagination %} - {{ page.pager(q=q) }} -{% endblock %} \ No newline at end of file diff --git a/ckanext/odsh/templates/datarequests/snippets/new_datarequest_form.html b/ckanext/odsh/templates/datarequests/snippets/new_datarequest_form.html deleted file mode 100644 index df537f6656c1e515ac0805153f740726e40f32e4..0000000000000000000000000000000000000000 --- a/ckanext/odsh/templates/datarequests/snippets/new_datarequest_form.html +++ /dev/null @@ -1,8 +0,0 @@ -{% extends "datarequests/snippets/datarequest_form.html" %} - -{% block delete_button %} -{% endblock %} - -{% block save_button_text %} - {{ _('Suggest New Data Request') }} -{% endblock %} \ No newline at end of file diff --git a/ckanext/odsh/templates/footer.html b/ckanext/odsh/templates/footer.html index 8c91856decdc05bf7417a3c3c954182bf43aca5e..402509e99ef393df262d6d7a7c9e152c6a952273 100644 --- a/ckanext/odsh/templates/footer.html +++ b/ckanext/odsh/templates/footer.html @@ -1,20 +1,19 @@ <footer class="footer"> - <div class="container"> - <div class="footer-content"> - <div class='footer-first-row'> - <div class="footer-left"> - </div> - </div> - <div class='footer-line'></div> - <div class="footer-left"> - <div class="footer-icon">© {{g.site_title}}</div> - </div> - <div class="footer-right"> - <div class='footer-icon'><a href='http://www.schleswig-holstein.de/odpkontakt'>Kontakt</a></div> - <div class='footer-icon'><a href='http://www.schleswig-holstein.de/odpimpressum'>Impressum</a></div> - <div class='footer-icon'><a href='https://www.schleswig-holstein.de/DE/Serviceseiten/Barrierefreiheitserklaerung/barrierefreiheit_node.html'>Barrierefreiheit</a></div> - <div class='footer-icon last'><a href='http://www.schleswig-holstein.de/odpdatenschutz'>Datenschutz</a></div> - </div> - </div> + <div class="container"> + <div class="footer-content"> + <div class='footer-first-row'> + <div class="footer-left"></div> + </div> + <div class='footer-line'></div> + <div class="footer-left"> + <div class="footer-icon">© {{g.site_title}}</div> + </div> + <div class="footer-right"> + <div class='footer-icon'><a href='http://www.schleswig-holstein.de/odpkontakt'>{{ _("Contact") }}</a></div> + <div class='footer-icon'><a href='http://www.schleswig-holstein.de/odpimpressum'>{{ _("Imprint") }}</a></div> + <div class='footer-icon'><a href='https://www.schleswig-holstein.de/DE/Serviceseiten/Barrierefreiheitserklaerung/barrierefreiheit_node.html'>{{ _("Accessibility") }}</a></div> + <div class='footer-icon last'><a href='http://www.schleswig-holstein.de/odpdatenschutz'>{{ _("Data protection") }}</a></div> + </div> </div> + </div> </footer> diff --git a/ckanext/odsh/templates/header.html b/ckanext/odsh/templates/header.html index 85f97274022d38dc50fbf15d15e2f7b325883e4c..ed80dc23cf62717c6c2de0924deaf6822ae0726a 100644 --- a/ckanext/odsh/templates/header.html +++ b/ckanext/odsh/templates/header.html @@ -2,29 +2,24 @@ {% asset 'ckanext-odsh/odsh_toggle_menu' %} {% endblock scripts %} -{% block header_wrapper %} -{% block header_account %} -<header class="navbar navbar-static-top masthead"> - <div class="container"> - {# The .header-image class hides the main text and uses image replacement for the title #} - <div class='row topline'> - - <div class='span3 span-navigation'> - <hgroup class="{{ g.header_class }} pull-left"> +{% set dataset_type = h.default_package_type() %} +{% set org_type = h.default_group_type('organization') %} - {% block header_logo %} - <a class="logo" href="{{ h.url_for('home.index') }}"> - <img class="img-logo-large" src="{{ h.url_for_static_or_external(g.site_logo) }}" - alt="Logo Schleswig Holstein" title="{{ g.site_title }}" /> - <img class="img-logo-small" src="/base/images/logo-quer.png" alt="Logo Schleswig Holstein" - title="{{ g.site_title }}" /> - </a> - {% endblock %} - </hgroup> - </div> - <h1 class='site-title'> {{ g.site_title }} </h1> - </div> - <div id="menu-button-and-title" data-module="odsh_toggle_menu"> +{% block header_wrapper %} {% block header_account %} +<header class="navbar navbar-static-top masthead"> + <div class="container topline"> + <hgroup class="{{ g.header_class }}"> + {% block header_logo %} + <a class="logo" href="{{ h.url_for('home.index') }}"> + <img class="img-logo-large" src="{{ h.url_for_static_or_external(g.site_logo) }}" + alt="Logo Schleswig Holstein" title="{{ g.site_title }}" /> + <img class="img-logo-small" src="/base/images/logo-quer.png" alt="Logo Schleswig Holstein" + title="{{ g.site_title }}" /> + </a> + {% endblock %} + </hgroup> + <h1 class='site-title'> {{ g.site_title }} </h1> + <div id="menu-button-and-title" aria-label="{{ _('Toggle menu') }}" data-module="odsh_toggle_menu"> <span class="fa fa-bars"></span> <h1 class='site-title-mobile'> {{ g.site_title }} </h1> </div> @@ -36,13 +31,13 @@ <ul class="nav nav-pills"> <li class="header-menu-mobile" data-module="odsh_toggle_menu"> <a>{{ _('Menu') }}</a> - <img src="/base/images/icon_close_white.svg" alt="Menü schließen" aria-label="Menü schließen" /> + <img src="/base/images/icon_close_white.svg" alt="{{ _('Close menu') }}" aria-label="{{ _('Close menu') }}" /> </li> {% block header_site_navigation_tabs %} {{ h.build_nav_main( - ('search', _('Datasets')), - ('organizations_index', _('Organizations')) + (dataset_type ~ '.search', _('Datasets'), ["dataset", "resource"]), + (org_type ~ '.index', _('Organizations'), ['organization']) ) }} {% endblock %} @@ -56,64 +51,75 @@ {% link_for _('Upload'), named_route='dataset.new', class_='text' %} </li> {% endif %} + {% block header_account_container_content %} {% if c.userobj %} <li class="dropdown navbar-right {{clazz}}"> {% set name = c.userobj.fullname if c.userobj.fullname else c.userobj.email%} - <a class="dropdown-toggle" data-toggle="dropdown" href="#"> + <a href="#" class="dropdown-toggle" data-bs-toggle="dropdown" id="accountMenuButton" aria-expanded="false"> <svg class='user-icon' viewBox="0 0 54 54"> <circle class='user-icon' cx="27" cy="17" r="7.5" /> <path class='user-icon' d="M42.5,44.5h-31v-6.4c0-4.7,3.9-8.6,8.6-8.6h13.9c4.7,0,8.6,3.9,8.6,8.6V44.5z" /> </svg> {{name}}</a> - <ul class="dropdown-menu" role="menu"> + <ul class="dropdown-menu" role="menu" aria-labelledby="accountMenuButton"> + {% block header_account_logged %} {% if c.userobj.sysadmin %} + <li> + <a href="{{ h.url_for('admin.index') }}" title="{{ _('Sysadmin settings') }}"> + <i class="fa fa-gavel" aria-hidden="true"></i> + <span class="text">{{ _('Admin') }}</span> + </a> + </li> + {% endif %} + {% block header_account_profile %} <li> <svg class='user-icon-small' viewBox="0 0 54 54"> <circle cx="27" cy="17" r="7.5" /> <path d="M42.5,44.5h-31v-6.4c0-4.7,3.9-8.6,8.6-8.6h13.9c4.7,0,8.6,3.9,8.6,8.6V44.5z" /> </svg> - <a href="{{ h.url_for('user.read', id=c.userobj.name) }}" title="logout" role="menuitem"> + <a href="{{ h.url_for('user.read', id=c.userobj.name) }}" aria-label="{{ _('View profile') }}" title="{{ _('View profile') }}" role="menuitem"> <span class="text"> {{ _('View profile') }} </span> </a> </li> + {% endblock %} + {% block header_account_settings_link %} <li> - <a href="{{ h.url_for('user.edit', id=c.userobj.name) }}" title="logout" role="menuitem"> + <a href="{{ h.url_for('user.edit', id=c.userobj.name) }}" aria-label="{{ _('Edit profile') }}" title="{{ _('Edit profile') }}" role="menuitem"> <i class='fa fa-edit'></i> <span class="text"> {{ _('Edit profile') }} </span> </a> </li> + {% endblock %} + {% block header_account_log_out_link %} <li> - <a href="{{ h.url_for('user.logout') }}" title="logout" role="menuitem"> + <a href="{{ h.url_for('user.logout') }}" aria-label="{{ _('Logout') }}" title="{{ _('Logout') }}" role="menuitem"> <i class='fa fa-sign-out'></i> <span class="text">{{ _('Logout') }}</span> </a> </li> + {% endblock %} {% endblock %} </ul> </a> </li> {% else %} <li class='{{clazz}}'> - <a href="{{ h.url_for('user.login') }}" title="login"> + <a href="{{ h.url_for('user.login') }}" aria-label="{{ _('Login') }}" title="{{ _('Login') }}"> <span class="text">{{ _('Login') }}</span> </a> </li> - {% endif %} - <li class="language-switch"> - <a href="/gebaerdensprache" title="{{ _('Sign language') }}" class="navGebaerdensprache"></a> + {% endif %} {% endblock %} + <li class="language-switch sign-language{% if not c.userobj %} navbar-right{% endif %}"> + <a href="/gebaerdensprache" aria-label="{{ _('Sign language') }}" title="{{ _('Sign language') }}" class="navGebaerdensprache"></a> </li> - <li class="language-switch"> - <a href="/leichtesprache" title="{{ _('Simple language') }}" class="navLeichteSprache"></a> + <li class="language-switch simple-language"> + <a href="/leichtesprache" aria-label="{{ _('Simple language') }}" title="{{ _('Simple language') }}" class="navLeichteSprache"></a> </li> </ul> </nav> - <nav class="section navigation"> - <ul class="nav nav-pills"> - </ul> - </nav> {% endblock %} </div> </div> diff --git a/ckanext/odsh/templates/home/index.html b/ckanext/odsh/templates/home/index.html index ff5122b718a4b22956dd3bfd625e1b32a67e5b2c..e23819503f648af5902f6d5e66044a9f8fe9b4cb 100644 --- a/ckanext/odsh/templates/home/index.html +++ b/ckanext/odsh/templates/home/index.html @@ -8,41 +8,40 @@ {% endblock %} - {% block main_content %} +{% block main_content %} -{% block toolbar %} -{{ super() }} -{% snippet "snippets/search_box.html"%} -{% endblock %} + {% block toolbar %} + {{ super() }} + {% snippet "snippets/search_box.html"%} + {% endblock %} -<div class='home-page-content'> -<h2 class='home-title'>Open Data Schleswig-Holstein</h2> -<p>Wir fördern Transparenz und Innovation durch Veröffentlichung schleswig-holsteinischer Daten in offenen, freien und wiederverwendbaren Formaten.</p> -<a href="/dataset" class="btn btn-primary home-button"> -Datensätze entdecken -</a> + <div class='home-page-content'> + <h2 class='home-title'>Open Data Schleswig-Holstein</h2> + <p>{% trans %}We promote transparency and innovation by publishing Schleswig-Holstein data in open, free and reusable formats.{% endtrans %}</p> + <a href="/dataset" class="btn btn-primary home-button">{% trans %}Discover datasets{% endtrans %}</a> {% for group_row in h.odsh_main_groups() | batch(3, '') %} - <div class='home-groups'> - <div class='home-groups-rows'> - {% for group in group_row %} - {% if group != '' %} - {% set href = h.add_url_param(named_route='dataset.search',extras={'groups':group.id} ) %} - <div class='home_group_item'> - <div class='home-groups-img'> - <img src="/base/images/icon_kat_{{group.id}}.svg"/> - </div> - <div class='home-groups-title'> - <div> - <a href='{{href}}'>{{group.display_name}}</a> + <div class='home-groups'> + <div class='home-groups-rows'> + {% for group in group_row %} + {% if group != '' %} + {% set href = h.add_url_param(named_route='dataset.search',extras={'groups':group.id} ) %} + <div class='home_group_item'> + <div class='home-groups-img'> + <img src="/base/images/icon_kat_{{group.id}}.svg"/> </div> - </div> - </div> - {% endif %} - {% endfor %} - </div> - </div> + <div class='home-groups-title'> + <div> + <a href='{{href}}'>{{group.display_name}}</a> + </div> + </div> + </div> + {% endif %} + {% endfor %} + </div> + </div> {% endfor %} -</div> + </div> {% endblock %} + {% block secondary%} {% endblock %} \ No newline at end of file diff --git a/ckanext/odsh/templates/organization/index.html b/ckanext/odsh/templates/organization/index.html index 58de4af2b1b784fc481bdcf01d5bb3dc277f5e6a..0cd0e5ba3e680bb80c63901fbde0132512a3f6cd 100644 --- a/ckanext/odsh/templates/organization/index.html +++ b/ckanext/odsh/templates/organization/index.html @@ -9,26 +9,25 @@ {% block page_header %}{% endblock %} {% block toolbar %} -{{ super() }} -<form id='organization-search-form' class="section site-search simple-input" method="get" data-module="select-switch"> -<div class='search-box-container'> - <div class='search-box'> - <div class="field"> - <input id="field-sitewide-search" type="text" name="q" value="{{c.q}}" placeholder="{{ _('Search organizations') }}" /> - <button class="btn-search" type="submit"> - </div> + {{ super() }} + <form id='organization-search-form' class="section site-search simple-input" method="get" data-module="select-switch"> + <div class='search-box-container'> + <div class='search-box'> + <div class="field"> + <input id="field-sitewide-search" type="text" name="q" value="{{q}}" placeholder="{{ _('Search organizations') }}" aria-label="{{ _('Search organizations') }}" /> + <button class="btn-search" type="submit" aria-label="{{ _('Search') }}"> + </div> + </div> </div> -</div> {% endblock %} {% block page_primary_action %} {% endblock %} {% block primary %} -<div class="primary organization"> + <div class="primary organization"> {% if h.check_access('organization_create') %} - {% link_for _('Add Organization'), named_route='organization.new', class_='btn btn-primary', - icon='plus-square' %} + {% link_for _('Add Organization'), named_route='organization.new', class_='btn btn-primary', icon='plus-square' %} {% endif %} <h1 class="hide-heading">{% block page_heading %}{{ _('Organizations') }}{% endblock %}</h1> <div class="search-form"> @@ -37,28 +36,28 @@ {% endblock %} </div> {% block organizations_list %} - {% if c.page.items or request.args %} - {% if c.page.items %} - {% snippet "organization/snippets/odsh_organization_list.html", organizations=c.page.items %} - {% endif %} - {% else %} - <p class="empty"> - {{ _('There are currently no organizations for this site') }}. - {% if h.check_access('organization_create') %} - {% link_for _('How about creating one?'), named_route='organization.new' %}</a>. + {% if page.items or request.args %} + {% if page.items %} + {% snippet "organization/snippets/odsh_organization_list.html", organizations=c.page.items %} {% endif %} - </p> - {% endif %} + {% else %} + <p class="empty"> + {{ _('There are currently no organizations for this site') }}. + {% if h.check_access('organization_create') %} + {% link_for _('How about creating one?'), named_route='organization.new' %}</a>. + {% endif %} + </p> + {% endif %} {% endblock %} {% block page_pagination %} - {{ c.page.pager(q=c.q or '', sort=c.sort_by_selected or '') }} + {{ page.pager(q=q or '', sort=sort_by_selected or '') }} {% endblock %} -</div> + </div> {% endblock %} -{% block secondary%} +{% block secondary %} {% endblock %} {% block pre_wrap %} -</form> + </form> {% endblock %} \ No newline at end of file diff --git a/ckanext/odsh/templates/organization/read.html b/ckanext/odsh/templates/organization/read.html index 7c842dee0bb448dd3d18b83f528672973035292c..9ee49b09a3ae57f1f59d7e9078daa90884c2ffa9 100644 --- a/ckanext/odsh/templates/organization/read.html +++ b/ckanext/odsh/templates/organization/read.html @@ -1,10 +1,11 @@ {% extends "organization/read_base.html" %} +{% set dataset_type = h.default_package_type() %} {% block page_primary_action %} -{% if h.check_access('package_create', {'owner_org': c.group_dict.id}) %} -{% link_for _('Add dataset'), named_route='dataset.new', group=c.group_dict.id, class_='btn btn-primary', + {% if h.check_access('package_create', {'owner_org': group_dict.id}) %} + {% link_for _('Add dataset'), named_route='dataset.new', group=group_dict.id, class_='btn btn-primary', icon='plus-square' %} -{% endif %} + {% endif %} {% endblock %} {% block toolbar %} @@ -14,47 +15,46 @@ icon='plus-square' %} {% endblock %} {% block primary_content_inner %} -{% block groups_search_form %} - {% set facets = { - 'fields': fields_grouped, - 'search': search_facets, - 'titles': facet_titles, - 'translated_fields': translated_fields, - 'remove_field': remove_field } - %} - {% set sorting = [ - (_('Relevance'), 'score desc, metadata_modified desc'), - (_('Name Ascending'), 'title_string asc'), - (_('Name Descending'), 'title_string desc'), - (_('Issued Ascending'), 'extras_issued asc'), - (_('Issued Descending'), 'extras_issued desc'), - (_('Popular'), 'views_recent desc') if g.tracking_enabled else (false, false) ] - %} - {% snippet 'snippets/search_form.html', form_id='organization-datasets-search-form', type=dataset_type, query=q, sorting=sorting, sorting_selected=sort_by_selected, count=page.item_count, facets=facets, placeholder=_('Search datasets...'), show_empty=request.args, fields=fields, force_title=_('Datasets') %} -{% endblock %} -{% block packages_list %} -{% if c.page.items %} -{{ h.snippet('snippets/package_list.html', packages=c.page.items) }} -{% endif %} -{% endblock %} -{% block page_pagination %} -{{ c.page.pager(q=c.q) }} -{% endblock %} + {% block groups_search_form %} + {% set facets = { + 'fields': fields_grouped, + 'search': search_facets, + 'titles': facet_titles, + 'translated_fields': translated_fields, + 'remove_field': remove_field } + %} + {% set sorting = [ + (_('Relevance'), 'score desc, metadata_modified desc'), + (_('Name Ascending'), 'title_string asc'), + (_('Name Descending'), 'title_string desc'), + (_('Issued Ascending'), 'extras_issued asc'), + (_('Issued Descending'), 'extras_issued desc'), + (_('Popular'), 'views_recent desc') if g.tracking_enabled else (false, false) ] + %} + {% snippet 'snippets/search_form.html', form_id='organization-datasets-search-form', type=dataset_type, query=q, sorting=sorting, sorting_selected=sort_by_selected, count=page.item_count, facets=facets, placeholder=_('Search datasets...'), show_empty=request.args, fields=fields, force_title=_('Datasets') %} + {% endblock %} + {% block packages_list %} + {% if page.items %} + {{ h.snippet('snippets/package_list.html', packages=page.items) }} + {% endif %} + {% endblock %} + {% block page_pagination %} + {{ page.pager(q=q) }} + {% endblock %} {% endblock %} {% block organization_facets %} -{% set url = h.url_for(c.group_dict.type ~ '_read', id=c.group_dict.id) %} -<div class="filters"> + {% set url = h.url_for(group_dict.type ~ '_read', id=group_dict.id) %} + <div class="filters"> <div class="container-fluid filter-reset"> - <div class="filter-reset-label"><span>{{ _('Filter') }}:</span></div> - <div class="filter-reset-box"><a href="{{ url }}">{{ _('Reset') }}</a></button></div> + <div class="filter-reset-label"><span>{{ _('Filter') }}:</span></div> + <div class="filter-reset-box"><a href="{{ url }}">{{ _('Reset') }}</a></button></div> </div> <div> - {% for facet in c.facet_titles %} - {{ h.snippet('snippets/facet_list.html', title=c.facet_titles[facet], name=facet, - extras={'id':c.group_dict.id}) }} - {% endfor %} + {% for facet in facet_titles %} + {{ h.snippet('snippets/facet_list.html', title=facet_titles[facet], name=facet, extras={'id':group_dict.id}, search_facets=search_facets) }} + {% endfor %} </div> - <a class="close no-text hide-filters"><i class="fa fa-times-circle"></i><span class="text">{{ _('Close') }}</span></a> -</div> -{% endblock %} \ No newline at end of file + <a class="close no-text hide-filters" aria-label="{{ _('Close') }}"><i class="fa fa-times-circle"></i><span class="text">{{ _('Close') }}</span></a> + </div> +{% endblock %} diff --git a/ckanext/odsh/templates/organization/snippets/organization_form.html b/ckanext/odsh/templates/organization/snippets/organization_form.html index a14c122168039edefcc90ee433631a25bd3d2cad..77797c54474261d77eb83b6675013d97b46769e3 100644 --- a/ckanext/odsh/templates/organization/snippets/organization_form.html +++ b/ckanext/odsh/templates/organization/snippets/organization_form.html @@ -1,6 +1,7 @@ {% import 'macros/form.html' as form %} <form id='organization-edit-form' class="dataset-form form-horizontal" method="post" data-module="basic-form" enctype="multipart/form-data"> + {{ h.csrf_input() }} {% block error_summary %} {{ form.errors(error_summary) }} {% endblock %} @@ -46,8 +47,8 @@ {{ form.input_address('gnd','GND URI', value=extras.gnd, index=6, placeholder='https://d-nb.info/gnd/1136109587', type='text', attrs={}) }} + {% set custom_extras = ['person','street','location','telephone','mail','web','gnd'] %} {% for extra in data.extras %} - {% set custom_extras = ['person','street','location','telephone','mail','web','gnd'] %} {% if extra.key not in custom_extras %} {% set prefix = 'extras__%d__' % (loop.index0 + (custom_extras|count)) %} {{ form.custom( @@ -62,11 +63,12 @@ {# Add a max of 3 empty columns #} {% set total_extras = data.extras|count %} + {% if total_extras <= (custom_extras|count) %}{% set total_extras = (custom_extras|count) %}{% endif %} {% set empty_extras = (limit or 3) - total_extras %} {% if empty_extras <= 0 %}{% set empty_extras = 1 %}{% endif %} {% for extra in range(total_extras, total_extras + empty_extras) %} - {% set index = loop.index0 + (data.extras|count) + (custom_extras|count) %} + {% set index = loop.index0 + total_extras %} {% set prefix = 'extras__%d__' % index %} {{ form.custom( names=(prefix ~ 'key', prefix ~ 'value', prefix ~ 'deleted'), diff --git a/ckanext/odsh/templates/organization/snippets/organization_item.html b/ckanext/odsh/templates/organization/snippets/organization_item.html index 53ca800e2fb869d9b00ee485bb7c113b30cc0199..9f277ce102746974cd4b1d33a85415de0fb4a43c 100644 --- a/ckanext/odsh/templates/organization/snippets/organization_item.html +++ b/ckanext/odsh/templates/organization/snippets/organization_item.html @@ -13,16 +13,13 @@ Example: #} {% set url = h.url_for('organization.read', id=organization.name) %} <a class="organization-item" href="{{ url }}" title="{{ _('View {organization_name}').format(organization_name=organization.display_name) }}"> - <div class="row organization-item"> - <div class="span1 organization-item-text"> - <h3>{{ organization.display_name }}</h3> - {% if organization.description %} - <p>{{ h.markdown_extract(organization.description, extract_length=200) }}</p> - {% endif %} - </div> - <div class="span1 organization-image-column"> - <img src="{{ organization.image_display_url or h.url_for_static('/base/images/placeholder-organization.png') }}" - alt="{{ organization.name }}" class="organization-image"> - </div> - </div> + <div class="span1 organization-item-text"> + <h3>{{ organization.display_name }}</h3> + {% if organization.description %} + <p>{{ h.markdown_extract(organization.description, extract_length=200) }}</p> + {% endif %} + </div> + <div class="span1 organization-image-column"> + <img src="{{ organization.image_display_url or h.url_for_static('/base/images/placeholder-organization.png') }}" alt="{{ organization.name }}" class="organization-image"> + </div> </a> diff --git a/ckanext/odsh/templates/package/collection_read.html b/ckanext/odsh/templates/package/collection_read.html index b6a22c718376f80bdb31855f0e66d4fc2ccf36cc..b0f5149072a811d17e15140afceabfbd785d8106 100644 --- a/ckanext/odsh/templates/package/collection_read.html +++ b/ckanext/odsh/templates/package/collection_read.html @@ -16,8 +16,7 @@ {% if collection['members'] %} <p> - Dies ist die Übersichtsseite der Reihe "{{ collection_title }}". - Sie enthält folgende Datensätze (neuere Datensätze zuerst): + {% trans title=collection_title %}This is the overview page of the "{{ title }}" series. It contains the following datasets (newer datasets first):{% endtrans %} </p> {% snippet 'snippets/package_list.html', packages=collection['members'] | reverse() %} {% endif %} diff --git a/ckanext/odsh/templates/package/new_package_form.html b/ckanext/odsh/templates/package/new_package_form.html index 5d411f4bf0c0f8d43aae16d973dccfb5f27f3372..891a455e59601636835fee80f3095e694c283a05 100644 --- a/ckanext/odsh/templates/package/new_package_form.html +++ b/ckanext/odsh/templates/package/new_package_form.html @@ -1,34 +1,30 @@ {% extends 'package/snippets/package_form.html' %} -{% set form_style = c.form_style or c.action %} - {% block stages %} -{% if form_style != 'edit' %} -<div class='search-form'> - <h2>{{ _('Create Dataset') }}</h2> -</div> -{{ super() }} -{% else %} - -{% endif %} + {% if form_style != 'edit' %} + <div class='search-form'> + <h2>{{ _('Create Dataset') }}</h2> + </div> + {{ super() }} + {% endif %} {% endblock %} {% block save_button_text %} -{% if form_style != 'edit' %} -{{ _('next') }} -{% else %} -{{ _('Update Dataset') }} -{% endif %} + {% if form_style != 'edit' %} + {{ _('next') }} + {% else %} + {{ _('Update Dataset') }} + {% endif %} {% endblock %} {% block cancel_button %} -{% if form_style != 'edit' %} -{{ super() }} -{% endif %} + {% if form_style != 'edit' %} + {{ super() }} + {% endif %} {% endblock %} {% block delete_button %} -{% if form_style == 'edit' and h.check_access('package_delete', {'id': pkg_dict.id}) %} -{{ super() }} -{% endif %} + {% if form_style == 'edit' and h.check_access('package_delete', {'id': pkg_dict.id}) %} + {{ super() }} + {% endif %} {% endblock %} \ No newline at end of file diff --git a/ckanext/odsh/templates/package/read.html b/ckanext/odsh/templates/package/read.html index e3972bb8d7dbdd9746ea66dba592b3244bd01b9f..03688153c7b653d3082a7e6c0c402bb35d48eae4 100644 --- a/ckanext/odsh/templates/package/read.html +++ b/ckanext/odsh/templates/package/read.html @@ -1,6 +1,6 @@ {% extends "package/read_base.html" %} -{% set pkg = c.pkg_dict %} +{% set pkg = pkg_dict %} {% set collection = h.get_collection(pkg) %} {% set collection_title = collection['title'] if collection else None %} {% set collection_url = collection['url'] if collection else None %} @@ -12,150 +12,148 @@ {% set version_notes = h.odsh_extract_value_from_extras(pkg.extras, 'version_notes') %} {% block breadcrumb_content %} -{% if pkg %} -{% set dataset = h.dataset_display_name(pkg) %} -{% if pkg.organization %} -{% set organization = h.get_translated(pkg.organization, 'title') or pkg.organization.name %} -<li>{% link_for organization|truncate(30), named_route='organization.read', id=pkg.organization.name %}</li> -{% else %} -<li>{% link_for _('Datasets'), named_route='dataset.search' %}</li> -{% endif %} -<li {{ self.breadcrumb_content_selected() }}>{% link_for dataset|truncate(30), named_route='dataset.read', - id=pkg.name %}</li> -{% else %} -<li>{% link_for _('Datasets'), named_route='dataset.search' %}</li> -<li class="active"><a href="">{{ _('Create Dataset') }}</a></li> -{% endif %} + {% if pkg %} + {% set dataset = h.dataset_display_name(pkg) %} + {% if pkg.organization %} + {% set organization = h.get_translated(pkg.organization, 'title') or pkg.organization.name %} + <li>{% link_for organization|truncate(30), named_route='organization.read', id=pkg.organization.name %}</li> + {% else %} + <li>{% link_for _('Datasets'), named_route='dataset.search' %}</li> + {% endif %} + <li {{ self.breadcrumb_content_selected() }}>{% link_for dataset|truncate(30), named_route='dataset.read', id=pkg.name %}</li> + {% else %} + <li>{% link_for _('Datasets'), named_route='dataset.search' %}</li> + <li class="active"><a href="">{{ _('Create Dataset') }}</a></li> + {% endif %} {% endblock breadcrumb_content %} {% block primary_content_inner %} -{{ super() }} -{% block package_description %} -<div class="odsh-dataset-heading"> - <h2> - {% block page_heading %} - {{ h.dataset_display_name(pkg) }} - {% if pkg.state.startswith('draft') %} - [{{ _('Draft') }}] - {% endif %} - {% if pkg.state == 'deleted' %} - [{{ _('Deleted') }}] - {% endif %} - {% endblock page_heading %} - <div class="odsh-dataset-edit-button"> - {% if h.check_access('package_update', {'id':pkg.id }) %} - <div> - {% link_for _('Manage Dataset'), named_route='dataset.edit', id=pkg.name, class_='btn btn-primary btn-add-dataset', - icon='wrench' %} - </div> + {{ super() }} + {% block package_description %} + <div class="odsh-dataset-heading"> + <h2> + {% block page_heading %} + <span property="dc:title">{{ h.dataset_display_name(pkg) }}</span> + {% if pkg.state.startswith('draft') %} + [{{ _('Draft') }}] + {% endif %} + {% if pkg.state == 'deleted' %} + [{{ _('Deleted') }}] + {% endif %} + {% endblock page_heading %} + {% if h.check_access('package_update', {'id':pkg.id }) %} + <div class="odsh-dataset-edit-button"> + <div> + {% link_for _('Manage Dataset'), named_route='dataset.edit', id=pkg.name, class_='btn btn-primary btn-add-dataset', + icon='wrench' %} + </div> + {% endif %} + {% if pkg.private %} + <span class="dataset-private badge bg-secondary"> + <i class="fa fa-lock"></i> + {{ _('Private') }} + </span> + </div> {% endif %} - {% if pkg.private %} - <span class="dataset-private label label-inverse"> - <i class="fa fa-lock"></i> - {{ _('Private') }} - </span> + </h2> + <div class="dataset-stars"> + {% if stars>-1%} + {% snippet "qa/stars.html", stars=stars %} {% endif %} </div> - </h2> - <div class="dataset-stars"> - {% if stars>-1%} - {% snippet "qa/stars.html", stars=stars %} - {% endif %} </div> - {% if h.check_access('package_update', {'id':pkg.id }) %} - {% endif %} -</div> -{# {{ pkg.resources }} #} + {# {{ pkg.resources }} #} -{% block package_notes %} -<div class="btn btn-primary btn-lg show-filters" role="button"> - <img src="/base/images/icon_info.svg" aria-hidden="true"></img> - {{ _('Detailed information') }} -</div> -{% if successor_url %} -<p class="hint-newer-version"> - {% trans %} - Note: A <a href="{{ latest_collection_member }}">newer version</a> of this dataset is available. - {% endtrans %} -</p> -{% endif %} -{% if is_replaced_by %} -<div class="hint-newer-version"> - {% trans %} - Note: This dataset has been replaced with a <a href="{{ is_replaced_by }}">newer version</a>. - {% endtrans %} -</div> -{% endif %} -{% if pkg.notes %} -<div class="notes embedded-content"> - {{ h.render_markdown(h.get_translated(pkg, 'notes')) }} -</div> -{% endif %} -{% if version_notes %} -<div class="version-notes"> - {{ version_notes }} -</div> -{% endif %} -{% endblock package_notes %} + {% block package_notes %} + <div class="btn btn-primary btn-lg show-filters" role="button"> + <img src="/base/images/icon_info.svg" aria-hidden="true" /> + {{ _('Detailed information') }} + </div> + {% if successor_url %} + <p class="hint-newer-version"> + {% trans %} + Note: A <a href="{{ latest_collection_member }}">newer version</a> of this dataset is available. + {% endtrans %} + </p> + {% endif %} + {% if is_replaced_by %} + <div class="hint-newer-version"> + {% trans %} + Note: This dataset has been replaced with a <a href="{{ is_replaced_by }}">newer version</a>. + {% endtrans %} + </div> + {% endif %} + {% if pkg.notes %} + <div class="notes embedded-content"> + {{ h.render_markdown(h.get_translated(pkg, 'notes')) }} + </div> + {% endif %} + {% if version_notes %} + <div class="version-notes"> + {{ version_notes }} + </div> + {% endif %} + {% endblock package_notes %} {% endblock package_description %} {% block package_resources %} -{% snippet "package/snippets/resources_list.html", pkg=pkg, resources=pkg.resources %} + {% snippet "package/snippets/resources_list.html", pkg=pkg, resources=pkg.resources %} {% if h.check_access('package_update', {'id':pkg.id }) %} - <div class='add-resource-container'> - {% link_for _('Add new resource'), named_route='resource.new', id=c.pkg_dict.name, class_='btn btn-primary', icon='plus' %} - </div> + <div class='add-resource-container'> + {% link_for _('Add new resource'), named_route='resource.new', id=pkg.name, class_='btn btn-primary', icon='plus' %} + </div> {% endif %} {% endblock package_resources %} {% block collection %} -{% if latest_collection_member %} -<section id="dataset-collection"> - {% if collection_title %} - <p> - Dieser Datensatz ist Bestandteil der <a href={{ collection_url }}>Reihe "{{ collection_title }}"</a>. - Sie können zu älteren und neueren Datensätzen blättern. - </p> - {% endif %} {# collection_title #} - <div class="button-container"> + {% if latest_collection_member %} + <section id="dataset-collection"> + {% if collection_title %} + <p> + {% trans title=collection_title, url=collection_url %} + This record is part of the series <a href="{{ url }}">{{ title }}</a>. You can browse to older and newer records. + {% endtrans %} + </p> + {% endif %} {# collection_title #} + <div class="button-container"> <a href="{{ latest_collection_member }}" class="btn btn-primary btn-lg" role="button"> - <img src="/base/images/icon_latest.svg" aria-hidden="true"></img> - <span class="hide-on-mobile">{{ _('latest collection member') }}</span> + <img src="/base/images/icon_latest.svg" aria-hidden="true" /> + <span class="hide-on-mobile">{{ _('latest collection member') }}</span> </a> {% if predecessor_url %} - <a href="{{ predecessor_url }}" class="btn btn-primary btn-lg" role="button"> - <img src="/base/images/icon_arrow_left.svg" aria-hidden="true"></img> + <a href="{{ predecessor_url }}" class="btn btn-primary btn-lg" role="button"> + <img src="/base/images/icon_arrow_left.svg" aria-hidden="true" /> <span class="hide-on-mobile">{{ _('predecessor') }}</span> - </a> + </a> {% else %} - <a href="#" class="btn btn-primary btn-lg disabled" role="button"> - <img src="/base/images/icon_arrow_left.svg" aria-hidden="true"></img> + <a href="#" class="btn btn-primary btn-lg disabled" role="button"> + <img src="/base/images/icon_arrow_left.svg" aria-hidden="true" /> <span class="hide-on-mobile">{{ _('predecessor') }}</span> - </a> + </a> {% endif %} {% if successor_url %} - <a href="{{ successor_url }}" class="btn btn-primary btn-lg" role="button"> + <a href="{{ successor_url }}" class="btn btn-primary btn-lg" role="button"> <span class="hide-on-mobile">{{ _('successor') }}</span> - <img src="/base/images/icon_arrow_right.svg" aria-hidden="true"></img> - </a> + <img src="/base/images/icon_arrow_right.svg" aria-hidden="true" /> + </a> {% else %} - <a href="#" class="btn btn-primary btn-lg disabled" role="button"> + <a href="#" class="btn btn-primary btn-lg disabled" role="button"> <span class="hide-on-mobile">{{ _('successor') }}</span> - <img src="/base/images/icon_arrow_right.svg" aria-hidden="true"></img> - </a> + <img src="/base/images/icon_arrow_right.svg" aria-hidden="true" /> + </a> {% endif %} - </div> -</section> -{% endif %} {# latest_collection_member #} + </div> + </section> + {% endif %} {# latest_collection_member #} {% endblock collection %} <div class='tag-container'> -{% for tag in pkg.tags %} + {% for tag in pkg.tags %} <div class='tag-pill'> {{h.tag_link(tag)}} </div> -{% endfor %} + {% endfor %} </div> {% endblock primary_content_inner %} diff --git a/ckanext/odsh/templates/package/resource_edit.html b/ckanext/odsh/templates/package/resource_edit.html index e45c3f3ee112dad44448478199f891778781b265..7c1a93def9af42770f452bc16c8092fdf746f448 100644 --- a/ckanext/odsh/templates/package/resource_edit.html +++ b/ckanext/odsh/templates/package/resource_edit.html @@ -9,7 +9,7 @@ errors=errors, error_summary=error_summary, pkg_name=pkg.name, - form_action=c.form_action, + form_action=form_action, allow_upload=g.ofs_impl and logged_in, resource_form_snippet=resource_form_snippet, dataset_type=dataset_type %} diff --git a/ckanext/odsh/templates/package/resource_read.html b/ckanext/odsh/templates/package/resource_read.html index 663baecf60c014a0001e0bf3a8c05713f8663547..491aa400608f3e7ad24ac5e9136b097023eca8fe 100644 --- a/ckanext/odsh/templates/package/resource_read.html +++ b/ckanext/odsh/templates/package/resource_read.html @@ -73,13 +73,11 @@ {% block data_preview %} {% block resource_view %} {% block resource_view_nav %} - {% set resource_preview = h.resource_preview(resource, package) %} {% snippet "package/snippets/resource_views_list.html", views=resource_views, pkg=pkg, is_edit=false, view_id=current_resource_view['id'], - resource_preview=resource_preview, resource=resource, extra_class="nav-tabs-plain" %} @@ -87,22 +85,16 @@ <div class="module-content"> {% block resource_view_content %} <div class="resource-view"> - {% set resource_preview = h.resource_preview(resource, package) %} - {% set views_created = res.has_views or resource_preview %} - {% if views_created %} - {% if resource_preview and not current_resource_view %} - {{ h.resource_preview(resource, package) }} - {% else %} - {% for resource_view in resource_views %} - {% if resource_view == current_resource_view %} - {% snippet 'package/snippets/resource_view.html', - resource_view=resource_view, - resource=resource, - package=package - %} - {% endif %} - {% endfor %} - {% endif %} + {% if resource_views %} + {% for resource_view in resource_views %} + {% if resource_view == current_resource_view %} + {% snippet 'package/snippets/resource_view.html', + resource_view=resource_view, + resource=resource, + package=package + %} + {% endif %} + {% endfor %} {% else %} {# Views not created #} <div class="module-content data-viewer-info"> diff --git a/ckanext/odsh/templates/package/search.html b/ckanext/odsh/templates/package/search.html index 9f3a89199f3f6857aac9b7461f49f45e1e2ffd7a..39b2b58d43b29543513eb2ae8b805180735321f6 100644 --- a/ckanext/odsh/templates/package/search.html +++ b/ckanext/odsh/templates/package/search.html @@ -7,17 +7,17 @@ {% endblock styles %} {% block breadcrumb_content %} - <li class="active">{{ h.nav_link(_('Datasets'), named_route='dataset.search', highlight_actions = 'new index') }}</li> + <li class="active">{{ h.nav_link(_('Datasets'), named_route='dataset.search') }}</li> {% endblock %} {% block toolbar %} {{ super() }} <form id='dataset-search-box-form' class="section site-search simple-input" action="{% url_for 'dataset.search' %}" method="get" data-module="select-switch"> - <div class="row filter-search-row"> - <div class='btn show-filters'>{{ _("Filter") }}</div> - {% snippet "snippets/search_box.html"%} - </div> + <div class="row filter-search-row"> + <div class='btn show-filters'><i class="fa fa-filter"></i> {{ _("Filter") }}</div> + {% snippet "snippets/search_box.html"%} + </div> {% endblock %} {% block primary_content %} @@ -31,12 +31,12 @@ method="get" data-module="select-switch"> {% endblock %} </div> {% block package_search_results_list %} - {{ h.snippet('snippets/package_list.html', packages=c.page.items) }} + {{ h.snippet('snippets/package_list.html', packages=page.items) }} {% endblock %} </div> {% block page_pagination %} - {{ c.page.pager(q=c.q,symbol_next='>') }} + {{ page.pager(q=q,symbol_next='>') }} {% endblock %} </section> @@ -57,8 +57,8 @@ method="get" data-module="select-switch"> <div class="filters"> <div> - {% for facet in c.facet_titles %} - {{ h.snippet('snippets/facet_list.html', title=c.facet_titles[facet], name=facet) }} + {% for facet in facet_titles %} + {{ h.snippet('snippets/facet_list.html', title=facet_titles[facet], name=facet, search_facets=search_facets) }} {% endfor %} </div> @@ -68,45 +68,45 @@ method="get" data-module="select-switch"> <nav> <div class="nav-title">{{_('Period')}}</div> <div class="rangesearch-controls"> - <div class='controls rangesearch' > - {%- set start = request.args['ext_startdate'] -%} - {%- set start_error = h.odsh_render_datetime(start, False) == '' and start -%} - {%- set end = request.args['ext_enddate'] -%} - {%- set end_error = h.odsh_render_datetime(end, False) == '' and end -%} - {%- set typeStart = 'text' if (start_error or not start) else 'date' -%} - {%- set typeEnd = 'text' if (end_error or not end) else 'date' -%} - - <label for="ext_startdate">{{_('from')|title}}</label> - {% - snippet 'snippets/datepicker.html', - aria_label=_('date start'), - id='ext_startdate', - value=start, - class='rangesearch', - placeholder=_('Date') - %} - {%if start_error %} - <div class="error-reange-search"> - {{_('wrong_start_date_for_search')}} - </div> - {%endif%} - - <label for="ext_enddate">{{_('to')|title}}</label> - {% - snippet 'snippets/datepicker.html', - aria_label=_('date end'), - id='ext_enddate', - value=end, - class='rangesearch', - placeholder=_('Date') - %} - {%if end_error %} - <div class="error-reange-search"> - {{_('wrong_end_date_for_search')}} - </div> - {%endif%} - <a class='pull-right action' href="javascript:{}" onclick="$('#dataset-search-box-form').submit();">{{_('submit date search') }}</a> - </div> + <div class='controls rangesearch' > + {%- set start = request.args['ext_startdate'] -%} + {%- set start_error = h.odsh_render_datetime(start, False) == '' and start -%} + {%- set end = request.args['ext_enddate'] -%} + {%- set end_error = h.odsh_render_datetime(end, False) == '' and end -%} + {%- set typeStart = 'text' if (start_error or not start) else 'date' -%} + {%- set typeEnd = 'text' if (end_error or not end) else 'date' -%} + + <label for="ext_startdate">{{_('from')|title}}</label> + {% + snippet 'snippets/datepicker.html', + aria_label=_('date start'), + id='ext_startdate', + value=start, + class='rangesearch', + placeholder=_('Date') + %} + {%if start_error %} + <div class="error-reange-search"> + {{_('wrong_start_date_for_search')}} + </div> + {%endif%} + + <label for="ext_enddate">{{_('to')|title}}</label> + {% + snippet 'snippets/datepicker.html', + aria_label=_('date end'), + id='ext_enddate', + value=end, + class='rangesearch', + placeholder=_('Date') + %} + {%if end_error %} + <div class="error-reange-search"> + {{_('wrong_end_date_for_search')}} + </div> + {%endif%} + <a class='pull-right action' href="javascript:{}" onclick="$('#dataset-search-box-form').submit();">{{_('submit date search') }}</a> + </div> </div> </nav> </section> diff --git a/ckanext/odsh/templates/package/snippets/close_mobile_sidebar_button.html b/ckanext/odsh/templates/package/snippets/close_mobile_sidebar_button.html index de00ec9cc7d9af1877176388699e032a48406759..4c09ff10a9004dd721c9e74193519b1bfa137ea2 100644 --- a/ckanext/odsh/templates/package/snippets/close_mobile_sidebar_button.html +++ b/ckanext/odsh/templates/package/snippets/close_mobile_sidebar_button.html @@ -1,3 +1,3 @@ <div class="container-fluid hide-filters-style"> - <a class="no-text hide-filters"><img src="/base/images/icon_close.svg" alt="{{ _('Filterdialog schließen') }}"/><span class="text">{{ _('Close') }}</span></a> + <a class="no-text hide-filters" aria-label="{{ _('Close') }}"><img src="/base/images/icon_close.svg" alt="{{ _('Close') }}"/><span class="text">{{ _('Close') }}</span></a> </div> diff --git a/ckanext/odsh/templates/package/snippets/info.html b/ckanext/odsh/templates/package/snippets/info.html index 927f32942a7faa67e1154f94ccaaacbb1107d5b7..57385b3b5b51674aed6e457f37f585e362a39174 100644 --- a/ckanext/odsh/templates/package/snippets/info.html +++ b/ckanext/odsh/templates/package/snippets/info.html @@ -13,124 +13,123 @@ Example: {% set license_attribution_by_text = h.odsh_extract_value_from_extras(pkg.extras, 'licenseAttributionByText') %} {% block package_info %} -{% if pkg %} -<section class="module module-narrow"> - <div class="module context-info"> + {% if pkg %} + <section class="module module-narrow"> + <div class="module context-info"> <div class="module-content"> - {% block package_info_inner %} + {% block package_info_inner %} {% block heading %} {% endblock heading %} {% block groups %} {# aka categories #} - {% if pkg.groups|length %} - <div class="info-detail groups-detail"> - <div> + {% if pkg.groups|length %} + <div class="info-detail groups-detail"> + <div> {% trans category_count=pkg.groups|length %} Category: {% pluralize %} Categories: {% endtrans %} - </div> - {% for category in pkg.groups %} - <span class='category-with-icon'> - <span class='category-icon-container'> + </div> + {% for category in pkg.groups %} + <span class='category-with-icon'> + <span class='category-icon-container'> <img src="/base/images/icon_kat_{{category.name}}.svg" /> - </span> - <span class="category-name"> + </span> + <span class="category-name"> {{ category.display_name }} + </span> </span> - </span> - {% endfor %} - </div> - {% endif %} + {% endfor %} + </div> + {% endif %} {% endblock groups %} {% block timerange %} - {% if daterange %} - <div class="timerange-detail info-detail"> - <div>{{ _('Period') }}:</div> - <p>{{ daterange }}</p> - </div> - {% endif %} + {% if daterange %} + <div class="timerange-detail info-detail"> + <div>{{ _('Period') }}:</div> + <p>{{ daterange }}</p> + </div> + {% endif %} {% endblock timerange %} {% block last_change %} - <div class="last-change-detail info-detail"> + <div class="last-change-detail info-detail"> {% set value = h.odsh_extract_value_from_extras(pkg.extras,'issued')%} {% set issued = h.odsh_render_datetime(value) if value else h.odsh_render_datetime(pkg.metadata_created)%} <div>{{ _('Issued') }}:</div> - {{issued}} - </div> - <div class="last-change-detail info-detail"> + <span property="dc:issued">{{ issued }}</span> + </div> + <div class="last-change-detail info-detail"> {% set modified = h.odsh_render_datetime(pkg.metadata_modified)%} <div>{{ _('Modified') }}:</div> - {{modified}} - </div> + <span property="dc:modified">{{ modified }}</span> + </div> {% endblock last_change %} {% block license %} - <div class="license-detail info-detail"> + <div class="license-detail info-detail"> <div>{{ _('License') }}:</div> {%set lic=pkg.license_title if pkg.license_title else '-'%} {%set licenseAttributionByText = h.odsh_extract_value_from_extras(pkg.extras,'licenseAttributionByText') %} {%set name=' (' + licenseAttributionByText +')' if licenseAttributionByText else ''%} - <a href='{{pkg.license_url}}'>{{ lic }}</a>{{ name }} - </div> + <a href="{{pkg.license_url}}" rel="dc:rights">{{ lic }}</a>{{ name }} + </div> {% endblock license %} - {% block musterdatensatz %} - {% set musterdatensatzURI = h.odsh_extract_value_from_extras(pkg.extras,'reference') %} - {% if musterdatensatzURI %} - {% set mdk=h.odsh_load_raw_mdk_sample_dataset() %} - {% set musterdatensatzName = mdk[musterdatensatzURI] %} - <div class="musterdatensatz-detail info-detail"> - <div>{{ _('Musterdatensatz') }}</div> - <a href="/dataset?reference={{ musterdatensatzURI }}">{{ musterdatensatzName }}</a> - </div> - {% endif %} - {% endblock musterdatensatz %} + {% block musterdatensatz %} + {% set musterdatensatzURI = h.odsh_extract_value_from_extras(pkg.extras,'reference') %} + {% if musterdatensatzURI %} + {% set mdk=h.odsh_load_raw_mdk_sample_dataset() %} + {% set musterdatensatzName = mdk[musterdatensatzURI] %} + <div class="musterdatensatz-detail info-detail"> + <div>{{ _('Musterdatensatz') }}</div> + <a href="/dataset?reference={{ musterdatensatzURI }}">{{ musterdatensatzName }}</a> + </div> + {% endif %} + {% endblock musterdatensatz %} - {% endblock package_info_inner %} + {% endblock package_info_inner %} </div> {% set map_text = h.odsh_get_spatial_text(pkg) %} <div class="spatial-detail info-detail"> - <div>{{ _('Spatial uri') }}:</div> - {%set ext=map_text if map_text else '-'%} - <p>{{ ext }}</p> + <div>{{ _('Spatial uri') }}:</div> + {%set ext=map_text if map_text else '-'%} + <p>{{ ext }}</p> </div> {% set dataset_extent = h.get_pkg_dict_extra(pkg, 'spatial', '') %} {% if dataset_extent %} - <section class="module module-narrow dataset-map"> + <section class="module module-narrow dataset-map"> {% snippet "snippets/dataset_map.html", extent=dataset_extent %} - </section> + </section> {% endif %} {% block spatial_info %} - <div class="info-detail"> + <div class="info-detail"> {% set bbox = h.odsh_get_bounding_box(pkg) %} {% if bbox%} - <div>{{ _('Map boundaries') }}:</div> - <p> {{ '{0:0.3f}'.format(bbox[0]).zfill(2).replace('.',',') }}° {{_('in east')}}</p> - <p> {{ '{0:0.3f}'.format(bbox[1]).replace('.',',') }}° {{_('in west')}}</p> - <p> {{ '{0:0.3f}'.format(bbox[2]).replace('.',',') }}° {{_('in north')}}</p> - <p> {{ '{0:0.3f}'.format(bbox[3]).replace('.',',') }}° {{_('in south')}}</p> + <div>{{ _('Map boundaries') }}:</div> + <p> {{ '{0:0.3f}'.format(bbox[0]).zfill(2).replace('.',',') }}° {{_('in east')}}</p> + <p> {{ '{0:0.3f}'.format(bbox[1]).replace('.',',') }}° {{_('in west')}}</p> + <p> {{ '{0:0.3f}'.format(bbox[2]).replace('.',',') }}° {{_('in north')}}</p> + <p> {{ '{0:0.3f}'.format(bbox[3]).replace('.',',') }}° {{_('in south')}}</p> {% endif %} - </div> + </div> {% endblock %} {% block metadata_links %} - <div class="info-detail metadata-links"> - <div>{{ _('DCAT-AP.de metadata') }}</div> - <ul> - <li><a href="/dataset/{{ pkg.id }}.rdf">Download (RDF/XML)</a></li> - <li><a href="/dataset/{{ pkg.id }}.ttl">Download (Turtle)</a></li> - <li><a href="/dataset/{{ pkg.id }}.n3">Download (N3)</a></li> - <li><a href="/dataset/{{ pkg.id }}.jsonld">Download (JSON-LD)</a></li> - </ul> - </div> + <div class="info-detail metadata-links"> + <div>{{ _('DCAT-AP.de metadata') }}</div> + <ul> + <li><a href="/dataset/{{ pkg.id }}.rdf">Download (RDF/XML)</a></li> + <li><a href="/dataset/{{ pkg.id }}.ttl">Download (Turtle)</a></li> + <li><a href="/dataset/{{ pkg.id }}.n3">Download (N3)</a></li> + <li><a href="/dataset/{{ pkg.id }}.jsonld">Download (JSON-LD)</a></li> + </ul> + </div> {% endblock metadata_links %} - - -</section> -{% endif %} + </div> + </section> + {% endif %} {% endblock package_info %} diff --git a/ckanext/odsh/templates/package/snippets/package_basic_fields.html b/ckanext/odsh/templates/package/snippets/package_basic_fields.html index 4b835d319339aca4f0d45fe7f3ac9aa0e4629cb5..944dee9b905bb8c652ceb3742654b84d7e844fa2 100644 --- a/ckanext/odsh/templates/package/snippets/package_basic_fields.html +++ b/ckanext/odsh/templates/package/snippets/package_basic_fields.html @@ -7,10 +7,11 @@ {# field title #} {% block package_basic_fields_title %} -{% set error_string = _(_('Title') + ': '+errors.title[0]) if errors.title %} -{{ - form.input( - 'title', id='field-title', + {% set error_string = _(_('Title') + ': '+errors.title[0]) if errors.title %} + {{ + form.input( + 'title', + id='field-title', label=_('Title'), value=data.title, error=error_string, @@ -18,10 +19,29 @@ attrs={'data-module': 'slug-preview-target'}, is_required=true, placeholder=_('Enter title') - ) -}} + ) + }} {% endblock package_basic_fields_title %} +{# field name #} +{% block package_basic_fields_url %} + {% set prefix = h.url_for('dataset.read', id='') %} + {% set domain = h.url_for('dataset.read', id='', qualified=true) %} + {% set domain = domain|replace("http://", "")|replace("https://", "") %} + {% set attrs = {'data-module': 'slug-preview-slug', 'data-module-prefix': domain, 'data-module-placeholder': '<dataset>', 'class': 'form-control input-sm'} %} + {{ + form.prepend('name', + id='field-name', + label=_('URL'), + prepend=prefix, + placeholder=_('eg. my-dataset'), + value=data.name, + error=errors.name, + attrs=attrs, + is_required=true + ) + }} +{% endblock %} {# field note #} {% block package_basic_fields_description %} diff --git a/ckanext/odsh/templates/package/snippets/package_form.html b/ckanext/odsh/templates/package/snippets/package_form.html index 36005089eb2dd40a0bc7c92d24cbc0e419d3615c..9120161850af053e5bf38d15b46a270859d1d3c6 100644 --- a/ckanext/odsh/templates/package/snippets/package_form.html +++ b/ckanext/odsh/templates/package/snippets/package_form.html @@ -1,11 +1,12 @@ {% import 'macros/form.html' as form %} -{% set action = c.form_action or '' %} -{% set form_style = c.form_style or c.action %} +{% set action = g.form_action or '' %} +{% set form_style = g.form_style or g.action %} <form id="dataset-edit" class="dataset-form {% if(form_style=='edit') %} dataset-edit-form {%endif%} " method="post" action="{{ action }}" data-module="basic-form" novalidate> + {{ h.csrf_input() }} {% block stages %} - {{ h.snippet('package/snippets/stages.html', stages=stage) }} + {{ h.snippet('package/snippets/stages.html', stages=stage) }} {% endblock %} <input type="hidden" name="_ckan_phase" value="dataset_new_1" /> @@ -14,34 +15,33 @@ {# {% block errors %}{{ form.errors(error_summary) }}{% endblock %} #} {% block basic_fields %} - {% snippet 'package/snippets/package_basic_fields.html', data=data, errors=errors, licenses=c.licenses, - groups_available=c.groups_available %} + {% snippet 'package/snippets/package_basic_fields.html', data=data, errors=errors %} {% endblock %} {% block metadata_fields %} - {% snippet 'package/snippets/package_metadata_fields.html', data=data, errors=errors %} + {% snippet 'package/snippets/package_metadata_fields.html', data=data, errors=errors %} {% endblock %} {% block form_actions %} - <div class="form-actions"> - <div class="row-fluid"> - <div class="span6"> - {% block delete_button %} - {% if h.check_access('package_delete', {'id': data.id}) and not data.state == 'deleted' %} - <a class="btn btn-danger pull-left" href="{% url_for 'dataset.delete', id=data.id %}" - data-module="confirm-action" data-module-content="{{ _('Are you sure you want to delete this dataset?') }}"> - {% block delete_button_text %}{{ _('Delete') }}{% endblock %}</a> - {% endif %} - {% endblock %} - {% block save_button %} - <button class="btn btn-primary btn-arrow-right" type="submit" name="save"> - {% block save_button_text %}{{ - _('Next: Add Data') - }}{% endblock %}</button> - {% endblock %} + <div class="form-actions"> + <div class="row-fluid"> + <div class="span6"> + {% block delete_button %} + {% if h.check_access('package_delete', {'id': data.id}) and not data.state == 'deleted' %} + <a class="btn btn-danger pull-left" href="{% url_for 'dataset.delete', id=data.id %}" + data-module="confirm-action" data-module-content="{{ _('Are you sure you want to delete this dataset?') }}"> + {% block delete_button_text %}{{ _('Delete') }}{% endblock %}</a> + {% endif %} + {% endblock %} + {% block save_button %} + <button class="btn btn-primary btn-arrow-right" type="submit" name="save"> + {% block save_button_text %}{{ + _('Next: Add Data') + }}{% endblock %}</button> + {% endblock %} + </div> </div> </div> - </div> {% endblock %} <span class='required-text'>*{{ _('Required information') }}</span> </form> \ No newline at end of file diff --git a/ckanext/odsh/templates/package/snippets/resource_form.html b/ckanext/odsh/templates/package/snippets/resource_form.html index fb3f99da26600dad2dde9bea8327f385ae176a6c..5adc1346d6032eeb8a1feb4a8d50a982772abe7e 100644 --- a/ckanext/odsh/templates/package/snippets/resource_form.html +++ b/ckanext/odsh/templates/package/snippets/resource_form.html @@ -6,7 +6,8 @@ {% set action = form_action or h.url_for('resource.new', id=pkg_name) %} <form id="resource-edit" class="dataset-form dataset-resource-form {%if(data)%}resource-edit-form{%endif%}" method="post" action="{{ action }}" data-module="basic-form resource-form" enctype="multipart/form-data" novalidate> - {% block stages %} + {{ h.csrf_input() }} + {% block stages %} <div class='search-form'> <h2>{{ _('odsh Create Dataset') }}</h2> </div> diff --git a/ckanext/odsh/templates/package/snippets/resource_info.html b/ckanext/odsh/templates/package/snippets/resource_info.html index f36357975003a37c901716a755f2c20f528b3b11..f3728fc76a503d3088cacf309859aada6fad4087 100644 --- a/ckanext/odsh/templates/package/snippets/resource_info.html +++ b/ckanext/odsh/templates/package/snippets/resource_info.html @@ -9,22 +9,22 @@ Example: #} <div class="module context-info"> - <div class="module-content"> - <div class="info-detail"> - <div>{{ _('dataset') }}:</div> - {{ h.dataset_display_name(pkg) }} - </div> - <div class="info-detail"> - <div>{{ _('Name Resource') }}:</div> - {{ res.name }} - </div> - <div class="info-detail"> - <div>{{ _('Resource count') }}:</div> - {{ pkg.resources|count}} - </div> - <div class="info-detail"> - <div>{{ _('Format') }}:</div> - <div class="label dataformat-label">{{res.format}}</div> - </div> + <div class="module-content"> + <div class="info-detail"> + <div>{{ _('dataset') }}:</div> + <span property="dc:title">{{ h.dataset_display_name(pkg) }}</span> </div> + <div class="info-detail"> + <div>{{ _('Name Resource') }}:</div> + {{ res.name }} + </div> + <div class="info-detail"> + <div>{{ _('Resource count') }}:</div> + {{ pkg.resources|count}} + </div> + <div class="info-detail"> + <div>{{ _('Format') }}:</div> + <div class="badge badge-default dataformat-label" property="dc:format">{{res.format}}</div> + </div> + </div> </div> \ No newline at end of file diff --git a/ckanext/odsh/templates/package/snippets/resource_item.html b/ckanext/odsh/templates/package/snippets/resource_item.html index b6f438c0499de0ff52cbaed5d1eb8671582f166a..7f2e42385c9f1772c29b0b762b8bb74820a62f6a 100644 --- a/ckanext/odsh/templates/package/snippets/resource_item.html +++ b/ckanext/odsh/templates/package/snippets/resource_item.html @@ -6,63 +6,51 @@ {% set rtitle=h.resource_display_name(res) if res.name else ' '%} {% set resource_size = h.get_resource_size(res) %} -{% set res_format = res.format.replace('_SRVC','') %} +{% set res_format = h.format_resource_format(res.format) %} <li class="resource-item" data-id="{{ res.id }}"> - <div class="resource-title-container"> - <div class="resource-title" title="{{ rtitle }}"> - {% if res.name %} - <a href="{{ download }}"> - {{ h.resource_display_name(res) }} - </a> - {% endif %} - {% if resource_size %} - <p>{{ _('File size') }}: {{ resource_size }}</p> - {% endif %} - {% set number_of_pages = res.get('number_of_pages') %} - {% if number_of_pages%} - <p>{{ _('Number of pages') }}: {{ number_of_pages }}</p> - {% endif %} - </div> - <div class="resource-icons"> - {% block resource_item_explore_links %} - <a href="{{ download }}" aria-label="{{ _('download file') }}"> - <div aria-hidden="true" class="icon icon-download"></div> - </a> - {% if can_edit %} - <a href="{{ h.url_for('resource.edit', id=pkg.name, resource_id=res.id) }}"> - <div class="icon icon-edit"></div> - </a> - {% endif %} - {% endblock %} - </div> - {% if res_format %} - <a href="{{ download }}" > - <div class="dataformat-label resource-dataformat-label label" style='font-size:{{150/(res_format|length)}}px'>{{res_format}}</div> - </a> - {% endif %} + <div class="resource-title-container"> + <div class="resource-title" title="{{ rtitle }}"> + {% if res.name %} + <a href="{{ download }}" title="{{ res.name }}"> + {{ h.resource_display_name(res) | truncate(50) }} + </a> + {% endif %} </div> -</li> - - <!-- </div> - <div class="row resource-description-container"> - </div> - <div class="resource-icons"> + {% block resource_item_description %} + <div class="resource-description"> + {% if res.description %} + <p class="description"> + {{ h.markdown_extract(res.description, extract_length=100) }} + </p> + {% endif %} + {% if resource_size %} + <p>{{ _('File size') }}: {{ resource_size }}</p> + {% endif %} + {% set number_of_pages = res.get('number_of_pages') %} + {% if number_of_pages%} + <p>{{ _('Number of pages') }}: {{ number_of_pages }}</p> + {% endif %} + </div> + {% endblock %} + <div class="resource-icons"> + {% block resource_item_explore_links %} <a href="{{ download }}" aria-label="{{ _('download file') }}"> <div aria-hidden="true" class="icon icon-download"></div> </a> {% if can_edit %} - <a href="{{ h.url_for('resource.edit', id=pkg.name, resource_id=res.id) }}"> - <div class="icon icon-edit"></div> - </a> + <a href="{{ h.url_for('resource.edit', id=pkg.name, resource_id=res.id) }}"> + <div class="icon icon-edit"></div> + </a> {% endif %} - </div> - <div> - - - </div> - </div> + {% endblock %} </div> + {% if res_format %} + <a href="{{ download }}"> + <div class="badge badge-default dataformat-label resource-dataformat-label" property="dc:format" + data-format="{{ res.format.lower() or 'data' }}" style='font-size:{{150/(res_format|length)}}px'>{{ res_format + }}</div> + </a> + {% endif %} </div> - -</li> --> +</li> diff --git a/ckanext/odsh/templates/package/snippets/resources_list.html b/ckanext/odsh/templates/package/snippets/resources_list.html index d349f0da36256b548788c56504e59f413bcd4065..e67668171e41f165fab8bf217d0a67c4bd4eeed2 100644 --- a/ckanext/odsh/templates/package/snippets/resources_list.html +++ b/ckanext/odsh/templates/package/snippets/resources_list.html @@ -23,12 +23,12 @@ Example: </ul> {% else %} {% if h.check_access('resource_create', {'package_id': pkg['id']}) %} - {% trans url=h.url_for('resource.new', id=pkg.name) %} - <p class="empty">This dataset has no data, <a href="{{ url }}">why not add some?</a></p> - {% endtrans %} + {% trans url=h.url_for('resource.new', id=pkg.name) %} + <p class="empty">This dataset has no data, <a href="{{ url }}">why not add some?</a></p> + {% endtrans %} {% else %} - <p class="empty">{{ _('This dataset has no data') }}</p> + <p class="empty">{{ _('This dataset has no data') }}</p> {% endif %} {% endif %} - {% endblock %} + {% endblock %} </section> diff --git a/ckanext/odsh/templates/page.html b/ckanext/odsh/templates/page.html index 4c7c78fdede177e26a991494e4c43538bdd013a2..e761bb02ccf3b0af92ffe2f6aeb986169bfec04e 100644 --- a/ckanext/odsh/templates/page.html +++ b/ckanext/odsh/templates/page.html @@ -1,76 +1,74 @@ {% ckan_extends %} {% block skip %} - <a class="skip-link" href="#content"> - Zum Inhalt springen. - </a> + <a class="skip-link" href="#content"> + {{ _('Skip to content.') }} + </a> {% endblock skip %} {%- block content %} -<div class="blur-layer"></div> -{% block maintag %}<div role="main">{% endblock %} + <div class="blur-layer"></div> + {% block maintag %}<div role="main">{% endblock %} - <div id="content" class="container"> - {% if h.odsh_show_testbanner() %} -<div id="testsystem"> - <p>TESTSYSTEM</p> -</div> -{% endif %} - {% block main_content %} + <div id="content" class="container"> + {% if h.odsh_show_testbanner() %} + <div id="testsystem"> + <p>TESTSYSTEM</p> + </div> + {% endif %} + {% block main_content %} - {% block flash %} - {{ super() }} + {% block flash %} + {{ super() }} - {% if not request.referrer or not request.referrer.startswith(h.odsh_public_url()) %} - <div class="alert alert-info" role="alert"> + {% if not request.referrer or not request.referrer.startswith(h.odsh_public_url()) %} + <div class="alert alert-info alert-dismissible fade show" role="alert"> + <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button> + <span aria-hidden="true"></span> + </button> + <h4 class="alert-heading">Evaluation des Offene-Daten-Gesetzes (ODaG)</h4> + <p>Für die Evaluation des Offene-Daten-Gesetzes (ODaG) lassen wir eine Umfrage zur Nutzung des Open-Data-Portals durchführen. Wir würden uns freuen, wenn möglichst viele Nutzerinnen und Nutzer an der Umfrage teilnehmen würden:</p> + <p style="margin-top: 15px;"> + <a href="https://insight.uni-speyer.de/ODSH/" class="btn">zum Fragebogen</a><br> + <small>(extern beim Deutschen Forschungsinstitut für öffentliche Verwaltung Speyer).</small> + </p> + </div> + {% endif %} - <button type="button" class="close" data-dismiss="alert" aria-label="Close"> - <span aria-hidden="true">×</span> - </button> - <h4 class="alert-heading">Evaluation des Offene-Daten-Gesetzes (ODaG)</h4> - <p>Für die Evaluation des Offene-Daten-Gesetzes (ODaG) lassen wir eine Umfrage zur Nutzung des Open-Data-Portals durchführen. Wir würden uns freuen, wenn möglichst viele Nutzerinnen und Nutzer an der Umfrage teilnehmen würden:</p> - <p style="margin-top: 15px;"> - <a href="https://insight.uni-speyer.de/ODSH/" class="btn">zum Fragebogen</a><br> - <small>(extern beim Deutschen Forschungsinstitut für öffentliche Verwaltung Speyer).</small> - </p> - - </div> - {% endif %} + {% endblock %} - {% endblock %} + {% block toolbar %} + {{ super() }} + {% endblock %} - {% block toolbar %} - {{ super() }} - {% endblock %} + <div class="row wrapper{% block wrapper_class %}{% endblock %}{% if self.secondary()|trim == '' %} no-nav{% endif %} is-table-row"> + {# + The pre_primary block can be used to add content to before the + rendering of the main content columns of the page. + #} + {% block pre_primary %} + {% endblock %} - <div class="row wrapper{% block wrapper_class %}{% endblock %}{% if self.secondary()|trim == '' %} no-nav{% endif %} is-table-row"> - {# - The pre_primary block can be used to add content to before the - rendering of the main content columns of the page. - #} - {% block pre_primary %} - {% endblock %} + {% block secondary %} + <aside class="secondary span3"> + {% block secondary_content %} + {{ super() }} + {% endblock %} + </aside> + {% endblock %} - {% block secondary %} - <aside class="secondary span3"> - {% block secondary_content %} - {{ super() }} - {% endblock %} - </aside> - {% endblock %} + {% block primary %} + <div class="primary span9"> + {% block primary_content %} + {{ super() }} + {% endblock %} + </div> + {% endblock %} - {% block primary %} - <div class="primary span9"> - {% block primary_content %} - {{ super() }} + </div> + {% block pre_wrap %} {% endblock %} - </div> {% endblock %} - </div> - {% block pre_wrap %} - {% endblock %} - {% endblock %} </div> -</div> {% endblock -%} \ No newline at end of file diff --git a/ckanext/odsh/templates/qa/stars.html b/ckanext/odsh/templates/qa/stars.html index f241255d53a5cad93c92a34ca2868fb5cdff9f36..d36359a85be95b7b9359b363574be1f145d19bdc 100644 --- a/ckanext/odsh/templates/qa/stars.html +++ b/ckanext/odsh/templates/qa/stars.html @@ -12,32 +12,32 @@ reason - A reason why the dataset doesn't have a rating. {% set texts=[_('OL = open licence'), _('RE = machine readable'), _('OF = open format'), _('URI = uses URIs'), _('LD = Linked Data')] %} <span class="star-rating{% if stars == 0 %} no-stars{% endif %}"> {%- if stars == None -%} - {{ reason }} + {{ reason }} {%- else -%} - <span class="star-rating-stars"> - {%- for index in range(stars) -%} - <div class='odsh-star-wrap'> - <a tabindex="0" data-module="odsh_popover" data-module-text='{{texts[index]}}' role="button" data-toggle="popover" data-trigger="focus" class="odsh-star"> - <img src='/base/images/opendata-{{index+1}}.svg' alt="{{texts[index]}}"/> - </a> - </div> - {%- endfor -%} - {%- for index in range(5-stars) -%} - <div class='odsh-star-wrap'> - <img src='/base/images/opendata-empty.svg' alt=""/> - </div> - {%- endfor -%} - {%- if stars == 0 -%} - {# 0 stars looks awfully like 5 stars, so be explicit #} - {# {{ _("{0} out of {1}").format(stars, 5) }} #} - {%- endif -%} - </span> + <span class="star-rating-stars"> + {%- for index in range(stars) -%} + <div class='odsh-star-wrap'> + <a tabindex="0" data-module="odsh_popover" data-module-text='{{texts[index]}}' role="button" data-toggle="popover" data-trigger="focus" class="odsh-star"> + <img src='/base/images/opendata-{{index+1}}.svg' alt="{{texts[index]}}"/> + </a> + </div> + {%- endfor -%} + {%- for index in range(5-stars) -%} + <div class='odsh-star-wrap'> + <img src='/base/images/opendata-empty.svg' alt=""/> + </div> + {%- endfor -%} + {%- if stars == 0 -%} + {# 0 stars looks awfully like 5 stars, so be explicit #} + {# {{ _("{0} out of {1}").format(stars, 5) }} #} + {%- endif -%} + </span> {%- endif -%} - <div class='odsh-star-wrap'> - <a tabindex="0" data-module="odsh_popover" data-module-trigger='custom' data-module-text="{{stars}} {{ _('Sterne') }}{{short_texts[stars]}}<br><a target='_blank' href='https://5stardata.info/de/'>{{ _('5-Sterne-Modell für Offene Daten') }}</a>" role="button" data-toggle="popover" data-trigger="focus" class="odsh-star"> - <i class="fa fa-info odsh-star-info"></i> - </a> - </div> + <div class='odsh-star-wrap'> + <a tabindex="0" data-module="odsh_popover" data-module-trigger='custom' data-module-text="{{stars}} {{ _('Stars') }}{{short_texts[stars]}}<br><a target='_blank' href='https://5stardata.info/de/'>{{ _('5-Star Model for Open Data') }}</a>" role="button" data-toggle="popover" data-trigger="focus" class="odsh-star"> + <i class="fa fa-info odsh-star-info"></i> + </a> + </div> </span> {% block scripts %} diff --git a/ckanext/odsh/templates/snippets/custom_search_form.html b/ckanext/odsh/templates/snippets/custom_search_form.html deleted file mode 100644 index 7e74adafdeb88625fedab32ff146d6a5dcf8e206..0000000000000000000000000000000000000000 --- a/ckanext/odsh/templates/snippets/custom_search_form.html +++ /dev/null @@ -1,26 +0,0 @@ -{% extends "snippets/search_form.html" %} - -{% block search_title %} - - <h2> - {% set text_query = ungettext('{number} data request found for "{query}"', '{number} data requests found for "{query}"', count) %} - {% set text_query_none = _('No data requests found for "{query}"') %} - {% set text_no_query = ungettext('{number} data proposal found', '{number} data proposals found', count) %} - {% set text_no_query_none = _('No data proposal found') %} - - {% if query %} - {%- if count -%} - {{ text_query.format(number=h.localised_number(count), query=query) }} - {%- else -%} - {{ text_query_none.format(query=query) }} - {%- endif -%} - {%- else -%} - {%- if count -%} - {{ text_no_query.format(number=h.localised_number(count)) }} - {%- else -%} - {{ text_no_query_none }} - {%- endif -%} - {%- endif -%} - </h2> - -{% endblock %} \ No newline at end of file diff --git a/ckanext/odsh/templates/snippets/dataset_map.html b/ckanext/odsh/templates/snippets/dataset_map.html index 1e4ad4fb48863ed17202cbaf81d7acd467a1b7f2..3d99f307bdb7fea6f3aaf0b9eaac683b6ac32c4e 100644 --- a/ckanext/odsh/templates/snippets/dataset_map.html +++ b/ckanext/odsh/templates/snippets/dataset_map.html @@ -4,7 +4,7 @@ {% set map_config = h.get_common_map_config() %} {% set x=map_config.__setitem__("height", "10px") %} -<div class="dataset-map" data-module="dataset-map" data-extent="{{ extent }}" data-module-site_url="{{ h.dump_json(h.url('/', locale='default', qualified=true)) }}" data-module-map_config="{{ h.dump_json(map_config) }}"> +<div class="dataset-map" data-module="dataset-map" data-extent="{{ extent }}" data-module-site_url="{{ h.dump_json(h.url_for('home.index', locale='default', qualified=true)) }}" data-module-map_config="{{ h.dump_json(map_config) }}"> <div id="dataset-map-container"></div> <div id="dataset-map-attribution"> {% snippet "spatial/snippets/map_attribution.html", map_config=map_config %} diff --git a/ckanext/odsh/templates/snippets/facet_list.html b/ckanext/odsh/templates/snippets/facet_list.html index 17531a4884925b89173a02aebf0c20109933daba..8e6e5cc1973643f9eb894ecc4873c0aced24cbc6 100644 --- a/ckanext/odsh/templates/snippets/facet_list.html +++ b/ckanext/odsh/templates/snippets/facet_list.html @@ -6,8 +6,8 @@ {% endblock %} {% block facet_list_items %} -{# {% with items = items or h.get_facet_items_dict(name,20) %} #} -{% with items = items or h.odsh_get_facet_items_dict(name)|selectattr('count')|list %} +{# {% with items = items or h.get_facet_items_dict(name, search_facets, 20) %} #} +{% with items = items or h.odsh_get_facet_items_dict(name, search_facets)|selectattr('count')|list %} {% if items %} <nav> {% set title = title or h.get_facet_title(name) %} @@ -22,7 +22,7 @@ {% set label = _(label)%} {% endif%} {% set count = count_label(item['count']) if count_label else ('%d' % item['count']) %} - {% set label_truncated = h.truncate(label, 25) if not label_function else label %} + {% set label_truncated = label|truncate(25) if not label_function else label %} <li class="{{ nav_item_class or 'nav-item' }}"> <div class="facet_label"> {# TODO: checkbox-id vereinheitlichen (code-duplikation) und sicher gegen Titel mit Leerzeichen machen! #} @@ -61,17 +61,17 @@ </nav> <div class="module-footer"> - {% if not name=='groups' %} + {% if not name=='groups' %} {% if h.get_param_int('_%s_limit' % name) %} - {% if h.odsh_has_more_facets(name) %} - <a href="{{ h.remove_url_param('_%s_limit' % name, replace=0, extras=extras, alternative_url=alternative_url) }}" + {% if h.odsh_has_more_facets(name, search_facets) %} + <a href="{{ h.remove_url_param('_%s_limit' % name, replace=0, extras=extras, alternative_url=alternative_url) }}" class="read-more">> {{ _('Show More') }}</a> - {% endif %} + {% endif %} {% else %} - <a href="{{ h.remove_url_param('_%s_limit' % name, extras=extras, alternative_url=alternative_url) }}" class="read-more">> {{ + <a href="{{ h.remove_url_param('_%s_limit' % name, extras=extras, alternative_url=alternative_url) }}" class="read-more">> {{ _('Show Less')}}</a> {% endif %} - {% endif %} + {% endif %} </div> {% else %} diff --git a/ckanext/odsh/templates/snippets/home_breadcrumb_item.html b/ckanext/odsh/templates/snippets/home_breadcrumb_item.html index 7631991a8f5af79049b34ee308827ade14c6a421..866c900748c7ea5f3c5ae0c21d8288bc671901c5 100644 --- a/ckanext/odsh/templates/snippets/home_breadcrumb_item.html +++ b/ckanext/odsh/templates/snippets/home_breadcrumb_item.html @@ -1,6 +1,6 @@ {# Used to insert the home icon into a breadcrumb #} <li class="home"> - <a href="{{ h.url_for('home') }}"> + <a href="{{ h.url_for('home.index') }}"> <img class='icon-home' src='/base/images/Icon-Home.png' alt='home icon' /> <span> {{_('Home') }}</span> </a> diff --git a/ckanext/odsh/templates/snippets/organization.html b/ckanext/odsh/templates/snippets/organization.html index 86e9203407ce2d9c79d58d40c9040059232172ce..94fa411469b58aea0e887416422feb29a46bc420 100644 --- a/ckanext/odsh/templates/snippets/organization.html +++ b/ckanext/odsh/templates/snippets/organization.html @@ -18,99 +18,99 @@ Example: {% block info %} <div class="module module-narrow module-shallow context-info"> - {% block heading %} + {% block heading %} <h1 class="heading">{{ organization.title or organization.name }} - {% if organization.state == 'deleted' %} + {% if organization.state == 'deleted' %} [{{ _('Deleted') }}] - {% endif %} + {% endif %} </h1> - {% endblock heading%} - <section id="section-org" class="module-content"> - {% block inner %} - {% block image %} + {% endblock heading%} + <section id="section-org" class="module-content"> + {% block inner %} + {% block image %} <div class="image"> - <img src="{{ organization.image_display_url or h.url_for_static('/base/images/placeholder-organization.png') }}" - width="200" alt="{{ organization.name }}" /> + <img src="{{ organization.image_display_url or h.url_for_static('/base/images/placeholder-organization.png') }}" + width="200" alt="{{ organization.name }}" /> </div> <div class="information-organisation"> - {% set address = h.get_address_org(organization) %} - {% set street = address.get('street') %} - {% set location = address.get('location') %} - {% set mail = address.get('mail') %} - {% set telephone = address.get('telephone') %} - {% set web = address.get('web') %} - - {% if person %} + {% set address = h.get_address_org(organization) %} + {% set street = address.get('street') %} + {% set location = address.get('location') %} + {% set mail = address.get('mail') %} + {% set telephone = address.get('telephone') %} + {% set web = address.get('web') %} + + {% if person %} <p> - {{ person }} + {{ person }} </p> - {% endif %} {# person #} + {% endif %} {# person #} - {% if street and location %} + {% if street and location %} <p>{{ street }}</p> <p>{{ location }}</p> - {% endif %} {# street and location #} - - {% if mail %} + {% endif %} {# street and location #} + + {% if mail %} {% if package %} - {% set package_name = package.get('name') %} - {% set betreff = "Open-Data-Portal Datensatz: "+ package_name%} - {% set body_mail = h.get_body_mail(organization, package) %} - {% else %} - {% set betreff = "Transparenzportal" %} + {% set package_name = package.get('name') %} + {% set betreff = "Open-Data-Portal Datensatz: "+ package_name%} + {% set body_mail = h.get_body_mail(organization, package) %} + {% else %} + {% set betreff = "Transparenzportal" %} {% endif %} {# package #} <p> - <a href="mailto:{{ mail }}?subject={{betreff}}&body={{body_mail}}Viele Grüße">{{ mail }}</a> + <a href="mailto:{{ mail }}?subject={{betreff}}&body={{body_mail}}Viele Grüße">{{ mail }}</a> </p> - {% endif %} {# mail #} + {% endif %} {# mail #} - {% if telephone %} + {% if telephone %} <p class="phone"> - {{ telephone }} + {{ telephone }} </p> - {% endif %} {# telephone #} - - {% if web %} + {% endif %} {# telephone #} + + {% if web %} <p> - <a href="{{address.web}}">{{ address.web }}</a> + <a href="{{address.web}}">{{ address.web }}</a> </p> - {% endif %} {# web #} + {% endif %} {# web #} </div> - {% endblock image%} + {% endblock image%} - {% if not hide_description %} + {% if not hide_description %} {% block description %} - {% if organization.description %} - <p> - {{ h.markdown_extract(organization.description, 180) }} - {% link_for _('read more'), named_route='organization.about', id=organization.name %} - </p> - {% else %} - <p class="empty">{{ _('There is no description for this organization') }}</p> - {% endif %} + {% if organization.description %} + <p> + {{ h.markdown_extract(organization.description, 180) }} + {% link_for _('read more'), named_route='organization.about', id=organization.name %} + </p> + {% else %} + <p class="empty">{{ _('There is no description for this organization') }}</p> + {% endif %} {% endblock description %} - {% endif %} - {% if show_nums %} + {% endif %} + {% if show_nums %} {% block nums %} - <div class="nums"> + <div class="nums"> <dl> - <dt>{{ _('Followers') }}</dt> - <dd>{{ h.SI_number_span(organization.num_followers) }}</dd> + <dt>{{ _('Followers') }}</dt> + <dd>{{ h.SI_number_span(organization.num_followers) }}</dd> </dl> <dl> - <dt>{{ _('Documents') }}</dt> - <dd>{{ h.SI_number_span(organization.package_count) }}</dd> + <dt>{{ _('Documents') }}</dt> + <dd>{{ h.SI_number_span(organization.package_count) }}</dd> </dl> - </div> + </div> {% endblock nums%} {% block follow %} - <div class="follow_button"> + <div class="follow_button"> {{ h.follow_button('group', organization.id) }} - </div> + </div> {% endblock follow %} - {% endif %} - {% endblock inner %} - </section> + {% endif %} + {% endblock inner %} + </section> </div> {% endblock %} diff --git a/ckanext/odsh/templates/snippets/package_item.html b/ckanext/odsh/templates/snippets/package_item.html index 2711197d823774890cbce304f3842b9efec2761d..f708758ef23fd045487a1fc65d8f8f8ff13fccf7 100644 --- a/ckanext/odsh/templates/snippets/package_item.html +++ b/ckanext/odsh/templates/snippets/package_item.html @@ -32,10 +32,10 @@ Example: {% set thumbnail = package.get('thumbnail') %} {% block package_item %} -<div class="odsh-dataset-item"> + <div class="odsh-dataset-item"> {% block content %} <div class="dataset-content"> - {% block heading %} + {% block heading %} {% if package.get('type') == 'collection' %} <div class='package-info-pill purple'> {{ _('Data series') }} @@ -62,23 +62,25 @@ Example: <h3 class="dataset-heading"> {% block heading_private %} {% if package.is_new %} - <span class='label new-dataset-label'>{{ _('NEW') }}</span> + <span class='badge new-dataset-label'>{{ _('NEW') }}</span> {% endif %} {% if package.private %} - <span class="dataset-private label label-inverse"> + <span class="dataset-private badge bg-secondary"> <i class="fa fa-lock"></i> {{ _('Private') }} </span> {% endif %} {% endblock heading_private %} {% block heading_title %} - {{ h.link_to(h.truncate(title, truncate_title), h.url_for('%s.read' % package.type, id=package.name),title=_('View {organization_name}').format(organization_name=title))}} + <a href="{{ h.url_for('%s.read' % package.type, id=package.name) }}"> + {{ title|truncate(80) }} + </a> {% endblock heading_title %} {% block heading_meta %} {% if package.get('state', '').startswith('draft') %} - <span class="label label-info">{{ _('Draft') }}</span> + <span class="badge bg-info">{{ _('Draft') }}</span> {% elif package.get('state', '').startswith('deleted') %} - <span class="label label-important">{{ _('Deleted') }}</span> + <span class="badge bg-danger">{{ _('Deleted') }}</span> {% endif %} {{ h.popular('recent views', package.tracking_summary.recent, min=10) if package.tracking_summary }} {% endblock heading_meta %} @@ -117,35 +119,35 @@ Example: <div class='dataset-spacer'></div> - <div class="dataset-meta"> - {% block resources %} - {% block resources_outer %} - {% if package.resources and not hide_resources %} - <ul class="dataset-resources"> - {% block resources_inner %} - {% for resource in h.dict_list_reduce(package.resources, 'format') %} - <li> - <a href="{{ h.url_for(package.type ~ '.read', id=package.name) }}" class="label dataformat-label" - data-format="{{ resource.lower().replace('_srvc','') }}">{{ - resource.replace('_SRVC','') }}</a> - </li> - {% endfor %} - {% endblock %} - </ul> - {% endif %} - <div class="dataset-stars"> - {% if stars>-1%} - {% snippet "qa/stars.html", stars=stars %} - {% endif %} - </div> + <div class="dataset-meta"> + {% block resources %} + {% block resources_outer %} + {% if package.resources and not hide_resources %} + <ul class="dataset-resources"> + {% block resources_inner %} + {% for resource in h.dict_list_reduce(package.resources, 'format') %} + <li> + <a href="{{ h.url_for(package.type ~ '.read', id=package.name) }}" class="badge badge-default dataformat-label" + data-format="{{ h.format_resource_format(resource).lower() }}"> + {{ h.format_resource_format(resource) }} + </a> + </li> + {% endfor %} + {% endblock %} + </ul> + {% endif %} + <div class="dataset-stars"> + {% if stars>-1%} + {% snippet "qa/stars.html", stars=stars %} + {% endif %} + </div> - <div class="dataset-info issued"> - <p>{{ _('Issued') }}: {{issued}} </p> + <div class="dataset-info issued"> + <p>{{ _('Issued') }}: {{issued}} </p> + </div> + {% endblock %} + {% endblock %} </div> - {% endblock %} - {% endblock %} - </div> - {% endblock content %} -</div> + </div> {% endblock package_item %} diff --git a/ckanext/odsh/templates/snippets/search_box.html b/ckanext/odsh/templates/snippets/search_box.html index 912eac5ca451697e2b06c4c616f283ad5a659c6a..bd4f4974a358e5fe9c1b3c5ed41160ad46485e33 100644 --- a/ckanext/odsh/templates/snippets/search_box.html +++ b/ckanext/odsh/templates/snippets/search_box.html @@ -1,16 +1,9 @@ <div class='search-box-container'> - <div class='search-box'> - <div class="field search-field"> - <input - aria-label="{{ _('Enter search query for datasets') }}" - id="field-sitewide-search" - class="search" - type="text" - value="{{c.q}}" - name="q" - placeholder="{{ _('Search dataset') }}" - /> - <button class="btn-search" type="submit" aria-label="{{ _('Search dataset') }}"></button> - </div> + <div class='search-box'> + <div class="field search-field"> + <input id="field-sitewide-search" class="search" + type="text" value="{{ query }}" name="q" placeholder="{{ _('Search dataset') }}" aria-label="{{ _('Search dataset') }}" /> + <button class="btn-search" type="submit" aria-label="{{ _('Search') }}"></button> </div> + </div> </div> \ No newline at end of file diff --git a/ckanext/odsh/templates/snippets/search_form.html b/ckanext/odsh/templates/snippets/search_form.html index 09b45a2367039960fc17adf5ae164d46366cf7aa..58616f00ebb0d5b9fe1419d3e60520fa48ad8ce5 100644 --- a/ckanext/odsh/templates/snippets/search_form.html +++ b/ckanext/odsh/templates/snippets/search_form.html @@ -3,22 +3,20 @@ {% set placeholder = placeholder if placeholder else _('Search datasets...') %} {% set sorting_label_prefix = _('Order by') %} {% if type=='organization' %} -{% set sorting = sorting if sorting else [(_('Name Ascending'), 'name asc'), (_('Name Descending'), 'name desc')] %} -{% elif type=='datarequest' %} -{% set sorting = [(_('Date Ascending'), 'asc'), (_('Date Descending'), 'desc')] %} + {% set sorting = sorting if sorting else [(_('Name Ascending'), 'name asc'), (_('Name Descending'), 'name desc')] %} {% else %} -{% set sorting = [ - (_('Relevance'), 'score desc, metadata_modified desc'), - (_('Name Ascending'), 'title_string asc'), - (_('Name Descending'), 'title_string desc'), - (_('Issued Ascending'), 'extras_issued asc'), - (_('Issued Descending'), 'extras_issued desc'), - (_('Start Date Ascending'), 'temporal_start asc'), - (_('Start Date Descending'), 'temporal_start desc'), - (_('End Date Ascending'), 'temporal_end asc'), - (_('End Date Descending'), 'temporal_end desc'), - (_('Popular'), 'views_recent desc') if g.tracking_enabled else (false, false) ] - %} + {% set sorting = [ + (_('Relevance'), 'score desc, metadata_modified desc'), + (_('Name Ascending'), 'title_string asc'), + (_('Name Descending'), 'title_string desc'), + (_('Issued Ascending'), 'extras_issued asc'), + (_('Issued Descending'), 'extras_issued desc'), + (_('Start Date Ascending'), 'temporal_start asc'), + (_('Start Date Descending'), 'temporal_start desc'), + (_('End Date Ascending'), 'temporal_end asc'), + (_('End Date Descending'), 'temporal_end desc'), + (_('Popular'), 'views_recent desc') if g.tracking_enabled else (false, false) ] + %} {% endif %} {% set search_class = search_class if search_class else 'search-giant' %} {% set no_bottom_border = no_bottom_border if no_bottom_border else false %} @@ -26,176 +24,176 @@ <form {% if form_id %}id="{{ form_id }}" {% endif %}class="search-form{% if no_bottom_border %} no-bottom-border{% endif %}" method="get" data-module="select-switch"> - {% block search_input %} - {% endblock %} + {% block search_input %} + {% endblock %} - {% block search_search_fields %} + {% block search_search_fields %} {% if fields -%} - <span>{{ form.hidden_from_list(fields=fields) }}</span> + <span>{{ form.hidden_from_list(fields=fields) }}</span> {%- endif %} - {% endblock %} + {% endblock %} - {% block search_title %} + {% block search_title %} {% if not error %} - {% if force_title %} - <h2>{{force_title }}</h2> + {% if force_title %} + <h2>{{force_title }}</h2> + {% else %} + <h2>{% snippet 'snippets/search_result_text.html', query=query, count=count, type=type %}</h2> + {% if type == 'dataset' %} + <a href={{h.remove_url_param([''], controller='feeds', action='custom') }} title="{{ _('rss feeds') }}" aria-label="{{ _('rss feeds') }}"> + <i aria-hidden="true" class="fa fa-solid fa-rss"></i> + </a> + {%- endif -%} + {% endif %} {% else %} - <h2>{% snippet 'snippets/search_result_text.html', query=query, count=count, type=type %}</h2> - {% if type == 'dataset' %} - <a aria-label="{{ _('rss feeds') }}" href={{h.remove_url_param([''], controller='feeds', action='custom') }}> - <i aria-hidden="true" class="fa fa-solid fa-rss"></i> - </a> - {%- endif -%} + <h2>{{ _('Error') }}</h2> {% endif %} - {% else %} - <h2>Error</h2> - {% endif %} - {% endblock %} + {% endblock %} - {% block search_sortby %} + {% block search_sortby %} {% if sorting %} - <div class="form-select control-group control-order-by"> - <select id="field-order-by" name="sort" aria-label="{{sorting_label_prefix}} …"> - {% for label, value in sorting %} + <div class="form-group control-order-by"> + <select id="field-order-by" name="sort" aria-label="{{ sorting_label_prefix }} …"> + {% for label, value in sorting %} {% if label and value %} - <option value="{{ value }}" {% if sorting_selected==value %} selected="selected" {% endif %}> - {{sorting_label_prefix}} {{ label }}</option> + <option value="{{ value }}"{% if sorting_selected==value %} selected="selected" {% endif %}> + {{ sorting_label_prefix }} {{ label }}</option> {% endif %} - {% endfor %} + {% endfor %} </select> {% block search_sortby_button %} - <button class="btn btn-default js-hide" type="submit">{{ _('Go') }}</button> + <button class="btn btn-default js-hide" type="submit">{{ _('Go') }}</button> {% endblock %} - </div> + </div> {% endif %} - {% endblock %} + {% endblock %} - {% block search_facets %} + {% block search_facets %} {% if facets and facets.search %} - <p class="filter-list"> + <p class="filter-list"> {% for field in facets.fields %} - {% set search_facets_items = facets.search.get(field)['items'] %} - {% for value in facets.fields[field] %} - <span class="filtered pill"> + {% set search_facets_items = facets.search.get(field)['items'] %} + {% for value in facets.fields[field] %} + <span class="filtered pill"> {% if(field=='openness')%} - {{_(value)}} + {{_(value)}} {%- else -%} - {%- if facets.translated_fields and facets.translated_fields.has_key((field,value)) -%} + {%- if facets.translated_fields and facets.translated_fields.has_key((field,value)) -%} {{ facets.translated_fields[(field,value)] }} - {%- else -%} + {%- else -%} {{ h.list_dict_filter(search_facets_items, 'name', 'display_name', value) }} {#{{_(value)}}#} - {%- endif %} - {%- endif %} - <a - href="{{ facets.remove_field(field, value) }}" - class="remove" - aria-label="{{ _('Remove filters') }}" - title="{{ _('Remove filters') }}" - > - <i class="fa fa-times" aria-hidden="true"></i> - </a> - </span> - {% endfor %} + {%- endif %} + {%- endif %} + <a + href="{{ facets.remove_field(field, value) }}" + class="remove" + aria-label="{{ _('Remove filters') }}" + title="{{ _('Remove filters') }}" + > + <i class="fa fa-times" aria-hidden="true"></i> + </a> + </span> + {% endfor %} {% endfor %} - </p> - <!-- <a class="show-filters btn">{{ _('Filter Results') }}</a> --> - {% else%} - {% if always_show_filter_list%} - <p class="filter-list"></p> - {% endif %} - {% endif %} - <div id="datesearch-filter"> + </p> + <!-- <a class="show-filters btn">{{ _('Filter Results') }}</a> --> + {% else%} + {% if always_show_filter_list%} + <p class="filter-list"></p> + {% endif %} + {% endif %} + <div id="datesearch-filter"> {%set start_date=h.odsh_render_datetime(request.args.get('ext_startdate'), False)%} {%set end_date=h.odsh_render_datetime(request.args.get('ext_enddate'), False)%} {%- set start_error = start_date == '' and request.args.get('ext_startdate')-%} {%- set end_error = end_date == '' and request.args.get('ext_enddate')-%} {% if start_date or end_date or start_error or end_error%} <p class="filter-list"> - {% if start_date and not start_error%} + {% if start_date and not start_error%} <span class="filtered pill"> - {{_('daterange')}}: {{_('from')}} {{ start_date}} - <a - href="{{ h.remove_url_param('ext_startdate') }}" - class="remove" - aria-label="{{ _('Remove filters') }}" - title="{{ _('Remove filters') }}" - > + {{_('daterange')}}: {{_('from')}} {{ start_date}} + <a + href="{{ h.remove_url_param('ext_startdate') }}" + class="remove" + aria-label="{{ _('Remove filters') }}" + title="{{ _('Remove filters') }}" + > <i class="fa fa-times" aria-hidden="true"></i> - </a> + </a> </span> - {% endif %} - {% if start_error %} + {% endif %} + {% if start_error %} <span class="filtered pill error"> {{_('daterange')}}: {{_('wrong_start_date_for_search')}} <a - href="{{ h.remove_url_param('ext_startdate') }}" - class="remove" - aria-label="{{ _('Remove filters') }}" - title="{{ _('Remove filters') }}" + href="{{ h.remove_url_param('ext_startdate') }}" + class="remove" + aria-label="{{ _('Remove filters') }}" + title="{{ _('Remove filters') }}" > - <i class="fa fa-times" aria-hidden="true"></i> + <i class="fa fa-times" aria-hidden="true"></i> </a> </span> - {% endif %} + {% endif %} - {% if end_date and not end_error%} - <span class="filtered pill"> - {{_('daterange')}}: {{_('to')}} {{ end_date}} - <a - href="{{ h.remove_url_param('ext_enddate') }}" - class="remove" - aria-label="{{ _('Remove filters') }}" - title="{{ _('Remove filters') }}" - > - <i class="fa fa-times" aria-hidden="true"></i> + {% if end_date and not end_error%} + <span class="filtered pill"> + {{_('daterange')}}: {{_('to')}} {{ end_date}} + <a + href="{{ h.remove_url_param('ext_enddate') }}" + class="remove" + aria-label="{{ _('Remove filters') }}" + title="{{ _('Remove filters') }}" + > + <i class="fa fa-times" aria-hidden="true"></i> </a> - </span> - {% endif %} - {% if end_error %} - <span class="filtered pill error"> - {{_('daterange')}}: {{_('wrong_end_date_for_search')}} - <a - href="{{ h.remove_url_param('ext_enddate') }}" - class="remove" - aria-label="{{ _('Remove filters') }}" - title="{{ _('Remove filters') }}" - > - <i class="fa fa-times" aria-hidden="true"></i> - </a> - </span> - {% endif %} - </p> + </span> {% endif %} - </div> - <div > - {%set ext_bbox=request.args.get('ext_bbox')%} - {%set ext_prev_extent=request.args.get('ext_prev_extent')%} - {%set ext_location=request.args.get('ext_location')%} - {% if ext_bbox %} - <p class="filter-list"> - <span class="filtered pill"> - {{_('map search active')}} - <a - href="{{ h.remove_url_param(['ext_bbox','ext_prev_extent', 'ext_location'])}}" - class="remove" - aria-label="{{ _('Remove filters') }}" - title="{{ _('Remove filters') }}" - > - <i class="fa fa-times" aria-hidden="true"></i> + {% if end_error %} + <span class="filtered pill error"> + {{_('daterange')}}: {{_('wrong_end_date_for_search')}} + <a + href="{{ h.remove_url_param('ext_enddate') }}" + class="remove" + aria-label="{{ _('Remove filters') }}" + title="{{ _('Remove filters') }}" + > + <i class="fa fa-times" aria-hidden="true"></i> </a> - </span> - </p> + </span> {% endif %} - </div> - {% endblock %} + </p> + {% endif %} + </div> + <div > + {%set ext_bbox=request.args.get('ext_bbox')%} + {%set ext_prev_extent=request.args.get('ext_prev_extent')%} + {%set ext_location=request.args.get('ext_location')%} + {% if ext_bbox %} + <p class="filter-list"> + <span class="filtered pill"> + {{_('map search active')}} + <a + href="{{ h.remove_url_param(['ext_bbox','ext_prev_extent', 'ext_location'])}}" + class="remove" + aria-label="{{ _('Remove filters') }}" + title="{{ _('Remove filters') }}" + > + <i class="fa fa-times" aria-hidden="true"></i> + </a> + </span> + </p> + {% endif %} + </div> +{% endblock %} - </form> +</form> {% if show_empty and count == 0 and not error %} -<p class="extra">{{ _("Please try another search.") }}</p> + <p class="extra">{{ _("Please try another search.") }}</p> {% endif %} {% if error %} -<p id="search-error"><strong>{{ _("There was an error while searching.") }}</strong> {{ _("Please try again.") }}</p> + <p id="search-error"><strong>{{ _("There was an error while searching.") }}</strong> {{ _("Please try again.") }}</p> {% endif %} diff --git a/ckanext/odsh/templates/snippets/search_result_text.html b/ckanext/odsh/templates/snippets/search_result_text.html index cd44abe63cd5f3be1caa86928cedc31bbb0dd5e1..c4b23d4b542d59f590261df9f467eda49cfde7a2 100644 --- a/ckanext/odsh/templates/snippets/search_result_text.html +++ b/ckanext/odsh/templates/snippets/search_result_text.html @@ -12,37 +12,36 @@ Example: #} {% if type == 'dataset' %} -{% set text_query = ungettext('{number} dataset found for "{query}"', '{number} datasets found for "{query}"', count) -%} -{% set text_query_none = _('No datasets found for "{query}"') %} -{% set text_no_query = ungettext('{number} dataset found', '{number} datasets found', count) %} -{% set text_no_query_none = _('No datasets found') %} - -{% elif type == 'group' %} -{% set text_query = ungettext('{number} group found for "{query}"', '{number} groups found for "{query}"', count) %} -{% set text_query_none = _('No groups found for "{query}"') %} -{% set text_no_query = ungettext('{number} group found', '{number} groups found', count) %} -{% set text_no_query_none = _('No groups found') %} + {% set text_query = ungettext('{number} dataset found for "{query}"', '{number} datasets found for "{query}"', count) + %} + {% set text_query_none = _('No datasets found for "{query}"') %} + {% set text_no_query = ungettext('{number} dataset found', '{number} datasets found', count) %} + {% set text_no_query_none = _('No datasets found') %} + + {% elif type == 'group' %} + {% set text_query = ungettext('{number} group found for "{query}"', '{number} groups found for "{query}"', count) %} + {% set text_query_none = _('No groups found for "{query}"') %} + {% set text_no_query = ungettext('{number} group found', '{number} groups found', count) %} + {% set text_no_query_none = _('No groups found') %} {% elif type == 'organization' %} -{% set text_query = ungettext('{number} organization found for "{query}"', '{number} organizations found for -"{query}"', count) %} -{% set text_query_none = _('No organizations found for "{query}"') %} -{% set text_no_query = ungettext('{number} organization found', '{number} organizations found', count) %} -{% set text_no_query_none = _('No organizations found') %} + {% set text_query = ungettext('{number} organization found for "{query}"', '{number} organizations found for + "{query}"', count) %} + {% set text_query_none = _('No organizations found for "{query}"') %} + {% set text_no_query = ungettext('{number} organization found', '{number} organizations found', count) %} + {% set text_no_query_none = _('No organizations found') %} {%- endif -%} {% if query %} -{%- if count -%} -{{ text_query.format(number=h.localised_number(count), query=query) }} - -{%- else -%} -{{ text_query_none.format(query=query) }} -{%- endif -%} + {%- if count -%} + {{ text_query.format(number=h.localised_number(count), query=query) }} + {%- else -%} + {{ text_query_none.format(query=query) }} + {%- endif -%} {%- else -%} -{%- if count and text_no_query -%} -{{ text_no_query.format(number=h.localised_number(count)) }} -{%- else -%} -{{ text_no_query_none }} -{%- endif -%} + {%- if count and text_no_query -%} + {{ text_no_query.format(number=h.localised_number(count)) }} + {%- else -%} + {{ text_no_query_none }} + {%- endif -%} {%- endif -%} \ No newline at end of file diff --git a/ckanext/odsh/templates/snippets/social.html b/ckanext/odsh/templates/snippets/social.html index d2d37670a9f0d86b90b10cd03a871b2612b7b953..f0e922f55d8efa47b5793329cc07335db1fb7cc9 100644 --- a/ckanext/odsh/templates/snippets/social.html +++ b/ckanext/odsh/templates/snippets/social.html @@ -1,13 +1,13 @@ {% set current_url = h.full_current_url() %} {% block social %} -<section class="module module-narrow social"> + <section class="module module-narrow social"> {% block social_title %} {% endblock %} {% block social_nav %} <ul class="nav nav-simple"> - <li class="nav-item"><a href="https://www.facebook.com/sharer.php?u={{ current_url }}" target="_blank"><i class="fa fa-facebook-square"></i></a></li> - <li class="nav-item"><a href="https://twitter.com/share?url={{ current_url }}" target="_blank"><i class="fa fa-twitter-square"></i></a></li> + <li class="nav-item"><a href="https://www.facebook.com/sharer.php?u={{ current_url }}" target="_blank"><i class="fa fa-facebook-square"></i></a></li> + <li class="nav-item"><a href="https://twitter.com/share?url={{ current_url }}" target="_blank"><i class="fa fa-twitter-square"></i></a></li> </ul> {% endblock %} -</section> + </section> {% endblock %} \ No newline at end of file diff --git a/ckanext/odsh/templates/user/edit_user_form.html b/ckanext/odsh/templates/user/edit_user_form.html index 3ed5777bdcc949c347d79c70391f12a5b9560b32..ddfb63c79ad991b697bfd5dac49b8d15ca31986e 100644 --- a/ckanext/odsh/templates/user/edit_user_form.html +++ b/ckanext/odsh/templates/user/edit_user_form.html @@ -1,60 +1,95 @@ {% import 'macros/form.html' as form %} -<form id="user-edit-form" class="dataset-form form-horizontal" method="post" action="{{ action }}"> - {{ form.errors(error_summary) }} +{% block form %} + <form id="user-edit-form" class="dataset-form form-horizontal" method="post" action="{{ action }}"> + {{ h.csrf_input() }} + {{ form.errors(error_summary) }} - <fieldset> - <legend>{{ _('Change details') }}</legend> - {{ form.input('name', label=_('Username'), id='field-username', value=data.name, error=errors.name, classes=['control-medium'], is_required=true) }} + {% block core_fields %} + <fieldset> + <legend>{{ _('Change details') }}</legend> + {{ form.input('name', label=_('Username'), id='field-username', value=data.name, error=errors.name, classes=['control-medium'], is_required=true) }} - {{ form.input('fullname', label=_('Full name'), id='field-fullname', value=data.fullname, error=errors.fullname, placeholder=_('eg. Joe Bloggs'), classes=['control-medium']) }} + {{ form.input('fullname', label=_('Full name'), id='field-fullname', value=data.fullname, error=errors.fullname, placeholder=_('eg. Joe Bloggs'), classes=['control-medium']) }} - {{ form.input('email', label=_('Email'), id='field-email', type='email', value=data.email, error=errors.email, placeholder=_('eg. joe@example.com'), classes=['control-medium'], is_required=true) }} + {{ form.input('email', label=_('Email'), id='field-email', type='email', value=data.email, error=errors.email, placeholder=_('eg. joe@example.com'), classes=['control-medium'], is_required=true) }} - {{ form.markdown('about', label=_('About'), id='field-about', value=data.about, error=errors.about, placeholder=_('A little information about yourself')) }} - - {% if c.show_email_notifications %} - {% call form.checkbox('activity_streams_email_notifications', label=_('Subscribe to notification emails'), id='field-activity-streams-email-notifications', value=True, checked=c.userobj.activity_streams_email_notifications) %} - {% set helper_text = _("You will receive notification emails from {site_title}, e.g. when you have new activities on your dashboard."|string) %} - {{ form.info(helper_text.format(site_title=g.site_title), classes=['info-help-tight']) }} - {% endcall %} - {% endif %} - - </fieldset> - - <fieldset> - <legend>{{ _('Change password') }}</legend> - {{ form.input('old_password', - type='password', - label=_('Sysadmin Password') if c.is_sysadmin else _('Old Password'), - id='field-password', - value=data.oldpassword, - error=errors.oldpassword, - classes=['control-medium'], - attrs={'autocomplete': 'off'} - ) }} - - {{ form.input( - 'password1', type='password', label=_('Password'), id='field-password', value=data.password1, error=errors.password1, classes=['control-medium'], attrs={'autocomplete': 'off', 'data-module': 'odsh_validate_password'} ) }} - - {{ form.input('password2', type='password', label=_('Confirm Password'), id='field-password-confirm', value=data.password2, error=errors.password2, classes=['control-medium'], attrs={'autocomplete': 'off'}) }} - </fieldset> - - <div class="form-actions"> - {% block delete_button %} - {% if h.check_access('user_delete', {'id': data.id}) %} - <a class="btn btn-danger pull-left" href="{% url_for 'user_delete', id=data.id %}" data-module="confirm-action" data-module-content="{{ _('Are you sure you want to delete this User?') }}">{% block delete_button_text %}{{ _('Delete') }}{% endblock %}</a> - {% endif %} + {{ form.markdown('about', label=_('About'), id='field-about', value=data.about, error=errors.about, placeholder=_('A little information about yourself')) }} + </fieldset> {% endblock %} - {% block generate_button %} - {% if h.check_access('user_generate_apikey', {'id': data.id}) %} - <a class="btn btn-warning" href="{% url_for 'user_generate_apikey', id=data.id %}" data-module="confirm-action" data-module-content="{{ _('Are you sure you want to regenerate the API key?') }}">{% block generate_button_text %}{{ _('Regenerate API Key') }}{% endblock %}</a> + + {% block extra_fields %} + {% if g.userobj.sysadmin and data.state == 'deleted' %} + {% call form.checkbox('activate_user', label=_('Reactivate User'), id='activate_user', value=True, checked=false) %} + {% set helper_text = _('This account is deactivated, if you want to reactivate it, please click on checkbox.') %} + {{ form.info(helper_text, classes='info-help-tight') }} + {% endcall %} {% endif %} {% endblock %} + + {% if is_sysadmin and current_user.name != data.name %} + {% block sysadmin_password %} + <fieldset> + <legend>{{ _('Change ' + data.name|capitalize + "'s" + ' password') }}</legend> + {{ form.input('password1', type='password', label=_('Password'), id='field-password', value=data.password1, error=errors.password1, classes=['control-medium'], attrs={'autocomplete': 'off', 'class': 'form-control'} ) }} + {{ form.input('password2', type='password', label=_('Confirm Password'), id='field-password-confirm', value=data.password2, error=errors.password2, classes=['control-medium'], attrs={'autocomplete': 'off', 'class': 'form-control'}) }} + </fieldset> + {% endblock %} + + {% block sysadmin_old_password %} + <fieldset> + <legend>{{ _('Sysadmin password') }}</legend> + {{ form.input('old_password', + type='password', + label=_('Sysadmin Password'), + id='field-password-old', + value=data.oldpassword, + error=errors.oldpassword, + classes=['control-medium'], + attrs={'autocomplete': 'off', 'class': 'form-control'} + ) }} + + </fieldset> + {% endblock %} + {% else %} + {% block change_password %} + <fieldset> + <legend>{{ _('Change password') }}</legend> + {{ form.input('old_password', + type='password', + label=_('Old Password'), + id='field-password', + value=data.oldpassword, + error=errors.oldpassword, + classes=['control-medium'], + attrs={'autocomplete': 'off'} + ) }} + + {{ form.input( + 'password1', type='password', label=_('Password'), id='field-password', value=data.password1, error=errors.password1, classes=['control-medium'], attrs={'autocomplete': 'off', 'data-module': 'odsh_validate_password'} ) }} + + {{ form.input('password2', type='password', label=_('Confirm Password'), id='field-password-confirm', value=data.password2, error=errors.password2, classes=['control-medium'], attrs={'autocomplete': 'off'}) }} + </fieldset> + {% endblock %} + {% endif %} + {{ form.required_message() }} - <button class="btn btn-primary" type="submit" name="save">{{ _('Update Profile') }}</button> - </div> -</form> + + <div class="form-actions"> + {% block form_actions %} + {% set is_deleted = data.state == 'deleted' %} + {% if not is_deleted %} + {% block delete_button %} + {% if h.check_access('user_delete', {'id': data.id}) %} + <a class="btn btn-danger pull-left" href="{% url_for 'user_delete', id=data.id %}" data-module="confirm-action" data-module-content="{{ _('Are you sure you want to delete this User?') }}">{% block delete_button_text %}{{ _('Delete') }}{% endblock %}</a> + {% endif %} + {% endblock %} + {% endif %} + <button class="btn btn-primary" type="submit" name="save">{{ _('Reactivate Profile') if is_deleted else _('Update Profile') }}</button> + {% endblock %} + </div> + </form> +{% endblock %} {% block scripts %} {% asset 'ckanext-odsh/odsh_validate_password' %} diff --git a/ckanext/odsh/templates/user/login.html b/ckanext/odsh/templates/user/login.html index e9e93b4539ebb4ac7e26dde72ff4c9962107fe87..af9f18ade22504d5bad411cbc05410f9e071caf3 100644 --- a/ckanext/odsh/templates/user/login.html +++ b/ckanext/odsh/templates/user/login.html @@ -15,7 +15,7 @@ <div class="module-content"> <h2 class="page-heading">{% block page_heading %}{{ _('Login') }}{% endblock %}</h2> {% block form %} - {% snippet "user/snippets/login_form.html", action=c.login_handler, error_summary=error_summary %} + {% snippet "user/snippets/login_form.html", error_summary=error_summary %} {% endblock %} </div> </section> diff --git a/ckanext/odsh/templates/user/snippets/login_form.html b/ckanext/odsh/templates/user/snippets/login_form.html index 08565405b3d87a6803aab2094bcc50bc8ae59cc6..bc50b6e0fa46fd60725896caf7bdcf78a35e4410 100644 --- a/ckanext/odsh/templates/user/snippets/login_form.html +++ b/ckanext/odsh/templates/user/snippets/login_form.html @@ -1,12 +1,12 @@ {# Renders the login form. -action - The url that the form should be submitted to. +action - The url that the form should be submitted to. error_summary - A tuple/list of form errors. Example: -{% snippet "user/snippets/login_form.html", action=c.login_handler, error_summary=error_summary %} + {% snippet "user/snippets/login_form.html", action=g.login_handler, error_summary=error_summary %} #} {% import 'macros/form.html' as form %} diff --git a/ckanext/odsh/tests/test_search.py b/ckanext/odsh/tests/test_search.py index 0988d909ce2f5e86cc9af2822abd03169653a5ec..9f8f2b50fbc6c1741461ec9baa0b5574ce24672e 100644 --- a/ckanext/odsh/tests/test_search.py +++ b/ckanext/odsh/tests/test_search.py @@ -1,7 +1,7 @@ import ckanext.odsh.search as search import unittest -class Test_before_search(unittest.TestCase): +class Test_before_dataset_search(unittest.TestCase): def setUp(self): self.search_params_before_test = { 'extras': {}, @@ -20,7 +20,7 @@ class Test_before_search(unittest.TestCase): # arange search_params = self.search_params_before_test.copy() # act - search.before_search(search_params) + search.before_dataset_search(search_params) # assert search_params_expected = self.search_params_with_facet_mincount.copy() assert search_params == search_params_expected @@ -41,7 +41,7 @@ class Test_before_search(unittest.TestCase): ) }) # act - search.before_search(search_params) + search.before_dataset_search(search_params) # assert assert search_params == search_params_expected @@ -53,7 +53,7 @@ class Test_before_search(unittest.TestCase): search_params_expected = self.search_params_with_facet_mincount.copy() search_params_expected.update({'extras': extras}) # act - search.before_search(search_params) + search.before_dataset_search(search_params) # assert assert search_params == search_params_expected @@ -77,7 +77,7 @@ class Test_before_search(unittest.TestCase): ) }) # act - search.before_search(search_params) + search.before_dataset_search(search_params) # assert assert search_params == search_params_expected @@ -98,7 +98,7 @@ class Test_before_search(unittest.TestCase): ) }) # act - search.before_search(search_params) + search.before_dataset_search(search_params) # assert assert search_params == search_params_expected @@ -120,7 +120,7 @@ class Test_before_search(unittest.TestCase): ) }) # act - search.before_search(search_params) + search.before_dataset_search(search_params) # assert assert search_params == search_params_expected @@ -128,6 +128,6 @@ class Test_before_search(unittest.TestCase): # arange search_params = self.search_params_before_test.copy() # act - return_value = search.before_search(search_params) + return_value = search.before_dataset_search(search_params) # assert assert search_params == return_value diff --git a/ckanext/odsh/tests_wip/test_datarequest.py b/ckanext/odsh/tests_wip/test_datarequest.py deleted file mode 100644 index f8c656c2b38288640922a21d271efb4448e4adf5..0000000000000000000000000000000000000000 --- a/ckanext/odsh/tests_wip/test_datarequest.py +++ /dev/null @@ -1,101 +0,0 @@ - -from ckanext.odsh.tests_wip.test_helpers import AppProxy -import ckanext.odsh.tests_wip.test_helpers as testhelpers -import ckan.tests.factories as factories -import uuid -import pdb -from ckanext.odsh.tests_wip.harvest_sever_mock import HarvestServerMock -import ckanext.odsh.tests_wip.harvest_sever_mock as harvest_sever_mock -import subprocess -import re - -markdown = \ - """ -Lorem markdownum supplex iniquis, nec nostram nam conde tympana, deae Mutinae -regna sepulcro; morae arces quae, pia? Rates Circe, quandoquidem Ausoniae, me, -cacumine apta, saevus abductas navigiis. Sacri ostendit *ad anas* amores nostras -[currebam celeres], milia gaudet eripitur superest circumque auras, [nec]. Si -haurit geminis agendum profana lacertis infamis? - -> Dedit potuit perenni nesciet flumine. Et sui **ibis** mihi supponat, flamina -> mihi rogos, deus manum ora tenebras. Acta nec dominus aenum, haud de ripa -> instabilemque amnis erat nam Patraeque parabat quod membra quamquam. -""" - - -class TestDatarequest: - - def test_nologin_cannot_create_request(self): - pass - - def _create_request(self): - guid = str(uuid.uuid4()) - self._get_app().login() - response = self.app.get('/datarequest/new') - form = response.forms[0] - title = 'datarequest_' + guid - form['title'] = title - form['description'] = markdown - final_response = self.app.submit_form(form) - - - id = re.search( - '/datarequest/edit/([a-zA-Z0-9\-]*)">', final_response.body).group(1) - return id - - def test_create_datarequest(self): - # Act - id = self._create_request() - - # Assert - response = self.app.get('/datarequest') - assert id in response - - def test_edit_datarequest(self): - # Arrange - id = self._create_request() - - # Act - response = self.app.get('/datarequest/edit/'+id) - form = response.forms[0] - form['title'] = id+'edit_title' - form['description'] = id+'edit_desc' - final_response = self.app.submit_form(form) - - # Assert - response = self.app.get('/datarequest/'+id) - assert id+'edit_title' in response - assert id+'edit_desc' in response - - def test_comment_datarequest(self): - # Arrange - id = self._create_request() - guid = str(uuid.uuid4()) - - # Act - response = self.app.get('/datarequest/comment/'+id) - form = response.forms[0] - form['comment'] = markdown + guid - final_response = self.app.submit_form(form) - - # Assert - assert guid in final_response - - def test_close_datarequest(self): - # Arrange - id = self._create_request() - - # Act - response = self.app.get('/datarequest/close/'+id) - form = response.forms[0] - final_response = self.app.submit_form(form) - - # Assert - response = self.app.get('/datarequest/'+id) - assert 'label-closed' in response - - def _get_app(self): - if not hasattr(self, 'app'): - app = AppProxy() - self.app = app - return self.app diff --git a/ckanext/odsh/views/dashboard.py b/ckanext/odsh/views/dashboard.py index 3aa1736bf7ce0eb7583765d24ebcbf7a49b113a9..463487c4517f694e73e07f39c1373849f5706cfa 100644 --- a/ckanext/odsh/views/dashboard.py +++ b/ckanext/odsh/views/dashboard.py @@ -1,31 +1,27 @@ -import ckan.plugins.toolkit as toolkit import ckan.authz as authz -import ckan.logic as logic -from ckan.common import g +import ckan.lib.helpers as h +from ckan.common import g, _ from flask import Blueprint -from ckan.views.dashboard import index +import ckan.views.dashboard as dashboard import logging log = logging.getLogger(__name__) -blueprint = Blueprint('odsh_dashboard', __name__) +blueprint = Blueprint(u'odsh_dashboard', __name__) - -def dashboard(offset=0): - log.debug("views.dashboard::dashboard") +@blueprint.before_request +def before_request() -> None: is_sysadmin = authz.is_sysadmin(g.user) - if not is_sysadmin: - toolkit.abort(403) - - return index(offset) + h.flash_error(_(u'Not authorized to see this page')) + return h.redirect_to(u'user.login') + return None +def datasets(): + return dashboard.datasets() -def dashboard_datasets(): - log.debug("views.dashboard::dashboard_datasets") - is_sysadmin = authz.is_sysadmin(g.user) - - if not is_sysadmin: - toolkit.abort(403) +def organizations(): + return dashboard.organizations() - return index() +def groups(): + return dashboard.groups() diff --git a/ckanext/odsh/views/user.py b/ckanext/odsh/views/user.py index 4c3e0874e13ac4bae200f34906cbb36f84ba960c..7963a52e8be5d606e1f60b66bf2d62be42d900c4 100644 --- a/ckanext/odsh/views/user.py +++ b/ckanext/odsh/views/user.py @@ -33,12 +33,3 @@ def read(id=None): if not g.user: return ckan_user_view.login() return ckan_user_view.read(id) - - -def activity(id, offset=0): - log.debug("views.user::activity") - is_sysadmin = authz.is_sysadmin(g.user) - - if not is_sysadmin: - toolkit.abort(403) - return ckan_user_view.activity(id, offset) diff --git a/dev-requirements.txt b/dev-requirements.txt index 0e7ac24e690337ed0c60cbf1182acd0671bedc14..e35a5947c3c200649f5e5fdf9bffecb84f217f75 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,3 +1,4 @@ mock pytest-ckan +pytest-factoryboy coverage \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 58fbc88b31cb6dad8ea6e154cdd46d8c0df2567b..9b4681ed07f6335fbde3260904eaf0591b57641b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ -ckan +ckan~=2.10.0 ckanext-harvest -ckanext-spatial +ckanext-spatial>=2.0.0 lxml multiline-log-formatter filehash==0.1.dev3 diff --git a/setup.py b/setup.py index cfee02ab75b488bdb6a7903054878319e70e5b69..320e101ee89a2ca963c949373fc70cf99f4a2203 100755 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ setup( # Versions should comply with PEP440. For a discussion on single-sourcing # the version across setup.py and the project code, see # http://packaging.python.org/en/latest/tutorial.html#version - version='2.0.0', + version='2.3.0', description='''A general extension for CKAN that is used for the Open Data Schleswig-Holstein project''', long_description=long_description, @@ -108,6 +108,7 @@ setup( ('**.py', 'python', None), ('**.js', 'javascript', None), ('**/templates/**.html', 'ckan', None), + ('**/harvest_templates/**.html', 'ckan', None), ], } )