Skip to content

Commit

Permalink
Update rankGroup. Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
jlpereira committed Oct 11, 2023
1 parent 90a5366 commit 43790e1
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 25 deletions.
50 changes: 30 additions & 20 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,16 @@ But if you don't want to fork it, you can clone directly from this
git clone https://github.com/SpeciesFileGroup/taxonpages.git
```
3. Go to `taxonpages` folder and switch to `main` branch
3. Go to `taxonpages` folder and enter the following commands to copy the software to your `setup` branch
```
cd taxonpages
git checkout main
git checkout setup
git checkout main .
git reset
git checkout .
```
4. [Download](https://github.com/SpeciesFileGroup/taxonpages/archive/refs/heads/setup.zip) configuration branch and paste `config` and `pages` folders inside taxonpages folder.
5. Setup `config/api.yml` with the API server configuration
6. Install node dependencies
Expand Down Expand Up @@ -162,25 +163,34 @@ const { project_name } = __APP_ENV__
const projectName = __APP_ENV__.project_name
```

## Panels

### Panel layout
## Taxa Page

To modify the position of the panels in the layout of the Taxa page, edit the `taxa_page.yml` file
### Layout

```yaml
taxa_page_overview:
panels:
- - - panel:gallery
- panel:type
- panel:type-specimen
- panel:nomenclature
- panel:nomenclature-references
To modify the position of the panels in the layout of the Taxa page, edit the `taxa_page.yml` file. There you can add/move/remove panels from the layout, also you can add new tabs and include new panels there. If you want to make some tabs visible or not depending the rank group, you can include `rankGroup`

- - panel:map
- panel:descendants
- panel:content
- panel:statistics
```yaml
taxa_page:
overview:
panels:
- - - panel:gallery
- panel:type
- panel:type-specimen
- panel:nomenclature
- panel:nomenclature-references
- - panel:map
- panel:descendants
- panel:content
- panel:statistics
#
# An example of a new tab:
#
# type_specimens:
# rank_group: ['SpeciesGroup']
# panels:
# - - - panel:specimen-records
```

### External panels
Expand All @@ -195,7 +205,7 @@ import MyPanelComponent from './MyPanelComponent.vue'
Export default {
id: 'panel:test', // ID to identify this panel
component: MyPanelComponent, // Vue component for your panel
available: ['HigherClassificationGroup', 'FamilyGroup', 'GenusGroup', 'SpeciesGroup'] // <-- OPTIONAL: This will define for which rank group will be available, remove it if your panel will be available for all.
rankGroup: ['HigherClassificationGroup', 'FamilyGroup', 'GenusGroup', 'SpeciesGroup'] // <-- OPTIONAL: This will define for which rank group will be available, remove it if your panel will be available for all.
}
```

Expand Down
2 changes: 1 addition & 1 deletion src/modules/otus/components/Panel/PanelGallery/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import PanelGallery from './PanelGallery.vue'
export default {
id: 'panel:gallery',
component: PanelGallery,
available: [SPECIES_GROUP, SPECIES_AND_INFRASPECIES_GROUP]
rankGroup: [SPECIES_GROUP, SPECIES_AND_INFRASPECIES_GROUP]
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import { FAMILY_GROUP, GENUS_GROUP } from '../../../constants'
export default {
id: 'panel:type',
component: PanelTypeDesignation,
available: [FAMILY_GROUP, GENUS_GROUP]
rankGroup: [FAMILY_GROUP, GENUS_GROUP]
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import PanelTypeSpecimen from './PanelTypeSpecimen.vue'
export default {
id: 'panel:type-specimen',
component: PanelTypeSpecimen,
available: [SPECIES_GROUP, SPECIES_AND_INFRASPECIES_GROUP]
rankGroup: [SPECIES_GROUP, SPECIES_AND_INFRASPECIES_GROUP]
}
4 changes: 2 additions & 2 deletions src/modules/otus/views/PageLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
:key="index"
>
<template
v-for="{ component, available, id } in column"
v-for="{ component, rankGroup, id } in column"
:key="id"
>
<component
:is="component"
v-if="!available || isAvailableForRank(available, taxonRank)"
v-if="!rankGroup || isAvailableForRank(rankGroup, taxonRank)"
:otu-id="otuId"
:otu="otu"
:taxon-id="taxonId"
Expand Down

0 comments on commit 43790e1

Please sign in to comment.