Skip to content

Commit

Permalink
Merge pull request #176 from SpeciesFileGroup/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
jlpereira authored Oct 16, 2023
2 parents c9322c3 + af7aa02 commit a051951
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 27 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
9 changes: 7 additions & 2 deletions src/components/TrackerReport.global.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@
<span>My issue is with:</span>
<ul class="mx-5 my-2">
<li v-for="item in issue_trackers">
<a :href="item.url">{{ item.label }}</a>
<a
:href="item.url"
target="_blank"
>
{{ item.label }}
</a>
<span
v-if="item.description"
class="text-sm"
Expand Down Expand Up @@ -72,7 +77,7 @@ function openTracker() {
if (issue_trackers) {
isModalVisible.value = true
} else {
window.open(TAXONPAGES_ISSUE_TRACKER, '_self')
window.open(TAXONPAGES_ISSUE_TRACKER, '_blank')
}
}
</script>
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 a051951

Please sign in to comment.