Closed laurenwalker closed 4 years ago
AppModel.js
now has two attributes which can be customized in each theme, portalTermSingular
and portalTermPlural
. The plural term is set manually instead of just appending an "s" in order to allow for terms with irregular plural forms, e.g. "business" vs "businesses".
I've replaced user-facing instances of "portal" and "portals" with MetacatUI.appModel.get("portalTermSingular")
and MetacatUI.appModel.get("portalTermPlural")
, respectively. However, this could use a second set of eyes. @rushirajnenuji and @laurenwalker , if you see any other hard-coded instances of "portal", could you please update them or let me know?
Additionally, routes to portals are now set dynamically using the configurable term: https://github.com/NCEAS/metacatui/blob/e59aa0842f751cf48aab0d34c0e96792ed94e8cf/src/js/routers/router.js#L46-L53
Should we remove the default routes that use "portals" and "projects", or do we want to continue to support these? https://github.com/NCEAS/metacatui/blob/e59aa0842f751cf48aab0d34c0e96792ed94e8cf/src/js/routers/router.js#L34-L36
Let's remove the hard-coded 'portals' routes since those should work with the new way you've implemented those routes. But we should keep the projects
routes in the KNB and Arctic themes since we initially deployed the portal views with those URLs.
Done. To keep the projects route in the KNB, I had to add a router to the theme. It's the same as the main router.js
, with the addition of the projects route.
Thanks! Let's just add the projects
route to the default router. I'd like to avoid having an extra router.js file to update as much as possible.
During our last portal developer meeting, we decided we should make the term "portal" configurable everywhere in the app so projects like ESS-DIVE that use MetacatUI can use their own terminology.