Skip to content

Commit

Permalink
#129 added Specimen view description
Browse files Browse the repository at this point in the history
  • Loading branch information
enmust committed Feb 1, 2021
1 parent 4e529b8 commit a16e36c
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<meta name="theme-color" content="#FFA000">
<meta name="apple-mobile-web-app-status-bar-style" content="#FFA000">
<title>GeoCASe</title>
<meta name="description" content="This is GeoCASe 2.0 prototype interface. It has incomplete functionality and data, and is intended for testing purposes only.">
<meta name="description" data-vmid="description" content="GeoCASe stands for Geoscience Collections Access Service. This is the GeoCASe 2.0 beta interface. It is still in development and currently has incomplete functionality and data.">
<meta name="robots" content="index, follow">
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default {
vmid: "description",
name: "description",
content:
"This is GeoCASe 2.0 prototype interface. It has incomplete functionality and data, and is intended for testing purposes only."
"GeoCASe stands for Geoscience Collections Access Service. This is the GeoCASe 2.0 beta interface. It is still in development and currently has incomplete functionality and data."
}
]
},
Expand Down
28 changes: 27 additions & 1 deletion src/views/DetailView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,7 @@ export default {
mixins: [helperMixin],
metaInfo() {
// TITLE
const type =
this.getSpecimenType.charAt(0).toUpperCase() +
this.getSpecimenType.substring(1);
Expand All @@ -594,8 +595,33 @@ export default {
if (fullscientificname) title = fullscientificname;
else if (collectioncode || unitid)
title += ` - ${collectioncode} ${unitid}`;
// DESCRIPTION
let description = "";
const fields = [
"recordbasis",
"fullscientificname",
"locality",
"datasetowner"
];
if (this.item) {
fields.forEach((item, index) => {
if (this.item[item])
description += ` ${this.$t(`search.table.${item}`)}: ${
this.item[item]
}${index < fields.length - 1 ? "," : ""}`;
});
}
return {
title: title
title: title,
meta: [
{
vmid: "description",
name: "description",
content: description
}
]
};
},
Expand Down

0 comments on commit a16e36c

Please sign in to comment.