diff --git a/.ember-cli b/.ember-cli new file mode 100644 index 00000000..ee64cfed --- /dev/null +++ b/.ember-cli @@ -0,0 +1,9 @@ +{ + /** + Ember CLI sends analytics information by default. The data is completely + anonymous, but there are times when you might want to disable this behavior. + + Setting `disableAnalytics` to true will prevent any data from being sent. + */ + "disableAnalytics": false +} diff --git a/.env.dev b/.env.dev index 715f967c..073038d1 100644 --- a/.env.dev +++ b/.env.dev @@ -1,5 +1,3 @@ -API_URL_V1=https://api.dev.ror.org/v1 -API_URL_V2=https://api.dev.ror.org/v2 +API_URL=https://api.dev.ror.org/v2 SENTRY_DSN=https://1c334995f85448b1afa561c8ccf13791@sentry.io/1422597 BASE_URL=https://dev.ror.org -LAUNCH_DARKLY_CLIENT_SIDE_ID=6390f62d05087a11e466bfc9 diff --git a/.env.production b/.env.production index 2fc16de2..3ab7f5c3 100644 --- a/.env.production +++ b/.env.production @@ -1,5 +1,3 @@ -API_URL_V1=https://api.ror.org/v1 -API_URL_V2=https://api.ror.org/v2 +API_URL=https://api.ror.org/v2 SENTRY_DSN=https://1c334995f85448b1afa561c8ccf13791@sentry.io/1422597 BASE_URL=https://ror.org -LAUNCH_DARKLY_CLIENT_SIDE_ID=636d08a3d56cf611cc88019d diff --git a/.env.staging b/.env.staging index 3f954227..7595389e 100644 --- a/.env.staging +++ b/.env.staging @@ -1,5 +1,3 @@ -API_URL_V1=https://api.staging.ror.org/v1 -API_URL_V2=https://api.staging.ror.org/v2 +API_URL=https://api.staging.ror.org/v2 SENTRY_DSN=https://1c334995f85448b1afa561c8ccf13791@sentry.io/1422597 BASE_URL=https://staging.ror.org -LAUNCH_DARKLY_CLIENT_SIDE_ID=636d08a3d56cf611cc88019c diff --git a/.eslintrc.js b/.eslintrc.js index 6cb5e605..5c9ef8b7 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,5 +1,6 @@ module.exports = { root: true, + parser: "babel-eslint", parserOptions: { ecmaVersion: 2017, sourceType: 'module' @@ -29,7 +30,7 @@ module.exports = { }, env: { browser: false, - node: true + node: true, } } ] diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index ef8eb598..2a9068c1 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -22,7 +22,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v2 with: - node-version: '14' + node-version: '18' - name: Extract branch name shell: bash diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 850bc593..a87f884e 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -18,7 +18,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v2 with: - node-version: '14' + node-version: '18' - name: Extract branch name shell: bash diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index e198bd80..5abac419 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -22,7 +22,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v2 with: - node-version: '14' + node-version: '18' - name: Extract branch name shell: bash diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..92216555 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,21 @@ +# unconventional js +/blueprints/*/files/ +/vendor/ + +# compiled output +/dist/ +/tmp/ + +# dependencies +/bower_components/ +/node_modules/ + +# misc +/coverage/ +!.* +.eslintcache + +# ember-try +/.node_modules.ember-try/ +/bower.json.ember-try +/package.json.ember-try diff --git a/.template-lintrc.js b/.template-lintrc.js index a73e7b71..04f97818 100644 --- a/.template-lintrc.js +++ b/.template-lintrc.js @@ -15,7 +15,7 @@ module.exports = { 'no-triple-curlies': false, 'no-unused-block-params': false, 'simple-unless': false, - 'no-console': false, + 'no-log': false, 'no-bare-strings': false } }; \ No newline at end of file diff --git a/app/adapters/application.js b/app/adapters/application.js index 6fefaaf3..c04ba4ad 100644 --- a/app/adapters/application.js +++ b/app/adapters/application.js @@ -1,11 +1,6 @@ -import DS from 'ember-data'; +import JSONAPIAdapter from '@ember-data/adapter/json-api'; import ENV from 'ror-app/config/environment'; -import { inject as service } from '@ember/service'; -import { computed } from '@ember/object'; -export default DS.JSONAPIAdapter.extend({ - launchDarkly: service(), - host: computed('launchDarkly.variation', function() { - return this.launchDarkly.variation('v2_ui') ? ENV.API_URL_V2 : ENV.API_URL_V1; - }), +export default JSONAPIAdapter.extend({ + host: ENV.API_URL }); \ No newline at end of file diff --git a/app/adapters/organization.js b/app/adapters/organization.js index 7ce9c10b..119c40f5 100644 --- a/app/adapters/organization.js +++ b/app/adapters/organization.js @@ -1,13 +1,8 @@ -import DS from 'ember-data'; +import JSONAPIAdapter from '@ember-data/adapter/json-api'; import ENV from 'ror-app/config/environment'; -import { inject as service } from '@ember/service'; -import { computed } from '@ember/object'; -export default DS.JSONAPIAdapter.extend({ - launchDarkly: service(), - host: computed('launchDarkly.variation', function() { - return this.launchDarkly.variation('v2_ui') ? ENV.API_URL_V2 : ENV.API_URL_V1; - }), +export default JSONAPIAdapter.extend({ + host: ENV.API_URL, urlForFindRecord(id, modelName) { return `${this.host}/${modelName}s/ror.org/${id}`; diff --git a/app/components/application-header.js b/app/components/application-header.js index e54c1564..2fc6eeca 100644 --- a/app/components/application-header.js +++ b/app/components/application-header.js @@ -8,10 +8,10 @@ export default Component.extend({ actions: { search() { - this.get('globalSearch').doSearch(this.query); + this.globalSearch.doSearch(this.query); }, clear() { - this.get('globalSearch').doSearch(null); + this.globalSearch.doSearch(null); } } }); diff --git a/app/components/filter-sidebar.js b/app/components/filter-sidebar.js index 23d8e37f..cbbcafc8 100644 --- a/app/components/filter-sidebar.js +++ b/app/components/filter-sidebar.js @@ -9,6 +9,9 @@ export default Component.extend({ filterValue: '', actions: { + toggleStatus(e){ + this.set(e.target.name, e.target.checked) + }, applyFilter() { this.filterValue = '' if (this.activeStatus == true){ @@ -22,8 +25,7 @@ export default Component.extend({ } this.filterValue = this.filterValue.slice(0, -1) this.set('model.query.filter', this.filterValue) - //this.get('globalSearch').doSearch(this.query, this.allStatus) - this.get('router').transitionTo('organizations.index', { queryParams: { query: this.model.query.query, page: this.model.query.page, all_status: this.model.query.allStatus, filter: this.model.query.filter}}); + this.router.transitionTo('organizations.index', { queryParams: { query: this.model.query.query, page: this.model.query.page, all_status: this.model.query.allStatus, filter: this.model.query.filter}}); }, clearFilter() { this.filterValue = '' @@ -32,7 +34,7 @@ export default Component.extend({ this.set('withdrawnStatus', false); this.filterValue = "status:active" this.set('model.query.filter', this.filterValue) - this.get('router').transitionTo('organizations.index', { queryParams: { query: this.model.query.query, page: this.model.query.page, all_status: this.model.query.allStatus, filter: this.model.query.filter}}); + this.router.transitionTo('organizations.index', { queryParams: { query: this.model.query.query, page: this.model.query.page, all_status: this.model.query.allStatus, filter: this.model.query.filter}}); } } diff --git a/app/components/v2/organization-item.js b/app/components/organization-item.js similarity index 100% rename from app/components/v2/organization-item.js rename to app/components/organization-item.js diff --git a/app/components/page-numbers.js b/app/components/page-numbers.js index 3e8b1780..4e615ab7 100644 --- a/app/components/page-numbers.js +++ b/app/components/page-numbers.js @@ -1,15 +1,16 @@ +import { alias } from '@ember/object/computed'; import Component from '@ember/component'; import { computed } from '@ember/object'; export default Component.extend({ tagName: 'row', - currentPage: computed.alias("model.query.page"), - totalPages: computed.alias("model.meta.totalPages"), + currentPage: alias("model.query.page"), + totalPages: alias("model.meta.totalPages"), pageItems: computed("currentPage","totalPages", function() { - const page = Number(this.get("currentPage") || 1); - const totalPages = Number(this.get("totalPages")); + const page = Number(this.currentPage || 1); + const totalPages = Number(this.totalPages); return Array.from(Array(totalPages).keys()).reduce(function (sum, i) { if (i < 2 || (i > (page - 4) && i < (page + 2)) || i > (totalPages - 3)) { @@ -24,8 +25,8 @@ export default Component.extend({ }), nextPage: computed("currentPage", "totalPages", function() { - const page = Number(this.get("currentPage")); - const totalPages = Number(this.get("totalPages")); + const page = Number(this.currentPage); + const totalPages = Number(this.totalPages); if (page < totalPages) { return page + 1; } else { @@ -34,7 +35,7 @@ export default Component.extend({ }), previousPage: computed("currentPage", function() { - const page = Number(this.get("currentPage")); + const page = Number(this.currentPage); if (page > 1) { return page - 1; } else { diff --git a/app/components/v1/organization-item.js b/app/components/v1/organization-item.js deleted file mode 100644 index babdf016..00000000 --- a/app/components/v1/organization-item.js +++ /dev/null @@ -1,79 +0,0 @@ -import Component from '@ember/component'; -import { computed } from '@ember/object'; -import { inject as service } from '@ember/service'; - -export default Component.extend({ - INACTIVE_STATUSES: ['inactive', 'withdrawn'], - fundref: null, - grid: null, - isni: null, - wikidata: null, - relationships: {}, - relationshipsCount: null, - router: service(), - isSearch: computed('router.currentURL', function() { - return this.router.currentURL.includes("search") - }), - inactiveStatus: false, - - // Convert label array into a dictionary with relationship type as key - // for variable fields in template - convertRelationships(relationships){ - let formattedRelationships = {Parent:[], Child:[], Related:[], Successor:[], Predecessor:[]}; - for (let i = 0; i < relationships.length; i++){ - formattedRelationships[relationships[i]["type"]].push({"label": relationships[i]["label"], "id": relationships[i]["id"]}); - } - return formattedRelationships - }, - - didInsertElement() { - if(this.INACTIVE_STATUSES.indexOf(this.model.get('status')) > -1) { - this.set('inactiveStatus', true) - } - if(this.model.get('relationships')) { - this.set('relationshipsCount', this.model.get('relationships').length) - this.set('relationships', this.convertRelationships(this.model.get('relationships'))) - } - this.set('aliases', this.model.get('aliases').join(', ')); - this.set('acronyms', this.model.get('acronyms').join(', ')); - this.set('labels', this.model.get('labels').map(label => label.label).join(', ')); - - if (this.model.get('external_ids.GRID')) { - if (this.model.get('external_ids.GRID').preferred){ - let grid = this.model.get('external_ids.GRID').preferred; - this.set('grid', grid); - } - } - if (this.model.get('external_ids.ISNI')) { - if (this.model.get('external_ids.ISNI').preferred){ - let display_isni = this.model.get('external_ids.ISNI').preferred; - let link_isni = this.model.get('external_ids.ISNI').preferred.replace(/-|\s/g,""); - this.set('display_isni', display_isni); - this.set('link_isni', link_isni); - } else { - let display_isni = this.model.get('external_ids.ISNI').all.get('firstObject'); - let link_isni = this.model.get('external_ids.ISNI').all.get('firstObject').replace(/-|\s/g,""); - this.set('display_isni', display_isni); - this.set('link_isni', link_isni); - } - } - if (this.model.get('external_ids.FundRef')) { - if (this.model.get('external_ids.FundRef').preferred){ - let fundref = this.model.get('external_ids.FundRef').preferred; - this.set('fundref', fundref); - } else { - let fundref = this.model.get('external_ids.FundRef').all.get('firstObject'); - this.set('fundref', fundref); - } - } - if (this.model.get('external_ids.Wikidata')) { - if (this.model.get('external_ids.Wikidata').preferred){ - let wikidata = this.model.get('external_ids.Wikidata').preferred; - this.set('wikidata', wikidata); - } else { - let wikidata = this.model.get('external_ids.Wikidata').all.get('firstObject'); - this.set('wikidata', wikidata); - } - } - } -}); diff --git a/app/helpers/decimal-format.js b/app/helpers/decimal-format.js new file mode 100644 index 00000000..54a4f6df --- /dev/null +++ b/app/helpers/decimal-format.js @@ -0,0 +1,13 @@ +import { helper } from '@ember/component/helper'; + +export function decimalFormat(params) { + const [number] = params; + + if (isNaN(number) || number === '') { + return ""; + } + + return new Intl.NumberFormat().format(number); +} + +export default helper(decimalFormat); diff --git a/app/index.html b/app/index.html index 169fa9a8..b0dabfed 100755 --- a/app/index.html +++ b/app/index.html @@ -35,4 +35,4 @@ - + \ No newline at end of file diff --git a/app/models/organization.js b/app/models/organization.js index 6d35285b..f367a26b 100644 --- a/app/models/organization.js +++ b/app/models/organization.js @@ -1,23 +1,23 @@ -import DS from 'ember-data'; +import Model, { attr } from '@ember-data/model'; -export default DS.Model.extend({ - meta: DS.attr(), +export default Model.extend({ + meta: attr(), - name: DS.attr('string'), //TODO: Remove this when v1 has been retired - names: DS.attr(), - local: DS.attr('string'), - types: DS.attr(), - links: DS.attr(), - aliases: DS.attr(), - acronyms: DS.attr(), - external_ids: DS.attr(), - wikipediaUrl: DS.attr('string'), - labels: DS.attr(), - country: DS.attr(), - addresses: DS.attr(), - relationships: DS.attr(), - status: DS.attr('string'), - admin: DS.attr(), - locations: DS.attr() + name: attr('string'), //TODO: Remove this when v1 has been retired + names: attr(), + local: attr('string'), + types: attr(), + links: attr(), + aliases: attr(), + acronyms: attr(), + external_ids: attr(), + wikipediaUrl: attr('string'), + labels: attr(), + country: attr(), + addresses: attr(), + relationships: attr(), + status: attr('string'), + admin: attr(), + locations: attr() }); diff --git a/app/router.js b/app/router.js index 703e9ac0..3c6fe24b 100644 --- a/app/router.js +++ b/app/router.js @@ -1,10 +1,10 @@ import EmberRouter from '@ember/routing/router'; import config from './config/environment'; -const Router = EmberRouter.extend({ - location: config.locationType, - rootURL: config.rootURL -}); +class Router extends EmberRouter { + location = config.locationType; + rootURL = config.rootURL; +} Router.map(function() { this.route('organizations', { path: '/' }, function() { diff --git a/app/routes/application.js b/app/routes/application.js index a6549620..27724466 100644 --- a/app/routes/application.js +++ b/app/routes/application.js @@ -1,11 +1,4 @@ import Route from '@ember/routing/route'; -export default Route.extend({ - beforeModel(){ - let user = { - key: 'user-key-123abc', - anonymous: true - }; - return this.launchDarkly.initialize(user); - } -}); \ No newline at end of file +export default class ApplicationRoute extends Route { +} diff --git a/app/routes/error.js b/app/routes/error.js index 9a5ff06c..6fd62eea 100644 --- a/app/routes/error.js +++ b/app/routes/error.js @@ -1,8 +1,8 @@ import Route from '@ember/routing/route'; import ENV from 'ror-app/config/environment'; -export default Route.extend({ - redirect: function() { - window.location.replace(ENV.BASE_URL + "/error"); - } -}); \ No newline at end of file +export default class ErrorRoute extends Route { + redirect() { + window.location.replace(ENV.BASE_URL + "/error"); + } +} \ No newline at end of file diff --git a/app/routes/index.js b/app/routes/index.js index ceaa0a2c..61507dca 100644 --- a/app/routes/index.js +++ b/app/routes/index.js @@ -1,4 +1,5 @@ import Route from '@ember/routing/route'; -export default Route.extend({ -}); \ No newline at end of file +export default class IndexRoute extends Route { + +} \ No newline at end of file diff --git a/app/routes/organizations/index.js b/app/routes/organizations/index.js index 2e46bdc0..3fd8e472 100644 --- a/app/routes/organizations/index.js +++ b/app/routes/organizations/index.js @@ -1,45 +1,10 @@ import Route from '@ember/routing/route'; +import { inject as service } from '@ember/service'; -export default Route.extend({ - model(params) { - /*Escape Elasticsearch reserved chars - https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#_reserved_characters*/ - if(params.query){ - let ror_id = '' - // eslint-disable-next-line - let re1 = new RegExp("^0[a-hj-km-np-tv-z|0-9]{6}[0-9]{2}$"); - // eslint-disable-next-line - let re2 = new RegExp("^http(s)?:\/\/ror\.org\/0[a-hj-km-np-tv-z|0-9]{6}[0-9]{2}$"); - // eslint-disable-next-line - let re3 = new RegExp("^ror\.org\/0[a-hj-km-np-tv-z|0-9]{6}[0-9]{2}$") - if(re1.test(params.query)){ - ror_id = params.query - } - if(re2.test(params.query)){ - // eslint-disable-next-line - ror_id = params.query.replace(/http(s)?:\/\/ror\.org\//g, '') - } - if(re3.test(params.query)){ - // eslint-disable-next-line - ror_id = params.query.replace(/ror\.org\//g, '') - } - if(ror_id){ - window.location.href = ror_id - return; - } else { - // eslint-disable-next-line - params.query = params.query.replace(/([\+\-\=\&\|\>\<\!\(\)\{\}\\\[\]\^\~\*\?\:\/])/g, "\\$1"); - } - } - return this.store.query('organization', params).then(function(model) { - return model; - }).catch(function (reason) { - console.log(reason); - return []; - }); - }, +export default class OrganizationsIndexRoute extends Route { + @service store; - queryParams: { + queryParams = { query: { refreshModel: true }, @@ -52,6 +17,41 @@ export default Route.extend({ filter: { refreshModel: true } - } + }; + + model(params) { + // Escape Elasticsearch reserved chars + if (params.query) { + let ror_id = ''; + const re1 = new RegExp("^0[a-hj-km-np-tv-z|0-9]{6}[0-9]{2}$"); + const re2 = new RegExp("^http(s)?:\/\/ror\.org\/0[a-hj-km-np-tv-z|0-9]{6}[0-9]{2}$"); // eslint-disable-line no-useless-escape + const re3 = new RegExp("^ror\.org\/0[a-hj-km-np-tv-z|0-9]{6}[0-9]{2}$"); // eslint-disable-line no-useless-escape -}); + if (re1.test(params.query)) { + ror_id = params.query; + } + + if (re2.test(params.query)) { + ror_id = params.query.replace(/http(s)?:\/\/ror\.org\//g, ''); + } + + if (re3.test(params.query)) { + ror_id = params.query.replace(/ror\.org\//g, ''); + } + + if (ror_id) { + window.location.href = ror_id; + return; + } else { + params.query = params.query.replace(/([\+\-\=\&\|\>\<\!\(\)\{\}\\\[\]\^\~\*\?\:\/])/g, "\\$1"); // eslint-disable-line no-useless-escape + } + } + + return this.store.query('organization', params).then((model) => { + return model; + }).catch((reason) => { + console.log(reason); + return []; + }); + } +} diff --git a/app/routes/organizations/show.js b/app/routes/organizations/show.js index 5df0532b..080b6a17 100644 --- a/app/routes/organizations/show.js +++ b/app/routes/organizations/show.js @@ -1,15 +1,11 @@ import Route from '@ember/routing/route'; +import { inject as service } from '@ember/service'; + +export default class OrganizationsShowRoute extends Route { + @service store; -export default Route.extend({ model(params) { - //let self = this; - return this.store.findRecord('organization', params.organization_id).then(function(organization) { - return organization; - }) - }, - actions: { - queryParamsDidChange() { - this.refresh(); - } + const { organization_id } = params; + return this.store.findRecord('organization', organization_id); } -}); +} diff --git a/app/serializers/application.js b/app/serializers/application.js index 4b7338fa..d6eb84aa 100644 --- a/app/serializers/application.js +++ b/app/serializers/application.js @@ -1,8 +1,8 @@ +import JSONSerializer from '@ember-data/serializer/json'; import { underscore } from '@ember/string'; import { assign } from '@ember/polyfills'; -import DS from 'ember-data'; -export default DS.JSONSerializer.extend({ +export default JSONSerializer.extend({ normalizeArrayResponse(store, primaryModelClass, payload, id, requestType) { let total = payload.number_of_results; let totalPages = Math.min(Math.ceil(total / 20), 500); diff --git a/app/services/config-service.js b/app/services/config-service.js index 1740fb1a..81c2f127 100644 --- a/app/services/config-service.js +++ b/app/services/config-service.js @@ -2,6 +2,5 @@ import Service from '@ember/service'; import config from '../config/environment'; export default Service.extend({ - API_URL_V1: config.API_URL_V1, - API_URL_V2: config.API_URL_V2 + API_URL: config.API_URL }); \ No newline at end of file diff --git a/app/services/global-search.js b/app/services/global-search.js index 3bb6395a..8bb5f667 100644 --- a/app/services/global-search.js +++ b/app/services/global-search.js @@ -1,6 +1,4 @@ -import Service from '@ember/service'; -import { inject as service } from '@ember/service'; -// import { assign } from '@ember/polyfills'; +import Service, { inject as service } from '@ember/service'; export default Service.extend({ router: service(), @@ -16,6 +14,6 @@ export default Service.extend({ //let params = assign(this.model.get('query'), { query: this.query, sort: this.sort }); // this.router.transitionTo({ queryParams: params }); - this.get('router').transitionTo('organizations.index', { queryParams: { query: query, page: 1}}); + this.router.transitionTo('organizations.index', { queryParams: { query: query, page: 1}}); } }); diff --git a/app/templates/application.hbs b/app/templates/application.hbs index ae45aab0..f46c147c 100644 --- a/app/templates/application.hbs +++ b/app/templates/application.hbs @@ -2,6 +2,6 @@ {{outlet}} -{{application-subscribe}} -{{application-socials}} -{{application-footer}} + + + diff --git a/app/templates/components/application-header.hbs b/app/templates/components/application-header.hbs index a58418c2..993b46ac 100755 --- a/app/templates/components/application-header.hbs +++ b/app/templates/components/application-header.hbs @@ -1,77 +1,76 @@ -{{#bs-navbar backgroundColor="white" class="navbar-expand-lg" -onCollapse=(action (mut collapsed) true) onExpand=(action (mut collapsed) false) as |navbar|}} +
Research Organization Registry logo {{navbar.toggle}} - {{#navbar.content}} - {{#navbar.nav class="ml-auto" as |nav|}} + + - {{#nav.item}} +

About

- {{/nav.item}} +
- {{#nav.item}} +

Registry

- {{/nav.item}} +
- {{#nav.item}} +

Community

- {{/nav.item}} +
- {{#nav.item}} +

Events

- {{/nav.item}} +
+ + - {{#nav.item}}

Blog

- {{/nav.item}} +
- {{#nav.item}} +

Documentation

- {{/nav.item}} +
- {{/navbar.nav}} - {{/navbar.content}} +
+
-{{/bs-navbar}} -{{#if showAdvanced}} +
+{{#if this.showAdvanced}}

Show records with status:

- {{/if}} \ No newline at end of file +{{/if}} \ No newline at end of file diff --git a/app/templates/components/application-subscribe.hbs b/app/templates/components/application-subscribe.hbs index 237f4cbc..eabc0e95 100644 --- a/app/templates/components/application-subscribe.hbs +++ b/app/templates/components/application-subscribe.hbs @@ -1,28 +1,19 @@
-
+
-
-
-
-

Subscribe to ROR updates by email

-
-
- - -
- -
-
-
-
+
+

Subscribe to the ROR newsletter

+Subscribe +
-
-
-

Have a suggestion for an addition or update to ROR?

Submit a curation request -
+
+
+

Suggest an addition or update to ROR

+ Suggest +
diff --git a/app/templates/components/filter-sidebar.hbs b/app/templates/components/filter-sidebar.hbs index 98b38ff8..a34e02fc 100644 --- a/app/templates/components/filter-sidebar.hbs +++ b/app/templates/components/filter-sidebar.hbs @@ -3,15 +3,36 @@

Record status


- {{input class="filters-list-input" type="checkbox" id="active-status" name="activeStatus" checked=activeStatus}} +
- {{input class="filters-list-input" type="checkbox" id="inactive-status" name="inactiveStatus" checked=inactiveStatus}} +
- {{input class="filters-list-input" type="checkbox" id="withdrawn-status" name="withdrawnStatus" checked=withdrawnStatus}} +
diff --git a/app/templates/components/v2/organization-item.hbs b/app/templates/components/organization-item.hbs similarity index 66% rename from app/templates/components/v2/organization-item.hbs rename to app/templates/components/organization-item.hbs index 9c50c7be..a70c20c8 100644 --- a/app/templates/components/v2/organization-item.hbs +++ b/app/templates/components/organization-item.hbs @@ -6,27 +6,27 @@

- ROR ID {{#link-to "organizations.show" model.id class="card-link logo-link"}}https://ror.org/{{model.id}}{{/link-to}} + ROR ID https://ror.org/{{this.model.id}}

- {{#if inactiveStatus}} - {{model.status}} + {{#if this.inactiveStatus}} + {{this.model.status}} {{/if}}

- {{#if inactiveStatus}} - {{#if (not isSearch)}} + {{#if this.inactiveStatus}} + {{#if (not this.isSearch)}}
This record has - {{#if (eq model.status "withdrawn")}}been {{/if}}{{#if (eq model.status "inactive")}}become {{/if}} - {{model.status}} - {{#if (eq model.status "withdrawn")}}from {{/if}}{{#if (eq model.status "inactive")}}in{{/if}} + {{#if (eq this.model.status "withdrawn")}}been {{/if}}{{#if (eq this.model.status "inactive")}}become {{/if}} + {{this.model.status}} + {{#if (eq this.model.status "withdrawn")}}from {{/if}}{{#if (eq this.model.status "inactive")}}in{{/if}} ROR and is no longer actively maintained. - {{#each-in relationships as |relationshipType relationshipInstances|}} + {{#each-in this.relationships as |relationshipType relationshipInstances|}} {{#if (eq relationshipType "Successor")}} {{#if relationshipInstances}} This organization is succeeded by @@ -37,32 +37,32 @@ {{/if}} {{/if}} {{/each-in}} -
Learn more about {{model.status}} records +
Learn more about {{this.model.status}} records
{{/if}} {{/if}}
-

{{name}}

+

{{this.name}}

- {{#if isSearch}} + {{#if this.isSearch}}
- {{#if otherNames.values}} + {{#if this.otherNames.values}}

Other names:

- {{otherNames.values}} + {{this.otherNames.values}} {{/if}}
{{/if}}

Organization types

- {{capitalize organizationTypes}}
- {{#if (not isSearch)}} - {{#if otherNames.groupedNamesCount}} + {{capitalize this.organizationTypes}}
+ {{#if (not this.isSearch)}} + {{#if this.otherNames.groupedNamesCount}}

Other names


- {{#each-in otherNames.groupedNames as |nameType nameInstances|}} + {{#each-in this.otherNames.groupedNames as |nameType nameInstances|}} {{#if nameType}} {{#if nameInstances}} {{capitalize (pluralize nameType)}}
@@ -76,50 +76,50 @@ {{/if}}
- {{#if model.locations}} + {{#if this.model.locations}}

Locations

- {{#each model.locations as |location|}} + {{#each this.model.locations as |location|}} {{#if location.geonames_details.name}} {{location.geonames_details.name}} (GeoNames ID {{location.geonames_id}}), {{location.geonames_details.country_name}}
{{/if}} {{/each}} {{/if}} - {{#if model.links}} + {{#if this.model.links}}

Website

- {{#each model.links as |link|}} + {{#each this.model.links as |link|}} {{#if (eq link.type 'website')}} {{link.value}}
{{/if}} {{/each}} {{/if}} - {{#if (or grid display_isni fundref wikidata)}} + {{#if (or this.grid this.display_isni this.fundref this.wikidata)}}

Other Identifiers

- {{#if grid}} - GRID {{grid}}
+ {{#if this.grid}} + GRID {{this.grid}}
{{/if}} - {{#if display_isni}} - ISNI {{display_isni}}
+ {{#if this.display_isni}} + ISNI {{this.display_isni}}
{{/if}} - {{#if fundref}} - Crossref Funder ID {{fundref}}
+ {{#if this.fundref}} + Crossref Funder ID {{this.fundref}}
{{/if}} - {{#if wikidata}} - Wikidata {{wikidata}}
+ {{#if this.wikidata}} + Wikidata {{this.wikidata}}
{{/if}} {{/if}}
- {{#if relationshipsCount}} + {{#if this.relationshipsCount}}
- {{#if isSearch}} + {{#if this.isSearch}}
-

Relationships ({{relationshipsCount}})

+

Relationships ({{this.relationshipsCount}})

{{/if}} - {{#if (not isSearch)}} + {{#if (not this.isSearch)}}

Relationships

- {{#each-in relationships as |relationshipType relationshipInstances|}} + {{#each-in this.relationships as |relationshipType relationshipInstances|}} {{#if relationshipType}} {{#if relationshipInstances}} {{relationshipType}} Organizations
@@ -135,15 +135,15 @@ {{/if}}