diff --git a/MANIFEST.in b/MANIFEST.in index 25e3d8f..3f4b7bc 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,3 @@ recursive-include ckanext/harvest/templates * -recursive-include ckanext/harvest/templates_new * recursive-include ckanext/harvest/fanstatic_library/styles * recursive-include ckanext/harvest/public * diff --git a/README.rst b/README.rst index 0da09ef..da72490 100644 --- a/README.rst +++ b/README.rst @@ -8,6 +8,9 @@ ckanext-harvest - Remote harvesting extension This extension provides a common harvesting framework for ckan extensions and adds a CLI and a WUI to CKAN to manage harvesting sources and jobs. +Requires CKAN 2.0 or later. + + Installation ============ @@ -192,8 +195,7 @@ Authorization Starting from CKAN 2.0, harvest sources behave exactly the same as datasets (they are actually internally implemented as a dataset type). That means they can be searched and faceted, and that the same authorization rules can be -applied to them. The default authorization settings are based on organizations -(equivalent to the `publisher profile` found in old versions). +applied to them. The default authorization settings are based on organizations. Have a look at the `Authorization `_ documentation on CKAN core to see how to configure your instance depending on @@ -231,7 +233,7 @@ field. The currently supported configuration options are: * {dataset_id} * {harvest_source_id} * {harvest_source_url} # Will be stripped of trailing forward slashes (/) - * {harvest_source_title} # Requires CKAN 1.6 + * {harvest_source_title} * {harvest_job_id} * {harvest_object_id} diff --git a/ckanext/harvest/controllers/organization.py b/ckanext/harvest/controllers/organization.py index ab70b89..20bcdfd 100644 --- a/ckanext/harvest/controllers/organization.py +++ b/ckanext/harvest/controllers/organization.py @@ -1,5 +1,4 @@ import logging -import genshi from urllib import urlencode from ckan import plugins as p @@ -60,21 +59,8 @@ class OrganizationController(GroupController): else: q += ' groups: "%s"' % c.group_dict.get('name') - try: - description_formatted = ckan.misc.MarkdownFormat().to_html( - c.group_dict.get('description', '')) - c.description_formatted = genshi.HTML(description_formatted) - except Exception, e: - error_msg = "%s" %\ - p.toolkit._("Cannot render description") - c.description_formatted = genshi.HTML(error_msg) - context['return_query'] = True - # c.group_admins is used by CKAN's legacy (Genshi) templates only, - # if we drop support for those then we can delete this line. - c.group_admins = ckan.new_authz.get_group_or_org_admin_ids(c.group.id) - try: page = int(request.params.get('page', 1)) except ValueError, e: diff --git a/ckanext/harvest/i18n/ckanext-harvest.pot b/ckanext/harvest/i18n/ckanext-harvest.pot index 2fdd283..6720bbd 100644 --- a/ckanext/harvest/i18n/ckanext-harvest.pot +++ b/ckanext/harvest/i18n/ckanext-harvest.pot @@ -9,98 +9,94 @@ msgid "" msgstr "" "Project-Id-Version: ckanext-harvest 0.2\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2015-06-10 12:12+0100\n" +"POT-Creation-Date: 2015-12-11 15:21+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 0.9.6\n" +"Generated-By: Babel 2.1.1\n" #: ckanext/harvest/helpers.py:70 msgid "title" msgstr "" -#: ckanext/harvest/controllers/organization.py:41 +#: ckanext/harvest/controllers/organization.py:40 msgid "Group not found" msgstr "" -#: ckanext/harvest/controllers/organization.py:43 +#: ckanext/harvest/controllers/organization.py:42 #, python-format msgid "Unauthorized to read group %s" msgstr "" -#: ckanext/harvest/controllers/organization.py:69 -msgid "Cannot render description" -msgstr "" - -#: ckanext/harvest/controllers/organization.py:151 +#: ckanext/harvest/controllers/organization.py:137 msgid "Groups" msgstr "" -#: ckanext/harvest/controllers/organization.py:152 +#: ckanext/harvest/controllers/organization.py:138 msgid "Tags" msgstr "" -#: ckanext/harvest/controllers/organization.py:153 +#: ckanext/harvest/controllers/organization.py:139 msgid "Formats" msgstr "" -#: ckanext/harvest/controllers/organization.py:154 +#: ckanext/harvest/controllers/organization.py:140 msgid "Licence" msgstr "" -#: ckanext/harvest/controllers/view.py:27 +#: ckanext/harvest/controllers/view.py:28 msgid "Not authorized to see this page" msgstr "" -#: ckanext/harvest/controllers/view.py:44 +#: ckanext/harvest/controllers/view.py:45 msgid "Harvesting source successfully cleared" msgstr "" -#: ckanext/harvest/controllers/view.py:46 +#: ckanext/harvest/controllers/view.py:47 msgid "Harvesting source successfully inactivated" msgstr "" -#: ckanext/harvest/controllers/view.py:50 ckanext/harvest/controllers/view.py:61 -#: ckanext/harvest/controllers/view.py:82 ckanext/harvest/controllers/view.py:143 -#: ckanext/harvest/controllers/view.py:181 ckanext/harvest/controllers/view.py:192 -#: ckanext/harvest/controllers/view.py:218 ckanext/harvest/logic/auth/create.py:34 +#: ckanext/harvest/controllers/view.py:51 ckanext/harvest/controllers/view.py:63 +#: ckanext/harvest/controllers/view.py:85 ckanext/harvest/controllers/view.py:146 +#: ckanext/harvest/controllers/view.py:184 ckanext/harvest/controllers/view.py:195 +#: ckanext/harvest/controllers/view.py:221 ckanext/harvest/logic/auth/create.py:34 #: ckanext/harvest/logic/auth/delete.py:18 ckanext/harvest/logic/auth/get.py:33 #: ckanext/harvest/logic/auth/update.py:19 msgid "Harvest source not found" msgstr "" -#: ckanext/harvest/controllers/view.py:59 -msgid "Refresh requested, harvesting will take place within 15 minutes." +#: ckanext/harvest/controllers/view.py:61 +msgid "Harvest will start shortly. Refresh this page for updates." msgstr "" -#: ckanext/harvest/controllers/view.py:66 +#: ckanext/harvest/controllers/view.py:67 msgid "" "Cannot create new harvest jobs on inactive sources. First, please change the " "source status to 'active'." msgstr "" -#: ckanext/harvest/controllers/view.py:69 +#: ckanext/harvest/controllers/view.py:71 msgid "A harvest job has already been scheduled for this source" msgstr "" -#: ckanext/harvest/controllers/view.py:80 +#: ckanext/harvest/controllers/view.py:83 msgid "Harvest source cleared" msgstr "" -#: ckanext/harvest/controllers/view.py:108 +#: ckanext/harvest/controllers/view.py:111 msgid "No content found" msgstr "" -#: ckanext/harvest/controllers/view.py:168 +#: ckanext/harvest/controllers/view.py:171 msgid "Harvest job not found" msgstr "" -#: ckanext/harvest/controllers/view.py:201 -#: ckanext/harvest/templates_new/source/admin.html:15 -#: ckanext/harvest/templates_new/source/job/list.html:13 +#: ckanext/harvest/controllers/view.py:204 +#: ckanext/harvest/templates/source/admin.html:15 +#: ckanext/harvest/templates/source/job/list.html:13 msgid "No jobs yet for this source" msgstr "" @@ -148,120 +144,120 @@ msgstr "" msgid "Only sysadmins can run the pending harvest jobs" msgstr "" -#: ckanext/harvest/logic/auth/update.py:68 +#: ckanext/harvest/logic/auth/update.py:89 msgid "Only sysadmins can reindex all harvest sources" msgstr "" -#: ckanext/harvest/templates_new/snippets/add_source_button.html:6 -#: ckanext/harvest/templates_new/source/org_source_list.html:11 +#: ckanext/harvest/templates/snippets/add_source_button.html:6 +#: ckanext/harvest/templates/source/org_source_list.html:11 msgid "Add Harvest Source" msgstr "" -#: ckanext/harvest/templates_new/snippets/job_details.html:26 -#: ckanext/harvest/templates_new/source/job/list.html:38 +#: ckanext/harvest/templates/snippets/job_details.html:26 +#: ckanext/harvest/templates/source/job/list.html:44 msgid "errors" msgstr "" -#: ckanext/harvest/templates_new/snippets/job_details.html:41 +#: ckanext/harvest/templates/snippets/job_details.html:41 msgid "Details" msgstr "" -#: ckanext/harvest/templates_new/snippets/job_details.html:48 +#: ckanext/harvest/templates/snippets/job_details.html:48 msgid "Id" msgstr "" -#: ckanext/harvest/templates_new/snippets/job_details.html:52 +#: ckanext/harvest/templates/snippets/job_details.html:52 msgid "Created" msgstr "" -#: ckanext/harvest/templates_new/snippets/job_details.html:56 +#: ckanext/harvest/templates/snippets/job_details.html:60 msgid "Started" msgstr "" -#: ckanext/harvest/templates_new/snippets/job_details.html:60 +#: ckanext/harvest/templates/snippets/job_details.html:68 msgid "Finished" msgstr "" -#: ckanext/harvest/templates_new/snippets/job_details.html:64 +#: ckanext/harvest/templates/snippets/job_details.html:76 msgid "Status" msgstr "" -#: ckanext/harvest/templates_new/snippets/job_error_summary.html:18 +#: ckanext/harvest/templates/snippets/job_error_summary.html:18 msgid "Count" msgstr "" -#: ckanext/harvest/templates_new/snippets/job_error_summary.html:19 +#: ckanext/harvest/templates/snippets/job_error_summary.html:19 msgid "Message" msgstr "" -#: ckanext/harvest/templates_new/snippets/package_list_empty.html:1 +#: ckanext/harvest/templates/snippets/package_list_empty.html:1 msgid "There are no datasets associated to this harvest source." msgstr "" -#: ckanext/harvest/templates_new/snippets/search_result_text.html:4 +#: ckanext/harvest/templates/snippets/search_result_text.html:4 msgid "{number} harvest source found for \"{query}\"" msgid_plural "{number} harvest sources found for \"{query}\"" msgstr[0] "" msgstr[1] "" -#: ckanext/harvest/templates_new/snippets/search_result_text.html:5 -#: ckanext/harvest/templates_new/source/org_source_list.html:17 -#: ckanext/harvest/templates_new/source/search_2.0.html:27 +#: ckanext/harvest/templates/snippets/search_result_text.html:5 +#: ckanext/harvest/templates/source/org_source_list.html:17 +#: ckanext/harvest/templates/source/search_2.0.html:27 msgid "Sorry no harvest sources found for \"{query}\"" msgstr "" -#: ckanext/harvest/templates_new/snippets/search_result_text.html:6 +#: ckanext/harvest/templates/snippets/search_result_text.html:6 msgid "{number} harvest source found" msgid_plural "{number} harvest sources found" msgstr[0] "" msgstr[1] "" -#: ckanext/harvest/templates_new/snippets/search_result_text.html:7 -#: ckanext/harvest/templates_new/source/org_source_list.html:25 +#: ckanext/harvest/templates/snippets/search_result_text.html:7 +#: ckanext/harvest/templates/source/org_source_list.html:25 msgid "Sorry no harvest sources found" msgstr "" -#: ckanext/harvest/templates_new/snippets/source_item.html:28 +#: ckanext/harvest/templates/snippets/source_item.html:28 msgid "Draft" msgstr "" -#: ckanext/harvest/templates_new/snippets/source_item.html:30 -#: ckanext/harvest/templates_new/source/new_source_form.html:83 +#: ckanext/harvest/templates/snippets/source_item.html:30 +#: ckanext/harvest/templates/source/new_source_form.html:83 msgid "Deleted" msgstr "" -#: ckanext/harvest/templates_new/snippets/source_item.html:37 -#: ckanext/harvest/templates_new/source/about.html:9 -#: ckanext/harvest/templates_new/source/read_base.html:25 +#: ckanext/harvest/templates/snippets/source_item.html:37 +#: ckanext/harvest/templates/source/about.html:9 +#: ckanext/harvest/templates/source/read_base.html:25 msgid "There is no description for this harvest source" msgstr "" -#: ckanext/harvest/templates_new/snippets/source_item.html:42 -#: ckanext/harvest/templates_new/source/read.html:5 -#: ckanext/harvest/templates_new/source/read_base.html:30 -#: ckanext/harvest/templates_new/source/read_base.html:53 +#: ckanext/harvest/templates/snippets/source_item.html:42 +#: ckanext/harvest/templates/source/read.html:5 +#: ckanext/harvest/templates/source/read_base.html:30 +#: ckanext/harvest/templates/source/read_base.html:53 msgid "Datasets" msgstr "" -#: ckanext/harvest/templates_new/snippets/source_item.html:45 -#: ckanext/harvest/templates_new/source/new_source_form.html:63 +#: ckanext/harvest/templates/snippets/source_item.html:45 +#: ckanext/harvest/templates/source/new_source_form.html:63 msgid "Organization" msgstr "" -#: ckanext/harvest/templates_new/source/admin.html:5 +#: ckanext/harvest/templates/source/admin.html:5 msgid "Last Harvest Job" msgstr "" -#: ckanext/harvest/templates_new/source/admin.html:11 +#: ckanext/harvest/templates/source/admin.html:11 msgid "View full job report" msgstr "" -#: ckanext/harvest/templates_new/source/admin_base.html:7 -#: ckanext/harvest/templates_new/source/read_base.html:4 +#: ckanext/harvest/templates/source/admin_base.html:7 +#: ckanext/harvest/templates/source/read_base.html:4 msgid "Admin" msgstr "" -#: ckanext/harvest/templates_new/source/admin_base.html:15 +#: ckanext/harvest/templates/source/admin_base.html:15 msgid "" "This will re-run the harvesting for this source. Any updates at the source " "will overwrite the local datasets. Sources with a large number of datasets " @@ -269,76 +265,76 @@ msgid "" "you would like us to start reharvesting." msgstr "" -#: ckanext/harvest/templates_new/source/admin_base.html:18 +#: ckanext/harvest/templates/source/admin_base.html:18 msgid "Start a new harvesting job for this harvest source now" msgstr "" -#: ckanext/harvest/templates_new/source/admin_base.html:20 +#: ckanext/harvest/templates/source/admin_base.html:20 msgid "Reharvest" msgstr "" -#: ckanext/harvest/templates_new/source/admin_base.html:24 +#: ckanext/harvest/templates/source/admin_base.html:24 msgid "" "Warning: This will remove all datasets for this source, as well as all " "previous job reports. Are you sure you want to continue?" msgstr "" -#: ckanext/harvest/templates_new/source/admin_base.html:27 +#: ckanext/harvest/templates/source/admin_base.html:27 msgid "Delete all harvest jobs and existing datasets from this source" msgstr "" -#: ckanext/harvest/templates_new/source/admin_base.html:28 +#: ckanext/harvest/templates/source/admin_base.html:28 msgid "Clear" msgstr "" -#: ckanext/harvest/templates_new/source/admin_base.html:32 +#: ckanext/harvest/templates/source/admin_base.html:32 msgid "View harvest source" msgstr "" -#: ckanext/harvest/templates_new/source/admin_base.html:48 +#: ckanext/harvest/templates/source/admin_base.html:48 msgid "Dashboard" msgstr "" -#: ckanext/harvest/templates_new/source/admin_base.html:49 +#: ckanext/harvest/templates/source/admin_base.html:49 msgid "Jobs" msgstr "" -#: ckanext/harvest/templates_new/source/admin_base.html:50 +#: ckanext/harvest/templates/source/admin_base.html:50 msgid "Edit" msgstr "" -#: ckanext/harvest/templates_new/source/base.html:17 +#: ckanext/harvest/templates/source/base.html:17 msgid "Organizations" msgstr "" -#: ckanext/harvest/templates_new/source/base.html:19 -#: ckanext/harvest/templates_new/source/base.html:22 -#: ckanext/harvest/templates_new/source/new.html:4 -#: ckanext/harvest/templates_new/source/org_source_list.html:3 -#: ckanext/harvest/templates_new/source/org_source_list.html:7 -#: ckanext/harvest/templates_new/source/org_source_list.html:19 -#: ckanext/harvest/templates_new/source/search.html:7 +#: ckanext/harvest/templates/source/base.html:19 +#: ckanext/harvest/templates/source/base.html:22 +#: ckanext/harvest/templates/source/new.html:4 +#: ckanext/harvest/templates/source/org_source_list.html:3 +#: ckanext/harvest/templates/source/org_source_list.html:7 +#: ckanext/harvest/templates/source/org_source_list.html:19 +#: ckanext/harvest/templates/source/search.html:7 msgid "Harvest Sources" msgstr "" -#: ckanext/harvest/templates_new/source/edit.html:3 +#: ckanext/harvest/templates/source/edit.html:3 msgid "Edit harvest source" msgstr "" -#: ckanext/harvest/templates_new/source/new.html:5 +#: ckanext/harvest/templates/source/new.html:5 msgid "Create Harvest Source" msgstr "" -#: ckanext/harvest/templates_new/source/new.html:11 +#: ckanext/harvest/templates/source/new.html:11 msgid "Create harvest source" msgstr "" -#: ckanext/harvest/templates_new/source/new.html:23 -#: ckanext/harvest/templates_new/source/search.html:3 +#: ckanext/harvest/templates/source/new.html:23 +#: ckanext/harvest/templates/source/search.html:3 msgid "Harvest sources" msgstr "" -#: ckanext/harvest/templates_new/source/new.html:26 +#: ckanext/harvest/templates/source/new.html:26 msgid "" " Harvest sources allow importing remote metadata into this catalog. Remote " "sources can be other catalogs such as other CKAN instances, CSW servers or " @@ -346,222 +342,222 @@ msgid "" "this instance). " msgstr "" -#: ckanext/harvest/templates_new/source/new_source_form.html:8 +#: ckanext/harvest/templates/source/new_source_form.html:8 msgid "URL" msgstr "" -#: ckanext/harvest/templates_new/source/new_source_form.html:10 +#: ckanext/harvest/templates/source/new_source_form.html:10 msgid "This should include the http:// part of the URL" msgstr "" -#: ckanext/harvest/templates_new/source/new_source_form.html:14 +#: ckanext/harvest/templates/source/new_source_form.html:14 msgid "Title" msgstr "" -#: ckanext/harvest/templates_new/source/new_source_form.html:14 +#: ckanext/harvest/templates/source/new_source_form.html:14 msgid "eg. A descriptive title" msgstr "" -#: ckanext/harvest/templates_new/source/new_source_form.html:21 +#: ckanext/harvest/templates/source/new_source_form.html:21 msgid "Name" msgstr "" -#: ckanext/harvest/templates_new/source/new_source_form.html:21 +#: ckanext/harvest/templates/source/new_source_form.html:21 msgid "eg. my-dataset" msgstr "" -#: ckanext/harvest/templates_new/source/new_source_form.html:23 +#: ckanext/harvest/templates/source/new_source_form.html:23 msgid "Description" msgstr "" -#: ckanext/harvest/templates_new/source/new_source_form.html:43 +#: ckanext/harvest/templates/source/new_source_form.html:43 msgid "Update frequency" msgstr "" -#: ckanext/harvest/templates_new/source/new_source_form.html:46 +#: ckanext/harvest/templates/source/new_source_form.html:46 msgid "Configuration" msgstr "" -#: ckanext/harvest/templates_new/source/new_source_form.html:66 +#: ckanext/harvest/templates/source/new_source_form.html:66 msgid "No organization" msgstr "" -#: ckanext/harvest/templates_new/source/new_source_form.html:79 +#: ckanext/harvest/templates/source/new_source_form.html:79 msgid "State" msgstr "" -#: ckanext/harvest/templates_new/source/new_source_form.html:82 +#: ckanext/harvest/templates/source/new_source_form.html:82 msgid "Active" msgstr "" -#: ckanext/harvest/templates_new/source/new_source_form.html:92 +#: ckanext/harvest/templates/source/new_source_form.html:92 msgid "" "This will flag the source as deleted but keep all its datasets and previous " "jobs. Are you sure you want to delete this harvest source?" msgstr "" -#: ckanext/harvest/templates_new/source/new_source_form.html:93 +#: ckanext/harvest/templates/source/new_source_form.html:93 msgid "" "Warning: Apart from deleting this source, this command will remove all its " "datasets, as well as all previous job reports. Are you sure you want to " "continue?" msgstr "" -#: ckanext/harvest/templates_new/source/new_source_form.html:96 +#: ckanext/harvest/templates/source/new_source_form.html:96 msgid "Delete" msgstr "" -#: ckanext/harvest/templates_new/source/new_source_form.html:102 +#: ckanext/harvest/templates/source/new_source_form.html:102 msgid "Delete source" msgstr "" -#: ckanext/harvest/templates_new/source/new_source_form.html:107 +#: ckanext/harvest/templates/source/new_source_form.html:107 msgid "Delete and clear source" msgstr "" -#: ckanext/harvest/templates_new/source/old_new_source_form.html:5 +#: ckanext/harvest/templates/source/old_new_source_form.html:5 msgid "Return to the harvest sources list" msgstr "" -#: ckanext/harvest/templates_new/source/org_source_list.html:15 -#: ckanext/harvest/templates_new/source/search_2.0.html:25 +#: ckanext/harvest/templates/source/org_source_list.html:15 +#: ckanext/harvest/templates/source/search_2.0.html:25 msgid " found for \"{query}\"" msgstr "" -#: ckanext/harvest/templates_new/source/org_source_list.html:31 +#: ckanext/harvest/templates/source/org_source_list.html:31 msgid "Search sources..." msgstr "" -#: ckanext/harvest/templates_new/source/org_source_list.html:32 -#: ckanext/harvest/templates_new/source/search_2.0.html:8 +#: ckanext/harvest/templates/source/org_source_list.html:32 +#: ckanext/harvest/templates/source/search_2.0.html:8 msgid "Search" msgstr "" -#: ckanext/harvest/templates_new/source/read_base.html:22 +#: ckanext/harvest/templates/source/read_base.html:22 msgid "read more" msgstr "" -#: ckanext/harvest/templates_new/source/read_base.html:54 +#: ckanext/harvest/templates/source/read_base.html:54 msgid "About" msgstr "" -#: ckanext/harvest/templates_new/source/search.html:44 +#: ckanext/harvest/templates/source/search.html:44 msgid "Relevance" msgstr "" -#: ckanext/harvest/templates_new/source/search.html:45 +#: ckanext/harvest/templates/source/search.html:45 msgid "Name Ascending" msgstr "" -#: ckanext/harvest/templates_new/source/search.html:46 +#: ckanext/harvest/templates/source/search.html:46 msgid "Name Descending" msgstr "" -#: ckanext/harvest/templates_new/source/search.html:47 +#: ckanext/harvest/templates/source/search.html:47 msgid "Last Modified" msgstr "" -#: ckanext/harvest/templates_new/source/search.html:48 +#: ckanext/harvest/templates/source/search.html:48 msgid "Popular" msgstr "" -#: ckanext/harvest/templates_new/source/search.html:50 +#: ckanext/harvest/templates/source/search.html:50 msgid "Search harvest sources..." msgstr "" -#: ckanext/harvest/templates_new/source/search_2.0.html:7 +#: ckanext/harvest/templates/source/search_2.0.html:7 msgid "Search..." msgstr "" -#: ckanext/harvest/templates_new/source/search_2.0.html:29 +#: ckanext/harvest/templates/source/search_2.0.html:29 msgid "All harvest sources" msgstr "" -#: ckanext/harvest/templates_new/source/search_2.0.html:42 +#: ckanext/harvest/templates/source/search_2.0.html:42 msgid "Remove" msgstr "" -#: ckanext/harvest/templates_new/source/search_2.0.html:48 +#: ckanext/harvest/templates/source/search_2.0.html:48 msgid "Try another search term, browse the sources below or " msgstr "" -#: ckanext/harvest/templates_new/source/search_2.0.html:49 +#: ckanext/harvest/templates/source/search_2.0.html:49 msgid "add a new one" msgstr "" -#: ckanext/harvest/templates_new/source/search_2.0.html:55 +#: ckanext/harvest/templates/source/search_2.0.html:55 msgid "" "

There was an error while searching. Please try " "again.

" msgstr "" -#: ckanext/harvest/templates_new/source/job/list.html:5 -#: ckanext/harvest/templates_new/source/job/list.html:10 +#: ckanext/harvest/templates/source/job/list.html:5 +#: ckanext/harvest/templates/source/job/list.html:10 msgid "Harvest Jobs" msgstr "" -#: ckanext/harvest/templates_new/source/job/list.html:21 +#: ckanext/harvest/templates/source/job/list.html:21 msgid "Job: " msgstr "" -#: ckanext/harvest/templates_new/source/job/list.html:28 +#: ckanext/harvest/templates/source/job/list.html:28 msgid "Started:" msgstr "" -#: ckanext/harvest/templates_new/source/job/list.html:28 -#: ckanext/harvest/templates_new/source/job/list.html:30 +#: ckanext/harvest/templates/source/job/list.html:30 +#: ckanext/harvest/templates/source/job/list.html:35 msgid "Not yet" msgstr "" -#: ckanext/harvest/templates_new/source/job/list.html:30 +#: ckanext/harvest/templates/source/job/list.html:33 msgid "Finished:" msgstr "" -#: ckanext/harvest/templates_new/source/job/read.html:3 -#: ckanext/harvest/templates_new/source/job/read.html:12 +#: ckanext/harvest/templates/source/job/read.html:3 +#: ckanext/harvest/templates/source/job/read.html:12 msgid "Job Report" msgstr "" -#: ckanext/harvest/templates_new/source/job/read.html:9 +#: ckanext/harvest/templates/source/job/read.html:9 msgid "Back to job list" msgstr "" -#: ckanext/harvest/templates_new/source/job/read.html:18 -#: ckanext/harvest/templates_new/source/job/read.html:22 +#: ckanext/harvest/templates/source/job/read.html:18 +#: ckanext/harvest/templates/source/job/read.html:22 msgid "Error Summary" msgstr "" -#: ckanext/harvest/templates_new/source/job/read.html:19 +#: ckanext/harvest/templates/source/job/read.html:19 msgid "No errors for this job" msgstr "" -#: ckanext/harvest/templates_new/source/job/read.html:23 +#: ckanext/harvest/templates/source/job/read.html:23 msgid "Only the 20 most frequent errors are shown" msgstr "" -#: ckanext/harvest/templates_new/source/job/read.html:26 -#: ckanext/harvest/templates_new/source/job/read.html:40 +#: ckanext/harvest/templates/source/job/read.html:26 +#: ckanext/harvest/templates/source/job/read.html:40 msgid "Job Errors" msgstr "" -#: ckanext/harvest/templates_new/source/job/read.html:30 -#: ckanext/harvest/templates_new/source/job/read.html:57 +#: ckanext/harvest/templates/source/job/read.html:30 +#: ckanext/harvest/templates/source/job/read.html:57 msgid "Document Errors" msgstr "" -#: ckanext/harvest/templates_new/source/job/read.html:37 +#: ckanext/harvest/templates/source/job/read.html:37 msgid "Error Report" msgstr "" -#: ckanext/harvest/templates_new/source/job/read.html:58 +#: ckanext/harvest/templates/source/job/read.html:58 msgid "documents with errors" msgstr "" -#: ckanext/harvest/templates_new/source/job/read.html:69 +#: ckanext/harvest/templates/source/job/read.html:69 msgid "Remote content" msgstr "" -#: ckanext/harvest/templates_new/source/job/read.html:73 +#: ckanext/harvest/templates/source/job/read.html:73 msgid "Local content" msgstr "" diff --git a/ckanext/harvest/i18n/sv/LC_MESSAGES/ckanext-harvest.po b/ckanext/harvest/i18n/sv/LC_MESSAGES/ckanext-harvest.po index e370a26..c48d0ce 100644 --- a/ckanext/harvest/i18n/sv/LC_MESSAGES/ckanext-harvest.po +++ b/ckanext/harvest/i18n/sv/LC_MESSAGES/ckanext-harvest.po @@ -1,113 +1,111 @@ -# Translations template for ckanext-harvest. +# Swedish translations for ckanext-harvest. # Copyright (C) 2015 ORGANIZATION # This file is distributed under the same license as the ckanext-harvest # project. -# +# # Translators: # Börje Lewin , 2015 msgid "" msgstr "" -"Project-Id-Version: ckanext-harvest\n" +"Project-Id-Version: ckanext-harvest\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2015-06-10 12:12+0100\n" +"POT-Creation-Date: 2015-12-11 15:21+0000\n" "PO-Revision-Date: 2015-06-11 17:28+0000\n" "Last-Translator: Börje Lewin \n" -"Language-Team: Swedish (http://www.transifex.com/projects/p/ckanext-harvest/language/sv/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 0.9.6\n" "Language: sv\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Language-Team: Swedish (http://www.transifex.com/projects/p/ckanext-" +"harvest/language/sv/)\n" +"Plural-Forms: nplurals=2; plural=(n != 1)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.1.1\n" #: ckanext/harvest/helpers.py:70 msgid "title" msgstr "rubrik" -#: ckanext/harvest/controllers/organization.py:41 +#: ckanext/harvest/controllers/organization.py:40 msgid "Group not found" msgstr "Hittar inte grupp" -#: ckanext/harvest/controllers/organization.py:43 +#: ckanext/harvest/controllers/organization.py:42 #, python-format msgid "Unauthorized to read group %s" msgstr "Obehörig att läsa grupp %s" -#: ckanext/harvest/controllers/organization.py:69 -msgid "Cannot render description" -msgstr "Kan inte generera beskrivning" - -#: ckanext/harvest/controllers/organization.py:151 +#: ckanext/harvest/controllers/organization.py:137 msgid "Groups" msgstr "Grupper" -#: ckanext/harvest/controllers/organization.py:152 +#: ckanext/harvest/controllers/organization.py:138 msgid "Tags" msgstr "Taggar" -#: ckanext/harvest/controllers/organization.py:153 +#: ckanext/harvest/controllers/organization.py:139 msgid "Formats" msgstr "Format" -#: ckanext/harvest/controllers/organization.py:154 +#: ckanext/harvest/controllers/organization.py:140 msgid "Licence" msgstr "Licens" -#: ckanext/harvest/controllers/view.py:27 +#: ckanext/harvest/controllers/view.py:28 msgid "Not authorized to see this page" msgstr "Obehörig att se denna sida" -#: ckanext/harvest/controllers/view.py:44 +#: ckanext/harvest/controllers/view.py:45 msgid "Harvesting source successfully cleared" msgstr "Källan för skördning har raderats" -#: ckanext/harvest/controllers/view.py:46 +#: ckanext/harvest/controllers/view.py:47 msgid "Harvesting source successfully inactivated" msgstr "Källan för skördning har avaktiverats" -#: ckanext/harvest/controllers/view.py:50 -#: ckanext/harvest/controllers/view.py:61 -#: ckanext/harvest/controllers/view.py:82 -#: ckanext/harvest/controllers/view.py:143 -#: ckanext/harvest/controllers/view.py:181 -#: ckanext/harvest/controllers/view.py:192 -#: ckanext/harvest/controllers/view.py:218 +#: ckanext/harvest/controllers/view.py:51 +#: ckanext/harvest/controllers/view.py:63 +#: ckanext/harvest/controllers/view.py:85 +#: ckanext/harvest/controllers/view.py:146 +#: ckanext/harvest/controllers/view.py:184 +#: ckanext/harvest/controllers/view.py:195 +#: ckanext/harvest/controllers/view.py:221 #: ckanext/harvest/logic/auth/create.py:34 -#: ckanext/harvest/logic/auth/delete.py:18 -#: ckanext/harvest/logic/auth/get.py:33 +#: ckanext/harvest/logic/auth/delete.py:18 ckanext/harvest/logic/auth/get.py:33 #: ckanext/harvest/logic/auth/update.py:19 msgid "Harvest source not found" msgstr "Hittar inte källan" -#: ckanext/harvest/controllers/view.py:59 -msgid "Refresh requested, harvesting will take place within 15 minutes." -msgstr "Uppdatering har begärts, skördning sker inom 15 minuter." +#: ckanext/harvest/controllers/view.py:61 +msgid "Harvest will start shortly. Refresh this page for updates." +msgstr "" -#: ckanext/harvest/controllers/view.py:66 +#: ckanext/harvest/controllers/view.py:67 msgid "" -"Cannot create new harvest jobs on inactive sources. First, please change the" -" source status to 'active'." -msgstr "Kan inte skapa nya skördningsjobb för inaktiva källor. Ändra först källans status till 'aktiv'." +"Cannot create new harvest jobs on inactive sources. First, please change " +"the source status to 'active'." +msgstr "" +"Kan inte skapa nya skördningsjobb för inaktiva källor. Ändra först " +"källans status till 'aktiv'." -#: ckanext/harvest/controllers/view.py:69 +#: ckanext/harvest/controllers/view.py:71 msgid "A harvest job has already been scheduled for this source" msgstr "Ett skördningsjobb har redan schemalagts för denna källa" -#: ckanext/harvest/controllers/view.py:80 +#: ckanext/harvest/controllers/view.py:83 msgid "Harvest source cleared" msgstr "Skördningskällan har rensats" -#: ckanext/harvest/controllers/view.py:108 +#: ckanext/harvest/controllers/view.py:111 msgid "No content found" msgstr "Hittar inget innehåll" -#: ckanext/harvest/controllers/view.py:168 +#: ckanext/harvest/controllers/view.py:171 msgid "Harvest job not found" msgstr "Hittar inte skördningsjobbet" -#: ckanext/harvest/controllers/view.py:201 -#: ckanext/harvest/templates_new/source/admin.html:15 -#: ckanext/harvest/templates_new/source/job/list.html:13 +#: ckanext/harvest/controllers/view.py:204 +#: ckanext/harvest/templates/source/admin.html:15 +#: ckanext/harvest/templates/source/job/list.html:13 msgid "No jobs yet for this source" msgstr "Det finns inga jobb för denna källa" @@ -155,419 +153,439 @@ msgstr "Endast systemadministratörer kan importera om skördningsobjekt" msgid "Only sysadmins can run the pending harvest jobs" msgstr "Endast systemadministratörer kan köra väntande skördningsjobb" -#: ckanext/harvest/logic/auth/update.py:68 +#: ckanext/harvest/logic/auth/update.py:89 msgid "Only sysadmins can reindex all harvest sources" msgstr "Endast systemadministratörer kan omindexera skördningskällor" -#: ckanext/harvest/templates_new/snippets/add_source_button.html:6 -#: ckanext/harvest/templates_new/source/org_source_list.html:11 +#: ckanext/harvest/templates/snippets/add_source_button.html:6 +#: ckanext/harvest/templates/source/org_source_list.html:11 msgid "Add Harvest Source" msgstr "Lägg till skördningskälla" -#: ckanext/harvest/templates_new/snippets/job_details.html:26 -#: ckanext/harvest/templates_new/source/job/list.html:38 +#: ckanext/harvest/templates/snippets/job_details.html:26 +#: ckanext/harvest/templates/source/job/list.html:44 msgid "errors" msgstr "fel" -#: ckanext/harvest/templates_new/snippets/job_details.html:41 +#: ckanext/harvest/templates/snippets/job_details.html:41 msgid "Details" msgstr "Detaljer" -#: ckanext/harvest/templates_new/snippets/job_details.html:48 +#: ckanext/harvest/templates/snippets/job_details.html:48 msgid "Id" msgstr "Id" -#: ckanext/harvest/templates_new/snippets/job_details.html:52 +#: ckanext/harvest/templates/snippets/job_details.html:52 msgid "Created" msgstr "Skapad" -#: ckanext/harvest/templates_new/snippets/job_details.html:56 +#: ckanext/harvest/templates/snippets/job_details.html:60 msgid "Started" msgstr "Påbörjad" -#: ckanext/harvest/templates_new/snippets/job_details.html:60 +#: ckanext/harvest/templates/snippets/job_details.html:68 msgid "Finished" msgstr "Avslutad" -#: ckanext/harvest/templates_new/snippets/job_details.html:64 +#: ckanext/harvest/templates/snippets/job_details.html:76 msgid "Status" msgstr "Status" -#: ckanext/harvest/templates_new/snippets/job_error_summary.html:18 +#: ckanext/harvest/templates/snippets/job_error_summary.html:18 msgid "Count" msgstr "Antal" -#: ckanext/harvest/templates_new/snippets/job_error_summary.html:19 +#: ckanext/harvest/templates/snippets/job_error_summary.html:19 msgid "Message" msgstr "Meddelande" -#: ckanext/harvest/templates_new/snippets/package_list_empty.html:1 +#: ckanext/harvest/templates/snippets/package_list_empty.html:1 msgid "There are no datasets associated to this harvest source." msgstr "Det finns inga dataset kopplade till denna skördningskälla" -#: ckanext/harvest/templates_new/snippets/search_result_text.html:4 +#: ckanext/harvest/templates/snippets/search_result_text.html:4 msgid "{number} harvest source found for \"{query}\"" msgid_plural "{number} harvest sources found for \"{query}\"" msgstr[0] "{number} skördningskälla hittades för \"{query}\"" msgstr[1] "{number} skördningskällor hittades för \"{query}\"" -#: ckanext/harvest/templates_new/snippets/search_result_text.html:5 -#: ckanext/harvest/templates_new/source/org_source_list.html:17 -#: ckanext/harvest/templates_new/source/search_2.0.html:27 +#: ckanext/harvest/templates/snippets/search_result_text.html:5 +#: ckanext/harvest/templates/source/org_source_list.html:17 +#: ckanext/harvest/templates/source/search_2.0.html:27 msgid "Sorry no harvest sources found for \"{query}\"" msgstr "Hittar inga skördningskällor för \"{query}\"" -#: ckanext/harvest/templates_new/snippets/search_result_text.html:6 +#: ckanext/harvest/templates/snippets/search_result_text.html:6 msgid "{number} harvest source found" msgid_plural "{number} harvest sources found" msgstr[0] "{number} skördningskälla hittades" msgstr[1] "{number} skördningskällor hittades" -#: ckanext/harvest/templates_new/snippets/search_result_text.html:7 -#: ckanext/harvest/templates_new/source/org_source_list.html:25 +#: ckanext/harvest/templates/snippets/search_result_text.html:7 +#: ckanext/harvest/templates/source/org_source_list.html:25 msgid "Sorry no harvest sources found" msgstr "Hittade inga skördningskällor" -#: ckanext/harvest/templates_new/snippets/source_item.html:28 +#: ckanext/harvest/templates/snippets/source_item.html:28 msgid "Draft" msgstr "Utkast" -#: ckanext/harvest/templates_new/snippets/source_item.html:30 -#: ckanext/harvest/templates_new/source/new_source_form.html:83 +#: ckanext/harvest/templates/snippets/source_item.html:30 +#: ckanext/harvest/templates/source/new_source_form.html:83 msgid "Deleted" msgstr "Borttagen" -#: ckanext/harvest/templates_new/snippets/source_item.html:37 -#: ckanext/harvest/templates_new/source/about.html:9 -#: ckanext/harvest/templates_new/source/read_base.html:25 +#: ckanext/harvest/templates/snippets/source_item.html:37 +#: ckanext/harvest/templates/source/about.html:9 +#: ckanext/harvest/templates/source/read_base.html:25 msgid "There is no description for this harvest source" msgstr "Det finns ingen beskrivning för denna skördningskälla" -#: ckanext/harvest/templates_new/snippets/source_item.html:42 -#: ckanext/harvest/templates_new/source/read.html:5 -#: ckanext/harvest/templates_new/source/read_base.html:30 -#: ckanext/harvest/templates_new/source/read_base.html:53 +#: ckanext/harvest/templates/snippets/source_item.html:42 +#: ckanext/harvest/templates/source/read.html:5 +#: ckanext/harvest/templates/source/read_base.html:30 +#: ckanext/harvest/templates/source/read_base.html:53 msgid "Datasets" msgstr "Dataset" -#: ckanext/harvest/templates_new/snippets/source_item.html:45 -#: ckanext/harvest/templates_new/source/new_source_form.html:63 +#: ckanext/harvest/templates/snippets/source_item.html:45 +#: ckanext/harvest/templates/source/new_source_form.html:63 msgid "Organization" msgstr "Organisation" -#: ckanext/harvest/templates_new/source/admin.html:5 +#: ckanext/harvest/templates/source/admin.html:5 msgid "Last Harvest Job" msgstr "Sista skördningsjobb" -#: ckanext/harvest/templates_new/source/admin.html:11 +#: ckanext/harvest/templates/source/admin.html:11 msgid "View full job report" msgstr "Visa fullständig jobbrapport" -#: ckanext/harvest/templates_new/source/admin_base.html:7 -#: ckanext/harvest/templates_new/source/read_base.html:4 +#: ckanext/harvest/templates/source/admin_base.html:7 +#: ckanext/harvest/templates/source/read_base.html:4 msgid "Admin" msgstr "Admin" -#: ckanext/harvest/templates_new/source/admin_base.html:15 +#: ckanext/harvest/templates/source/admin_base.html:15 msgid "" -"This will re-run the harvesting for this source. Any updates at the source " -"will overwrite the local datasets. Sources with a large number of datasets " -"may take a significant amount of time to finish harvesting. Please confirm " -"you would like us to start reharvesting." -msgstr "Skördningen kommer att köras igen för denna källa. Alla uppdateringar från källan kommer att ersätta lokala dataset. Källor med många dataset kan ta lång tid att skörda. Bekräfta om du vill starta en omskördning." +"This will re-run the harvesting for this source. Any updates at the " +"source will overwrite the local datasets. Sources with a large number of " +"datasets may take a significant amount of time to finish harvesting. " +"Please confirm you would like us to start reharvesting." +msgstr "" +"Skördningen kommer att köras igen för denna källa. Alla uppdateringar " +"från källan kommer att ersätta lokala dataset. Källor med många dataset " +"kan ta lång tid att skörda. Bekräfta om du vill starta en omskördning." -#: ckanext/harvest/templates_new/source/admin_base.html:18 +#: ckanext/harvest/templates/source/admin_base.html:18 msgid "Start a new harvesting job for this harvest source now" msgstr "Starta ett nytt skördningsjobb för denna skördningskälla nu." -#: ckanext/harvest/templates_new/source/admin_base.html:20 +#: ckanext/harvest/templates/source/admin_base.html:20 msgid "Reharvest" msgstr "Skörda om" -#: ckanext/harvest/templates_new/source/admin_base.html:24 +#: ckanext/harvest/templates/source/admin_base.html:24 msgid "" "Warning: This will remove all datasets for this source, as well as all " "previous job reports. Are you sure you want to continue?" -msgstr "Varning: Alla dataset för denna källa tas bort, liksom tidigare jobbrapporter. Vill du fortsätta?" +msgstr "" +"Varning: Alla dataset för denna källa tas bort, liksom tidigare " +"jobbrapporter. Vill du fortsätta?" -#: ckanext/harvest/templates_new/source/admin_base.html:27 +#: ckanext/harvest/templates/source/admin_base.html:27 msgid "Delete all harvest jobs and existing datasets from this source" msgstr "Ta bort alla skördningsjobb och befintliga dataset från denna källa" -#: ckanext/harvest/templates_new/source/admin_base.html:28 +#: ckanext/harvest/templates/source/admin_base.html:28 msgid "Clear" msgstr "Rensa" -#: ckanext/harvest/templates_new/source/admin_base.html:32 +#: ckanext/harvest/templates/source/admin_base.html:32 msgid "View harvest source" msgstr "Visa skördningskälla" -#: ckanext/harvest/templates_new/source/admin_base.html:48 +#: ckanext/harvest/templates/source/admin_base.html:48 msgid "Dashboard" msgstr "Kontrollpanel" -#: ckanext/harvest/templates_new/source/admin_base.html:49 +#: ckanext/harvest/templates/source/admin_base.html:49 msgid "Jobs" msgstr "Jobb" -#: ckanext/harvest/templates_new/source/admin_base.html:50 +#: ckanext/harvest/templates/source/admin_base.html:50 msgid "Edit" msgstr "Redigera" -#: ckanext/harvest/templates_new/source/base.html:17 +#: ckanext/harvest/templates/source/base.html:17 msgid "Organizations" msgstr "Organisationer" -#: ckanext/harvest/templates_new/source/base.html:19 -#: ckanext/harvest/templates_new/source/base.html:22 -#: ckanext/harvest/templates_new/source/new.html:4 -#: ckanext/harvest/templates_new/source/org_source_list.html:3 -#: ckanext/harvest/templates_new/source/org_source_list.html:7 -#: ckanext/harvest/templates_new/source/org_source_list.html:19 -#: ckanext/harvest/templates_new/source/search.html:7 +#: ckanext/harvest/templates/source/base.html:19 +#: ckanext/harvest/templates/source/base.html:22 +#: ckanext/harvest/templates/source/new.html:4 +#: ckanext/harvest/templates/source/org_source_list.html:3 +#: ckanext/harvest/templates/source/org_source_list.html:7 +#: ckanext/harvest/templates/source/org_source_list.html:19 +#: ckanext/harvest/templates/source/search.html:7 msgid "Harvest Sources" msgstr "Skördningskällor" -#: ckanext/harvest/templates_new/source/edit.html:3 +#: ckanext/harvest/templates/source/edit.html:3 msgid "Edit harvest source" msgstr "Redigera skördningskällo" -#: ckanext/harvest/templates_new/source/new.html:5 +#: ckanext/harvest/templates/source/new.html:5 msgid "Create Harvest Source" msgstr "Skapa skördningskälla" -#: ckanext/harvest/templates_new/source/new.html:11 +#: ckanext/harvest/templates/source/new.html:11 msgid "Create harvest source" msgstr "Skapa skördningskälla" -#: ckanext/harvest/templates_new/source/new.html:23 -#: ckanext/harvest/templates_new/source/search.html:3 +#: ckanext/harvest/templates/source/new.html:23 +#: ckanext/harvest/templates/source/search.html:3 msgid "Harvest sources" msgstr "Skördningskällor" -#: ckanext/harvest/templates_new/source/new.html:26 +#: ckanext/harvest/templates/source/new.html:26 msgid "" -" Harvest sources allow importing remote metadata into this catalog. Remote " -"sources can be other catalogs such as other CKAN instances, CSW servers or " -"Web Accessible Folders (WAF) (depending on the actual harvesters enabled for" -" this instance). " -msgstr "Skördningskällor kan användas för att importera metadata till katalogen. Källor kan vara kataloger (t ex CKAN-instanser), CSW-servrar eller Web Accessible Folders (WAF), beroende på antalet aktiverade skördningsformat för instansen. " +" Harvest sources allow importing remote metadata into this catalog. " +"Remote sources can be other catalogs such as other CKAN instances, CSW " +"servers or Web Accessible Folders (WAF) (depending on the actual " +"harvesters enabled for this instance). " +msgstr "" +"Skördningskällor kan användas för att importera metadata till katalogen. " +"Källor kan vara kataloger (t ex CKAN-instanser), CSW-servrar eller Web " +"Accessible Folders (WAF), beroende på antalet aktiverade skördningsformat" +" för instansen. " -#: ckanext/harvest/templates_new/source/new_source_form.html:8 +#: ckanext/harvest/templates/source/new_source_form.html:8 msgid "URL" msgstr "URL" -#: ckanext/harvest/templates_new/source/new_source_form.html:10 +#: ckanext/harvest/templates/source/new_source_form.html:10 msgid "This should include the http:// part of the URL" msgstr "Denna URL ska börja med http://" -#: ckanext/harvest/templates_new/source/new_source_form.html:14 +#: ckanext/harvest/templates/source/new_source_form.html:14 msgid "Title" msgstr "Rubrik" -#: ckanext/harvest/templates_new/source/new_source_form.html:14 +#: ckanext/harvest/templates/source/new_source_form.html:14 msgid "eg. A descriptive title" msgstr "t ex Beskrivande rubrik" -#: ckanext/harvest/templates_new/source/new_source_form.html:21 +#: ckanext/harvest/templates/source/new_source_form.html:21 msgid "Name" msgstr "Namn" -#: ckanext/harvest/templates_new/source/new_source_form.html:21 +#: ckanext/harvest/templates/source/new_source_form.html:21 msgid "eg. my-dataset" msgstr "t ex mitt-dataset" -#: ckanext/harvest/templates_new/source/new_source_form.html:23 +#: ckanext/harvest/templates/source/new_source_form.html:23 msgid "Description" msgstr "Beskrivning" -#: ckanext/harvest/templates_new/source/new_source_form.html:43 +#: ckanext/harvest/templates/source/new_source_form.html:43 msgid "Update frequency" msgstr "Uppdateringsfrekvens" -#: ckanext/harvest/templates_new/source/new_source_form.html:46 +#: ckanext/harvest/templates/source/new_source_form.html:46 msgid "Configuration" msgstr "Konfiguration" -#: ckanext/harvest/templates_new/source/new_source_form.html:66 +#: ckanext/harvest/templates/source/new_source_form.html:66 msgid "No organization" msgstr "Ingen organisation" -#: ckanext/harvest/templates_new/source/new_source_form.html:79 +#: ckanext/harvest/templates/source/new_source_form.html:79 msgid "State" msgstr "Status" -#: ckanext/harvest/templates_new/source/new_source_form.html:82 +#: ckanext/harvest/templates/source/new_source_form.html:82 msgid "Active" msgstr "Aktiv" -#: ckanext/harvest/templates_new/source/new_source_form.html:92 +#: ckanext/harvest/templates/source/new_source_form.html:92 msgid "" -"This will flag the source as deleted but keep all its datasets and previous " -"jobs. Are you sure you want to delete this harvest source?" -msgstr "Källan markeras som borttagen men alla dataset och tidigare jobb sparas. Vill du markera skördningskällan som borttagen?" +"This will flag the source as deleted but keep all its datasets and " +"previous jobs. Are you sure you want to delete this harvest source?" +msgstr "" +"Källan markeras som borttagen men alla dataset och tidigare jobb sparas. " +"Vill du markera skördningskällan som borttagen?" -#: ckanext/harvest/templates_new/source/new_source_form.html:93 +#: ckanext/harvest/templates/source/new_source_form.html:93 msgid "" -"Warning: Apart from deleting this source, this command will remove all its " -"datasets, as well as all previous job reports. Are you sure you want to " -"continue?" -msgstr "Varning. Förutom att källan tas bort, raderas även alla källans dataset och tidigare jobbrapporter. Vill du fortsätta med raderingen?" +"Warning: Apart from deleting this source, this command will remove all " +"its datasets, as well as all previous job reports. Are you sure you want " +"to continue?" +msgstr "" +"Varning. Förutom att källan tas bort, raderas även alla källans dataset " +"och tidigare jobbrapporter. Vill du fortsätta med raderingen?" -#: ckanext/harvest/templates_new/source/new_source_form.html:96 +#: ckanext/harvest/templates/source/new_source_form.html:96 msgid "Delete" msgstr "Ta bort" -#: ckanext/harvest/templates_new/source/new_source_form.html:102 +#: ckanext/harvest/templates/source/new_source_form.html:102 msgid "Delete source" msgstr "Ta bort källa" -#: ckanext/harvest/templates_new/source/new_source_form.html:107 +#: ckanext/harvest/templates/source/new_source_form.html:107 msgid "Delete and clear source" msgstr "Ta bort och rensa källa" -#: ckanext/harvest/templates_new/source/old_new_source_form.html:5 +#: ckanext/harvest/templates/source/old_new_source_form.html:5 msgid "Return to the harvest sources list" msgstr "Återgå till listan med skördningskällor" -#: ckanext/harvest/templates_new/source/org_source_list.html:15 -#: ckanext/harvest/templates_new/source/search_2.0.html:25 +#: ckanext/harvest/templates/source/org_source_list.html:15 +#: ckanext/harvest/templates/source/search_2.0.html:25 msgid " found for \"{query}\"" msgstr " hittades för \"{query}\"" -#: ckanext/harvest/templates_new/source/org_source_list.html:31 +#: ckanext/harvest/templates/source/org_source_list.html:31 msgid "Search sources..." msgstr "Sök källor..." -#: ckanext/harvest/templates_new/source/org_source_list.html:32 -#: ckanext/harvest/templates_new/source/search_2.0.html:8 +#: ckanext/harvest/templates/source/org_source_list.html:32 +#: ckanext/harvest/templates/source/search_2.0.html:8 msgid "Search" msgstr "Sök" -#: ckanext/harvest/templates_new/source/read_base.html:22 +#: ckanext/harvest/templates/source/read_base.html:22 msgid "read more" msgstr "läs mer" -#: ckanext/harvest/templates_new/source/read_base.html:54 +#: ckanext/harvest/templates/source/read_base.html:54 msgid "About" msgstr "Om" -#: ckanext/harvest/templates_new/source/search.html:44 +#: ckanext/harvest/templates/source/search.html:44 msgid "Relevance" msgstr "Relevans" -#: ckanext/harvest/templates_new/source/search.html:45 +#: ckanext/harvest/templates/source/search.html:45 msgid "Name Ascending" msgstr "Namn (stigande)" -#: ckanext/harvest/templates_new/source/search.html:46 +#: ckanext/harvest/templates/source/search.html:46 msgid "Name Descending" msgstr "Namn (fallande)" -#: ckanext/harvest/templates_new/source/search.html:47 +#: ckanext/harvest/templates/source/search.html:47 msgid "Last Modified" msgstr "Senast ändrad" -#: ckanext/harvest/templates_new/source/search.html:48 +#: ckanext/harvest/templates/source/search.html:48 msgid "Popular" msgstr "Populär" -#: ckanext/harvest/templates_new/source/search.html:50 +#: ckanext/harvest/templates/source/search.html:50 msgid "Search harvest sources..." msgstr "Sök skördningskällor..." -#: ckanext/harvest/templates_new/source/search_2.0.html:7 +#: ckanext/harvest/templates/source/search_2.0.html:7 msgid "Search..." msgstr "Sök..." -#: ckanext/harvest/templates_new/source/search_2.0.html:29 +#: ckanext/harvest/templates/source/search_2.0.html:29 msgid "All harvest sources" msgstr "Alla skördningskällor" -#: ckanext/harvest/templates_new/source/search_2.0.html:42 +#: ckanext/harvest/templates/source/search_2.0.html:42 msgid "Remove" msgstr "Radera" -#: ckanext/harvest/templates_new/source/search_2.0.html:48 +#: ckanext/harvest/templates/source/search_2.0.html:48 msgid "Try another search term, browse the sources below or " msgstr "Försök med en annan sökning, välj bland källorna nedan eller " -#: ckanext/harvest/templates_new/source/search_2.0.html:49 +#: ckanext/harvest/templates/source/search_2.0.html:49 msgid "add a new one" msgstr "lägg till en ny" -#: ckanext/harvest/templates_new/source/search_2.0.html:55 +#: ckanext/harvest/templates/source/search_2.0.html:55 msgid "" "

There was an error while searching. Please try " "again.

" msgstr "

Fel vid sökning. Försök igen.

" -#: ckanext/harvest/templates_new/source/job/list.html:5 -#: ckanext/harvest/templates_new/source/job/list.html:10 +#: ckanext/harvest/templates/source/job/list.html:5 +#: ckanext/harvest/templates/source/job/list.html:10 msgid "Harvest Jobs" msgstr "Skördningsjobb" -#: ckanext/harvest/templates_new/source/job/list.html:21 +#: ckanext/harvest/templates/source/job/list.html:21 msgid "Job: " msgstr "Jobb:" -#: ckanext/harvest/templates_new/source/job/list.html:28 +#: ckanext/harvest/templates/source/job/list.html:28 msgid "Started:" msgstr "Påbörjade:" -#: ckanext/harvest/templates_new/source/job/list.html:28 -#: ckanext/harvest/templates_new/source/job/list.html:30 +#: ckanext/harvest/templates/source/job/list.html:30 +#: ckanext/harvest/templates/source/job/list.html:35 msgid "Not yet" msgstr "Inte ännu" -#: ckanext/harvest/templates_new/source/job/list.html:30 +#: ckanext/harvest/templates/source/job/list.html:33 msgid "Finished:" msgstr "Avslutade:" -#: ckanext/harvest/templates_new/source/job/read.html:3 -#: ckanext/harvest/templates_new/source/job/read.html:12 +#: ckanext/harvest/templates/source/job/read.html:3 +#: ckanext/harvest/templates/source/job/read.html:12 msgid "Job Report" msgstr "Jobbrapport" -#: ckanext/harvest/templates_new/source/job/read.html:9 +#: ckanext/harvest/templates/source/job/read.html:9 msgid "Back to job list" msgstr "Tillbaka till jobblistan" -#: ckanext/harvest/templates_new/source/job/read.html:18 -#: ckanext/harvest/templates_new/source/job/read.html:22 +#: ckanext/harvest/templates/source/job/read.html:18 +#: ckanext/harvest/templates/source/job/read.html:22 msgid "Error Summary" msgstr "Översikt för felaktigheter" -#: ckanext/harvest/templates_new/source/job/read.html:19 +#: ckanext/harvest/templates/source/job/read.html:19 msgid "No errors for this job" msgstr "Inga felaktigheter för detta jobb" -#: ckanext/harvest/templates_new/source/job/read.html:23 +#: ckanext/harvest/templates/source/job/read.html:23 msgid "Only the 20 most frequent errors are shown" msgstr "Endast de 20 vanligaste felen visas" -#: ckanext/harvest/templates_new/source/job/read.html:26 -#: ckanext/harvest/templates_new/source/job/read.html:40 +#: ckanext/harvest/templates/source/job/read.html:26 +#: ckanext/harvest/templates/source/job/read.html:40 msgid "Job Errors" msgstr "Jobbfel" -#: ckanext/harvest/templates_new/source/job/read.html:30 -#: ckanext/harvest/templates_new/source/job/read.html:57 +#: ckanext/harvest/templates/source/job/read.html:30 +#: ckanext/harvest/templates/source/job/read.html:57 msgid "Document Errors" msgstr "Dokumentfel" -#: ckanext/harvest/templates_new/source/job/read.html:37 +#: ckanext/harvest/templates/source/job/read.html:37 msgid "Error Report" msgstr "Felrapport" -#: ckanext/harvest/templates_new/source/job/read.html:58 +#: ckanext/harvest/templates/source/job/read.html:58 msgid "documents with errors" msgstr "dokument med fel" -#: ckanext/harvest/templates_new/source/job/read.html:69 +#: ckanext/harvest/templates/source/job/read.html:69 msgid "Remote content" msgstr "Fjärrinnehåll" -#: ckanext/harvest/templates_new/source/job/read.html:73 +#: ckanext/harvest/templates/source/job/read.html:73 msgid "Local content" msgstr "Lokalt innehåll" + +#~ msgid "Cannot render description" +#~ msgstr "Kan inte generera beskrivning" + +#~ msgid "Refresh requested, harvesting will take place within 15 minutes." +#~ msgstr "Uppdatering har begärts, skördning sker inom 15 minuter." + diff --git a/ckanext/harvest/plugin.py b/ckanext/harvest/plugin.py index 94eb287..b26c504 100644 --- a/ckanext/harvest/plugin.py +++ b/ckanext/harvest/plugin.py @@ -229,12 +229,14 @@ class Harvest(p.SingletonPlugin, DefaultDatasetForm, DefaultTranslation): return map def update_config(self, config): - # check if new templates - templates = 'templates' - if p.toolkit.check_ckan_version(min_version='2.0'): - if not p.toolkit.asbool(config.get('ckan.legacy_templates', False)): - templates = 'templates_new' - p.toolkit.add_template_directory(config, templates) + if not p.toolkit.check_ckan_version(min_version='2.0'): + assert 0, 'CKAN before 2.0 not supported by ckanext-harvest - '\ + 'genshi templates not supported any more' + if p.toolkit.asbool(config.get('ckan.legacy_templates', False)): + log.warn('Old genshi templates not supported any more by ' + 'ckanext-harvest so you should set ckan.legacy_templates ' + 'option to True any more.') + p.toolkit.add_template_directory(config, 'templates') p.toolkit.add_public_directory(config, 'public') p.toolkit.add_resource('fanstatic_library', 'ckanext-harvest') p.toolkit.add_resource('public/ckanext/harvest/javascript', 'harvest-extra-field') diff --git a/ckanext/harvest/templates_new/base.html b/ckanext/harvest/templates/base.html similarity index 100% rename from ckanext/harvest/templates_new/base.html rename to ckanext/harvest/templates/base.html diff --git a/ckanext/harvest/templates/index.html b/ckanext/harvest/templates/index.html index 21351de..5eea4d7 100644 --- a/ckanext/harvest/templates/index.html +++ b/ckanext/harvest/templates/index.html @@ -1,95 +1,91 @@ - +{% extends "page.html" %} - Harvesting Sources +{% block title %}{{ _('Harvesting Sources') }} - {{ super() }}{% endblock %} - harvest no-sidebar - Harvesting Sources +{% block breadcrumb_content %} +{% endblock %} - - - - - - +{% block styles %} + {{ super() }} + +{% endblock %} -
-
+{% block scripts %} + {{ super() }} + +{% endblock %} -
-

Status:

- ${h.literal(c.status)} -
+{% block primary %} +
+
+

{% trans %}Harvesting Sources{% endtrans %}

+ {% if c.status %} +
+

{{ _('Status') }}:

+ {{ h.literal(c.status) }} +
+ {% endif %} - - - -
- - -
+ - - - - - - - - - - - - - - - - - - - - - - - + {% if c.sources %} +
+ + +
+
ViewEditRefreshURLTypeActiveStatisticsNext HarvestCreated
${source['publisher_title']}${source['publisher_id']}
+ + + + + + {# TRANSLATORS: Appears in harvest source table for the type of harvester #} + + {# TRANSLATORS: Appears in harvest source table 'is Active' #} + + + {# TRANSLATORS: Appears in harvest source table 'date of next harvest #} + + {# TRANSLATORS: Appears in harvest source table date created #} + + + {% set old_publisher = None %} + {% for source in c.sources %} + {% if c.publisher_auth and old_publisher != source['publisher_id'] %} + + {% if source.get('publisher_title') %} + + {% else %} + + {% endif %} + + {% endif %} + {% set old_publisher = source['publisher_id'] %} + + + + + + + + {% if 'msg' in source.status %} + + + {% else %} + + + {% endif %} + - - - - - - - - - - - - - - - - - - - + {% endfor %} +
{{ _('View') }}{{ _('Edit') }}{{ _('Refresh'}}URL{{ _('Type')}}{{ _('Active')}}{{ _('Statistics') }}{{ _('Next Harvest') }}{{ _('Created') }}
{{ source['publisher_title'] }}{{ source['publisher_id'] }}
ViewEditRefresh{{ source.url | truncate(50) }}{{ source.type }}{{ source.active }}{{ source.status.msg }}{{ source.status.msg }}Datasets: {{ source.status.overall_statistics.added }}
+ Last errors: {{ source.status.last_harvest_statistics.errors }}
{{ source.status.next_harvest }}{{ h.render_datetime(source.created) }}
ViewEditRefresh${truncate(source.url, 50)}${source.type}${source.active}${source.status.msg}${source.status.msg}Datasets: ${source.status.overall_statistics.added}
- Last errors: ${source.status.last_harvest_statistics.errors}
${source.status.next_harvest}
+ {% else %} +
{% trans %}No harvest sources defined yet.{% endtrans %}
+ {% endif %} +
+
+{% endblock %} - ${h.render_datetime(source.created)} - - - - - -
No harvest sources defined yet.
-
- - -
-
- - +{% block sidebar %}{% endblock %} diff --git a/ckanext/harvest/templates_new/snippets/add_source_button.html b/ckanext/harvest/templates/snippets/add_source_button.html similarity index 100% rename from ckanext/harvest/templates_new/snippets/add_source_button.html rename to ckanext/harvest/templates/snippets/add_source_button.html diff --git a/ckanext/harvest/templates_new/snippets/job_details.html b/ckanext/harvest/templates/snippets/job_details.html similarity index 100% rename from ckanext/harvest/templates_new/snippets/job_details.html rename to ckanext/harvest/templates/snippets/job_details.html diff --git a/ckanext/harvest/templates_new/snippets/job_error_summary.html b/ckanext/harvest/templates/snippets/job_error_summary.html similarity index 100% rename from ckanext/harvest/templates_new/snippets/job_error_summary.html rename to ckanext/harvest/templates/snippets/job_error_summary.html diff --git a/ckanext/harvest/templates_new/snippets/package_list_empty.html b/ckanext/harvest/templates/snippets/package_list_empty.html similarity index 100% rename from ckanext/harvest/templates_new/snippets/package_list_empty.html rename to ckanext/harvest/templates/snippets/package_list_empty.html diff --git a/ckanext/harvest/templates_new/snippets/search_result_text.html b/ckanext/harvest/templates/snippets/search_result_text.html similarity index 100% rename from ckanext/harvest/templates_new/snippets/search_result_text.html rename to ckanext/harvest/templates/snippets/search_result_text.html diff --git a/ckanext/harvest/templates_new/snippets/source_item.html b/ckanext/harvest/templates/snippets/source_item.html similarity index 100% rename from ckanext/harvest/templates_new/snippets/source_item.html rename to ckanext/harvest/templates/snippets/source_item.html diff --git a/ckanext/harvest/templates_new/snippets/source_list.html b/ckanext/harvest/templates/snippets/source_list.html similarity index 100% rename from ckanext/harvest/templates_new/snippets/source_list.html rename to ckanext/harvest/templates/snippets/source_list.html diff --git a/ckanext/harvest/templates_new/source/about.html b/ckanext/harvest/templates/source/about.html similarity index 100% rename from ckanext/harvest/templates_new/source/about.html rename to ckanext/harvest/templates/source/about.html diff --git a/ckanext/harvest/templates_new/source/admin.html b/ckanext/harvest/templates/source/admin.html similarity index 100% rename from ckanext/harvest/templates_new/source/admin.html rename to ckanext/harvest/templates/source/admin.html diff --git a/ckanext/harvest/templates_new/source/admin_base.html b/ckanext/harvest/templates/source/admin_base.html similarity index 100% rename from ckanext/harvest/templates_new/source/admin_base.html rename to ckanext/harvest/templates/source/admin_base.html diff --git a/ckanext/harvest/templates_new/source/base.html b/ckanext/harvest/templates/source/base.html similarity index 100% rename from ckanext/harvest/templates_new/source/base.html rename to ckanext/harvest/templates/source/base.html diff --git a/ckanext/harvest/templates/source/edit.html b/ckanext/harvest/templates/source/edit.html index bad3465..c5a62bc 100644 --- a/ckanext/harvest/templates/source/edit.html +++ b/ckanext/harvest/templates/source/edit.html @@ -1,24 +1,9 @@ - +{% extends "source/admin_base.html" %} - Edit - Harvest Source - Edit harvest source +{% block subtitle %}{{ _('Edit harvest source') }}{% endblock %} - hide-sidebar - - - - - -
-
- - - ${h.literal(c.form)} - -
-
- - +{% block primary_content_inner %} +
+ {% block form %}{{ c.form | safe }}{% endblock %} +
+{% endblock %} diff --git a/ckanext/harvest/templates_new/source/job/list.html b/ckanext/harvest/templates/source/job/list.html similarity index 100% rename from ckanext/harvest/templates_new/source/job/list.html rename to ckanext/harvest/templates/source/job/list.html diff --git a/ckanext/harvest/templates_new/source/job/read.html b/ckanext/harvest/templates/source/job/read.html similarity index 100% rename from ckanext/harvest/templates_new/source/job/read.html rename to ckanext/harvest/templates/source/job/read.html diff --git a/ckanext/harvest/templates/source/new.html b/ckanext/harvest/templates/source/new.html index 2321e6d..f98e69c 100644 --- a/ckanext/harvest/templates/source/new.html +++ b/ckanext/harvest/templates/source/new.html @@ -1,23 +1,35 @@ - +{% extends "source/admin_base.html" %} - New - Harvest Source - New harvest source +{% block breadcrumb_content %} +
  • {{ h.nav_named_link(_('Harvest Sources'), '{0}_search'.format(c.dataset_type)) }}
  • +
  • {{ h.nav_named_link(_('Create Harvest Source'), '{0}_new'.format(c.dataset_type)) }}
  • +{% endblock %} - hide-sidebar - - - - +{% block actions_content %} +{% endblock %} -
    -
    +{% block subtitle %}{{ _('Create harvest source') }}{% endblock %} - ${h.literal(c.form)} - -
    +{% block primary_content %} +
    +
    + {% block form %}{{ c.form | safe }}{% endblock %}
    - - +
    +{% endblock %} + +{% block secondary_content %} +
    +

    {{ _('Harvest sources') }}

    +
    +

    + {% trans %} + Harvest sources allow importing remote metadata into this catalog. + Remote sources can be other catalogs such as other CKAN instances, CSW + servers or Web Accessible Folders (WAF) (depending on the actual + harvesters enabled for this instance). + {% endtrans %} +

    +
    +
    +{% endblock %} diff --git a/ckanext/harvest/templates/source/new_source_form.html b/ckanext/harvest/templates/source/new_source_form.html index 2fdabf1..5e3f4c9 100644 --- a/ckanext/harvest/templates/source/new_source_form.html +++ b/ckanext/harvest/templates/source/new_source_form.html @@ -1,89 +1,118 @@ -
    +{% import 'macros/form.html' as form %} +{% resource 'harvest-extra-field/main' %} -
    -

    Errors in form

    -

    The form contains invalid entries:

    -
      -
    • ${"%s: %s" % (key, error)}
    • -
    -
    + -
    - Details -
    -
    -
    -
    ${errors.get('url', '')}
    -
    This should include the http:// part of the URL
    -
    -
    - -
    -
    ${errors.get('type', '')}
    -
    Which type of source does the URL above represent? -
      - -
    • ${harvester.title}: ${harvester.description}
    • -
      -
    -
    + {% block errors %}{{ form.errors(error_summary) }}{% endblock %} -
    -
    -
    ${errors.get('title', '')}
    -
    This will be shown as the datasets source.
    + {% call form.input('url', id='field-url', label=_('URL'), value=data.url, error=errors.url, classes=['control-full', 'control-large']) %} + + {{ _('This should include the http:// part of the URL') }} + + {% endcall %} -
    -
    -
    You can add your own notes here about what the URL above represents to remind you later.
    + {{ form.input('title', id='field-title', label=_('Title'), placeholder=_('eg. A descriptive title'), value=data.title, error=errors.title, classes=['control-full'], attrs={'data-module': 'slug-preview-target'}) }} -
    -
    - -
    -
    Cannot add any publishers.
    + {% set prefix = 'harvest' %} + {% set domain = h.url_for('{0}_read'.format(c.dataset_type), id='', qualified=true) %} + {% set domain = domain|replace("http://", "")|replace("https://", "") %} + {% set attrs = {'data-module': 'slug-preview-slug', 'data-module-prefix': domain, 'data-module-placeholder': ''} %} + {{ form.prepend('name', id='field-name', label=_('Name'), prepend=prefix, placeholder=_('eg. my-dataset'), value=data.name, error=errors.name, attrs=attrs) }} -
    -
    + {{ form.markdown('notes', id='field-notes', label=_('Description'), value=data.notes, error=errors.notes) }} -
    -
    - - -
    This harvest source is Active
    -
    - -
    This harvest source is Withdrawn
    -
    +
    + +
    + {% for harvester in h.harvesters_info() %} + {% set checked = False %} + {# select first option if nothing in data #} + {% if data.source_type == harvester['name'] or (not data.source_type and loop.first) %} + {% set checked = True %} + {% endif %} + + {% endfor %} +
    +
    + + {{ form.select('frequency', id='field-frequency', label=_('Update frequency'), options=h.harvest_frequencies(), selected=data.frequency, error=errors.frequency) }} + + {% block extra_config %} + {{ form.textarea('config', id='field-config', label=_('Configuration'), value=data.config, error=errors.config) }} + {% endblock extra_config %} + + {# if we have a default group then this wants remembering #} + {% if data.group_id %} + + {% endif %} + + {% set dataset_is_draft = data.get('state', 'draft').startswith('draft') or data.get('state', 'none') == 'none' %} + {% set dataset_has_organization = data.owner_org or data.group_id %} + {% set organizations_available = h.organizations_available('create_dataset') %} + {% set user_is_sysadmin = h.check_access('sysadmin') %} + {% set show_organizations_selector = organizations_available and (user_is_sysadmin or dataset_is_draft) %} + + {% if show_organizations_selector %} + {% set existing_org = data.owner_org %} +
    + +
    + +
    +
    + {% endif %} + + {% if data.get('id', None) and h.check_access('harvest_source_delete', {'id': data.id}) and data.get('state', 'none') == 'deleted' %} +
    + +
    + +
    +
    + {% endif %} + +

    + {% block delete_button %} + {% if data.get('id', None) and h.check_access('harvest_source_delete', {'id': data.id}) and not data.get('state', 'none') == 'deleted' %} + {% set locale_delete = h.dump_json({'content': _('This will flag the source as deleted but keep all its datasets and previous jobs. Are you sure you want to delete this harvest source?')}) %} + {% set locale_clear = h.dump_json({'content': _('Warning: Apart from deleting this source, this command will remove all its datasets, as well as all previous job reports. Are you sure you want to continue?')}) %} +

    + {% endif %} + {% endblock %} + + +

    -
    -
    -
    - or Return to the harvest sources list -
    diff --git a/ckanext/harvest/templates_new/source/old_new_source_form.html b/ckanext/harvest/templates/source/old_new_source_form.html similarity index 100% rename from ckanext/harvest/templates_new/source/old_new_source_form.html rename to ckanext/harvest/templates/source/old_new_source_form.html diff --git a/ckanext/harvest/templates_new/source/org_source_list.html b/ckanext/harvest/templates/source/org_source_list.html similarity index 100% rename from ckanext/harvest/templates_new/source/org_source_list.html rename to ckanext/harvest/templates/source/org_source_list.html diff --git a/ckanext/harvest/templates/source/read.html b/ckanext/harvest/templates/source/read.html index 04cbc39..8ba1f21 100644 --- a/ckanext/harvest/templates/source/read.html +++ b/ckanext/harvest/templates/source/read.html @@ -1,149 +1,8 @@ - +{% extends "source/read_base.html" %} - Harvest Source Details - Harvest Source Details - - - - - -
    -
    - - -
    NB: This Harvest Source is Withdrawn. Therefore the Gemini XML will not be harvested again. However, any metadata that was previously harvested, remains in the catalogue.
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ID${c.source.id}
    URL${c.source.url}
    Type${c.source.type}
    Withdrawn${not c.source.active}
    Title${c.source.title}
    Description${c.source.description}
    Configuration${c.source.config}-
    User${c.source.user_id}
    Publisher${c.source.publisher_title}${c.source.publisher_id}
    Created${c.source.created}
    Total jobs${c.source.status.job_count}
    Status - Last Harvest Errors: ${c.source.status.last_harvest_statistics.errors}
    - - - Gathering errors -
      -
    • - -
      ${line}
      -
    • -
    -
    -
    - - - Object errors -
    - - - - Last Harvest Added: ${c.source.status.last_harvest_statistics.added}
    - Last Harvest Updated: ${c.source.status.last_harvest_statistics.updated}
    - Last Harvest: ${c.source.status.last_harvest_request}
    - Next Harvest: ${c.source.status.next_harvest} -
    Total Errors${c.source.status.overall_statistics.errors}
    Total Datasets${c.source.status.overall_statistics.added}
    Datasets - -
    There could be a 10 minutes delay before these datasets (or changes to them) appear on - the site or on search results.
    - -

    There are ${c.page.item_count} datasets.

    - - ${c.page.pager()} - -
    - - ${c.page.pager()} - -
    -
    -
    -
    - - +{% block primary_content_inner %} +
    +

    {{ _('Datasets') }}

    + {{ h.package_list_for_source(source.id) }} +
    +{% endblock %} diff --git a/ckanext/harvest/templates_new/source/read_base.html b/ckanext/harvest/templates/source/read_base.html similarity index 100% rename from ckanext/harvest/templates_new/source/read_base.html rename to ckanext/harvest/templates/source/read_base.html diff --git a/ckanext/harvest/templates_new/source/search.html b/ckanext/harvest/templates/source/search.html similarity index 100% rename from ckanext/harvest/templates_new/source/search.html rename to ckanext/harvest/templates/source/search.html diff --git a/ckanext/harvest/templates_new/source/search_2.0.html b/ckanext/harvest/templates/source/search_2.0.html similarity index 100% rename from ckanext/harvest/templates_new/source/search_2.0.html rename to ckanext/harvest/templates/source/search_2.0.html diff --git a/ckanext/harvest/templates_new/index.html b/ckanext/harvest/templates_new/index.html deleted file mode 100644 index 5eea4d7..0000000 --- a/ckanext/harvest/templates_new/index.html +++ /dev/null @@ -1,91 +0,0 @@ -{% extends "page.html" %} - -{% block title %}{{ _('Harvesting Sources') }} - {{ super() }}{% endblock %} - -{% block breadcrumb_content %} -{% endblock %} - -{% block styles %} - {{ super() }} - -{% endblock %} - -{% block scripts %} - {{ super() }} - -{% endblock %} - -{% block primary %} -
    -
    -

    {% trans %}Harvesting Sources{% endtrans %}

    - {% if c.status %} -
    -

    {{ _('Status') }}:

    - {{ h.literal(c.status) }} -
    - {% endif %} - - - - {% if c.sources %} -
    - - -
    - - - - - - - - {# TRANSLATORS: Appears in harvest source table for the type of harvester #} - - {# TRANSLATORS: Appears in harvest source table 'is Active' #} - - - {# TRANSLATORS: Appears in harvest source table 'date of next harvest #} - - {# TRANSLATORS: Appears in harvest source table date created #} - - - {% set old_publisher = None %} - {% for source in c.sources %} - {% if c.publisher_auth and old_publisher != source['publisher_id'] %} - - {% if source.get('publisher_title') %} - - {% else %} - - {% endif %} - - {% endif %} - {% set old_publisher = source['publisher_id'] %} - - - - - - - - {% if 'msg' in source.status %} - - - {% else %} - - - {% endif %} - - - {% endfor %} -
    {{ _('View') }}{{ _('Edit') }}{{ _('Refresh'}}URL{{ _('Type')}}{{ _('Active')}}{{ _('Statistics') }}{{ _('Next Harvest') }}{{ _('Created') }}
    {{ source['publisher_title'] }}{{ source['publisher_id'] }}
    ViewEditRefresh{{ source.url | truncate(50) }}{{ source.type }}{{ source.active }}{{ source.status.msg }}{{ source.status.msg }}Datasets: {{ source.status.overall_statistics.added }}
    - Last errors: {{ source.status.last_harvest_statistics.errors }}
    {{ source.status.next_harvest }}{{ h.render_datetime(source.created) }}
    - {% else %} -
    {% trans %}No harvest sources defined yet.{% endtrans %}
    - {% endif %} -
    -
    -{% endblock %} - -{% block sidebar %}{% endblock %} diff --git a/ckanext/harvest/templates_new/source/edit.html b/ckanext/harvest/templates_new/source/edit.html deleted file mode 100644 index c5a62bc..0000000 --- a/ckanext/harvest/templates_new/source/edit.html +++ /dev/null @@ -1,9 +0,0 @@ -{% extends "source/admin_base.html" %} - -{% block subtitle %}{{ _('Edit harvest source') }}{% endblock %} - -{% block primary_content_inner %} -
    - {% block form %}{{ c.form | safe }}{% endblock %} -
    -{% endblock %} diff --git a/ckanext/harvest/templates_new/source/new.html b/ckanext/harvest/templates_new/source/new.html deleted file mode 100644 index f98e69c..0000000 --- a/ckanext/harvest/templates_new/source/new.html +++ /dev/null @@ -1,35 +0,0 @@ -{% extends "source/admin_base.html" %} - -{% block breadcrumb_content %} -
  • {{ h.nav_named_link(_('Harvest Sources'), '{0}_search'.format(c.dataset_type)) }}
  • -
  • {{ h.nav_named_link(_('Create Harvest Source'), '{0}_new'.format(c.dataset_type)) }}
  • -{% endblock %} - -{% block actions_content %} -{% endblock %} - -{% block subtitle %}{{ _('Create harvest source') }}{% endblock %} - -{% block primary_content %} -
    -
    - {% block form %}{{ c.form | safe }}{% endblock %} -
    -
    -{% endblock %} - -{% block secondary_content %} -
    -

    {{ _('Harvest sources') }}

    -
    -

    - {% trans %} - Harvest sources allow importing remote metadata into this catalog. - Remote sources can be other catalogs such as other CKAN instances, CSW - servers or Web Accessible Folders (WAF) (depending on the actual - harvesters enabled for this instance). - {% endtrans %} -

    -
    -
    -{% endblock %} diff --git a/ckanext/harvest/templates_new/source/new_source_form.html b/ckanext/harvest/templates_new/source/new_source_form.html deleted file mode 100644 index 5e3f4c9..0000000 --- a/ckanext/harvest/templates_new/source/new_source_form.html +++ /dev/null @@ -1,118 +0,0 @@ -{% import 'macros/form.html' as form %} -{% resource 'harvest-extra-field/main' %} - -
    - - {% block errors %}{{ form.errors(error_summary) }}{% endblock %} - - {% call form.input('url', id='field-url', label=_('URL'), value=data.url, error=errors.url, classes=['control-full', 'control-large']) %} - - {{ _('This should include the http:// part of the URL') }} - - {% endcall %} - - {{ form.input('title', id='field-title', label=_('Title'), placeholder=_('eg. A descriptive title'), value=data.title, error=errors.title, classes=['control-full'], attrs={'data-module': 'slug-preview-target'}) }} - - {% set prefix = 'harvest' %} - {% set domain = h.url_for('{0}_read'.format(c.dataset_type), id='', qualified=true) %} - {% set domain = domain|replace("http://", "")|replace("https://", "") %} - {% set attrs = {'data-module': 'slug-preview-slug', 'data-module-prefix': domain, 'data-module-placeholder': ''} %} - - {{ form.prepend('name', id='field-name', label=_('Name'), prepend=prefix, placeholder=_('eg. my-dataset'), value=data.name, error=errors.name, attrs=attrs) }} - - {{ form.markdown('notes', id='field-notes', label=_('Description'), value=data.notes, error=errors.notes) }} - -
    - -
    - {% for harvester in h.harvesters_info() %} - {% set checked = False %} - {# select first option if nothing in data #} - {% if data.source_type == harvester['name'] or (not data.source_type and loop.first) %} - {% set checked = True %} - {% endif %} - - {% endfor %} -
    -
    - - {{ form.select('frequency', id='field-frequency', label=_('Update frequency'), options=h.harvest_frequencies(), selected=data.frequency, error=errors.frequency) }} - - {% block extra_config %} - {{ form.textarea('config', id='field-config', label=_('Configuration'), value=data.config, error=errors.config) }} - {% endblock extra_config %} - - {# if we have a default group then this wants remembering #} - {% if data.group_id %} - - {% endif %} - - {% set dataset_is_draft = data.get('state', 'draft').startswith('draft') or data.get('state', 'none') == 'none' %} - {% set dataset_has_organization = data.owner_org or data.group_id %} - {% set organizations_available = h.organizations_available('create_dataset') %} - {% set user_is_sysadmin = h.check_access('sysadmin') %} - {% set show_organizations_selector = organizations_available and (user_is_sysadmin or dataset_is_draft) %} - - {% if show_organizations_selector %} - {% set existing_org = data.owner_org %} -
    - -
    - -
    -
    - {% endif %} - - {% if data.get('id', None) and h.check_access('harvest_source_delete', {'id': data.id}) and data.get('state', 'none') == 'deleted' %} -
    - -
    - -
    -
    - {% endif %} - -

    - {% block delete_button %} - {% if data.get('id', None) and h.check_access('harvest_source_delete', {'id': data.id}) and not data.get('state', 'none') == 'deleted' %} - {% set locale_delete = h.dump_json({'content': _('This will flag the source as deleted but keep all its datasets and previous jobs. Are you sure you want to delete this harvest source?')}) %} - {% set locale_clear = h.dump_json({'content': _('Warning: Apart from deleting this source, this command will remove all its datasets, as well as all previous job reports. Are you sure you want to continue?')}) %} -

    - {% endif %} - {% endblock %} - - -

    - - diff --git a/ckanext/harvest/templates_new/source/read.html b/ckanext/harvest/templates_new/source/read.html deleted file mode 100644 index 8ba1f21..0000000 --- a/ckanext/harvest/templates_new/source/read.html +++ /dev/null @@ -1,8 +0,0 @@ -{% extends "source/read_base.html" %} - -{% block primary_content_inner %} -
    -

    {{ _('Datasets') }}

    - {{ h.package_list_for_source(source.id) }} -
    -{% endblock %} diff --git a/setup.py b/setup.py index cfabe8a..f014dcd 100644 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ setup( 'ckanext': [ ('**.py', 'python', None), ('**.js', 'javascript', None), - ('**/templates_new/**.html', 'ckan', None), + ('**/templates/**.html', 'ckan', None), ], } ) diff --git a/test-core.ini b/test-core.ini index 4cae80d..029bd66 100644 --- a/test-core.ini +++ b/test-core.ini @@ -17,6 +17,7 @@ use = config:../ckan/test-core.ini # run fast. ckan.plugins = harvest ckan_harvester test_harvester test_action_harvester ckan.harvest.mq.type = redis +ckan.legacy_templates = false # NB: other test configuration should go in test-core.ini, which is # what the postgres tests use.