Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Taxonomy Fixes #655

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
bb1d7b2
Increment Minor Version
jwaspin Feb 21, 2024
22a4e5a
Refactor Taxonomic System
jwaspin Feb 21, 2024
b7aa952
Change Placeholder Text
jwaspin Feb 21, 2024
ea5bc8a
Refactor Itis
jwaspin Feb 21, 2024
51792dd
Add Identification References to Taxonomic Collection
jwaspin Feb 21, 2024
6705f63
Refactor Taxonomic System List Attributes
jwaspin Feb 22, 2024
38da5b4
Update package.json version to 1.3.0-beta.4
jwaspin Feb 26, 2024
34457d0
Refactor ITIS component and service
jwaspin Feb 26, 2024
9437ba2
Add classifier date to ITIS citation
jwaspin Feb 27, 2024
30187d1
Merge branch 'develop' into feature/taxonomy-enhancements
jwaspin Mar 20, 2024
ec19d44
Merge branch 'develop' into feature/taxonomy-enhancements
jwaspin Mar 28, 2024
dd96da0
Merge branch 'develop' into feature/taxonomy-enhancements
dvonanderson Apr 8, 2024
74bf9d9
Bump package.json version to 1.4.0-beta.12
jwaspin Apr 8, 2024
e9ca544
Merge branch 'develop' into feature/taxonomy-enhancements
jwaspin Apr 16, 2024
b96c3e7
Bump package.json version to 1.5.0-beta.2
jwaspin Apr 16, 2024
86eceb1
Merge branch 'develop' into feature/taxonomy-enhancements
jwaspin Apr 16, 2024
01916e9
Bump package.json version to 1.5.0-beta.6
jwaspin Apr 16, 2024
0fd8542
Merge branch 'fix/677-fix-data-quality' into feature/taxonomy-enhance…
jwaspin May 17, 2024
fa73c23
Merge branch 'fix/677-fix-data-quality' into feature/taxonomy-enhance…
jwaspin May 17, 2024
f5bc3cc
Merge branch 'fix/677-fix-data-quality' into feature/taxonomy-enhance…
jwaspin May 17, 2024
ee20d49
chore: Bump version to 1.5.0-beta.21 in package.json
jwaspin May 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/pods/components/control/md-itis/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ export default Component.extend({

if (!system) {
itisCitation.get('date').pushObject(dateObj);
itisCitation.get('date').pushObject(classifierDateObj);
systems.pushObject({
citation: itisCitation,
});
Expand Down
331 changes: 198 additions & 133 deletions app/pods/components/control/md-itis/template.hbs
Original file line number Diff line number Diff line change
@@ -1,167 +1,232 @@
{{#layout/md-card
spotlightEnabled=false
block=false
}}
<div class="card-block row">
<div class="form-group col-lg-9">
<label class="control-label">Search Value</label>
{{input/md-input
value=this.searchString
placeholder="Search ITIS using common name, scientific name, or TSN"
}}
{{#layout/md-card spotlightEnabled=false block=false}}
<div class='card-block row'>
<div class='form-group col-lg-9'>
<label class='control-label'>Search Value</label>
{{input/md-input
value=this.searchString
placeholder='Search ITIS using common name, scientific name, or TSN'
}}
</div>

<div class="form-group col-lg-3">
<label class="control-label">Kingdom <em>(optional)</em></label>
<div class='form-group col-lg-3'>
<label class='control-label'>Kingdom <em>(optional)</em></label>
{{input/md-select
value=this.kingdom
valuePath="kingdomName"
namePath="title"
objectArray=(sort-by "title" itis.kingdoms.kingdomNames)
searchEnabled=false
tooltip=true
allowClear=true
tooltipPath="kingdomName"
disabled=(if searchString false true)
placeholder="Select a kingdom."
value=this.kingdom
valuePath='kingdomName'
namePath='title'
objectArray=(sort-by 'title' itis.kingdoms.kingdomNames)
searchEnabled=false
tooltip=true
allowClear=true
tooltipPath='kingdomName'
disabled=(if searchString false true)
placeholder='Select a kingdom.'
}}
</div>
</div>
<div class="card-footer">
<button class="btn btn-primary pull-right" type="submit" {{action "search"}} disabled={{if searchString false true}}>
<div class='card-footer'>
<button
class='btn btn-primary pull-right'
type='submit'
{{action 'search'}}
disabled={{if searchString false true}}
>
{{#if isLoading}}
{{fa-icon "spinner" spin=true}}
{{fa-icon 'spinner' spin=true}}
{{else}}
{{fa-icon "search"}}
{{ember-tooltip text="Click to send search request" tooltipClass="ember-tooltip md-tooltip info" side="left"}}
{{fa-icon 'search'}}
{{ember-tooltip
text='Click to send search request'
tooltipClass='ember-tooltip md-tooltip info'
side='left'
}}
{{/if}}
Search
</button>
</div>
{{/layout/md-card}}

{{#if notFound}}
<div class="alert alert-warning">
<h5>{{fa-icon "exclamation-triangle"}} No taxa matched the search. Please try again.</h5>
<div class='alert alert-warning'>
<h5>{{fa-icon 'exclamation-triangle'}}
No taxa matched the search. Please try again.</h5>
</div>
{{/if}}

{{#liquid-if found use="fade" enableGrowth=false}}
<div class="row">
<div class="col-md-6">
<div class="card md-card">
<div class="card-header">
<h4 class="card-title">
Select Taxa <small>Showing {{resultTitle}} found</small>
</h4>
</div>
<div class="card-block no-padding">
<div class="list-group no-margin md-itis-taxalist">
{{#each searchResult as |result|}}
{{#liquid-unless result.selected class=(concat "list-group-item " (if result.animate "md-itis-unselected")) enableGrowth=true shrinkDelay=500}}
<div class="media">
<div class="media-body">
<h4 class="media-heading">
{{result.name}}
<small class="text-success">{{result.rank}}</small>
</h4>
<p>
<div><strong>Kingdom:</strong> {{result.kingdom}}</div>
<div><strong>TSN:</strong>
<a href="https://www.itis.gov/servlet/SingleRpt/SingleRpt?search_topic=TSN&search_value={{result.tsn}}"
target="_blank" rel="noopener noreferrer">{{result.tsn}}</a>
(<span class="text-{{result.style}}">{{result.status}}</span>)
</div>
<dl class="no-margin">
{{#control/md-definition title="Common Name:" }}
{{#each result.common as |name|}}
{{name.name}} ({{name.language}})
<br>
{{else}}
<em class="text-muted">No names assigned.</em>
{{/each}}
{{#liquid-if found use='fade' enableGrowth=false}}
<div class='row'>
<div class='col-md-6'>
<div class='card md-card'>
<div class='card-header'>
<h4 class='card-title'>
Select Taxa
<small>Showing {{resultTitle}} found</small>
</h4>
</div>
<div class='card-block no-padding'>
<div class='list-group no-margin md-itis-taxalist'>
{{#each searchResult as |result|}}
{{#liquid-unless
result.selected
class=(concat
'list-group-item ' (if result.animate 'md-itis-unselected')
)
enableGrowth=true
shrinkDelay=500
}}
<div class='media'>
<div class='media-body'>
<h4 class='media-heading'>
{{result.name}}
<small class='text-success'>{{result.rank}}</small>
</h4>
<p>
<div><strong>Updated:</strong>
{{#if result.updatedDate}}
{{result.updatedDate}}
{{else}}
<em class='text-muted'>unknown</em>
{{/if}}
</div>
<div><strong>Published:</strong>
{{#if result.createdDate}}
{{result.createdDate}}
{{else}}
<em class='text-muted'>unknown</em>
{{/if}}
</div>
<div><strong>Kingdom:</strong> {{result.kingdom}}</div>
<div><strong>TSN:</strong>
<a
href='https://www.itis.gov/servlet/SingleRpt/SingleRpt?search_topic=TSN&search_value={{result.tsn}}'
target='_blank'
rel='noopener noreferrer'
>{{result.tsn}}</a>
(<span
class='text-{{result.style}}'
>{{result.status}}</span>)
</div>
<div><strong>Classifier:</strong>
{{#if result.classifier}}
{{result.classifier}}
{{else}}
<em class='text-muted'>No author assigned.</em>
{{/if}}
</div>
<dl class='no-margin'>
{{#control/md-definition title='Common Name:'}}
{{#each result.common as |name|}}
{{name.name}}
({{name.language}})
<br />
{{else}}
<em class='text-muted'>No names assigned.</em>
{{/each}}
{{/control/md-definition}}
</dl>
</p>
</div>
<div class="media-right media-middle">
<button type="button" class="btn btn-success btn-lg btn-block" {{action "selectItem" result}}>Add</button>
</dl>
</p>
</div>
<div class='media-right media-middle'>
<button
type='button'
class='btn btn-success btn-lg btn-block'
{{action 'selectItem' result}}
>Add</button>
</div>
</div>
</div>
{{/liquid-unless}}
{{/liquid-unless}}
{{else}}
<div class="list-group-item">
<p class="list-group-item-text">
<div class='list-group-item'>
<p class='list-group-item-text'>
Perform a search to select additional taxa.
</p>
</div>
{{/each}}
{{/each}}
</div>
</div>
</div>
</div>
</div>
{{!-- Selected --}}
<div class="col-md-6">
<div class="card md-card hd-success card-inverse card-outline-success">
<div class="card-header">
<h4 class="card-title">
Taxa Selected
{{!-- <small class="text-white">{{selected.length}}</small> --}}
</h4>
</div>
<div class="card-block no-padding">
<div class="list-group no-margin md-itis-selectedlist">
{{#liquid-if selected.length use="fade"}}
<div class="list-group-item">
<p class="list-group-item-text">
<button type="button" class="btn btn-primary btn-lg btn-block" {{action "importTaxa" selected}}>Import Taxa</button>
</p>
</div>
{{/liquid-if}}
{{#each selected as |result|}}
{{#liquid-if result.selected class="list-group-item md-itis-selected" enableGrowth=true shrinkDelay=500}}
<div class="media">
<div class="media-body">
<h4 class="media-heading">
{{result.name}}
<small class="text-success">{{result.rank}}</small>
</h4>
<p>
<div><strong>Kingdom:</strong> {{result.kingdom}}</div>
<div><strong>TSN:</strong>
<a href="https://www.itis.gov/servlet/SingleRpt/SingleRpt?search_topic=TSN&search_value={{result.tsn}}"
target="_blank" rel="noopener noreferrer">{{result.tsn}}</a>
(<span class="text-{{result.style}}">{{result.status}}</span>)
</div>
<dl class="no-margin">
{{#control/md-definition title="Common Name:" }}
{{#each result.common as |name|}}
{{name.name}} ({{name.language}})
<br>
{{else}}
<em class="text-muted">No names assigned.</em>
{{/each}}
{{! Selected }}
<div class='col-md-6'>
<div class='card md-card hd-success card-inverse card-outline-success'>
<div class='card-header'>
<h4 class='card-title'>
Taxa Selected
{{!-- <small class="text-white">{{selected.length}}</small> --}}
</h4>
</div>
<div class='card-block no-padding'>
<div class='list-group no-margin md-itis-selectedlist'>
{{#liquid-if selected.length use='fade'}}
<div class='list-group-item'>
<p class='list-group-item-text'>
<button
type='button'
class='btn btn-primary btn-lg btn-block'
{{action 'importTaxa' selected}}
>Import Taxa</button>
</p>
</div>
{{/liquid-if}}
{{#each selected as |result|}}
{{#liquid-if
result.selected
class='list-group-item md-itis-selected'
enableGrowth=true
shrinkDelay=500
}}
<div class='media'>
<div class='media-body'>
<h4 class='media-heading'>
{{result.name}}
<small class='text-success'>{{result.rank}}</small>
</h4>
<p>
<div><strong>Kingdom:</strong> {{result.kingdom}}</div>
<div><strong>TSN:</strong>
<a
href='https://www.itis.gov/servlet/SingleRpt/SingleRpt?search_topic=TSN&search_value={{result.tsn}}'
target='_blank'
rel='noopener noreferrer'
>{{result.tsn}}</a>
(<span
class='text-{{result.style}}'
>{{result.status}}</span>)
</div>
<dl class='no-margin'>
{{#control/md-definition title='Common Name:'}}
{{#each result.common as |name|}}
{{name.name}}
({{name.language}})
<br />
{{else}}
<em class='text-muted'>No names assigned.</em>
{{/each}}
{{/control/md-definition}}
</dl>
</p>
</div>
<div class="media-left media-middle">
<button type="button" class="btn btn-danger btn-lg btn-block" {{action "deselectItem" result}}>Remove</button>
</dl>
</p>
</div>
<div class='media-left media-middle'>
<button
type='button'
class='btn btn-danger btn-lg btn-block'
{{action 'deselectItem' result}}
>Remove</button>
</div>
</div>
</div>
{{else}}
{{/liquid-if}}
{{else}}
{{/liquid-if}}
{{else}}
<div class="list-group-item">
<p class="list-group-item-text">
Select taxa from the list.
</p>
</div>
{{/each}}
<div class='list-group-item'>
<p class='list-group-item-text'>
Select taxa from the list.
</p>
</div>
{{/each}}
</div>
{{!-- {{/liquid-spacer}} --}}
</div>
{{!-- {{/liquid-spacer}} --}}
</div>
</div>
</div>
</div>
{{/liquid-if}}
{{/liquid-if}}
Loading