diff --git a/ckanext/odsh/assets/odsh.css b/ckanext/odsh/assets/odsh.css index fc32a357d990bc682709db9bf5cbc8b4126bc358..59b462b765b0ddbcd54e515423398fa49cf31fad 100644 --- a/ckanext/odsh/assets/odsh.css +++ b/ckanext/odsh/assets/odsh.css @@ -4,6 +4,7 @@ --odsh-color-sh-blue: #003064; --odsh-color-sh-blue-light: #e4f2f8; --odsh-color-sh-blue-2: #0089ca; + --odsh-color-sh-grey-light: #f2f2f2; --odsh-color-sh-blue-grey: #657592; --odsh-color-sh-blue-dark: #001E49; } @@ -773,7 +774,7 @@ label.rangesearch.disabled { } .is-table-row .row-fluid [class*="span"] { - float: none; + float: left; display: block; } } @@ -3026,4 +3027,70 @@ body.filters-modal div.row>aside.secondary.span3 { .metadata-links ul { list-style: none; padding-left: 0px; +} + +section, .section { + margin-bottom: 48px; +} + +.sub-section { + background-color: #F6F6F6; + text-align: left; +} + +.sub-section h5 { + border-bottom: 2px solid #FFF; + padding: 10px; + margin: 0; + color: var(--odsh-color-sh-blue); +} + +.details .details-item { + margin: 3px 0; +} + +.sub-section .details a { + color: #4a4a4a; + margin: 0 10px; +} + + +.sub-section .table { + --bs-table-striped-bg: var(--odsh-color-sh-grey-light); +} + +.sub-section table td { + border-color: white; +} + +.sub-section .table > :not(:first-child) { + border-top: 0; +} + +.ellipsis-action { + position: relative; + width: 100%; +} + +.ellipsis-action .readless { + display: none; +} + +.ellipsis-action > .ellipsis-overlay { + height: 35px; + background-color: #fff; + position: absolute; + top: -35px; + width: 100%; + background: linear-gradient(to bottom,white 0%,rgba(255,255,255,0) 1%,white 100%); +} + +.resource-description .ellipsis-action > .ellipsis-overlay { + background-color: var(--odsh-color-sh-grey-light); + background: linear-gradient(to bottom,var(--odsh-color-sh-grey-light) 0%,rgba(255,255,255,0) 1%,var(--odsh-color-sh-grey-light) 100%); +} + +li.resource-item:hover .resource-description .ellipsis-action > .ellipsis-overlay { + background-color: #EEEEEE; + background: linear-gradient(to bottom,#EEEEEE 0%,rgba(255,255,255,0) 1%,#EEEEEE 100%); } \ No newline at end of file diff --git a/ckanext/odsh/assets/odsh.js b/ckanext/odsh/assets/odsh.js index 97cd432650dbdf5926c53649449d47eab09ced7b..ca7e7493f628eff2a7dfc620840585e2f09ab38e 100644 --- a/ckanext/odsh/assets/odsh.js +++ b/ckanext/odsh/assets/odsh.js @@ -1,29 +1,21 @@ -$(document).ready(function () -{ - $('.mylabel').click(function () - { - window.location = $(this).siblings('label').children('a').attr('href'); - }); +$(document).ready(function () { + $('.mylabel').click(function () { + window.location = $(this).siblings('label').children('a').attr('href'); + }); - let search = function (score) - { - return function () - { - // $('#label-score-'+score).toggleClass('checked') - $('#check-score-' + score).prop("checked", !$('#check-score-' + score).prop("checked")); - // $('#check-score-'+score).val(1) - $("#dataset-search-box-form").submit(); //TODO: use default or inject - } - } - for (let i = 1; i <= 5; i++) - { - $('.search-score-' + i).click(search(i)); - $('#check-score-' + i).click(function () - { - $("#dataset-search-box-form").submit(); //TODO: use default or inject - }); + let search = function (score) { + return function () { + // $('#label-score-'+score).toggleClass('checked') + $('#check-score-' + score).prop("checked", !$('#check-score-' + score).prop("checked")); + // $('#check-score-'+score).val(1) + $("#dataset-search-box-form").submit(); //TODO: use default or inject } + } + for (let i = 1; i <= 5; i++) { + $('.search-score-' + i).click(search(i)); + $('#check-score-' + i).click(function () { + $("#dataset-search-box-form").submit(); //TODO: use default or inject + }); + } }); - - diff --git a/ckanext/odsh/assets/odsh_adjust_ellipsis.js b/ckanext/odsh/assets/odsh_adjust_ellipsis.js new file mode 100644 index 0000000000000000000000000000000000000000..f2d3adca90639e778918fa7c3f7ca650e9f98426 --- /dev/null +++ b/ckanext/odsh/assets/odsh_adjust_ellipsis.js @@ -0,0 +1,79 @@ +$(document).ready(function () { + + function adjustEllipsis() { + $('.ellipsis-action').each(function () { + var ellipsisAction = $(this); + var targetId = ellipsisAction.data('target'); + var targetContent = $(targetId); + var maxContentHeight = ellipsisAction.data('max-height') || 150; + var overlay = $('.ellipsis-overlay', ellipsisAction); + var readMoreLink = $('.readmore', ellipsisAction); + var readLessLink = $('.readless', ellipsisAction); + + // Reset styles to calculate content height + targetContent.css({ + 'max-height': 'none', + 'overflow-y': 'visible' + }); + + var contentHeight = targetContent.height(); + + // Apply ellipsis functionality if necessary + if (contentHeight > maxContentHeight) { + ellipsisAction.show(); + if (targetContent.hasClass("full-text")) { + toggleEllipsisActions(false); + } else { + targetContent.css({ + 'max-height': maxContentHeight + 'px', + 'overflow-y': 'hidden' + }); + toggleEllipsisActions(true); + if (overlay) overlay.show(); + } + } else { + ellipsisAction.hide(); + } + + function toggleEllipsisActions(showReadMore) { + readMoreLink.toggle(showReadMore); + readLessLink.toggle(!showReadMore); + } + + readMoreLink.off('click').on('click', function (event) { + event.preventDefault(); + targetContent.css({ + 'max-height': 'none', + 'overflow-y': 'visible' + }); + targetContent.addClass("full-text"); + if (overlay) overlay.hide(); + toggleEllipsisActions(false); + }); + + readLessLink.off('click').on('click', function (event) { + event.preventDefault(); + targetContent.css({ + 'max-height': maxContentHeight + 'px', + 'overflow-y': 'hidden' + }); + targetContent.removeClass("full-text"); + if (overlay) overlay.show(); + toggleEllipsisActions(true); + $('html, body').animate({ + scrollTop: targetContent.offset().top + }, 50); + }); + }); + } + + // Call the function on page load + adjustEllipsis(); + + // Add an event listener for window resize + $(window).on('resize', function () { + // Call the adjustEllipsis function when window is resized + adjustEllipsis(); + }); + +}); diff --git a/ckanext/odsh/assets/webassets.yml b/ckanext/odsh/assets/webassets.yml index 37bb956c0f2bbb607951648982a36d607ad6bef7..3136df98f8102ef5f577c692fd9fa39d865db2a2 100644 --- a/ckanext/odsh/assets/webassets.yml +++ b/ckanext/odsh/assets/webassets.yml @@ -5,6 +5,7 @@ odsh_base_script: - vendor/jquery-ui-autocomplete/jquery-ui.js - autocomplete.js - odsh.js + - odsh_adjust_ellipsis.js odsh_base_style: output: ckanext-odsh/odsh_base.css diff --git a/ckanext/odsh/helpers.py b/ckanext/odsh/helpers.py index 968b901f4965716fe073b04afe17933bdb61ccc1..7ade4ebf635951d0eb643dac2ae6a94bd8cdc40b 100644 --- a/ckanext/odsh/helpers.py +++ b/ckanext/odsh/helpers.py @@ -791,3 +791,17 @@ def format_resource_format(format_str): return format_str[:-5] else: return format_str + + +def extract_email(text): + if not isinstance(text, str): + return None # Return None for non-string inputs + + # Regular expression pattern to match email addresses + email_pattern = r'[\w\.-]+@[a-zA-Z\d\.-]+\.[a-zA-Z]{2,}' + + # Find all email addresses in the input text using the regular expression pattern + matches = re.findall(email_pattern, text) + + # If there are matches, return the first email address found, else return None + return matches[0] if matches else None \ No newline at end of file diff --git a/ckanext/odsh/i18n/ckanext-odsh.pot b/ckanext/odsh/i18n/ckanext-odsh.pot index 919c1502fb758494a99934f68622b71e34f012dc..488cb5d1e974ca531634943ea20326d03941e50b 100644 --- a/ckanext/odsh/i18n/ckanext-odsh.pot +++ b/ckanext/odsh/i18n/ckanext-odsh.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: ckanext-odsh 2.3.0\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2023-08-02 11:41+0200\n" +"POT-Creation-Date: 2023-11-06 12:35+0100\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" @@ -17,7 +17,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" -#: ckanext/odsh/plugin.py:234 ckanext/odsh/plugin.py:243 ckanext/odsh/plugin.py:249 +#: ckanext/odsh/plugin.py:232 ckanext/odsh/plugin.py:241 ckanext/odsh/plugin.py:247 #: ckanext/odsh/templates/header.html:40 #: ckanext/odsh/templates/organization/index.html:3 #: ckanext/odsh/templates/organization/index.html:6 @@ -28,23 +28,23 @@ msgstr "" msgid "Organizations" msgstr "" -#: ckanext/odsh/plugin.py:235 ckanext/odsh/plugin.py:246 ckanext/odsh/plugin.py:252 +#: ckanext/odsh/plugin.py:233 ckanext/odsh/plugin.py:244 ckanext/odsh/plugin.py:250 msgid "Category" msgstr "" -#: ckanext/odsh/plugin.py:236 ckanext/odsh/plugin.py:244 ckanext/odsh/plugin.py:250 +#: ckanext/odsh/plugin.py:234 ckanext/odsh/plugin.py:242 ckanext/odsh/plugin.py:248 msgid "File format" msgstr "" -#: 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/plugin.py:235 ckanext/odsh/plugin.py:243 ckanext/odsh/plugin.py:249 +#: ckanext/odsh/templates/package/resource_read.html:162 #: ckanext/odsh/templates/package/snippets/info.html:75 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:91 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:98 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:111 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:118 msgid "License" msgstr "" -#: ckanext/odsh/plugin.py:239 +#: ckanext/odsh/plugin.py:237 msgid "Open-Data-Eigenschaften" msgstr "" @@ -91,6 +91,7 @@ msgstr "" #: 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/package_basic_fields.html:35 #: ckanext/odsh/templates/package/snippets/resource_form.html:31 msgid "URL" msgstr "" @@ -174,6 +175,8 @@ msgstr "" #: ckanext/odsh/harvest_templates/source/search.html:60 #: ckanext/odsh/harvest_templates/source/search.html:62 #: ckanext/odsh/templates/footer.html:12 +#: ckanext/odsh/templates/package/snippets/contact_details.html:70 +#: ckanext/odsh/templates/package/snippets/contact_details.html:74 msgid "Contact" msgstr "" @@ -230,31 +233,39 @@ msgstr "" msgid "Harvester" msgstr "" -#: ckanext/odsh/templates/header.html:70 ckanext/odsh/templates/header.html:72 +#: ckanext/odsh/templates/header.html:68 +msgid "Sysadmin settings" +msgstr "" + +#: ckanext/odsh/templates/header.html:70 +msgid "Admin" +msgstr "" + +#: ckanext/odsh/templates/header.html:80 ckanext/odsh/templates/header.html:82 msgid "View profile" msgstr "" -#: ckanext/odsh/templates/header.html:77 ckanext/odsh/templates/header.html:80 +#: ckanext/odsh/templates/header.html:89 ckanext/odsh/templates/header.html:92 msgid "Edit profile" msgstr "" -#: ckanext/odsh/templates/header.html:85 ckanext/odsh/templates/header.html:87 +#: ckanext/odsh/templates/header.html:99 ckanext/odsh/templates/header.html:101 #: ckanext/odsh/templates/user/logout.html:4 msgid "Logout" msgstr "" -#: ckanext/odsh/templates/header.html:95 ckanext/odsh/templates/header.html:96 +#: ckanext/odsh/templates/header.html:110 ckanext/odsh/templates/header.html:111 #: 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:101 +#: ckanext/odsh/templates/header.html:116 msgid "Sign language" msgstr "" -#: ckanext/odsh/templates/header.html:104 +#: ckanext/odsh/templates/header.html:119 msgid "Simple language" msgstr "" @@ -335,7 +346,7 @@ msgid "Raumbezug: Fehlender Wert" msgstr "" #: ckanext/odsh/templates/i18n_defaults.html:20 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:219 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:239 msgid "Tags" msgstr "" @@ -407,17 +418,27 @@ msgstr "" msgid "Start" msgstr "" +#: ckanext/odsh/templates/home/index.html:20 +msgid "" +"We promote transparency and innovation by publishing Schleswig-Holstein data " +"in open, free and reusable formats." +msgstr "" + +#: ckanext/odsh/templates/home/index.html:21 +msgid "Discover datasets" +msgstr "" + #: ckanext/odsh/templates/macros/form.html:410 msgid "Custom" msgstr "" #: ckanext/odsh/templates/macros/form.html:410 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:60 -#: 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:240 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:287 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:80 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:112 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:163 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:209 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:260 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:307 msgid "This field is required" msgstr "" @@ -521,8 +542,8 @@ msgid "My Organization" msgstr "" #: 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 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:48 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:53 msgid "Description" msgstr "" @@ -554,7 +575,6 @@ msgid "Save Organization" msgstr "" #: ckanext/odsh/templates/organization/snippets/organization_item.html:15 -#: ckanext/odsh/templates/snippets/package_item.html:76 msgid "View {organization_name}" msgstr "" @@ -649,7 +669,7 @@ msgid "Draft" msgstr "" #: ckanext/odsh/templates/package/read.html:41 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:270 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:290 #: ckanext/odsh/templates/snippets/organization.html:24 #: ckanext/odsh/templates/snippets/package_item.html:83 msgid "Deleted" @@ -660,7 +680,7 @@ msgid "Manage Dataset" msgstr "" #: ckanext/odsh/templates/package/read.html:54 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:246 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:266 #: ckanext/odsh/templates/snippets/package_item.html:70 msgid "Private" msgstr "" @@ -683,28 +703,38 @@ msgid "" "href=\"%(is_replaced_by)s\">newer version</a>." msgstr "" -#: ckanext/odsh/templates/package/read.html:103 +#: ckanext/odsh/templates/package/read.html:93 +#: ckanext/odsh/templates/package/snippets/resource_item.html:28 +msgid "Read more »" +msgstr "" + +#: ckanext/odsh/templates/package/read.html:94 +#: ckanext/odsh/templates/package/snippets/resource_item.html:29 +msgid "« Read less" +msgstr "" + +#: ckanext/odsh/templates/package/read.html:110 msgid "Add new resource" msgstr "" -#: ckanext/odsh/templates/package/read.html:113 +#: ckanext/odsh/templates/package/read.html:120 #, 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 +#: ckanext/odsh/templates/package/read.html:128 msgid "latest collection member" msgstr "" -#: ckanext/odsh/templates/package/read.html:126 -#: ckanext/odsh/templates/package/read.html:131 +#: ckanext/odsh/templates/package/read.html:133 +#: ckanext/odsh/templates/package/read.html:138 msgid "predecessor" msgstr "" -#: ckanext/odsh/templates/package/read.html:136 -#: ckanext/odsh/templates/package/read.html:141 +#: ckanext/odsh/templates/package/read.html:143 +#: ckanext/odsh/templates/package/read.html:148 msgid "successor" msgstr "" @@ -742,69 +772,69 @@ msgstr "" msgid "Source: <a href=\"%(url)s\">%(dataset)s</a>" msgstr "" -#: ckanext/odsh/templates/package/resource_read.html:109 +#: ckanext/odsh/templates/package/resource_read.html:101 msgid "There are no views created for this resource yet." msgstr "" -#: ckanext/odsh/templates/package/resource_read.html:113 +#: ckanext/odsh/templates/package/resource_read.html:105 msgid "Not seeing the views you were expecting?" msgstr "" -#: ckanext/odsh/templates/package/resource_read.html:115 +#: ckanext/odsh/templates/package/resource_read.html:107 msgid "Click here for more information." msgstr "" -#: ckanext/odsh/templates/package/resource_read.html:118 +#: ckanext/odsh/templates/package/resource_read.html:110 msgid "Here are some reasons you may not be seeing expected views:" msgstr "" -#: ckanext/odsh/templates/package/resource_read.html:120 +#: ckanext/odsh/templates/package/resource_read.html:112 msgid "No view has been created that is suitable for this resource" msgstr "" -#: ckanext/odsh/templates/package/resource_read.html:121 +#: ckanext/odsh/templates/package/resource_read.html:113 msgid "The site administrators may not have enabled the relevant view plugins" msgstr "" -#: ckanext/odsh/templates/package/resource_read.html:122 +#: ckanext/odsh/templates/package/resource_read.html:114 msgid "" "If a view requires the DataStore, the DataStore plugin may not be enabled, or" " the data may not have been pushed to the DataStore, or the DataStore hasn't " "finished processing the data yet" msgstr "" -#: ckanext/odsh/templates/package/resource_read.html:144 +#: ckanext/odsh/templates/package/resource_read.html:136 msgid "Additional Information" msgstr "" -#: ckanext/odsh/templates/package/resource_read.html:148 +#: ckanext/odsh/templates/package/resource_read.html:140 msgid "Field" msgstr "" -#: ckanext/odsh/templates/package/resource_read.html:149 +#: ckanext/odsh/templates/package/resource_read.html:141 msgid "Value" msgstr "" -#: ckanext/odsh/templates/package/resource_read.html:154 +#: ckanext/odsh/templates/package/resource_read.html:146 msgid "Data last updated" msgstr "" +#: ckanext/odsh/templates/package/resource_read.html:147 +#: ckanext/odsh/templates/package/resource_read.html:151 #: ckanext/odsh/templates/package/resource_read.html:155 #: ckanext/odsh/templates/package/resource_read.html:159 -#: ckanext/odsh/templates/package/resource_read.html:163 -#: ckanext/odsh/templates/package/resource_read.html:167 msgid "unknown" msgstr "" -#: ckanext/odsh/templates/package/resource_read.html:158 +#: ckanext/odsh/templates/package/resource_read.html:150 msgid "Metadata last updated" msgstr "" -#: ckanext/odsh/templates/package/resource_read.html:162 +#: ckanext/odsh/templates/package/resource_read.html:154 msgid "Created" msgstr "" -#: ckanext/odsh/templates/package/resource_read.html:166 +#: ckanext/odsh/templates/package/resource_read.html:158 #: ckanext/odsh/templates/package/snippets/resource_form.html:69 #: ckanext/odsh/templates/package/snippets/resource_info.html:26 msgid "Format" @@ -812,12 +842,12 @@ msgstr "" #: ckanext/odsh/templates/package/search.html:69 #: ckanext/odsh/templates/package/snippets/info.html:52 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:143 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:163 msgid "Period" msgstr "" #: ckanext/odsh/templates/package/search.html:79 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:156 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:176 #: ckanext/odsh/templates/snippets/search_form.html:115 msgid "from" msgstr "" @@ -837,7 +867,7 @@ 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/package/snippets/package_basic_fields.html:190 #: ckanext/odsh/templates/snippets/search_form.html:142 msgid "to" msgstr "" @@ -867,6 +897,26 @@ msgstr "" msgid "View preview" msgstr "" +#: ckanext/odsh/templates/package/snippets/contact_details.html:72 +msgid "Creator" +msgstr "" + +#: ckanext/odsh/templates/package/snippets/contact_details.html:73 +msgid "Maintainer" +msgstr "" + +#: ckanext/odsh/templates/package/snippets/contact_details.html:75 +msgid "Publisher" +msgstr "" + +#: ckanext/odsh/templates/package/snippets/contact_details.html:76 +msgid "Originator" +msgstr "" + +#: ckanext/odsh/templates/package/snippets/contact_details.html:77 +msgid "Contributor" +msgstr "" + #: ckanext/odsh/templates/package/snippets/info.html:28 #: ckanext/odsh/templates/snippets/package_item.html:99 msgid "Category:" @@ -884,12 +934,12 @@ msgid "Modified" msgstr "" #: ckanext/odsh/templates/package/snippets/info.html:89 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:329 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:349 msgid "Musterdatensatz" msgstr "" #: ckanext/odsh/templates/package/snippets/info.html:99 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:234 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:254 msgid "Spatial uri" msgstr "" @@ -918,54 +968,58 @@ 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 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:15 msgid "Title" msgstr "" -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:20 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:21 msgid "Enter title" msgstr "" #: ckanext/odsh/templates/package/snippets/package_basic_fields.html:37 +msgid "eg. my-dataset" +msgstr "" + +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:57 msgid "Enter description" msgstr "" -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:59 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:79 msgid "Organization" msgstr "" -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:67 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:87 msgid "" "No\n" " organization" msgstr "" -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:118 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:138 #: ckanext/odsh/templates/user/snippets/login_form.html:23 msgid "enter name" msgstr "" -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:189 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:209 msgid "Publication date" msgstr "" -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:225 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:245 msgid "odsh tags placeholder" msgstr "" -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:239 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:259 msgid "Visibility" msgstr "" -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:246 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:266 msgid "Public" msgstr "" -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:260 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:280 msgid "State" msgstr "" -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:267 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:287 msgid "Active" msgstr "" @@ -1077,15 +1131,15 @@ msgstr "" msgid "Resource count" msgstr "" -#: ckanext/odsh/templates/package/snippets/resource_item.html:20 +#: ckanext/odsh/templates/package/snippets/resource_item.html:33 msgid "File size" msgstr "" -#: ckanext/odsh/templates/package/snippets/resource_item.html:24 +#: ckanext/odsh/templates/package/snippets/resource_item.html:37 msgid "Number of pages" msgstr "" -#: ckanext/odsh/templates/package/snippets/resource_item.html:29 +#: ckanext/odsh/templates/package/snippets/resource_item.html:43 msgid "download file" msgstr "" diff --git a/ckanext/odsh/i18n/de/LC_MESSAGES/ckanext-odsh.mo b/ckanext/odsh/i18n/de/LC_MESSAGES/ckanext-odsh.mo index 19048e0f8754ccf02e9f6e0403cc210429c5b592..ec867b922cc9903c538c9d64fb2508e74012c98c 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 649b47969882fa4f3cc0625005a3409d26dd50af..147f24d588c8832d009e7b1bc35e9c1b6c450b94 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-08-02 11:41+0200\n" -"PO-Revision-Date: 2023-08-02 11:41+0200\n" +"POT-Creation-Date: 2023-11-06 12:35+0100\n" +"PO-Revision-Date: 2023-11-06 12:40+0100\n" "Last-Translator: \n" "Language-Team: de <LL@li.org>\n" "Language: de\n" @@ -18,10 +18,10 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "Generated-By: Babel 2.3.4\n" -"X-Generator: Poedit 2.3\n" +"X-Generator: Poedit 3.0.1\n" -#: ckanext/odsh/plugin.py:234 ckanext/odsh/plugin.py:243 -#: ckanext/odsh/plugin.py:249 ckanext/odsh/templates/header.html:40 +#: ckanext/odsh/plugin.py:232 ckanext/odsh/plugin.py:241 +#: ckanext/odsh/plugin.py:247 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:32 @@ -31,26 +31,26 @@ msgstr "" msgid "Organizations" msgstr "Herausgeber" -#: ckanext/odsh/plugin.py:235 ckanext/odsh/plugin.py:246 -#: ckanext/odsh/plugin.py:252 +#: ckanext/odsh/plugin.py:233 ckanext/odsh/plugin.py:244 +#: ckanext/odsh/plugin.py:250 msgid "Category" msgstr "Kategorie" -#: ckanext/odsh/plugin.py:236 ckanext/odsh/plugin.py:244 -#: ckanext/odsh/plugin.py:250 +#: ckanext/odsh/plugin.py:234 ckanext/odsh/plugin.py:242 +#: ckanext/odsh/plugin.py:248 msgid "File format" msgstr "Dateiformat" -#: 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/plugin.py:235 ckanext/odsh/plugin.py:243 +#: ckanext/odsh/plugin.py:249 +#: ckanext/odsh/templates/package/resource_read.html:162 #: ckanext/odsh/templates/package/snippets/info.html:75 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:91 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:98 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:111 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:118 msgid "License" msgstr "Lizenz" -#: ckanext/odsh/plugin.py:239 +#: ckanext/odsh/plugin.py:237 msgid "Open-Data-Eigenschaften" msgstr "Open-Data-Eigenschaften" @@ -101,6 +101,7 @@ msgstr "Hochladen einer Datei auf Ihren Computer" #: 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/package_basic_fields.html:35 #: ckanext/odsh/templates/package/snippets/resource_form.html:31 msgid "URL" msgstr "URL" @@ -184,6 +185,8 @@ 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 +#: ckanext/odsh/templates/package/snippets/contact_details.html:70 +#: ckanext/odsh/templates/package/snippets/contact_details.html:74 msgid "Contact" msgstr "Kontakt" @@ -242,31 +245,40 @@ msgstr "Infos" msgid "Harvester" msgstr "Harvester" -#: ckanext/odsh/templates/header.html:70 ckanext/odsh/templates/header.html:72 +#: ckanext/odsh/templates/header.html:68 +msgid "Sysadmin settings" +msgstr "Sysadmin Einstellungen" + +#: ckanext/odsh/templates/header.html:70 +msgid "Admin" +msgstr "Admin" + +#: ckanext/odsh/templates/header.html:80 ckanext/odsh/templates/header.html:82 msgid "View profile" msgstr "Mein Profil einsehen" -#: ckanext/odsh/templates/header.html:77 ckanext/odsh/templates/header.html:80 +#: ckanext/odsh/templates/header.html:89 ckanext/odsh/templates/header.html:92 msgid "Edit profile" msgstr "Mein Profil bearbeiten" -#: ckanext/odsh/templates/header.html:85 ckanext/odsh/templates/header.html:87 +#: ckanext/odsh/templates/header.html:99 ckanext/odsh/templates/header.html:101 #: ckanext/odsh/templates/user/logout.html:4 msgid "Logout" msgstr "Logout" -#: ckanext/odsh/templates/header.html:95 ckanext/odsh/templates/header.html:96 +#: ckanext/odsh/templates/header.html:110 +#: ckanext/odsh/templates/header.html:111 #: 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:101 +#: ckanext/odsh/templates/header.html:116 msgid "Sign language" msgstr "Gebärdensprache" -#: ckanext/odsh/templates/header.html:104 +#: ckanext/odsh/templates/header.html:119 msgid "Simple language" msgstr "Einfache Sprache" @@ -349,7 +361,7 @@ msgid "Raumbezug: Fehlender Wert" msgstr "Bitte geben Sie einen Ort ein" #: ckanext/odsh/templates/i18n_defaults.html:20 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:219 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:239 msgid "Tags" msgstr "Schlagwörter" @@ -421,17 +433,29 @@ msgstr "Willkommen" msgid "Start" msgstr "Start" +#: ckanext/odsh/templates/home/index.html:20 +msgid "" +"We promote transparency and innovation by publishing Schleswig-Holstein data " +"in open, free and reusable formats." +msgstr "" +"Wir fördern Transparenz und Innovation, indem wir Daten aus Schleswig-" +"Holstein in offenen, freien und wiederverwendbaren Formaten veröffentlichen." + +#: ckanext/odsh/templates/home/index.html:21 +msgid "Discover datasets" +msgstr "weitere Distribution" + #: ckanext/odsh/templates/macros/form.html:410 msgid "Custom" msgstr "Benutzerdefiniert" #: ckanext/odsh/templates/macros/form.html:410 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:60 -#: 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:240 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:287 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:80 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:112 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:163 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:209 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:260 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:307 msgid "This field is required" msgstr "Dieses Feld ist erforderlich" @@ -535,8 +559,8 @@ msgid "My Organization" msgstr "Herausgeber" #: 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 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:48 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:53 msgid "Description" msgstr "Beschreibung" @@ -571,7 +595,6 @@ msgid "Save Organization" msgstr "Herausgeber speichern" #: ckanext/odsh/templates/organization/snippets/organization_item.html:15 -#: ckanext/odsh/templates/snippets/package_item.html:76 msgid "View {organization_name}" msgstr "{organization_name} anzeigen" @@ -672,7 +695,7 @@ msgid "Draft" msgstr "Entwurf" #: ckanext/odsh/templates/package/read.html:41 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:270 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:290 #: ckanext/odsh/templates/snippets/organization.html:24 #: ckanext/odsh/templates/snippets/package_item.html:83 msgid "Deleted" @@ -683,7 +706,7 @@ msgid "Manage Dataset" msgstr "Datensatz bearbeiten" #: ckanext/odsh/templates/package/read.html:54 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:246 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:266 #: ckanext/odsh/templates/snippets/package_item.html:70 msgid "Private" msgstr "Privat" @@ -704,17 +727,27 @@ msgstr "" #: 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>." +"Note: This dataset has been replaced with a <a " +"href=\"%(is_replaced_by)s\">newer version</a>." msgstr "" -"Hinweis: Dieser Datensatz wurde durch eine <a href=\"%(is_replaced_by)s" -"\">neuere Version</a> ersetzt." +"Hinweis: Dieser Datensatz wurde durch eine <a " +"href=\"%(is_replaced_by)s\">neuere Version</a> ersetzt." + +#: ckanext/odsh/templates/package/read.html:93 +#: ckanext/odsh/templates/package/snippets/resource_item.html:28 +msgid "Read more »" +msgstr "Mehr erfahren »" -#: ckanext/odsh/templates/package/read.html:103 +#: ckanext/odsh/templates/package/read.html:94 +#: ckanext/odsh/templates/package/snippets/resource_item.html:29 +msgid "« Read less" +msgstr "« Weniger anzeigen" + +#: ckanext/odsh/templates/package/read.html:110 msgid "Add new resource" msgstr "Neue Ressource hinzufügen" -#: ckanext/odsh/templates/package/read.html:113 +#: ckanext/odsh/templates/package/read.html:120 #, python-format msgid "" "This record is part of the series <a href=\"%(url)s\">%(title)s</a>. You can " @@ -723,17 +756,17 @@ 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 +#: ckanext/odsh/templates/package/read.html:128 msgid "latest collection member" msgstr "Neuester Datensatz" -#: ckanext/odsh/templates/package/read.html:126 -#: ckanext/odsh/templates/package/read.html:131 +#: ckanext/odsh/templates/package/read.html:133 +#: ckanext/odsh/templates/package/read.html:138 msgid "predecessor" msgstr "Vorgänger" -#: ckanext/odsh/templates/package/read.html:136 -#: ckanext/odsh/templates/package/read.html:141 +#: ckanext/odsh/templates/package/read.html:143 +#: ckanext/odsh/templates/package/read.html:148 msgid "successor" msgstr "Nachfolger" @@ -771,35 +804,35 @@ msgstr "Aus der Zusammenfassung des Datensatzes" msgid "Source: <a href=\"%(url)s\">%(dataset)s</a>" msgstr "Quelle: <a href=\"%(url)s\">%(dataset)s</a>" -#: ckanext/odsh/templates/package/resource_read.html:109 +#: ckanext/odsh/templates/package/resource_read.html:101 msgid "There are no views created for this resource yet." msgstr "Für diese Ressource sind noch keine Ansichten erstellt worden." -#: ckanext/odsh/templates/package/resource_read.html:113 +#: ckanext/odsh/templates/package/resource_read.html:105 msgid "Not seeing the views you were expecting?" msgstr "Sie sehen nicht die Ansichten, die Sie erwartet haben?" -#: ckanext/odsh/templates/package/resource_read.html:115 +#: ckanext/odsh/templates/package/resource_read.html:107 msgid "Click here for more information." msgstr "Klicken Sie hier für weitere Informationen." -#: ckanext/odsh/templates/package/resource_read.html:118 +#: ckanext/odsh/templates/package/resource_read.html:110 msgid "Here are some reasons you may not be seeing expected views:" msgstr "" "Hier sind einige Gründe, warum Sie möglicherweise nicht die erwarteten " "Ansichten sehen:" -#: ckanext/odsh/templates/package/resource_read.html:120 +#: ckanext/odsh/templates/package/resource_read.html:112 msgid "No view has been created that is suitable for this resource" msgstr "Es wurde keine Ansicht erstellt, die für diese Ressource geeignet ist" -#: ckanext/odsh/templates/package/resource_read.html:121 +#: ckanext/odsh/templates/package/resource_read.html:113 msgid "The site administrators may not have enabled the relevant view plugins" msgstr "" "Die Website-Administratoren haben möglicherweise die entsprechenden Ansichts-" "Plugins nicht aktiviert" -#: ckanext/odsh/templates/package/resource_read.html:122 +#: ckanext/odsh/templates/package/resource_read.html:114 msgid "" "If a view requires the DataStore, the DataStore plugin may not be enabled, " "or the data may not have been pushed to the DataStore, or the DataStore " @@ -810,38 +843,38 @@ msgstr "" "übertragen, oder der DataStore hat die Verarbeitung der Daten noch nicht " "abgeschlossen" -#: ckanext/odsh/templates/package/resource_read.html:144 +#: ckanext/odsh/templates/package/resource_read.html:136 msgid "Additional Information" msgstr "Zusätzliche Informationen" -#: ckanext/odsh/templates/package/resource_read.html:148 +#: ckanext/odsh/templates/package/resource_read.html:140 msgid "Field" msgstr "Feld" -#: ckanext/odsh/templates/package/resource_read.html:149 +#: ckanext/odsh/templates/package/resource_read.html:141 msgid "Value" msgstr "Wert" -#: ckanext/odsh/templates/package/resource_read.html:154 +#: ckanext/odsh/templates/package/resource_read.html:146 msgid "Data last updated" msgstr "Daten zuletzt aktualisiert" +#: ckanext/odsh/templates/package/resource_read.html:147 +#: ckanext/odsh/templates/package/resource_read.html:151 #: ckanext/odsh/templates/package/resource_read.html:155 #: ckanext/odsh/templates/package/resource_read.html:159 -#: ckanext/odsh/templates/package/resource_read.html:163 -#: ckanext/odsh/templates/package/resource_read.html:167 msgid "unknown" msgstr "unbekannt" -#: ckanext/odsh/templates/package/resource_read.html:158 +#: ckanext/odsh/templates/package/resource_read.html:150 msgid "Metadata last updated" msgstr "Metadaten zuletzt aktualisiert" -#: ckanext/odsh/templates/package/resource_read.html:162 +#: ckanext/odsh/templates/package/resource_read.html:154 msgid "Created" msgstr "Erstellt" -#: ckanext/odsh/templates/package/resource_read.html:166 +#: ckanext/odsh/templates/package/resource_read.html:158 #: ckanext/odsh/templates/package/snippets/resource_form.html:69 #: ckanext/odsh/templates/package/snippets/resource_info.html:26 msgid "Format" @@ -849,12 +882,12 @@ msgstr "Format" #: ckanext/odsh/templates/package/search.html:69 #: ckanext/odsh/templates/package/snippets/info.html:52 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:143 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:163 msgid "Period" msgstr "Zeitraum" #: ckanext/odsh/templates/package/search.html:79 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:156 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:176 #: ckanext/odsh/templates/snippets/search_form.html:115 msgid "from" msgstr "von" @@ -874,7 +907,7 @@ 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/package/snippets/package_basic_fields.html:190 #: ckanext/odsh/templates/snippets/search_form.html:142 msgid "to" msgstr "bis" @@ -904,6 +937,26 @@ msgstr "Ansicht anzeigen" msgid "View preview" msgstr "Vorschau ansehen" +#: ckanext/odsh/templates/package/snippets/contact_details.html:72 +msgid "Creator" +msgstr "Autor" + +#: ckanext/odsh/templates/package/snippets/contact_details.html:73 +msgid "Maintainer" +msgstr "Verwalter" + +#: ckanext/odsh/templates/package/snippets/contact_details.html:75 +msgid "Publisher" +msgstr "Herausgeber" + +#: ckanext/odsh/templates/package/snippets/contact_details.html:76 +msgid "Originator" +msgstr "Urheber" + +#: ckanext/odsh/templates/package/snippets/contact_details.html:77 +msgid "Contributor" +msgstr "Bearbeiter" + #: ckanext/odsh/templates/package/snippets/info.html:28 #: ckanext/odsh/templates/snippets/package_item.html:99 msgid "Category:" @@ -921,12 +974,12 @@ msgid "Modified" msgstr "Zuletzt bearbeitet" #: ckanext/odsh/templates/package/snippets/info.html:89 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:329 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:349 msgid "Musterdatensatz" msgstr "Musterdatensatz" #: ckanext/odsh/templates/package/snippets/info.html:99 -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:234 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:254 msgid "Spatial uri" msgstr "Raumbezug" @@ -955,54 +1008,60 @@ 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 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:15 msgid "Title" msgstr "Titel" -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:20 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:21 msgid "Enter title" msgstr "Titel eingeben" #: ckanext/odsh/templates/package/snippets/package_basic_fields.html:37 +#, fuzzy +#| msgid "dataset" +msgid "eg. my-dataset" +msgstr "Datensatz" + +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:57 msgid "Enter description" msgstr "Beschreibung eingeben" -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:59 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:79 msgid "Organization" msgstr "Herausgeber" -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:67 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:87 msgid "" "No\n" " organization" msgstr "Kein Herausgeber" -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:118 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:138 #: ckanext/odsh/templates/user/snippets/login_form.html:23 msgid "enter name" msgstr "Name eingeben" -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:189 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:209 msgid "Publication date" msgstr "Publikationsdatum" -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:225 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:245 msgid "odsh tags placeholder" msgstr "z.B. Energie; Politik; Umwelt; Alle; ..." -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:239 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:259 msgid "Visibility" msgstr "Sichtbarkeit" -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:246 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:266 msgid "Public" msgstr "Öffentlich" -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:260 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:280 msgid "State" msgstr "Status" -#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:267 +#: ckanext/odsh/templates/package/snippets/package_basic_fields.html:287 msgid "Active" msgstr "Aktiv" @@ -1118,15 +1177,15 @@ msgstr "Name Ressource" msgid "Resource count" msgstr "Anzahl Ressourcen" -#: ckanext/odsh/templates/package/snippets/resource_item.html:20 +#: ckanext/odsh/templates/package/snippets/resource_item.html:33 msgid "File size" msgstr "Dateigröße" -#: ckanext/odsh/templates/package/snippets/resource_item.html:24 +#: ckanext/odsh/templates/package/snippets/resource_item.html:37 msgid "Number of pages" msgstr "Seitenanzahl" -#: ckanext/odsh/templates/package/snippets/resource_item.html:29 +#: ckanext/odsh/templates/package/snippets/resource_item.html:43 msgid "download file" msgstr "Datei herunterladen" @@ -1140,8 +1199,8 @@ msgid "" "<p class=\"empty\">This dataset has no data, <a href=\"%(url)s\">why not add " "some?</a></p>" msgstr "" -"<p class=\"empty\">Dieser Datensatz enthält keine Daten, <a href=\"%(url)s" -"\">Warum nicht welche hinzufügen?</a></p>" +"<p class=\"empty\">Dieser Datensatz enthält keine Daten, <a " +"href=\"%(url)s\">Warum nicht welche hinzufügen?</a></p>" #: ckanext/odsh/templates/package/snippets/resources_list.html:30 msgid "This dataset has no data" @@ -1486,6 +1545,9 @@ msgstr "Einloggen" msgid "Not authorized to see this page" msgstr "Nicht berechtigt, diese Seite zu sehen" +#~ msgid "Contact Person" +#~ msgstr "Ansprechstelle" + #~ msgid "Enter search query for datasets" #~ msgstr "Suchanfrage für Datensätze eingeben" diff --git a/ckanext/odsh/plugin.py b/ckanext/odsh/plugin.py index ee6126c9cdc4f7f31087f91f62c97652a725c421..e71e23225605276ea1671b512ae911b56021bec7 100644 --- a/ckanext/odsh/plugin.py +++ b/ckanext/odsh/plugin.py @@ -331,6 +331,7 @@ class OdshPlugin(plugins.SingletonPlugin, DefaultTranslation, DefaultDatasetForm '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, + 'extract_email': helpers_odsh.extract_email, '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, diff --git a/ckanext/odsh/templates/header.html b/ckanext/odsh/templates/header.html index ed80dc23cf62717c6c2de0924deaf6822ae0726a..429f730b883cf976bc2b3ba1e3617dc23e400021 100644 --- a/ckanext/odsh/templates/header.html +++ b/ckanext/odsh/templates/header.html @@ -27,7 +27,7 @@ <div class="container navigation-container"> <div class='row navigation-row'> - <nav class="section navigation"> + <nav class="navigation"> <ul class="nav nav-pills"> <li class="header-menu-mobile" data-module="odsh_toggle_menu"> <a>{{ _('Menu') }}</a> diff --git a/ckanext/odsh/templates/package/read.html b/ckanext/odsh/templates/package/read.html index 03688153c7b653d3082a7e6c0c402bb35d48eae4..11057ec8849803ca3b1ad3cfca6a98f44d584619 100644 --- a/ckanext/odsh/templates/package/read.html +++ b/ckanext/odsh/templates/package/read.html @@ -54,47 +54,54 @@ {{ _('Private') }} </span> </div> - {% endif %} - </h2> - <div class="dataset-stars"> - {% if stars>-1%} - {% snippet "qa/stars.html", stars=stars %} - {% endif %} + {% endif %} + </h2> + <div class="dataset-stars"> + {% if stars>-1%} + {% snippet "qa/stars.html", stars=stars %} + {% endif %} + </div> </div> - </div> {# {{ 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" /> - {{ _('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 }} + {% 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> - {% endif %} - {% endblock package_notes %} -{% endblock package_description %} + {% 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"> + <div class="embedded-content" id="dataset-notes"> + {{ h.render_markdown(h.get_translated(pkg, 'notes')) }} + </div> + <div class="ellipsis-action" data-target="#dataset-notes" data-max-height="250"> + <div class="ellipsis-overlay"></div> + <a title="Read more" class="readmore" href="#">{% trans %}Read more »{% endtrans %}</a> + <a title="Read less" class="readless" href="#">{% trans %}« Read less{% endtrans %}</a> + </div> + </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 %} @@ -147,6 +154,9 @@ {% endif %} {# latest_collection_member #} {% endblock collection %} +{% block contact %} + {% snippet "package/snippets/contact_details.html", pkg=pkg %} +{% endblock contact %} <div class='tag-container'> {% for tag in pkg.tags %} diff --git a/ckanext/odsh/templates/package/snippets/contact_details.html b/ckanext/odsh/templates/package/snippets/contact_details.html new file mode 100644 index 0000000000000000000000000000000000000000..1f6947d72c7e5fd4c9052696351cfe7b0fcd6081 --- /dev/null +++ b/ckanext/odsh/templates/package/snippets/contact_details.html @@ -0,0 +1,80 @@ +{% set author_data = { + 'name': pkg.author, + 'email': h.extract_email(pkg.author_email), + 'tel': h.odsh_extract_value_from_extras(pkg.extras, 'author_tel'), + 'fax': h.odsh_extract_value_from_extras(pkg.extras, 'author_fax'), + 'city': h.odsh_extract_value_from_extras(pkg.extras, 'author_city'), + 'zip': h.odsh_extract_value_from_extras(pkg.extras, 'author_zip'), + 'street': h.odsh_extract_value_from_extras(pkg.extras, 'author_street'), + 'country': h.odsh_extract_value_from_extras(pkg.extras, 'author_country') +} %} + +{% set maintainer_data = { + 'name': h.odsh_extract_value_from_extras(pkg.extras, 'maintainer_name'), + 'email': h.extract_email(h.odsh_extract_value_from_extras(pkg.extras, 'maintainer_email')), + 'tel': h.odsh_extract_value_from_extras(pkg.extras, 'maintainer_tel'), + 'fax': h.odsh_extract_value_from_extras(pkg.extras, 'maintainer_fax'), + 'city': h.odsh_extract_value_from_extras(pkg.extras, 'maintainer_city'), + 'zip': h.odsh_extract_value_from_extras(pkg.extras, 'maintainer_zip'), + 'street': h.odsh_extract_value_from_extras(pkg.extras, 'maintainer_street'), + 'country': h.odsh_extract_value_from_extras(pkg.extras, 'maintainer_country') +} %} + +{% set contact_data = { + 'name': h.odsh_extract_value_from_extras(pkg.extras, 'contact_name'), + 'email': h.extract_email(h.odsh_extract_value_from_extras(pkg.extras, 'contact_email')), + 'tel': h.odsh_extract_value_from_extras(pkg.extras, 'contact_tel'), + 'fax': h.odsh_extract_value_from_extras(pkg.extras, 'contact_fax'), + 'city': h.odsh_extract_value_from_extras(pkg.extras, 'contact_city'), + 'zip': h.odsh_extract_value_from_extras(pkg.extras, 'contact_zip'), + 'street': h.odsh_extract_value_from_extras(pkg.extras, 'contact_street'), + 'country': h.odsh_extract_value_from_extras(pkg.extras, 'contact_country') +} %} + +{% set publisher_data = { + 'name': h.odsh_extract_value_from_extras(pkg.extras, 'publisher_name'), + 'email': h.extract_email(h.odsh_extract_value_from_extras(pkg.extras, 'publisher_email')), + 'tel': h.odsh_extract_value_from_extras(pkg.extras, 'publisher_tel'), + 'fax': h.odsh_extract_value_from_extras(pkg.extras, 'publisher_fax'), + 'city': h.odsh_extract_value_from_extras(pkg.extras, 'publisher_city'), + 'zip': h.odsh_extract_value_from_extras(pkg.extras, 'publisher_zip'), + 'street': h.odsh_extract_value_from_extras(pkg.extras, 'publisher_street'), + 'country': h.odsh_extract_value_from_extras(pkg.extras, 'publisher_country') +} %} + +{% set originator_data = { + 'name': h.odsh_extract_value_from_extras(pkg.extras, 'originator_name'), + 'email': h.extract_email(h.odsh_extract_value_from_extras(pkg.extras, 'originator_email')), + 'tel': h.odsh_extract_value_from_extras(pkg.extras, 'originator_tel'), + 'fax': h.odsh_extract_value_from_extras(pkg.extras, 'originator_fax'), + 'city': h.odsh_extract_value_from_extras(pkg.extras, 'originator_city'), + 'zip': h.odsh_extract_value_from_extras(pkg.extras, 'originator_zip'), + 'street': h.odsh_extract_value_from_extras(pkg.extras, 'originator_street'), + 'country': h.odsh_extract_value_from_extras(pkg.extras, 'originator_country') +} %} + +{% set contributor_data = { + 'name': h.odsh_extract_value_from_extras(pkg.extras, 'contributor_name'), + 'email': h.extract_email(h.odsh_extract_value_from_extras(pkg.extras, 'contributor_email')), + 'tel': h.odsh_extract_value_from_extras(pkg.extras, 'contributor_tel'), + 'fax': h.odsh_extract_value_from_extras(pkg.extras, 'contributor_fax'), + 'city': h.odsh_extract_value_from_extras(pkg.extras, 'contributor_city'), + 'zip': h.odsh_extract_value_from_extras(pkg.extras, 'contributor_zip'), + 'street': h.odsh_extract_value_from_extras(pkg.extras, 'contributor_street'), + 'country': h.odsh_extract_value_from_extras(pkg.extras, 'contributor_country') +} %} + + +{% if author_data.name or maintainer_data.name or contact_data.name or publisher_data.name or originator_data.name or contributor_data.name %} +<div class="section"> + <h3>{{ _('Contact') }}</h3> + + {% snippet "package/snippets/contact_details_item.html", data=author_data, title=_('Creator') %} + {% snippet "package/snippets/contact_details_item.html", data=maintainer_data, title=_('Maintainer') %} + {% snippet "package/snippets/contact_details_item.html", data=contact_data, title=_('Contact') %} + {% snippet "package/snippets/contact_details_item.html", data=publisher_data, title=_('Publisher') %} + {% snippet "package/snippets/contact_details_item.html", data=originator_data, title=_('Originator') %} + {% snippet "package/snippets/contact_details_item.html", data=contributor_data, title=_('Contributor') %} + +</div> +{% endif %} \ No newline at end of file diff --git a/ckanext/odsh/templates/package/snippets/contact_details_item.html b/ckanext/odsh/templates/package/snippets/contact_details_item.html new file mode 100644 index 0000000000000000000000000000000000000000..c7d073fd7a2f6f95ca048cdb8c8574142386671b --- /dev/null +++ b/ckanext/odsh/templates/package/snippets/contact_details_item.html @@ -0,0 +1,62 @@ +{% if data and (data.name or data.email or data.street or data.tel) and title %} +<div class="sub-section"> + <h5>{{ title }}</h5> + <table class="table table-striped"> + <tbody> + <tr> + <td> + {% if data.name %} + <p> + <span>{{ data.name }}</span> + </p> + {% endif %} + {% if data.street %} + <p> + {% if data.street %} + {{ data.street }} + {% endif %} + {% if data.zip and data.city %} + <br> + {{ data.zip }} + {{ data.city }} + {% endif %} + {% if data.country %} + <br> + {{ data.country }} + {% endif %} + </p> + {% endif %} + {% if data.email or data.tel or data.fax %} + <div class="details"> + {% if data.email %} + <div class="details-item"> + <i class="fa-solid fa-envelope"></i> + <a href="mailto:{{ data.email }}"> + {{ data.email }} + </a> + </div> + {% endif %} + {% if data.tel %} + <div class="details-item"> + <i class="fa-solid fa-phone"></i> + <a href="tel:{{ data.tel }}"> + {{ data.tel }} + </a> + </div> + {% endif %} + {% if data.fax %} + <div class="details-item"> + <i class="fa-solid fa-fax"></i> + <a href="fax:{{ data.fax }}"> + {{ data.fax }} + </a> + </div> + {% endif %} + </div> + {% endif %} + </td> + </tr> + </tbody> + </table> +</div> +{% endif %} \ 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 7f2e42385c9f1772c29b0b762b8bb74820a62f6a..5c957ea66e44e3bae6a7d52f14074d7c0ce52908 100644 --- a/ckanext/odsh/templates/package/snippets/resource_item.html +++ b/ckanext/odsh/templates/package/snippets/resource_item.html @@ -10,28 +10,35 @@ <li class="resource-item" data-id="{{ res.id }}"> <div class="resource-title-container"> - <div class="resource-title" title="{{ rtitle }}"> - {% if res.name %} + {% if res.name %} + <div class="resource-title" title="{{ rtitle }}"> <a href="{{ download }}" title="{{ res.name }}"> - {{ h.resource_display_name(res) | truncate(50) }} + {{ h.resource_display_name(res) | truncate(120) }} </a> - {% endif %} - </div> - {% 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> + {% endif %} + {% block resource_item_description %} + {% if res.description or resource_size %} + <div class="resource-description"> + {% if res.description %} + <p class="description" id="resource-description-{{ res.id }}"> + {{ h.markdown_extract(res.description, extract_length=0) }} + </p> + <div class="ellipsis-action" data-target="#resource-description-{{ res.id }}" data-max-height="75"> + <div class="ellipsis-overlay"></div> + <a title="Read more" class="readmore" href="#">{% trans %}Read more »{% endtrans %}</a> + <a title="Read less" class="readless" href="#">{% trans %}« Read less{% endtrans %}</a> + </div> + {% 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> + {% endif %} {% endblock %} <div class="resource-icons"> {% block resource_item_explore_links %} diff --git a/ckanext/odsh/tests/test_odsh_helpers.py b/ckanext/odsh/tests/test_odsh_helpers.py index fba58f02bb22c6da9da263addc0a2b4bd4e24c18..cdb33260ffa68621a9524a33178cd41e1b3718d7 100644 --- a/ckanext/odsh/tests/test_odsh_helpers.py +++ b/ckanext/odsh/tests/test_odsh_helpers.py @@ -2,34 +2,58 @@ import datetime from mock import patch import unittest -from ckanext.odsh.helpers import is_within_last_month +from ckanext.odsh.helpers import is_within_last_month, extract_email -class Test_is_within_last_month(unittest.TestCase): - def test_it_returns_true_for_simple_query(self): +class TestHelpers(unittest.TestCase): + # is_within_last_month + def test_within_last_month_with_same_month(self): date = datetime.date(2019, 4, 15) date_ref = datetime.date(2019, 4, 29) - assert is_within_last_month(date, date_ref) - - def test_it_uses_today_if_date_ref_missing(self): - date = datetime.date.today() - datetime.timedelta(days=20) - assert is_within_last_month(date) - - def test_it_returns_true_for_dates_in_different_years(self): + self.assertTrue(is_within_last_month(date, date_ref)) + + def test_within_last_month_with_different_years(self): date = datetime.date(2018, 12, 16) date_ref = datetime.date(2019, 1, 15) - assert is_within_last_month(date, date_ref) - - def test_it_returns_false_for_dates_in_different_years(self): - date = datetime.date(2018, 12, 15) - date_ref = datetime.date(2019, 1, 15) - assert is_within_last_month(date, date_ref)==False - - def test_it_returns_true_for_dates_in_differen_months(self): + self.assertTrue(is_within_last_month(date, date_ref)) + + def test_within_last_month_with_different_months(self): date = datetime.date(2018, 6, 16) date_ref = datetime.date(2018, 7, 10) - assert is_within_last_month(date, date_ref) - - def test_it_return_false_for_date_in_different_months(self): + self.assertTrue(is_within_last_month(date, date_ref)) + + def test_within_last_month_returns_false_for_invalid_dates(self): + date = datetime.date(2018, 12, 15) + date_ref = datetime.date(2019, 1, 15) + self.assertFalse(is_within_last_month(date, date_ref)) + + def test_within_last_month_returns_false_for_dates_in_different_months(self): date = datetime.date(2018, 6, 8) date_ref = datetime.date(2018, 7, 10) - assert is_within_last_month(date, date_ref)==False + self.assertFalse(is_within_last_month(date, date_ref)) + + def test_within_last_month_uses_today_if_date_ref_missing(self): + date = datetime.date.today() - datetime.timedelta(days=20) + self.assertTrue(is_within_last_month(date)) + + # extract_email + def test_extract_email_with_mailto_prefix(self): + email = extract_email("mailto:user1@example.com") + self.assertEqual(email, "user1@example.com") + + def test_extract_email_without_mailto_prefix(self): + email = extract_email("user1@example.com") + self.assertEqual(email, "user1@example.com") + + def test_extract_email_invalid_input(self): + email = extract_email("thisisnomail") + self.assertIsNone(email) + + email = extract_email(None) + self.assertIsNone(email) + + def test_extract_email_multiple_emails(self): + email = extract_email("Emails: user1@example.com, user2@example.com") + self.assertEqual(email, "user1@example.com") + +if __name__ == '__main__': + unittest.main() \ No newline at end of file