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, 2020
2 parents 11a7df9 + dd41250 commit e12cc07
Show file tree
Hide file tree
Showing 56 changed files with 757 additions and 422 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deliver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
- name: Push image to DockerHub
if: ${{ github.event_name != 'pull_request' }}
env:
DOCKER_TAG: 'github-actions-${{steps.docker_tag.outputs.result}}'
DOCKER_TAG: '${{steps.docker_tag.outputs.result}}'
run: |
docker tag sfgrp/taxonworks:latest sfgrp/taxonworks:$DOCKER_TAG
docker push sfgrp/taxonworks:$DOCKER_TAG
Expand Down
44 changes: 43 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,47 @@ This project <em>does not yet</em> adheres to [Semantic Versioning](https://semv

\-

## [0.15.1] - 2020-12-14
### Added
- Show buffered values in `Task - Browse collection objects` [#1931]
- Default pin button on Uniquify people task
- Checkbox to Select/unselect all match people on Uniquify people task [#1921]
- Pixels to centimeter on new image task

### Changed
- Clean timeline display in `Task - Browse collection objects`
- `db:seed` displays password for created users and adds admin to Default project [#1913]
- Start date needs to be set before set end date on Housekeeping facet
- Bump node package `ini` from 1.3.5 to 1.3.7

### Fixed
- CVT smart selectors/pinboard scope broken [#1940] [#1941]
- Image filter `ancestor_id` was to be `taxon_name_id` or `taxon_name_id[]` [#1916]
- Bad Image select_option sort [#1930]
- Housekeeping filter params now less restrictive [#1920] PENDING UI TEST
- ShallowPolymorphic called in `.json` form [#1928]
- Documentation of param names, examples, for the "CASTOR" taxon name batch load [#1926]
- `tw:db:load` task not handling settings reliably. [#1914]
- Set `pulse` attribute true on radial annotator for object with annotations on data views and Browse nomenclature task
- Invalid attribute `:note` in Note API result view.
- Malformed PDF exception handling in Document model.
- Clipboard copy shortcut
- Source hub link on Citations by source task
- Clean content editor after change a topic


[#1941]: https://github.com/SpeciesFileGroup/taxonworks/issues/1941
[#1940]: https://github.com/SpeciesFileGroup/taxonworks/issues/1940
[#1916]: https://github.com/SpeciesFileGroup/taxonworks/issues/1916
[#1931]: https://github.com/SpeciesFileGroup/taxonworks/issues/1931
[#1930]: https://github.com/SpeciesFileGroup/taxonworks/issues/1930
[#1920]: https://github.com/SpeciesFileGroup/taxonworks/issues/1920
[#1928]: https://github.com/SpeciesFileGroup/taxonworks/issues/1928
[#1926]: https://github.com/SpeciesFileGroup/taxonworks/issues/1926
[#1913]: https://github.com/SpeciesFileGroup/taxonworks/issues/1913
[#1914]: https://github.com/SpeciesFileGroup/taxonworks/issues/1914
[#1921]: https://github.com/SpeciesFileGroup/taxonworks/issues/1921

## [0.15.0] - 2020-11-30

### Added
Expand Down Expand Up @@ -700,7 +741,8 @@ This project <em>does not yet</em> adheres to [Semantic Versioning](https://semv

[#1532]: https://github.com/SpeciesFileGroup/taxonworks/issues/1532

[unreleased]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.15.0...development
[unreleased]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.15.1...development
[0.15.1]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.15.0...v0.15.1
[0.15.0]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.14.1...v0.15.0
[0.14.1]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.14.0...v0.14.1
[0.14.0]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.13.0...v0.14.0
Expand Down
9 changes: 6 additions & 3 deletions app/controllers/collection_objects_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -428,14 +428,17 @@ def filter_params
collecting_event_ids: [],
geographic_area_ids: [],
biocuration_class_ids: [],
biological_relationship_ids: []

biological_relationship_ids: [],
# user_id: []

# collecting_event: {
# :recent,
# keyword_ids: []
# }
)

# TODO: check user_id: []

a[:user_id] = params[:user_id] if params[:user_id] && is_project_member_by_id(params[:user_id], sessions_current_project_id) # double check vs. setting project_id from API
a
end
Expand Down Expand Up @@ -480,7 +483,7 @@ def api_params
collecting_event_ids: [],
geographic_area_ids: [],
biocuration_class_ids: [],
biological_relationship_ids: []
biological_relationship_ids: [],

# collecting_event: {
# :recent,
Expand Down
3 changes: 2 additions & 1 deletion app/controllers/concerns/shallow_polymorphic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ module ShallowPolymorphic
def shallow_object_global_param
u = request.fullpath
n = self.class.controller_name
if u =~ /\d+\/#{n}$(\..+)?/ && params.permit(:object_global_id).to_h.empty?

if u =~ /\d+\/#{n}(\..+)?(\.json)?$/ && params.permit(:object_global_id).to_h.empty?

s = u.split('/')
k = s[1].singularize.camelize
Expand Down
4 changes: 3 additions & 1 deletion app/controllers/images_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
class ImagesController < ApplicationController
include DataControllerConfiguration::ProjectDataControllerConfiguration
after_action -> { set_pagination_headers(:images) }, only: [:index, :api_index], if: :json_request?

before_action :set_image, only: [:show, :edit, :update, :destroy, :rotate]

Expand Down Expand Up @@ -148,7 +149,7 @@ def select_options

def filter_params
params.permit(
:ancestor_id,
:taxon_name_id,
:ancestor_id_target,
:otu_id,
:collection_object_id,
Expand All @@ -165,6 +166,7 @@ def filter_params
:identifier_exact,
:identifier_start,
keyword_ids: [],
taxon_name_id: [],
sled_image_id: [],
biocuration_class_id: [],
image_id: [],
Expand Down
4 changes: 3 additions & 1 deletion app/controllers/people_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ def filter_params
used_in_project_id: [],
keyword_ids: [],
role: [],
person_wildcard: []
person_wildcard: [],
user_id: []
)
end

Expand All @@ -188,6 +189,7 @@ def api_params
:user_id,
:user_target,
:tags,
# user_id: [],
keyword_ids: [],
role: [],
person_wildcard: []
Expand Down
5 changes: 5 additions & 0 deletions app/controllers/taxon_names_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ def filter_params
taxon_name_classification: [],
taxon_name_relationship_type: [],
taxon_name_relationship: []
# user_id: []
).to_h.symbolize_keys.merge(project_id: sessions_current_project_id)
end

Expand Down Expand Up @@ -336,6 +337,10 @@ def api_params
taxon_name_relationship_type: [],
taxon_name_relationship: []
).to_h.symbolize_keys.merge(project_id: sessions_current_project_id)

# TODO: see config in collection objects controller
# a[:user_id] = params[:user_id] if params[:user_id] && is_project_member_by_id(params[:user_id], sessions_current_project_id) # double check vs. setting project_id from API
# a
end

end
Expand Down
11 changes: 11 additions & 0 deletions app/helpers/annotations_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@ def annotations_summary_tag(object)

end

def annotations_exist(object)
return (object.has_citations? && object.citations.any?) ||
(object.has_identifiers? && object.identifiers.any?) ||
(object.has_data_attributes? && object.data_attributes.any?) ||
(object.has_notes? && object.notes.any?) ||
(object.has_tags? && object.tags.load.any?) ||
(object.has_alternate_values? && object.alternate_values.any?) ||
(object.has_confidences? && object.confidences.any?) ||
(object.has_attribution? && object.attribution)
end

def annotation_id(object)
"annotation_anchor_#{object.metamorphosize.class.name}_#{object.id}"
end
Expand Down
19 changes: 15 additions & 4 deletions app/helpers/collection_objects/catalog_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,23 @@ def collection_object_history_table(data)
def collection_object_history_row(item)
content_tag(:tr, class: Catalog::CollectionObject::FILTER_MAP[item.type]) do
content_tag(:td, item.type.to_s.humanize ) +
content_tag(:td, collection_object_catalog_date_range(item) ) +
content_tag(:td, item.object_class_name ) +
content_tag(:td, object_link(item.object) )
content_tag(:td, collection_object_catalog_date_range(item) ) +
content_tag(:td, item.object_class_name ) +
collection_object_history_object_value(item)
end
end


def collection_object_history_object_value(item)
case item.object_class_name
when 'Tag'
content_tag(:td, controlled_vocabulary_term_tag(item.object.keyword) )
when 'Depiction'
content_tag(:td, image_link(item.object.image))
else
content_tag(:td, object_link(item.object))
end
end

def collection_object_catalog_date_range(item)
d = [ item.start_date, item.end_date].compact.collect{|t| t.strftime('%F')}.join('-')
d.empty? ? content_tag(:em,'not provided') : d
Expand Down
Loading

0 comments on commit e12cc07

Please sign in to comment.