Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
LocoDelAssembly committed Dec 14, 2023
2 parents 14029ac + 1a14521 commit 1b1d190
Show file tree
Hide file tree
Showing 196 changed files with 4,836 additions and 2,719 deletions.
43 changes: 42 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,46 @@ This project <em>does not yet</em> adheres to [Semantic Versioning](https://semv

\-

## [0.37.0] - 2023-12-14

### Added

- DwC `verbatimLabel` support [#2749]
- Preview option and results reports for filter based batch updates [#3690]
- Freeform digtization, draw shapes to stub CollectionObjects [#3113]
- `superfamily`, `tribe` and `subtribe` DwC terms now supported in occurrences importer [#3705]

### Changed

- Improved simplified taxonomy rendering
- Unifies all filter-originating batch updates to a common look and feel [#3690]
- Report file size to browser for downloads
- DwC Checklist Importer: blank `originalNameUsageID` skip original combination creation instead of erroring [#3680]

### Fixed

- Ordering of descriptors in TNT format [#3711]
- Some ObservationMatrix views/formats were broken or unavailable for preview
- DwC-A checklist importer: fix importer crash caused by nil parent
- Address rendering on loan form [#3645]
- Citation topic whitespace for paper catalog [#187]
- Source filter with duplicate results when coming from another filter [#3696]
- `ancestrify` parameter for Otu queries not scoping to TaxonNames correctly
- Filter source: BibTeX type facet
- Project data SQL export obfuscating all users instead of just non-members
- Project data SQL export outputting only two rows per hierarchy-related tables
- AssertedDistributions API index call failed when OTU not linked to taxon name
- Missing valid names in nomenclature match task
- DwC Occurrence Importer: prefer correct protonym spelling when misspelling matches current conjugation

[#187]: https://github.com/SpeciesFileGroup/taxonpages/issues/187
[#2749]: https://github.com/SpeciesFileGroup/taxonworks/issues/2749
[#3113]: https://github.com/SpeciesFileGroup/taxonworks/issues/3113
[#3645]: https://github.com/SpeciesFileGroup/taxonworks/issues/3645
[#3680]: https://github.com/SpeciesFileGroup/taxonworks/issues/3680
[#3690]: https://github.com/SpeciesFileGroup/taxonworks/issues/3690
[#3696]: https://github.com/SpeciesFileGroup/taxonworks/issues/3696

## [0.36.0] - 2023-11-30

### Added
Expand Down Expand Up @@ -4138,7 +4178,8 @@ This project <em>does not yet</em> adheres to [Semantic Versioning](https://semv
- Loosing input page numbers when switching tabs on New Taxon Name task

[#1532]: https://github.com/SpeciesFileGroup/taxonworks/issues/1532
[unreleased]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.36.0...development
[unreleased]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.37.0...development
[0.37.0]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.36.0...v0.37.0
[0.36.0]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.35.3...v0.36.0
[0.35.3]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.35.2...v0.35.3
[0.35.2]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.35.1...v0.35.2
Expand Down
24 changes: 12 additions & 12 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ GEM
zeitwerk (~> 2.3)
acts_as_list (1.1.0)
activerecord (>= 4.2)
addressable (2.8.5)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
afm (0.2.2)
amazing_print (1.4.0)
Expand All @@ -157,7 +157,7 @@ GEM
babel-transpiler (0.7.0)
babel-source (>= 4.0, < 6)
execjs (~> 2.0)
barby (0.6.8)
barby (0.6.9)
base64 (0.2.0)
bcp47_spec (0.2.1)
bcrypt (3.1.20)
Expand Down Expand Up @@ -218,7 +218,7 @@ GEM
database_cleaner-core (~> 2.0.0)
database_cleaner-core (2.0.1)
date (3.3.4)
debug_inspector (1.1.0)
debug_inspector (1.2.0)
delayed_job (4.1.11)
activesupport (>= 3.0, < 8.0)
delayed_job_active_record (4.1.8)
Expand All @@ -236,7 +236,7 @@ GEM
exception_notification (4.5.0)
actionmailer (>= 5.2, < 8)
activesupport (>= 5.2, < 8)
excon (0.105.0)
excon (0.106.0)
execjs (2.8.1)
factory_bot (6.4.2)
activesupport (>= 5.0.0)
Expand Down Expand Up @@ -300,7 +300,7 @@ GEM
jquery-turbolinks (2.1.0)
railties (>= 3.1.0)
turbolinks
json (2.6.3)
json (2.7.1)
kaminari (1.2.2)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.2.2)
Expand Down Expand Up @@ -337,7 +337,7 @@ GEM
method_source (1.0.0)
mime-types (3.5.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2023.1003)
mime-types-data (3.2023.1205)
mimemagic (0.3.10)
nokogiri (~> 1)
rake
Expand All @@ -348,7 +348,7 @@ GEM
namae (1.1.1)
namecase (2.0.0)
nenv (0.3.0)
net-imap (0.4.7)
net-imap (0.4.8)
date
net-protocol
net-pop (0.1.2)
Expand All @@ -358,7 +358,7 @@ GEM
net-smtp (0.3.3)
net-protocol
netrc (0.11.0)
nio4r (2.6.1)
nio4r (2.7.0)
nokogiri (1.15.5-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.15.5-x86_64-linux)
Expand Down Expand Up @@ -459,7 +459,7 @@ GEM
rdoc (6.3.3)
redcarpet (3.6.0)
redis (4.8.1)
regexp_parser (2.8.2)
regexp_parser (2.8.3)
request_store (1.5.1)
rack (>= 1.4)
require_all (3.0.0)
Expand Down Expand Up @@ -518,15 +518,15 @@ GEM
rspec-support (~> 3.10)
rspec-support (3.12.1)
rtesseract (3.1.3)
rubocop (1.57.2)
rubocop (1.59.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.2.4)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.28.1, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.30.0)
Expand Down Expand Up @@ -571,7 +571,7 @@ GEM
rdoc (>= 5.0)
seedbank (0.5.0)
rake (>= 10.0)
selenium-webdriver (4.15.0)
selenium-webdriver (4.16.0)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
Expand Down
29 changes: 16 additions & 13 deletions app/assets/stylesheets/base/dimensions.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

$viewport_height: 768px;
$viewport_width: 1024px;

Expand All @@ -22,6 +21,10 @@ $viewport_width: 1024px;
width: 100%;
}

.full_height {
height: 100%;
}

.width-auto {
width: auto !important;
}
Expand All @@ -38,15 +41,16 @@ $viewport_width: 1024px;
width: 20%;
}

.one_third_width, .width-30 {
.one_third_width,
.width-30 {
width: 30%;
}

.half_width {
.half_width {
width: 50%;
}

.three_quarter_width {
.three_quarter_width {
width: 75%;
}

Expand All @@ -58,13 +62,11 @@ $viewport_width: 1024px;
width: 40%;
}



// this might belong elsewhere
.attributes {
.attributes {
p {
width:100%;
word-wrap:break-word;
width: 100%;
word-wrap: break-word;
}
}

Expand All @@ -76,9 +78,10 @@ $viewport_width: 1024px;
display: block;
}

p.list { margin-top: 0em;
margin-bottom: 0em;
margin-left: 1em;
p.list {
margin-top: 0em;
margin-bottom: 0em;
margin-left: 1em;
}

.overflow-x-scroll {
Expand All @@ -87,4 +90,4 @@ p.list { margin-top: 0em;

.overflow-y-scroll {
overflow-y: scroll;
}
}
16 changes: 15 additions & 1 deletion app/assets/stylesheets/views/loans/loans.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
margin: 0 auto;
max-width: 1020px;

.loan_address {
.address {
display:inline-block;
max-width: 5cm;
}
Expand Down Expand Up @@ -58,6 +58,16 @@
margin-bottom: 1em;
}

pre {
padding-top: 4px;
background-color: transparent;
padding: 4px 0px 0px 0px;
margin: 0px;
color: $default_text;
font-family: IBM Plex Sans,Helvetica,Arial,Verdana,Tahoma;
font-size: 13px !important;
}

#lender_details {
text-align: right;
li {
Expand All @@ -68,6 +78,10 @@
#recipient_details {
margin-bottom: 1em;
max-width: 40%;
text-align: left;
li {
list-style: none;
}
}

#loan_items {
Expand Down
13 changes: 9 additions & 4 deletions app/controllers/asserted_distributions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,16 @@ def download
def batch_load
end

# PATCH /asserted_distributions/batch_move.json?asserted_distribution_query=<>&geographic_area_id
def batch_move
if @result = AssertedDistribution.batch_move(params)
# PATCH /asserted_distributions/batch_update.json?asserted_distributions_query=<>&asserted_distribution={taxon_name_id=123}}
def batch_update
if r = AssertedDistribution.batch_update(
preview: params[:preview],
asserted_distribution: asserted_distribution_params.merge(by: sessions_current_user_id),
asserted_distribution_query: params[:asserted_distribution_query],
)
render json: r.to_json, status: :ok
else
render json: {success: false}
render json: {}, status: :unprocessable_entity
end
end

Expand Down
23 changes: 5 additions & 18 deletions app/controllers/biological_associations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,26 +131,12 @@ def api_index
end
end

# POST /biological_associations/batch_update.json?biological_association_query=<>&biological_association={}
# PATCH /biological_associations/batch_update.json?biological_association_query=<>&biological_association={}
def batch_update
if r = BiologicalAssociation.batch_update(
{
preview: params[:preview],
biological_association: biological_association_params.merge(by: sessions_current_user_id) ,
biological_association_query: params[:biological_association_query]
}
)
render json: r.to_json, status: :ok
else
render json: {}, status: :unprocessable_entity
end
end

# POST /biological_associations/batch_rotate.json?biological_association_query=<>&biological_association={}
def batch_rotate
if r = BiologicalAssociation.batch_rotate(
params.merge(by: sessions_current_user_id)
)
preview: params[:preview],
biological_association: biological_association_params.merge(by: sessions_current_user_id),
biological_association_query: params[:biological_association_query] )
render json: r.to_json, status: :ok
else
render json: {}, status: :unprocessable_entity
Expand All @@ -169,6 +155,7 @@ def biological_association_params
:biological_association_object_id, :biological_association_object_type,
:subject_global_id,
:object_global_id,
:rotate,
origin_citation_attributes: [:id, :_destroy, :source_id, :pages],
citations_attributes: [:id, :is_original, :_destroy, :source_id, :pages, :citation_object_id, :citation_object_type],
)
Expand Down
12 changes: 6 additions & 6 deletions app/controllers/collecting_events_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,13 @@ def autocomplete
@collecting_events = Queries::CollectingEvent::Autocomplete.new(params[:term], project_id: sessions_current_project_id).autocomplete
end

# POST /collecting_events/batch_update.json?collecting_event_query=<>&collecting_event={}
# PATCH /collecting_events/batch_update.json?collecting_event_query=<>&collecting_event={}
def batch_update
if c = CollectingEvent.batch_update(
collecting_event: collecting_event_params.merge(by: sessions_current_user_id) ,
collecting_event_query: params[:collecting_event_query]
)
render json: {}, status: :ok
if r = CollectingEvent.batch_update(
preview: params[:preview],
collecting_event: collecting_event_params.merge(by: sessions_current_user_id),
collecting_event_query: params[:collecting_event_query])
render json: r.to_json, status: :ok
else
render json: {}, status: :unprocessable_entity
end
Expand Down
16 changes: 10 additions & 6 deletions app/controllers/collection_objects_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -398,13 +398,16 @@ def batch_update_dwc_occurrence
end
end

# POST /collection_object/batch_update.json?collection_object_query=<>&collection_object={}
# PATCH /collection_object/batch_update.json?collection_object_query=<>&collection_object={}
def batch_update
c = CollectionObject.query_batch_update({
collection_object: collection_object_params.merge(by: sessions_current_user_id),
collection_object_query: params[:collection_object_query]
})
render json: c[:result], status: c[:status]
if c = CollectionObject.batch_update(
preview: params[:preview],
collection_object: collection_object_params.merge(by: sessions_current_user_id),
collection_object_query: params[:collection_object_query])
render json: c.to_json, status: :ok
else
render json: {}, status: :unprocessable_entity
end
end

private
Expand Down Expand Up @@ -437,6 +440,7 @@ def collection_object_params
collecting_event_attributes: [], # needs to be filled out!
data_attributes_attributes: [ :id, :_destroy, :controlled_vocabulary_term_id, :type, :value ],
tags_attributes: [:id, :_destroy, :keyword_id],
depictions_attributes: [:id, :_destroy, :svg_clip, :svg_view_box, :position, :caption, :figure_label, :image_id],
identifiers_attributes: [
:id,
:_destroy,
Expand Down
1 change: 1 addition & 0 deletions app/controllers/downloads_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def list
def file
if @download.ready?
@download.increment!(:times_downloaded)
response.headers["Content-Length"] = File.size(@download.file_path).to_s
send_file @download.file_path
else
redirect_to download_url
Expand Down
Loading

0 comments on commit 1b1d190

Please sign in to comment.