From 0d90689e9f5911222a25d2f821cc2419c4391443 Mon Sep 17 00:00:00 2001 From: Geoff Ower Date: Fri, 28 Oct 2022 16:38:04 -0500 Subject: [PATCH 001/160] Add basic metadata.yaml --- lib/export/coldp.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/export/coldp.rb b/lib/export/coldp.rb index 766a24dbeb..769f1dda46 100644 --- a/lib/export/coldp.rb +++ b/lib/export/coldp.rb @@ -1,4 +1,5 @@ require 'zip' +require 'yaml' module Export @@ -28,6 +29,7 @@ def self.otus(otu_id) def self.export(otu_id, prefer_unlabelled_otus: true) otus = otus(otu_id) + Current.project_id = Otu.find(otu_id).project_id # source_id: [csv_array] ref_csv = {} @@ -35,6 +37,19 @@ def self.export(otu_id, prefer_unlabelled_otus: true) # TODO: This will likely have to change, it is renamed on serving the file. zip_file_path = "/tmp/_#{SecureRandom.hex(8)}_coldp.zip" + metadata_path = Zaru::sanitize!("/tmp/#{::Project.find(Current.project_id).name}_#{DateTime.now}_metadata.yaml").gsub(' ', '_').downcase + version = Taxonworks::VERSION + if Settings.sandbox_mode? + version = Settings.sandbox_commit_sha + end + metadata = {"title" =>::Project.find(Current.project_id).name, + "version" => version, + "issued" => DateTime.now.strftime('%Y-%m-%d'), + } + metadata_file = Tempfile.new(metadata_path) + metadata_file.write(metadata.to_yaml) + metadata_file.close + Zip::File.open(zip_file_path, Zip::File::CREATE) do |zipfile| (FILETYPES - ['Name']).each do |ft| m = "Export::Coldp::Files::#{ft}".safe_constantize @@ -57,6 +72,7 @@ def self.export(otu_id, prefer_unlabelled_otus: true) end zipfile.get_output_stream('References.csv') { |f| f.write d } + zipfile.add("metadata.yaml", metadata_file.path) end zip_file_path From f754e1427af102e4fc0ed11a0efb7f9577baa336 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Luis=20Pereira?= Date: Tue, 8 Nov 2022 15:53:05 -0300 Subject: [PATCH 002/160] Add component --- .../tasks/collection_objects/filter/app.vue | 8 ++- .../components/DeleteCollectionObjects.vue | 55 +++++++++++++++++++ 2 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 app/javascript/vue/tasks/collection_objects/filter/components/DeleteCollectionObjects.vue diff --git a/app/javascript/vue/tasks/collection_objects/filter/app.vue b/app/javascript/vue/tasks/collection_objects/filter/app.vue index e4efe2b761..fded4c6ec2 100644 --- a/app/javascript/vue/tasks/collection_objects/filter/app.vue +++ b/app/javascript/vue/tasks/collection_objects/filter/app.vue @@ -44,7 +44,8 @@ @urlRequest="urlRequest = $event" @result="loadList" @pagination="pagination = getPagination($event)" - @reset="resetTask"/> + @reset="resetTask" + />
+ + + + Delete collection objects + + + + From 27c125514e6ab437feabd5854b33946ab535b780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Luis=20Pereira?= Date: Tue, 8 Nov 2022 18:55:28 -0300 Subject: [PATCH 003/160] Fix #3189 --- CHANGELOG.md | 7 +++++++ .../tasks/collection_objects/browse/App.vue | 21 +++++++++++++++++-- .../browse/components/CONavegation.vue | 10 ++++----- .../collection_objects/browse/utils/loadCO.js | 5 +++++ 4 files changed, 35 insertions(+), 8 deletions(-) create mode 100644 app/javascript/vue/tasks/collection_objects/browse/utils/loadCO.js diff --git a/CHANGELOG.md b/CHANGELOG.md index b5715a4aec..c03cc03e91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ This project does not yet adheres to [Semantic Versioning](https://semv ## [unreleased] +### Added +- Autocomplete on Browse collection object [#3189] + +[#3189]: https://github.com/SpeciesFileGroup/taxonworks/issues/3189 + +## [0.29.6] - 2022-11-08 + ### Added - Print unit-tray headers from TaxonNames via Filter nomenclature [#3160] - New radial "Filter" navigators facilitating cross-linking to filters [#2297] diff --git a/app/javascript/vue/tasks/collection_objects/browse/App.vue b/app/javascript/vue/tasks/collection_objects/browse/App.vue index a8f3f36f0a..20910f1ccb 100644 --- a/app/javascript/vue/tasks/collection_objects/browse/App.vue +++ b/app/javascript/vue/tasks/collection_objects/browse/App.vue @@ -1,6 +1,17 @@ - + + diff --git a/app/javascript/vue/tasks/nomenclature/by_source/components/Table/TableCitationRow.vue b/app/javascript/vue/tasks/nomenclature/by_source/components/Table/TableCitationRow.vue index 290cd1e87a..ba5e3a28eb 100644 --- a/app/javascript/vue/tasks/nomenclature/by_source/components/Table/TableCitationRow.vue +++ b/app/javascript/vue/tasks/nomenclature/by_source/components/Table/TableCitationRow.vue @@ -17,7 +17,7 @@ > - diff --git a/app/javascript/vue/tasks/otu/browse/components/BiologicalAssociations.vue b/app/javascript/vue/tasks/otu/browse/components/BiologicalAssociations.vue index 701419d14a..0fcd0c8a36 100644 --- a/app/javascript/vue/tasks/otu/browse/components/BiologicalAssociations.vue +++ b/app/javascript/vue/tasks/otu/browse/components/BiologicalAssociations.vue @@ -30,7 +30,7 @@ - +   From 36679044b9a25b331ebf0915fa594f6a8abeaf61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Luis=20Pereira?= Date: Wed, 9 Nov 2022 12:00:53 -0300 Subject: [PATCH 005/160] Fix #3182 --- CHANGELOG.md | 1 + .../new_taxon_name/components/listEntrys.vue | 28 +++++++++++-------- .../new_taxon_name/components/type.vue | 4 +-- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e40ae24b4a..be6d5c3c60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ This project does not yet adheres to [Semantic Versioning](https://semv ### Fixed - Citation link in Biological association panel on Browse OTU +- Type relationship text/rendering is inverted in New taxon name [#3182] [#3189]: https://github.com/SpeciesFileGroup/taxonworks/issues/3189 diff --git a/app/javascript/vue/tasks/nomenclature/new_taxon_name/components/listEntrys.vue b/app/javascript/vue/tasks/nomenclature/new_taxon_name/components/listEntrys.vue index 69e62dd3ea..95fa4b16b1 100644 --- a/app/javascript/vue/tasks/nomenclature/new_taxon_name/components/listEntrys.vue +++ b/app/javascript/vue/tasks/nomenclature/new_taxon_name/components/listEntrys.vue @@ -10,14 +10,17 @@ class="list-complete-item flex-separate middle">
@@ -59,10 +62,10 @@ export default { RadialAnnotator }, props: { - list: { + list: { type: Array, - default: () => { return [] } - }, + default: () => [] + }, display: { type: Array }, @@ -133,12 +136,13 @@ export default { .pages:disabled { background-color: #F5F5F5; } + .list-item { - a { - padding-left: 4px; - padding-right: 4px; + span { + margin-right: 4px; } } + .table-entrys-list { padding: 0px; position: relative; diff --git a/app/javascript/vue/tasks/nomenclature/new_taxon_name/components/type.vue b/app/javascript/vue/tasks/nomenclature/new_taxon_name/components/type.vue index 6721718b25..6f741dc649 100644 --- a/app/javascript/vue/tasks/nomenclature/new_taxon_name/components/type.vue +++ b/app/javascript/vue/tasks/nomenclature/new_taxon_name/components/type.vue @@ -14,7 +14,7 @@ v-if="editType" class="horizontal-left-content"> - + @@ -89,7 +89,7 @@
Date: Wed, 9 Nov 2022 14:03:53 -0300 Subject: [PATCH 006/160] Add scaffold --- app/javascript/packs/application.js | 1 + .../simple_new_specimen/App.vue | 10 ++++++ .../simple_new_specimen/components/FormCE.vue | 27 ++++++++++++++++ .../simple_new_specimen/components/FormCO.vue | 13 ++++++++ .../components/GeographicArea.vue | 22 +++++++++++++ .../composition/useStore.js | 31 +++++++++++++++++++ .../simple_new_specimen/index.js | 14 +++++++++ .../accessions/quick/simple/new.html.erb | 6 ++-- 8 files changed, 122 insertions(+), 2 deletions(-) create mode 100644 app/javascript/vue/tasks/collection_objects/simple_new_specimen/App.vue create mode 100644 app/javascript/vue/tasks/collection_objects/simple_new_specimen/components/FormCE.vue create mode 100644 app/javascript/vue/tasks/collection_objects/simple_new_specimen/components/FormCO.vue create mode 100644 app/javascript/vue/tasks/collection_objects/simple_new_specimen/components/GeographicArea.vue create mode 100644 app/javascript/vue/tasks/collection_objects/simple_new_specimen/composition/useStore.js create mode 100644 app/javascript/vue/tasks/collection_objects/simple_new_specimen/index.js diff --git a/app/javascript/packs/application.js b/app/javascript/packs/application.js index 0794d310c5..bfb5153121 100644 --- a/app/javascript/packs/application.js +++ b/app/javascript/packs/application.js @@ -79,3 +79,4 @@ require('../vue/tasks/extracts/filter/main.js') require('../vue/tasks/people/filter/main.js') require('../vue/tasks/collection_objects/stepwise/determinations/main.js') require('../vue/tasks/content/publisher/main.js') +require('../vue/tasks/collection_objects/simple_new_specimen/index') diff --git a/app/javascript/vue/tasks/collection_objects/simple_new_specimen/App.vue b/app/javascript/vue/tasks/collection_objects/simple_new_specimen/App.vue new file mode 100644 index 0000000000..aa25eb352f --- /dev/null +++ b/app/javascript/vue/tasks/collection_objects/simple_new_specimen/App.vue @@ -0,0 +1,10 @@ + + + diff --git a/app/javascript/vue/tasks/collection_objects/simple_new_specimen/components/FormCE.vue b/app/javascript/vue/tasks/collection_objects/simple_new_specimen/components/FormCE.vue new file mode 100644 index 0000000000..bfe1777981 --- /dev/null +++ b/app/javascript/vue/tasks/collection_objects/simple_new_specimen/components/FormCE.vue @@ -0,0 +1,27 @@ +