diff --git a/ckanext/kata/controllers.py b/ckanext/kata/controllers.py
index b80941ac..728df0cd 100644
--- a/ckanext/kata/controllers.py
+++ b/ckanext/kata/controllers.py
@@ -903,11 +903,10 @@ def pager_url(q=None, page=None):
def read(self, id):
_or_ = sqlalchemy.or_
- query = model.Session.query(model.Package, model.PackageExtra).filter(_or_(model.Package.name == id, model.Package.id == id)).join(model.PackageExtra).filter(model.PackageExtra.key == 'contact_0_email').first()
-
- if query and len(query) == 2 and query[0].state == 'deleted':
- c.org_title = model.Session.query(model.Group).filter(model.Group.id == query[0].owner_org).value('title')
- c.distributor_email = query[1].value
+ query = model.Session.query(model.Package).filter(_or_(model.Package.name == id, model.Package.id == id)).first()
+ if query and query.state == 'deleted':
+ c.org = model.Session.query(model.Group).filter(model.Group.id == query.owner_org).first()
+ c.title_json = query.title
return render('kata/tombstone.html')
return super(KataPackageController, self).read(id)
diff --git a/ckanext/kata/helpers.py b/ckanext/kata/helpers.py
index e3182e3a..2cd2d38a 100644
--- a/ckanext/kata/helpers.py
+++ b/ckanext/kata/helpers.py
@@ -511,7 +511,7 @@ def gtn_from_group(grp):
def get_flat_hierarchy(organization):
# Get a single organization based on data_dict's organization dict
- query = model.Group.search_by_name_or_title(organization.get('name'), group_type=None, is_org=True)
+ query = model.Group.search_by_name_or_title(organization.get('name') if organization.get('name') else organization.name, group_type=None, is_org=True)
org = query.first()
parent_hierarchy = org.get_parent_group_hierarchy(type='organization')
diff --git a/ckanext/kata/i18n/fi/LC_MESSAGES/ckan.mo b/ckanext/kata/i18n/fi/LC_MESSAGES/ckan.mo
index 8e27b5c5..fbafbf3b 100644
Binary files a/ckanext/kata/i18n/fi/LC_MESSAGES/ckan.mo and b/ckanext/kata/i18n/fi/LC_MESSAGES/ckan.mo differ
diff --git a/ckanext/kata/i18n/fi/LC_MESSAGES/ckan.po b/ckanext/kata/i18n/fi/LC_MESSAGES/ckan.po
index c24f4add..06cbf040 100644
--- a/ckanext/kata/i18n/fi/LC_MESSAGES/ckan.po
+++ b/ckanext/kata/i18n/fi/LC_MESSAGES/ckan.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Kata\n"
"Report-Msgid-Bugs-To: kata-project@postit.csc.fi>\n"
-"POT-Creation-Date: 2017-03-13 11:50+0000\n"
+"POT-Creation-Date: 2017-05-24 11:33+0000\n"
"PO-Revision-Date: 2010-04-08 07:44+0300\n"
"Last-Translator: CSC - IT Center for Science Ltd. \n"
@@ -26,11 +26,11 @@ msgstr "Artikkeli"
msgid "Unauthorized to add a harvest source"
msgstr "Ei oikeuksia luoda uutta haravointikohdetta"
-#: ckanext/kata/actions.py:507
+#: ckanext/kata/actions.py:539
msgid "You don't have permission to modify roles for this organization."
msgstr "Sinulla ei ole oikeuksia muokata tämän organisaation rooleja."
-#: ckanext/kata/actions.py:541
+#: ckanext/kata/actions.py:573
msgid "You don't have permission to remove this user."
msgstr "Sinulla ei ole oikeuksia poistaa tätä käyttäjää."
@@ -79,16 +79,16 @@ msgstr ""
msgid "User %s not authorized to delete resource %s"
msgstr "Käyttäjällä %s ei ole oikeuksia poistaa resurssia %s"
-#: ckanext/kata/controllers.py:472
+#: ckanext/kata/controllers.py:479
msgid "Bad Captcha. Please try again."
msgstr "Väärä Captcha. Ole hyvä ja yritä uudelleen."
-#: ckanext/kata/controllers.py:476
+#: ckanext/kata/controllers.py:483
msgid "Message not sent as logging wasn't permitted"
msgstr "Viestiä ei lähetetty, koska lokin tallentamista ei sallittu"
-#: ckanext/kata/controllers.py:480 ckanext/kata/controllers.py:582
-#: ckanext/kata/controllers.py:611
+#: ckanext/kata/controllers.py:487 ckanext/kata/controllers.py:592
+#: ckanext/kata/controllers.py:618
msgid ""
"Sending contact emails is prohibited for now. Please try again later or "
"contact customer service."
@@ -96,25 +96,25 @@ msgstr ""
"Asiakasviestien lähetys on parhaillaan poissa käytöstä. Ole hyvä ja yritä"
" myöhemmin uudelleen tai ota yhteyttä asiakaspalveluun."
-#: ckanext/kata/controllers.py:492
+#: ckanext/kata/controllers.py:499
msgid "Recipient not found"
msgstr "Vastaanottajaa ei löytynyt"
-#: ckanext/kata/controllers.py:501 ckanext/kata/controllers.py:507
+#: ckanext/kata/controllers.py:508 ckanext/kata/controllers.py:514
msgid "Message not sent. Couldn't confirm human interaction (spam bot control)"
msgstr ""
"Viestiä ei lähetetty. Tarkistukset bottien varalta antoivat positiivisen "
"tuloksen."
-#: ckanext/kata/controllers.py:527
+#: ckanext/kata/controllers.py:534
msgid "Message sent"
msgstr "Viesti lähetetty"
-#: ckanext/kata/controllers.py:529
+#: ckanext/kata/controllers.py:536
msgid "No message"
msgstr "Viesti on tyhjä"
-#: ckanext/kata/controllers.py:531
+#: ckanext/kata/controllers.py:538
msgid ""
"Message not sent. Please, provide reply address and name. Name must "
"contain at least three letters."
@@ -122,55 +122,55 @@ msgstr ""
"Viestiä ei lähetetty. Täytäthän sähköpostiosoite- ja nimitietosi. Nimen "
"on koostuttava vähintään kolmesta kirjaimesta."
-#: ckanext/kata/controllers.py:547 ckanext/kata/controllers.py:590
-#: ckanext/kata/controllers.py:608
+#: ckanext/kata/controllers.py:554 ckanext/kata/controllers.py:589
+#: ckanext/kata/controllers.py:615
#: ckanext/kata/theme/templates/kata/dummy.html:63
msgid "Dataset not found"
msgstr "Aineistoa ei löytynyt"
-#: ckanext/kata/controllers.py:664
+#: ckanext/kata/controllers.py:671
msgid "Login failed. Bad username or password."
msgstr "Kirjautuminen epäonnistui. Väärä käyttäjätunnus tai salasana."
-#: ckanext/kata/controllers.py:675
+#: ckanext/kata/controllers.py:682
msgid "Successfully logged out."
msgstr "Olet nyt kirjautunut ulos."
-#: ckanext/kata/controllers.py:693
+#: ckanext/kata/controllers.py:700
msgid "Unauthorized to upload metadata"
msgstr "Ei oikeuksia ladata metadataa palvelimelle"
-#: ckanext/kata/controllers.py:717
+#: ckanext/kata/controllers.py:724
msgid "Give upload URL or file."
msgstr "Anna tiedosto tai URL"
-#: ckanext/kata/controllers.py:722
+#: ckanext/kata/controllers.py:729
msgid "Could not fetch from url {ur}"
msgstr "Ei voituu noutaa osoitteesta {ur}"
-#: ckanext/kata/controllers.py:725
+#: ckanext/kata/controllers.py:732
msgid "Invalid upload URL"
msgstr "Virheellinen latausosoite"
-#: ckanext/kata/controllers.py:727
+#: ckanext/kata/controllers.py:734
msgid "Invalid XML content"
msgstr "Virheellinen XML sisältö"
-#: ckanext/kata/controllers.py:731
+#: ckanext/kata/controllers.py:738
msgid "Failed to load file"
msgstr "Tiedostoa ei voitu ladata"
-#: ckanext/kata/controllers.py:760 ckanext/kata/middleware.py:15
+#: ckanext/kata/controllers.py:767 ckanext/kata/middleware.py:15
msgid "Not authorized to see this page"
msgstr "Ei oikeuksia nähdä tätä sivua"
-#: ckanext/kata/controllers.py:838 ckanext/kata/theme/templates/header.html:31
+#: ckanext/kata/controllers.py:845 ckanext/kata/theme/templates/header.html:31
#: ckanext/kata/theme/templates/header.html:100
#: ckanext/kata/theme/templates/package/base.html:12
msgid "Organizations"
msgstr "Organisaatiot"
-#: ckanext/kata/controllers.py:839
+#: ckanext/kata/controllers.py:846
#: ckanext/kata/theme/templates/group/base_form_page.html:6
#: ckanext/kata/theme/templates/group/index.html:6
#: ckanext/kata/theme/templates/group/index.html:18
@@ -180,16 +180,16 @@ msgstr "Organisaatiot"
msgid "Groups"
msgstr "Ryhmät"
-#: ckanext/kata/controllers.py:840
+#: ckanext/kata/controllers.py:847
msgid "Tags"
msgstr "Asiasanat"
-#: ckanext/kata/controllers.py:841
+#: ckanext/kata/controllers.py:848
msgid "Formats"
msgstr "Formaatit"
-#: ckanext/kata/controllers.py:842
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:246
+#: ckanext/kata/controllers.py:849
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:247
#: ckanext/kata/theme/templates/package/snippets/package_usage_info.html:97
msgid "License"
msgstr "Lisenssi"
@@ -224,50 +224,50 @@ msgstr "Kieli on poistettu käytöstä, poistetaan kielet: '%s'"
msgid "Language %s not in ISO 639-2 T format"
msgstr "Väärä tai vääränmuotoinen kieli %s, ei ISO 639-2 T-muodossa"
-#: ckanext/kata/helpers.py:342
+#: ckanext/kata/helpers.py:343
#: ckanext/kata/theme/templates/package/read.html:21
#: ckanext/kata/theme/templates/package/related_list.html:13
msgid "Unpublished"
msgstr "Julkaisematon"
-#: ckanext/kata/helpers.py:342
+#: ckanext/kata/helpers.py:343
msgid "Published"
msgstr "Julkaistu"
-#: ckanext/kata/helpers.py:480
+#: ckanext/kata/helpers.py:481
msgid "By datasets"
msgstr "Aineistoittain"
-#: ckanext/kata/helpers.py:480
+#: ckanext/kata/helpers.py:481
msgid "Show all"
msgstr "Näytä kaikki"
#: ckanext/kata/settings.py:54
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:88
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:87
#: ckanext/kata/theme/templates/package/snippets/package_actors.html:20
#: ckanext/kata/theme/templates/revision/read.html:41
msgid "Author"
msgstr "Tekijä"
#: ckanext/kata/settings.py:55
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:179
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:178
msgid "Contributor"
msgstr "Avustaja"
-#: ckanext/kata/settings.py:56 ckanext/kata/settings.py:174
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:116
+#: ckanext/kata/settings.py:56 ckanext/kata/settings.py:175
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:115
#: ckanext/kata/theme/templates/package/snippets/package_actors.html:127
msgid "Distributor"
msgstr "Jakelija"
#: ckanext/kata/settings.py:57
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:415
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:416
#: ckanext/kata/theme/templates/package/snippets/package_actors.html:240
msgid "Funder"
msgstr "Rahoittaja"
#: ckanext/kata/settings.py:58
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:142
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:141
#: ckanext/kata/theme/templates/package/snippets/package_actors.html:285
msgid "Owner"
msgstr "Omistaja"
@@ -276,11 +276,11 @@ msgstr "Omistaja"
msgid "Producer"
msgstr "Tuottaja"
-#: ckanext/kata/settings.py:175
+#: ckanext/kata/settings.py:176
msgid "Owner organization"
msgstr "Omistajaorganisaatio"
-#: ckanext/kata/settings.py:176
+#: ckanext/kata/settings.py:177
#: ckanext/kata/theme/templates/package/snippets/package_terms_of_use.html:4
#: ckanext/kata/theme/templates/package/snippets/package_terms_of_use.html:11
msgid "Terms of use"
@@ -347,7 +347,25 @@ msgstr ""
"Tieteenalan \"%s\" pitää koostua alfanumeerisita merkeistä (ascii) ja "
"erikoismerkeistä: -,:#+?=&/."
-#: ckanext/kata/validators.py:297
+#: ckanext/kata/validators.py:282 ckanext/kata/validators.py:290
+#, python-format
+msgid ""
+"Discipline \"%s\" is not part of the official classification of "
+"disciplines. See help for further info."
+msgstr ""
+"Tieteenala \"%s\" ei kuulu viralliseen tieteenalaluokitukseen. "
+"Katso ohje."
+
+#: ckanext/kata/validators.py:287
+#, python-format
+msgid ""
+"Discipline \"%s\" must be a valid URL defined in Finto okm-tieteenala "
+"vocabulary. See help for further info."
+msgstr ""
+"Tieteenalan \"%s\" pitää olla URL, joka on määritelty Finton "
+ "okm-tieteenala sanastossa. Katso ohje."
+
+#: ckanext/kata/validators.py:312
#, python-format
msgid ""
"Spatial coverage \"%s\" must be alphanumeric characters or symbols: "
@@ -356,7 +374,7 @@ msgstr ""
"Maantieteellisen kattavuuden \"%s\" pitää koostua alfanumeerisita "
"merkeistä (ascii) ja näistä erikoismerkeistä: -'/,:().;= "
-#: ckanext/kata/validators.py:316
+#: ckanext/kata/validators.py:331
#, python-format
msgid ""
"File type (mimetype) \"%s\" must be alphanumeric characters or symbols: "
@@ -365,39 +383,39 @@ msgstr ""
"Tiedostotyypin (mimetyyppi) \"%s\" pitää koostua alfanumeerisita "
"merkeistä (ascii) ja näistä erikoismerkeistä: _'+./"
-#: ckanext/kata/validators.py:328
+#: ckanext/kata/validators.py:343
#, python-format
msgid "Algorithm \"%s\" must be alphanumeric characters or symbols _-()"
msgstr ""
"Algoritmin \"%s\" pitää koostua alfanumeerisita merkeistä (ascii) ja "
"erikoismerkeistä: _-()"
-#: ckanext/kata/validators.py:339
+#: ckanext/kata/validators.py:354
msgid "First title can not be empty"
msgstr "Ensimmäinen otsikko ei voi olla tyhjä"
-#: ckanext/kata/validators.py:355
+#: ckanext/kata/validators.py:370
msgid "Duplicate fields for a language not permitted"
msgstr "Et voi syöttää useampia kenttiä samalla kielellä"
-#: ckanext/kata/validators.py:379
+#: ckanext/kata/validators.py:394
msgid "Missing compulsory agent: {0}"
msgstr "Pakollinen toimija puuttuu: {0}"
-#: ckanext/kata/validators.py:391
+#: ckanext/kata/validators.py:406
msgid "Missing compulsory distributor information"
msgstr "Pakollinen jakelijan tieto puuttuu"
-#: ckanext/kata/validators.py:413
+#: ckanext/kata/validators.py:428
msgid "Missing dataset title"
msgstr "Aineiston otsikko puuttuu"
-#: ckanext/kata/validators.py:428 ckanext/kata/validators.py:464
+#: ckanext/kata/validators.py:443 ckanext/kata/validators.py:479
#: ckanext/kata/theme/templates/package/snippets/package_usage_info.html:27
msgid "Missing value"
msgstr "Puuttuva arvo"
-#: ckanext/kata/validators.py:482
+#: ckanext/kata/validators.py:497
msgid ""
"An organization must be supplied. If you do not find a suitable "
"organization, please choose the default organization 'Ei linkitetä "
@@ -407,7 +425,7 @@ msgstr ""
"organisaatioon - do not link to an organization', jos et löydä sopivaa "
"listalta."
-#: ckanext/kata/validators.py:495
+#: ckanext/kata/validators.py:510
msgid ""
"The provided organization does not exist. Please contact Etsin "
"administration using our contact form at http://openscience.fi/contact-"
@@ -416,11 +434,11 @@ msgstr ""
"Syötetty organisaatio ei ole olemassa. Otathan yhteyttä Etsin-ylläpitoon "
"palautelomakkeella osoitteessa http://avointiede.fi/ota-yhteytta"
-#: ckanext/kata/validators.py:511
+#: ckanext/kata/validators.py:526
msgid "Terms of use must be accepted"
msgstr "Käyttöehtojen hyväksyminen on pakollista"
-#: ckanext/kata/validators.py:528
+#: ckanext/kata/validators.py:543
msgid ""
"Copyright notice is needed if license is not specified or is a variant of"
" license type other."
@@ -428,27 +446,27 @@ msgstr ""
"Lisätietoja käyttöluvasta on esitettävä, jos lisenssiä ei ole määritetty "
"(License not specified) tai on tyyppiä Muu (Other)."
-#: ckanext/kata/validators.py:569
+#: ckanext/kata/validators.py:584
msgid "Value {ext_id} exists in another dataset {id}"
msgstr "Tunniste {ext_id} on jo käytössä toisessa aineistossa {id}"
-#: ckanext/kata/validators.py:601
+#: ckanext/kata/validators.py:616
msgid "Primary identifier {pid} exists in another dataset {id}"
msgstr "Aineiston tunniste {pid} on jo käytössä toisessa aineistossa {id}"
-#: ckanext/kata/validators.py:638
+#: ckanext/kata/validators.py:653
msgid "PID relation must be one of the following values: "
msgstr "Relaatiotunnisteen pitää olla jokin seuraavista arvoista: "
-#: ckanext/kata/validators.py:656
+#: ckanext/kata/validators.py:671
msgid "PID relation must be defined if PID type is relation"
msgstr "Relaatiotunniste täytyy määritellä jos tunnisteen tyyppi on relation"
-#: ckanext/kata/validators.py:671
+#: ckanext/kata/validators.py:686
msgid "Package id must start with \"urn:nbn:fi:csc-kata\""
msgstr "Sisäisen tunnisteen täytyy alkaa \"urn:nbn:fi:csc-kata\""
-#: ckanext/kata/validators.py:697
+#: ckanext/kata/validators.py:712
msgid ""
"External identifier must be provided to create new access request form "
"automatically"
@@ -456,7 +474,7 @@ msgstr ""
"Ulkoinen tunniste vaaditaan uuden lupahakemuslomakkeen automaattista "
"luontia varten"
-#: ckanext/kata/validators.py:728 ckanext/kata/validators.py:741
+#: ckanext/kata/validators.py:743 ckanext/kata/validators.py:756
msgid ""
"There was an internal problem in validating permissions for creating new "
"access request form automatically. Please contact Etsin administration "
@@ -466,7 +484,7 @@ msgstr ""
"käyttäjäoikeuksien tarkistamisessa tapahtui virhe. Otathan yhteyttä "
"Etsin-ylläpitoon lisätietojen saamiseksi."
-#: ckanext/kata/validators.py:733
+#: ckanext/kata/validators.py:748
msgid ""
"Distributor email address must be provided to create new access request "
"form automatically"
@@ -474,7 +492,7 @@ msgstr ""
"Jakelijan sähköpostiosoite vaaditaan uuden lupahakemuslomakkeen "
"automaattista luontia varten"
-#: ckanext/kata/validators.py:743
+#: ckanext/kata/validators.py:758
msgid ""
"Neither you nor the distributor ({dist}) is allowed to create new access "
"request form automatically. Please check the validity of distributor "
@@ -484,7 +502,7 @@ msgstr ""
"lupahakemuslomaketta automaattisesti. Tarkasta jakelijan "
"sähköpostiosoitteen oikeellisuus."
-#: ckanext/kata/validators.py:753
+#: ckanext/kata/validators.py:768
msgid "Invalid availability. Must be one of: {availabilities}"
msgstr "Virheellinen saatavuus. Täytyy olla yksi seuraavista: {availabilities}"
@@ -739,7 +757,7 @@ msgstr "Minun ryhmäni"
#: ckanext/kata/theme/templates/group/snippets/group_form.html:18
#: ckanext/kata/theme/templates/organization/snippets/organization_form.html:23
#: ckanext/kata/theme/templates/package/snippets/import_xml.html:8
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:416
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:417
#: ckanext/kata/theme/templates/package/snippets/resource_form.html:28
#: ckanext/kata/theme/templates/related/snippets/related_form.html:23
msgid "URL"
@@ -754,7 +772,7 @@ msgstr "minun-ryhmäni"
#: ckanext/kata/theme/templates/kata/data-model.html:22
#: ckanext/kata/theme/templates/organization/snippets/organization_form.html:27
#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:34
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:522
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:523
#: ckanext/kata/theme/templates/package/snippets/resource_form.html:36
#: ckanext/kata/theme/templates/related/snippets/related_form.html:25
msgid "Description"
@@ -783,7 +801,7 @@ msgstr "Oletko varma että haluat poistaa tämän ryhmän?"
#: ckanext/kata/theme/templates/group/snippets/group_form.html:52
#: ckanext/kata/theme/templates/organization/member_new.html:32
#: ckanext/kata/theme/templates/organization/members.html:31
-#: ckanext/kata/theme/templates/organization/snippets/organization_form.html:85
+#: ckanext/kata/theme/templates/organization/snippets/organization_form.html:87
#: ckanext/kata/theme/templates/package/read.html:69
#: ckanext/kata/theme/templates/package/snippets/resource_form.html:71
#: ckanext/kata/theme/templates/related/snippets/related_form.html:33
@@ -800,7 +818,7 @@ msgstr "Ryhmällä ei ole kuvausta"
#: ckanext/kata/theme/templates/group/snippets/group_item.html:31
#: ckanext/kata/theme/templates/kata/dummy.html:118
-#: ckanext/kata/theme/templates/organization/snippets/organization_item.html:29
+#: ckanext/kata/theme/templates/organization/snippets/organization_item.html:37
msgid "{num} Dataset"
msgid_plural "{num} Datasets"
msgstr[0] "{num} aineisto"
@@ -808,7 +826,7 @@ msgstr[1] "{num} aineistoa"
#: ckanext/kata/theme/templates/group/snippets/group_item.html:33
#: ckanext/kata/theme/templates/kata/dummy.html:120
-#: ckanext/kata/theme/templates/organization/snippets/organization_item.html:31
+#: ckanext/kata/theme/templates/organization/snippets/organization_item.html:39
msgid "0 Datasets"
msgstr "0 aineistoa"
@@ -1212,7 +1230,7 @@ msgstr ""
#: ckanext/kata/theme/templates/kata/data-model.html:21
#: ckanext/kata/theme/templates/kata/dummy.html:28
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:257
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:258
#: ckanext/kata/theme/templates/package/snippets/package_usage_info.html:109
msgid "Copyright notice"
msgstr "Lisätietoja käyttöluvasta"
@@ -1428,8 +1446,8 @@ msgid "Valid if role is author or contributor"
msgstr "Kenttä tunnistetaan, jos rooli (role) on author tai contributor"
#: ckanext/kata/theme/templates/kata/data-model.html:40
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:162
-#: ckanext/kata/theme/templates/package/snippets/package_organization.html:26
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:161
+#: ckanext/kata/theme/templates/package/snippets/package_organization.html:25
#: ckanext/kata/theme/templates/user/edit_user_form.html:20
msgid "Organization"
msgstr "Organisaatio"
@@ -1458,7 +1476,7 @@ msgstr ""
" rahoittaja, muulloin n"
#: ckanext/kata/theme/templates/kata/data-model.html:42
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:417
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:418
#: ckanext/kata/theme/templates/package/snippets/package_actors.html:249
msgid "Funding id"
msgstr "Rahoitustunniste"
@@ -1524,7 +1542,7 @@ msgstr ""
"olla true"
#: ckanext/kata/theme/templates/kata/data-model.html:49
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:78
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:77
msgid "Field of science"
msgstr "Tieteenala"
@@ -1602,7 +1620,7 @@ msgid "Agree on terms of use"
msgstr "Hyväksy palvelun käyttöehdot"
#: ckanext/kata/theme/templates/kata/data-model.html:61
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:262
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:263
#: ckanext/kata/theme/templates/package/snippets/package_usage_info.html:113
msgid "Citation"
msgstr "Sitaatti"
@@ -1628,7 +1646,7 @@ msgid "Agent"
msgstr "Toimija"
#: ckanext/kata/theme/templates/kata/dummy.html:22
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:519
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:520
msgid "Event"
msgstr "Tapahtuma"
@@ -1641,7 +1659,7 @@ msgid "Description + language"
msgstr "Kuvaus ja sen kieli"
#: ckanext/kata/theme/templates/kata/dummy.html:26
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:476
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:477
msgid "External identifier"
msgstr "Ulkoinen tunniste"
@@ -2562,6 +2580,10 @@ msgstr ""
" alueella eniten aineistoja. Esimerkiksi avainsanat, ryhmät, lisenssi, "
"tiedostoformaatti tai maa"
+#: ckanext/kata/theme/templates/kata/tombstone.html:6
+msgid "Tombstone page"
+msgstr ""
+
#: ckanext/kata/theme/templates/macros/form.html:148
msgid ""
"You can use There was an error while searching. Please try "
"again.
"
msgstr "Haussa tapahtui virhe. Ole hyvä ja yritä uudelleen
"
#: ckanext/kata/theme/templates/organization/read.html:116
-#: ckanext/kata/theme/templates/package/search.html:90
+#: ckanext/kata/theme/templates/package/search.html:91
msgid "Limit search results"
msgstr "Rajaa hakutuloksia"
#: ckanext/kata/theme/templates/organization/read.html:125
-#: ckanext/kata/theme/templates/package/search.html:99
+#: ckanext/kata/theme/templates/package/search.html:100
msgid "More categories…"
msgstr "Lisää kategorioita…"
@@ -2791,15 +2812,15 @@ msgstr "minun-organisaationi"
msgid "A little information about my organization..."
msgstr "Tietoa organisaatiostani..."
-#: ckanext/kata/theme/templates/organization/snippets/organization_form.html:37
+#: ckanext/kata/theme/templates/organization/snippets/organization_form.html:39
msgid "Parent"
msgstr "Yläorganisaatio"
-#: ckanext/kata/theme/templates/organization/snippets/organization_form.html:41
+#: ckanext/kata/theme/templates/organization/snippets/organization_form.html:43
msgid "None - top level"
msgstr "Ei mikään - juuritaso"
-#: ckanext/kata/theme/templates/organization/snippets/organization_form.html:47
+#: ckanext/kata/theme/templates/organization/snippets/organization_form.html:49
msgid ""
"Select a parent organisation in organization hierarchy to which this "
"dataset will be linked. When you start typing, you will get suggestions "
@@ -2815,7 +2836,7 @@ msgstr ""
"href=\"http://avointiede.fi/ota-yhteytta\" "
"target=\"_blank\">palautelomakkeella"
-#: ckanext/kata/theme/templates/organization/snippets/organization_form.html:84
+#: ckanext/kata/theme/templates/organization/snippets/organization_form.html:86
msgid ""
"Are you sure you want to delete this Organization? This will delete all "
"the public and private datasets belonging to this organization."
@@ -2823,7 +2844,7 @@ msgstr ""
"Haluatko varmasti tuhota tämän organisaation? Samalla tuhoat myös kaikki "
"julkiset ja yksityiset aineistot, jotka kuuluvat tälle organisaatiolle."
-#: ckanext/kata/theme/templates/organization/snippets/organization_form.html:89
+#: ckanext/kata/theme/templates/organization/snippets/organization_form.html:91
msgid "Save Organization"
msgstr "Tallenna organisaatio"
@@ -4938,12 +4959,12 @@ msgstr "Kieli"
msgid "No language"
msgstr "Ei kieltä"
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:71
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:70
#: ckanext/kata/theme/templates/package/snippets/package_basic_information.html:38
msgid "Keywords"
msgstr "Asiasanat"
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:126
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:125
msgid "Send a message"
msgstr "Lähetä viesti"
@@ -4979,88 +5000,88 @@ msgstr "saatavilla vapaasti tai saatavuutta ei ole määritetty"
msgid "Supplements"
msgstr "Kuvailutiedostot"
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:278
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:279
msgid "author"
msgstr "tekijä"
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:286
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:287
msgid "distributor"
msgstr "jakelija"
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:291
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:292
msgid "Etsin research data finder"
msgstr "Etsin tutkimuksen tietoaineistojen hakupalvelu"
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:301
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:302
msgid "Show more citation formats"
msgstr "Näytä lisää sitaattiehdotuksia"
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:307
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:308
msgid "Citations"
msgstr "Sitaatit"
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:311
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:312
msgid "Provided by distributor"
msgstr "Jakelijan ehdottama"
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:316
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:317
msgid "Etsin default citation (en)"
msgstr "Etsimen oletussitaatti (en)"
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:336
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:337
msgid "Etsin default citation (fi)"
msgstr "Etsimen oletussitaatti (fi)"
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:358
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:359
msgid "Close"
msgstr "Sulje"
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:371
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:372
msgid "Geographical areas covered"
msgstr "Maantieteellinen kattavuus"
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:378
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:379
msgid "Period of time covered"
msgstr "Ajallinen kattavuus"
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:385
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:386
msgid " to "
msgstr " - "
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:388
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:389
#: ckanext/kata/theme/templates/package/snippets/recommended_coverage.html:32
msgid "Begin"
msgstr "Alku"
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:391
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:392
#: ckanext/kata/theme/templates/package/snippets/recommended_coverage.html:44
msgid "End"
msgstr "Loppu"
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:401
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:402
msgid "Project and funding information"
msgstr "Projekti- ja rahoitustiedot"
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:414
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:415
msgid "Project name"
msgstr "Projektin nimi"
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:430
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:431
msgid "No funding information is available."
msgstr "Rahoitustietoja ei ole saatavilla."
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:442
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:443
msgid "Permanent address for this page"
msgstr "Pysyvä linkki tälle sivulle"
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:450
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:451
#: ckanext/kata/theme/templates/package/snippets/package_actors.html:32
#: ckanext/kata/theme/templates/package/snippets/package_actors.html:90
#: ckanext/kata/theme/templates/package/snippets/package_identification_info.html:17
msgid "Identifier"
msgstr "Tunniste"
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:468
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:469
msgid ""
"This is the permanent identifier (PID) for this dataset. Use it when "
"citing this dataset. An identifier is unique and permanent. With "
@@ -5076,47 +5097,47 @@ msgstr ""
"tunnisteisiin. Ne voivat olla esimerkiksi URN-, Handle- tai DOI-"
"tunnisteita.
"
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:484
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:485
#: ckanext/kata/theme/templates/package/snippets/package_identification_info.html:42
msgid "Related data"
msgstr "Muut aineistoon liittyvät tunnisteet"
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:507
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:508
#: ckanext/kata/theme/templates/package/snippets/recommended_lifecycle_events.html:5
msgid "Dataset lifecycle events"
msgstr "Aineston elinkaaren tapahtumat"
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:520
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:521
msgid "Who"
msgstr "Kuka"
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:521
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:522
msgid "When"
msgstr "Milloin"
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:536
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:537
msgid "Most recent data modification date"
msgstr "Datan viimeisin muokkauspäivämäärä"
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:543
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:552
#: ckanext/kata/theme/templates/package/snippets/package_basic_fields.html:22
msgid "Additional information"
msgstr "Lisätietoa"
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:548
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:557
msgid "File format: MIME type"
msgstr "Tiedoston muoto: MIME-tyyppi"
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:554
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:563
msgid "File format"
msgstr "Tiedoston muoto"
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:560
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:569
#: ckanext/kata/theme/templates/package/snippets/recommended_file_information.html:36
msgid "Checksum"
msgstr "Tarkistussumma"
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:564
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:573
#: ckanext/kata/theme/templates/package/snippets/recommended_file_information.html:47
msgid "Algorithm"
msgstr "Algoritmi"
@@ -5416,13 +5437,15 @@ msgstr "esim. talous, mielenterveys, hallitus"
msgid ""
"Select scientific disciplines the dataset belongs to. When you start "
"typing, you will get suggestions for matching discipline names. You can "
-"select a suggested keyword with a mouse click. To remove a keyword, click"
-" the 'x' symbol on the keyword tag."
+"browse the available disciplines by searching and browsing the Finto okm-"
+"tieteenala vocabulary. You can select a suggested keyword with a mouse "
+"click. To remove a keyword, click the 'x' symbol on the keyword tag."
msgstr ""
"Valitse tieteenalat, joihin aineisto liittyy. Kun alat kirjoittamaan, "
-"saat automaatisesti ehdotuksia tieteenalaksi. Voit valita ehdotuksen "
-"klikkaamalla sitä hiirellä. Voit poistaa valitun tieteenalan "
-"'x'-painikkeesta."
+"saat automaatisesti ehdotuksia tieteenalaksi. Voit selailla saatavilla "
+"olevia tieteenaloja tutustumalla Finton okm-tieteenala sanastoon. Voit "
+"valita ehdotuksen klikkaamalla sitä hiirellä. Voit poistaa valitun "
+"tieteenalan 'x'-painikkeesta."
#: ckanext/kata/theme/templates/package/snippets/package_basic_information.html:45
msgid "Disciplines"
@@ -5495,11 +5518,7 @@ msgstr ""
"lisätään, mikäli jostakin muusta palvelusta löytyy täydellisempi kuvailu,"
" johon voi viitata tässä kohdassa."
-#: ckanext/kata/theme/templates/package/snippets/package_organization.html:35
-msgid "No organization"
-msgstr "Ei organisaatiota"
-
-#: ckanext/kata/theme/templates/package/snippets/package_organization.html:55
+#: ckanext/kata/theme/templates/package/snippets/package_organization.html:50
msgid ""
"Select an organisation to which this dataset will be linked. When you "
"start typing, you will get suggestions for matching organisations. Select"
@@ -6283,6 +6302,11 @@ msgstr "Ei aineistoja."
msgid "You are not allowed to view other users' information."
msgstr "Sinulla ei ole lupaa katsella muiden käyttäjien tietoja."
-#~ msgid "Show empty organizations"
-#~ msgstr "Näytä tyhjät organisaatiot"
+#~ msgid ""
+#~ "Discipline \"%s\" must be a valid "
+#~ "concept URL defined in Finto okm-"
+#~ "tieteenala vocabulary"
+#~ msgstr ""
+#~ "Tieteenalan \"%s\" pitää olla määritelty "
+#~ "käsite Finton okm-tieteenala sanastossa"
diff --git a/ckanext/kata/i18n/kata.pot b/ckanext/kata/i18n/kata.pot
index cf3032b9..88172ef1 100644
--- a/ckanext/kata/i18n/kata.pot
+++ b/ckanext/kata/i18n/kata.pot
@@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: ckanext-kata 4.2.1\n"
+"Project-Id-Version: ckanext-kata 4.3.0\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2017-03-13 11:50+0000\n"
+"POT-Creation-Date: 2017-05-24 11:33+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -25,11 +25,11 @@ msgstr ""
msgid "Unauthorized to add a harvest source"
msgstr ""
-#: ckanext/kata/actions.py:507
+#: ckanext/kata/actions.py:539
msgid "You don't have permission to modify roles for this organization."
msgstr ""
-#: ckanext/kata/actions.py:541
+#: ckanext/kata/actions.py:573
msgid "You don't have permission to remove this user."
msgstr ""
@@ -76,91 +76,91 @@ msgstr ""
msgid "User %s not authorized to delete resource %s"
msgstr ""
-#: ckanext/kata/controllers.py:472
+#: ckanext/kata/controllers.py:479
msgid "Bad Captcha. Please try again."
msgstr ""
-#: ckanext/kata/controllers.py:476
+#: ckanext/kata/controllers.py:483
msgid "Message not sent as logging wasn't permitted"
msgstr ""
-#: ckanext/kata/controllers.py:480 ckanext/kata/controllers.py:582
-#: ckanext/kata/controllers.py:611
+#: ckanext/kata/controllers.py:487 ckanext/kata/controllers.py:592
+#: ckanext/kata/controllers.py:618
msgid ""
"Sending contact emails is prohibited for now. Please try again later or "
"contact customer service."
msgstr ""
-#: ckanext/kata/controllers.py:492
+#: ckanext/kata/controllers.py:499
msgid "Recipient not found"
msgstr ""
-#: ckanext/kata/controllers.py:501 ckanext/kata/controllers.py:507
+#: ckanext/kata/controllers.py:508 ckanext/kata/controllers.py:514
msgid "Message not sent. Couldn't confirm human interaction (spam bot control)"
msgstr ""
-#: ckanext/kata/controllers.py:527
+#: ckanext/kata/controllers.py:534
msgid "Message sent"
msgstr ""
-#: ckanext/kata/controllers.py:529
+#: ckanext/kata/controllers.py:536
msgid "No message"
msgstr ""
-#: ckanext/kata/controllers.py:531
+#: ckanext/kata/controllers.py:538
msgid ""
"Message not sent. Please, provide reply address and name. Name must contain "
"at least three letters."
msgstr ""
-#: ckanext/kata/controllers.py:547 ckanext/kata/controllers.py:590
-#: ckanext/kata/controllers.py:608 ckanext/kata/theme/templates/kata/dummy.html:63
+#: ckanext/kata/controllers.py:554 ckanext/kata/controllers.py:589
+#: ckanext/kata/controllers.py:615 ckanext/kata/theme/templates/kata/dummy.html:63
msgid "Dataset not found"
msgstr ""
-#: ckanext/kata/controllers.py:664
+#: ckanext/kata/controllers.py:671
msgid "Login failed. Bad username or password."
msgstr ""
-#: ckanext/kata/controllers.py:675
+#: ckanext/kata/controllers.py:682
msgid "Successfully logged out."
msgstr ""
-#: ckanext/kata/controllers.py:693
+#: ckanext/kata/controllers.py:700
msgid "Unauthorized to upload metadata"
msgstr ""
-#: ckanext/kata/controllers.py:717
+#: ckanext/kata/controllers.py:724
msgid "Give upload URL or file."
msgstr ""
-#: ckanext/kata/controllers.py:722
+#: ckanext/kata/controllers.py:729
msgid "Could not fetch from url {ur}"
msgstr ""
-#: ckanext/kata/controllers.py:725
+#: ckanext/kata/controllers.py:732
msgid "Invalid upload URL"
msgstr ""
-#: ckanext/kata/controllers.py:727
+#: ckanext/kata/controllers.py:734
msgid "Invalid XML content"
msgstr ""
-#: ckanext/kata/controllers.py:731
+#: ckanext/kata/controllers.py:738
msgid "Failed to load file"
msgstr ""
-#: ckanext/kata/controllers.py:760 ckanext/kata/middleware.py:15
+#: ckanext/kata/controllers.py:767 ckanext/kata/middleware.py:15
msgid "Not authorized to see this page"
msgstr ""
-#: ckanext/kata/controllers.py:838 ckanext/kata/theme/templates/header.html:31
+#: ckanext/kata/controllers.py:845 ckanext/kata/theme/templates/header.html:31
#: ckanext/kata/theme/templates/header.html:100
#: ckanext/kata/theme/templates/package/base.html:12
msgid "Organizations"
msgstr ""
-#: ckanext/kata/controllers.py:839
+#: ckanext/kata/controllers.py:846
#: ckanext/kata/theme/templates/group/base_form_page.html:6
#: ckanext/kata/theme/templates/group/index.html:6
#: ckanext/kata/theme/templates/group/index.html:18
@@ -170,16 +170,16 @@ msgstr ""
msgid "Groups"
msgstr ""
-#: ckanext/kata/controllers.py:840
+#: ckanext/kata/controllers.py:847
msgid "Tags"
msgstr ""
-#: ckanext/kata/controllers.py:841
+#: ckanext/kata/controllers.py:848
msgid "Formats"
msgstr ""
-#: ckanext/kata/controllers.py:842
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:246
+#: ckanext/kata/controllers.py:849
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:247
#: ckanext/kata/theme/templates/package/snippets/package_usage_info.html:97
msgid "License"
msgstr ""
@@ -214,49 +214,49 @@ msgstr ""
msgid "Language %s not in ISO 639-2 T format"
msgstr ""
-#: ckanext/kata/helpers.py:342 ckanext/kata/theme/templates/package/read.html:21
+#: ckanext/kata/helpers.py:343 ckanext/kata/theme/templates/package/read.html:21
#: ckanext/kata/theme/templates/package/related_list.html:13
msgid "Unpublished"
msgstr ""
-#: ckanext/kata/helpers.py:342
+#: ckanext/kata/helpers.py:343
msgid "Published"
msgstr ""
-#: ckanext/kata/helpers.py:480
+#: ckanext/kata/helpers.py:481
msgid "By datasets"
msgstr ""
-#: ckanext/kata/helpers.py:480
+#: ckanext/kata/helpers.py:481
msgid "Show all"
msgstr ""
#: ckanext/kata/settings.py:54
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:88
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:87
#: ckanext/kata/theme/templates/package/snippets/package_actors.html:20
#: ckanext/kata/theme/templates/revision/read.html:41
msgid "Author"
msgstr ""
#: ckanext/kata/settings.py:55
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:179
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:178
msgid "Contributor"
msgstr ""
-#: ckanext/kata/settings.py:56 ckanext/kata/settings.py:174
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:116
+#: ckanext/kata/settings.py:56 ckanext/kata/settings.py:175
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:115
#: ckanext/kata/theme/templates/package/snippets/package_actors.html:127
msgid "Distributor"
msgstr ""
#: ckanext/kata/settings.py:57
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:415
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:416
#: ckanext/kata/theme/templates/package/snippets/package_actors.html:240
msgid "Funder"
msgstr ""
#: ckanext/kata/settings.py:58
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:142
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:141
#: ckanext/kata/theme/templates/package/snippets/package_actors.html:285
msgid "Owner"
msgstr ""
@@ -265,11 +265,11 @@ msgstr ""
msgid "Producer"
msgstr ""
-#: ckanext/kata/settings.py:175
+#: ckanext/kata/settings.py:176
msgid "Owner organization"
msgstr ""
-#: ckanext/kata/settings.py:176
+#: ckanext/kata/settings.py:177
#: ckanext/kata/theme/templates/package/snippets/package_terms_of_use.html:4
#: ckanext/kata/theme/templates/package/snippets/package_terms_of_use.html:11
msgid "Terms of use"
@@ -323,118 +323,132 @@ msgstr ""
msgid "Discipline \"%s\" must be alphanumeric characters or symbols: -,:#+?=&/."
msgstr ""
-#: ckanext/kata/validators.py:297
+#: ckanext/kata/validators.py:282 ckanext/kata/validators.py:290
+#, python-format
+msgid ""
+"Discipline \"%s\" is not part of the official classification of disciplines. "
+"See help for further info."
+msgstr ""
+
+#: ckanext/kata/validators.py:287
+#, python-format
+msgid ""
+"Discipline \"%s\" must be a valid URL defined in Finto okm-tieteenala "
+"vocabulary. See help for further info."
+msgstr ""
+
+#: ckanext/kata/validators.py:312
#, python-format
msgid ""
"Spatial coverage \"%s\" must be alphanumeric characters or symbols: "
"-'/,:().;= "
msgstr ""
-#: ckanext/kata/validators.py:316
+#: ckanext/kata/validators.py:331
#, python-format
msgid "File type (mimetype) \"%s\" must be alphanumeric characters or symbols: _-+./"
msgstr ""
-#: ckanext/kata/validators.py:328
+#: ckanext/kata/validators.py:343
#, python-format
msgid "Algorithm \"%s\" must be alphanumeric characters or symbols _-()"
msgstr ""
-#: ckanext/kata/validators.py:339
+#: ckanext/kata/validators.py:354
msgid "First title can not be empty"
msgstr ""
-#: ckanext/kata/validators.py:355
+#: ckanext/kata/validators.py:370
msgid "Duplicate fields for a language not permitted"
msgstr ""
-#: ckanext/kata/validators.py:379
+#: ckanext/kata/validators.py:394
msgid "Missing compulsory agent: {0}"
msgstr ""
-#: ckanext/kata/validators.py:391
+#: ckanext/kata/validators.py:406
msgid "Missing compulsory distributor information"
msgstr ""
-#: ckanext/kata/validators.py:413
+#: ckanext/kata/validators.py:428
msgid "Missing dataset title"
msgstr ""
-#: ckanext/kata/validators.py:428 ckanext/kata/validators.py:464
+#: ckanext/kata/validators.py:443 ckanext/kata/validators.py:479
#: ckanext/kata/theme/templates/package/snippets/package_usage_info.html:27
msgid "Missing value"
msgstr ""
-#: ckanext/kata/validators.py:482
+#: ckanext/kata/validators.py:497
msgid ""
"An organization must be supplied. If you do not find a suitable organization,"
" please choose the default organization 'Ei linkitetä organisaatioon - do not"
" link to an organization'."
msgstr ""
-#: ckanext/kata/validators.py:495
+#: ckanext/kata/validators.py:510
msgid ""
"The provided organization does not exist. Please contact Etsin administration"
" using our contact form at http://openscience.fi/contact-form"
msgstr ""
-#: ckanext/kata/validators.py:511
+#: ckanext/kata/validators.py:526
msgid "Terms of use must be accepted"
msgstr ""
-#: ckanext/kata/validators.py:528
+#: ckanext/kata/validators.py:543
msgid ""
"Copyright notice is needed if license is not specified or is a variant of "
"license type other."
msgstr ""
-#: ckanext/kata/validators.py:569
+#: ckanext/kata/validators.py:584
msgid "Value {ext_id} exists in another dataset {id}"
msgstr ""
-#: ckanext/kata/validators.py:601
+#: ckanext/kata/validators.py:616
msgid "Primary identifier {pid} exists in another dataset {id}"
msgstr ""
-#: ckanext/kata/validators.py:638
+#: ckanext/kata/validators.py:653
msgid "PID relation must be one of the following values: "
msgstr ""
-#: ckanext/kata/validators.py:656
+#: ckanext/kata/validators.py:671
msgid "PID relation must be defined if PID type is relation"
msgstr ""
-#: ckanext/kata/validators.py:671
+#: ckanext/kata/validators.py:686
msgid "Package id must start with \"urn:nbn:fi:csc-kata\""
msgstr ""
-#: ckanext/kata/validators.py:697
+#: ckanext/kata/validators.py:712
msgid ""
"External identifier must be provided to create new access request form "
"automatically"
msgstr ""
-#: ckanext/kata/validators.py:728 ckanext/kata/validators.py:741
+#: ckanext/kata/validators.py:743 ckanext/kata/validators.py:756
msgid ""
"There was an internal problem in validating permissions for creating new "
"access request form automatically. Please contact Etsin administration for "
"more information."
msgstr ""
-#: ckanext/kata/validators.py:733
+#: ckanext/kata/validators.py:748
msgid ""
"Distributor email address must be provided to create new access request form "
"automatically"
msgstr ""
-#: ckanext/kata/validators.py:743
+#: ckanext/kata/validators.py:758
msgid ""
"Neither you nor the distributor ({dist}) is allowed to create new access "
"request form automatically. Please check the validity of distributor email "
"address."
msgstr ""
-#: ckanext/kata/validators.py:753
+#: ckanext/kata/validators.py:768
msgid "Invalid availability. Must be one of: {availabilities}"
msgstr ""
@@ -681,7 +695,7 @@ msgstr ""
#: ckanext/kata/theme/templates/group/snippets/group_form.html:18
#: ckanext/kata/theme/templates/organization/snippets/organization_form.html:23
#: ckanext/kata/theme/templates/package/snippets/import_xml.html:8
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:416
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:417
#: ckanext/kata/theme/templates/package/snippets/resource_form.html:28
#: ckanext/kata/theme/templates/related/snippets/related_form.html:23
msgid "URL"
@@ -696,7 +710,7 @@ msgstr ""
#: ckanext/kata/theme/templates/kata/data-model.html:22
#: ckanext/kata/theme/templates/organization/snippets/organization_form.html:27
#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:34
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:522
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:523
#: ckanext/kata/theme/templates/package/snippets/resource_form.html:36
#: ckanext/kata/theme/templates/related/snippets/related_form.html:25
msgid "Description"
@@ -725,7 +739,7 @@ msgstr ""
#: ckanext/kata/theme/templates/group/snippets/group_form.html:52
#: ckanext/kata/theme/templates/organization/member_new.html:32
#: ckanext/kata/theme/templates/organization/members.html:31
-#: ckanext/kata/theme/templates/organization/snippets/organization_form.html:85
+#: ckanext/kata/theme/templates/organization/snippets/organization_form.html:87
#: ckanext/kata/theme/templates/package/read.html:69
#: ckanext/kata/theme/templates/package/snippets/resource_form.html:71
#: ckanext/kata/theme/templates/related/snippets/related_form.html:33
@@ -742,7 +756,7 @@ msgstr ""
#: ckanext/kata/theme/templates/group/snippets/group_item.html:31
#: ckanext/kata/theme/templates/kata/dummy.html:118
-#: ckanext/kata/theme/templates/organization/snippets/organization_item.html:29
+#: ckanext/kata/theme/templates/organization/snippets/organization_item.html:37
msgid "{num} Dataset"
msgid_plural "{num} Datasets"
msgstr[0] ""
@@ -750,7 +764,7 @@ msgstr[1] ""
#: ckanext/kata/theme/templates/group/snippets/group_item.html:33
#: ckanext/kata/theme/templates/kata/dummy.html:120
-#: ckanext/kata/theme/templates/organization/snippets/organization_item.html:31
+#: ckanext/kata/theme/templates/organization/snippets/organization_item.html:39
msgid "0 Datasets"
msgstr ""
@@ -1096,7 +1110,7 @@ msgstr ""
#: ckanext/kata/theme/templates/kata/data-model.html:21
#: ckanext/kata/theme/templates/kata/dummy.html:28
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:257
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:258
#: ckanext/kata/theme/templates/package/snippets/package_usage_info.html:109
msgid "Copyright notice"
msgstr ""
@@ -1297,8 +1311,8 @@ msgid "Valid if role is author or contributor"
msgstr ""
#: ckanext/kata/theme/templates/kata/data-model.html:40
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:162
-#: ckanext/kata/theme/templates/package/snippets/package_organization.html:26
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:161
+#: ckanext/kata/theme/templates/package/snippets/package_organization.html:25
#: ckanext/kata/theme/templates/user/edit_user_form.html:20
msgid "Organization"
msgstr ""
@@ -1325,7 +1339,7 @@ msgid "y if role equals funder and its the first funder given, else n"
msgstr ""
#: ckanext/kata/theme/templates/kata/data-model.html:42
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:417
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:418
#: ckanext/kata/theme/templates/package/snippets/package_actors.html:249
msgid "Funding id"
msgstr ""
@@ -1389,7 +1403,7 @@ msgid ""
msgstr ""
#: ckanext/kata/theme/templates/kata/data-model.html:49
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:78
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:77
msgid "Field of science"
msgstr ""
@@ -1463,7 +1477,7 @@ msgid "Agree on terms of use"
msgstr ""
#: ckanext/kata/theme/templates/kata/data-model.html:61
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:262
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:263
#: ckanext/kata/theme/templates/package/snippets/package_usage_info.html:113
msgid "Citation"
msgstr ""
@@ -1489,7 +1503,7 @@ msgid "Agent"
msgstr ""
#: ckanext/kata/theme/templates/kata/dummy.html:22
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:519
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:520
msgid "Event"
msgstr ""
@@ -1502,7 +1516,7 @@ msgid "Description + language"
msgstr ""
#: ckanext/kata/theme/templates/kata/dummy.html:26
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:476
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:477
msgid "External identifier"
msgstr ""
@@ -2334,6 +2348,10 @@ msgid ""
"the most datasets. E.g. tags, groups, license, res_format, country. "
msgstr ""
+#: ckanext/kata/theme/templates/kata/tombstone.html:6
+msgid "Tombstone page"
+msgstr ""
+
#: ckanext/kata/theme/templates/macros/form.html:148
msgid ""
"You can use There was an error while searching. Please try "
"again. "
msgstr ""
#: ckanext/kata/theme/templates/organization/read.html:116
-#: ckanext/kata/theme/templates/package/search.html:90
+#: ckanext/kata/theme/templates/package/search.html:91
msgid "Limit search results"
msgstr ""
#: ckanext/kata/theme/templates/organization/read.html:125
-#: ckanext/kata/theme/templates/package/search.html:99
+#: ckanext/kata/theme/templates/package/search.html:100
msgid "More categories…"
msgstr ""
@@ -2550,15 +2568,15 @@ msgstr ""
msgid "A little information about my organization..."
msgstr ""
-#: ckanext/kata/theme/templates/organization/snippets/organization_form.html:37
+#: ckanext/kata/theme/templates/organization/snippets/organization_form.html:39
msgid "Parent"
msgstr ""
-#: ckanext/kata/theme/templates/organization/snippets/organization_form.html:41
+#: ckanext/kata/theme/templates/organization/snippets/organization_form.html:43
msgid "None - top level"
msgstr ""
-#: ckanext/kata/theme/templates/organization/snippets/organization_form.html:47
+#: ckanext/kata/theme/templates/organization/snippets/organization_form.html:49
msgid ""
"Select a parent organisation in organization hierarchy to which this dataset "
"will be linked. When you start typing, you will get suggestions for matching "
@@ -2568,13 +2586,13 @@ msgid ""
"target=\"_blank\">contact form."
msgstr ""
-#: ckanext/kata/theme/templates/organization/snippets/organization_form.html:84
+#: ckanext/kata/theme/templates/organization/snippets/organization_form.html:86
msgid ""
"Are you sure you want to delete this Organization? This will delete all the "
"public and private datasets belonging to this organization."
msgstr ""
-#: ckanext/kata/theme/templates/organization/snippets/organization_form.html:89
+#: ckanext/kata/theme/templates/organization/snippets/organization_form.html:91
msgid "Save Organization"
msgstr ""
@@ -4678,12 +4696,12 @@ msgstr ""
msgid "No language"
msgstr ""
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:71
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:70
#: ckanext/kata/theme/templates/package/snippets/package_basic_information.html:38
msgid "Keywords"
msgstr ""
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:126
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:125
msgid "Send a message"
msgstr ""
@@ -4719,88 +4737,88 @@ msgstr ""
msgid "Supplements"
msgstr ""
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:278
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:279
msgid "author"
msgstr ""
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:286
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:287
msgid "distributor"
msgstr ""
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:291
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:292
msgid "Etsin research data finder"
msgstr ""
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:301
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:302
msgid "Show more citation formats"
msgstr ""
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:307
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:308
msgid "Citations"
msgstr ""
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:311
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:312
msgid "Provided by distributor"
msgstr ""
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:316
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:317
msgid "Etsin default citation (en)"
msgstr ""
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:336
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:337
msgid "Etsin default citation (fi)"
msgstr ""
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:358
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:359
msgid "Close"
msgstr ""
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:371
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:372
msgid "Geographical areas covered"
msgstr ""
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:378
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:379
msgid "Period of time covered"
msgstr ""
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:385
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:386
msgid " to "
msgstr ""
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:388
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:389
#: ckanext/kata/theme/templates/package/snippets/recommended_coverage.html:32
msgid "Begin"
msgstr ""
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:391
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:392
#: ckanext/kata/theme/templates/package/snippets/recommended_coverage.html:44
msgid "End"
msgstr ""
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:401
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:402
msgid "Project and funding information"
msgstr ""
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:414
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:415
msgid "Project name"
msgstr ""
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:430
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:431
msgid "No funding information is available."
msgstr ""
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:442
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:443
msgid "Permanent address for this page"
msgstr ""
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:450
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:451
#: ckanext/kata/theme/templates/package/snippets/package_actors.html:32
#: ckanext/kata/theme/templates/package/snippets/package_actors.html:90
#: ckanext/kata/theme/templates/package/snippets/package_identification_info.html:17
msgid "Identifier"
msgstr ""
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:468
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:469
msgid ""
"This is the permanent identifier (PID) for this dataset. Use it when "
"citing this dataset. An identifier is unique and permanent. With identifiers "
@@ -4809,47 +4827,47 @@ msgid ""
"for data are URN, Handle and DOI, but many others exist.
"
msgstr ""
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:484
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:485
#: ckanext/kata/theme/templates/package/snippets/package_identification_info.html:42
msgid "Related data"
msgstr ""
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:507
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:508
#: ckanext/kata/theme/templates/package/snippets/recommended_lifecycle_events.html:5
msgid "Dataset lifecycle events"
msgstr ""
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:520
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:521
msgid "Who"
msgstr ""
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:521
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:522
msgid "When"
msgstr ""
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:536
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:537
msgid "Most recent data modification date"
msgstr ""
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:543
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:552
#: ckanext/kata/theme/templates/package/snippets/package_basic_fields.html:22
msgid "Additional information"
msgstr ""
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:548
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:557
msgid "File format: MIME type"
msgstr ""
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:554
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:563
msgid "File format"
msgstr ""
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:560
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:569
#: ckanext/kata/theme/templates/package/snippets/recommended_file_information.html:36
msgid "Checksum"
msgstr ""
-#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:564
+#: ckanext/kata/theme/templates/package/snippets/metadata_info.html:573
#: ckanext/kata/theme/templates/package/snippets/recommended_file_information.html:47
msgid "Algorithm"
msgstr ""
@@ -5106,9 +5124,10 @@ msgstr ""
#: ckanext/kata/theme/templates/package/snippets/package_basic_information.html:44
msgid ""
"Select scientific disciplines the dataset belongs to. When you start typing, "
-"you will get suggestions for matching discipline names. You can select a "
-"suggested keyword with a mouse click. To remove a keyword, click the 'x' "
-"symbol on the keyword tag."
+"you will get suggestions for matching discipline names. You can browse the "
+"available disciplines by searching and browsing the Finto okm-tieteenala "
+"vocabulary. You can select a suggested keyword with a mouse click. To remove "
+"a keyword, click the 'x' symbol on the keyword tag."
msgstr ""
#: ckanext/kata/theme/templates/package/snippets/package_basic_information.html:45
@@ -5167,11 +5186,7 @@ msgid ""
"consider the most complete metadata as primary."
msgstr ""
-#: ckanext/kata/theme/templates/package/snippets/package_organization.html:35
-msgid "No organization"
-msgstr ""
-
-#: ckanext/kata/theme/templates/package/snippets/package_organization.html:55
+#: ckanext/kata/theme/templates/package/snippets/package_organization.html:50
msgid ""
"Select an organisation to which this dataset will be linked. When you start "
"typing, you will get suggestions for matching organisations. Select the "
diff --git a/ckanext/kata/schemas.py b/ckanext/kata/schemas.py
index ffbc886c..35631b7f 100644
--- a/ckanext/kata/schemas.py
+++ b/ckanext/kata/schemas.py
@@ -301,7 +301,7 @@ def create_package_schema_ddi(cls):
schema.pop('accept-terms', None)
- schema['discipline'].insert(0, ignore_missing)
+ schema['discipline'] = [ignore_missing, co.convert_to_extras_kata, unicode]
schema['event'] = {'type': [ignore_missing, unicode, co.flattened_to_extras, va.validate_general],
'who': [ignore_missing, unicode, co.flattened_to_extras, va.validate_general, va.contains_alphanumeric],
'when': [ignore_missing, unicode, co.flattened_to_extras, va.validate_kata_date_relaxed],
diff --git a/ckanext/kata/tests/functional/test_api.py b/ckanext/kata/tests/functional/test_api.py
index 1813c868..b040b55a 100644
--- a/ckanext/kata/tests/functional/test_api.py
+++ b/ckanext/kata/tests/functional/test_api.py
@@ -555,7 +555,7 @@ def test_field_clearing(self):
output = self.api_user_normal.action.package_create(**data_dict)
data_dict['id'] = output['id']
- data_dict['discipline'] = 'Matematiikka'
+ data_dict['discipline'] = 'http://www.yso.fi/onto/okm-tieteenala/ta111'
output = self.api_user_normal.action.package_show(id=data_dict['id'])
assert 'discipline' not in output
diff --git a/ckanext/kata/tests/test_fixtures/unflattened.py b/ckanext/kata/tests/test_fixtures/unflattened.py
index 59719b2c..9262d817 100644
--- a/ckanext/kata/tests/test_fixtures/unflattened.py
+++ b/ckanext/kata/tests/test_fixtures/unflattened.py
@@ -81,7 +81,7 @@
'phone': u'05549583',
}],
'direct_download_URL': u'http://www.tdata.fi/kata',
- 'discipline': u'Tietojenkäsittely ja informaatiotieteet',
+ 'discipline': u'http://www.yso.fi/onto/okm-tieteenala/ta111',
'format': u'CSV',
'geographic_coverage': u'Keilaniemi (populated place),Espoo (city)',
'langdis': 'False',
diff --git a/ckanext/kata/tests/unit/test_helpers_utils.py b/ckanext/kata/tests/unit/test_helpers_utils.py
index e93e709e..2f04b468 100644
--- a/ckanext/kata/tests/unit/test_helpers_utils.py
+++ b/ckanext/kata/tests/unit/test_helpers_utils.py
@@ -95,15 +95,9 @@ def test_disciplines_string_resolved(self):
'en') == u'http://www.yso.fi/onto/okm-tieteenala/xyz1234, Fysiikka'
def test_get_label_for_uri(self):
- discipline = u'Matematiikka'
- assert helpers.get_label_for_uri(discipline, None, 'en') == discipline
- discipline = u'http://www.yso.fi/baldur/okm-tieteenala/ta111'
- assert helpers.get_label_for_uri(discipline, None, 'en') == discipline
- assert helpers.get_label_for_uri(discipline, 'okm-tieteenala') == discipline
discipline = u'http://www.yso.fi/onto/okm-tieteenala/ta111'
- assert helpers.get_label_for_uri(discipline) == u'Mathematics'
- discipline = u'http://www.yso.fi/onto/okm-tieteenala/xyz1234'
- assert helpers.get_label_for_uri(discipline) == discipline
+ assert helpers.get_label_for_uri(discipline, None, 'en') == u'Mathematics'
+ assert helpers.get_label_for_uri(discipline, 'okm-tieteenala', 'en') == u'Mathematics'
def test_get_translation(self):
translation_json = '{"fin":"otsikko", "eng":"title"}'
diff --git a/ckanext/kata/tests/unit/test_validators.py b/ckanext/kata/tests/unit/test_validators.py
index 94f8d0f1..5e75fc79 100644
--- a/ckanext/kata/tests/unit/test_validators.py
+++ b/ckanext/kata/tests/unit/test_validators.py
@@ -357,7 +357,7 @@ def test_validate_discipline(self):
errors = defaultdict(list)
dada = copy.deepcopy(TEST_DATA_FLATTENED)
- dada[('discipline',)] = u'Matematiikka'
+ dada[('discipline',)] = u'http://www.yso.fi/onto/okm-tieteenala/ta111'
validate_discipline(('discipline',), dada, errors, None)
assert len(errors) == 0
@@ -369,6 +369,12 @@ def test_validate_discipline(self):
dada[('discipline',)] = u'Matematiikka (Logiikka!)'
self.assertRaises(Invalid, validate_discipline, ('discipline',), dada, errors, None)
+ dada[('discipline',)] = u'Matematiikka'
+ self.assertRaises(Invalid, validate_discipline, ('discipline',), dada, errors, None)
+
+ dada[('discipline',)] = u'http://www.yso.fi/onto/okm-tieteenala/xyz123'
+ self.assertRaises(Invalid, validate_discipline, ('discipline',), dada, errors, None)
+
def test_validate_spatial(self):
errors = defaultdict(list)
diff --git a/ckanext/kata/theme/templates/kata/tombstone.html b/ckanext/kata/theme/templates/kata/tombstone.html
index d56f02f5..05456e60 100644
--- a/ckanext/kata/theme/templates/kata/tombstone.html
+++ b/ckanext/kata/theme/templates/kata/tombstone.html
@@ -1,7 +1,9 @@
{% extends "page.html" %}
-{% set org_title = c.org_title %}
-{% set distributor_email = c.distributor_email %}
+
+{% set org = c.org %}
+{% set title_json = c.title_json %}
+{% set lang = h.lang() %}
{% block subtitle %}{{ _("Tombstone page") }}{% endblock %}
@@ -11,7 +13,11 @@
- This dataset has been deleted.
Organization: {{ org_title }}.
Contact: {{ distributor_email }}
+ This dataset has been deleted
Title: {{ h.get_title_in_lang(title_json, lang) }}
Organization:
+ {% set delim = joiner(" > ") %}
+ {% for organization in h.get_flat_hierarchy(org) %}
+ {{ delim() }} {{ organization.title }}
+ {% endfor %}
diff --git a/ckanext/kata/theme/templates/package/snippets/package_basic_information.html b/ckanext/kata/theme/templates/package/snippets/package_basic_information.html
index a1e7cbcf..e3091384 100755
--- a/ckanext/kata/theme/templates/package/snippets/package_basic_information.html
+++ b/ckanext/kata/theme/templates/package/snippets/package_basic_information.html
@@ -41,7 +41,7 @@
{% set autocomplete_source = '/api/2/util/discipline_autocomplete?incomplete=?&language=' ~ h.lang() %}
{% set disc_attrs = {'data-module': 'kata-autocomplete', 'data-module-tags': 'true', 'data-module-source': autocomplete_source , 'data-module-key': 'key', 'data-module-label': 'label', 'data-module-getlabels': 'true'} %}
- {{ kata_form.tooltip(tooltip=_("Select scientific disciplines the dataset belongs to. When you start typing, you will get suggestions for matching discipline names. You can select a suggested keyword with a mouse click. To remove a keyword, click the \'x\' symbol on the keyword tag.")) }}
+ {{ kata_form.tooltip(tooltip=_("Select scientific disciplines the dataset belongs to. When you start typing, you will get suggestions for matching discipline names. You can browse the available disciplines by searching and browsing the Finto okm-tieteenala vocabulary. You can select a suggested keyword with a mouse click. To remove a keyword, click the \'x\' symbol on the keyword tag.")) }}
{{ form.input('discipline', id='discipline_field', label=_('Disciplines'), placeholder=_('e.g. Mathematics'), value=h.get_autocomplete_format(data.discipline), error=errors.discipline, classes=['control-medium'], control_classes=['error-block-autocomplete error-block-88'], attrs=disc_attrs, label_classes=['center-align']) }}
\ No newline at end of file
diff --git a/ckanext/kata/validators.py b/ckanext/kata/validators.py
index 9686391b..18668eb3 100644
--- a/ckanext/kata/validators.py
+++ b/ckanext/kata/validators.py
@@ -275,6 +275,21 @@ def validate_discipline(key, data, errors, context):
if not discipline_match.match(item):
raise Invalid(_('Discipline "%s" must be alphanumeric '
'characters or symbols: -,:#+?=&/.') % (item))
+
+ # Validate discipline so that it must be a valid URL from okm-tieteenala vocabulary
+ if not 'finto.fi/okm-tieteenala' in item and not 'yso.fi/onto/okm-tieteenala' in item:
+ raise Invalid(
+ _('Discipline "%s" is not part of the official classification of disciplines. See help for further info.') % item)
+ else:
+ try:
+ response = urllib2.urlopen(item)
+ if response.getcode() != 200:
+ raise Invalid(_('Discipline "%s" must be a valid URL defined in Finto okm-tieteenala vocabulary. See help for further info.') % item)
+ except urllib2.HTTPError:
+ raise Invalid(
+ _('Discipline "%s" is not part of the official classification of disciplines. See help for further info.') % item)
+
+
else:
# With ONKI component, the entire parameter might not exist
# so we generate it any way