Commit ebcd5310 authored by Markus Opolka's avatar Markus Opolka
Browse files

Merge branch 'v1.1.6' into 'master'

V1.1.6

See merge request !10
parents 67f1def1 3cd7db40
.git
.gitignore
.dockerignore
Dockerfile
node_modules
*.md
*.txt
*.example
.editorconfig
yarn.lock
# Version 1.1.6
- Extend autocomplete of feature search
- Minor changes in index information
- Fix bug in note display
# Version 1.1.5
- Add autocomplete to feature search
- Add display of new note-tags
- Change frontend to French
# Version 1.1.4
- Make Google Fonts available offline
- Unify project title
......
FROM node:alpine
LABEL maintainer="markus.opolka@fau.de"
COPY . /app
WORKDIR /app
RUN yarn install
RUN yarn run build
EXPOSE 3000
ENTRYPOINT node app.js
......@@ -143,30 +143,6 @@ function searchFeaturesInDocument (document, query) {
return document
}
function featureToString (feature) {
/*
* Turn into feature object into category>type>subtype String
*/
let category = feature.category
let type = feature.type
let subtype = feature.subtype
let ret = ''
if (category !== undefined) {
ret = ret.concat(category)
}
if (type !== undefined) {
ret = ret.concat(' > ', type)
}
if (subtype !== undefined) {
ret = ret.concat(' > ', subtype)
}
return ret
}
function featureGlossary (objs) {
/*
* Turn list of documents objects into a glossary set
......@@ -205,9 +181,9 @@ function featureGlossary (objs) {
}
let ret = {
categories: Array.from(new Set(categories)),
types: Array.from(new Set(types)),
subtypes: Array.from(new Set(subtypes))
categories: Array.from(new Set(categories)).sort(),
types: Array.from(new Set(types)).sort(),
subtypes: Array.from(new Set(subtypes)).sort()
}
return ret
......
{
"name": "cdbp",
"version": "1.1.4",
"version": "1.1.6",
"description": "FAU CDBP",
"author": "Markus Opolka <markus@martialblog.de>",
"private": true,
......
......@@ -31,31 +31,31 @@
<!-- Input Fields for Search -->
<v-flex xs12 md3>
<v-autocomplete
<v-combobox
v-model="feature_category"
:items="feature_categories_glossary"
label="Category"
@keyup.enter.native="validate"
>
</v-autocomplete>
</v-combobox>
</v-flex>
<v-flex xs12 md3>
<v-autocomplete
<v-combobox
v-model="feature_type"
:items="feature_types_glossary"
label="Types"
@keyup.enter.native="validate"
>
</v-autocomplete>
</v-combobox>
</v-flex>
<v-flex xs12 md3>
<v-autocomplete
<v-combobox
v-model="feature_subtype"
:items="feature_subtypes_glossary"
label="Subtypes"
@keyup.enter.native="validate"
>
</v-autocomplete>
</v-combobox>
</v-flex>
<!-- Search Buttons -->
......
......@@ -37,6 +37,9 @@
<p>Ces lettres serviront également de base pour une nouvelle histoire de l’alphabétisation et aideront aussi les disciplines voisines de la linguistique, notamment l’historiographie de la vie quotidienne et la science culturelle.</p>
</v-flex>
<p>Source: <a target="_blank" href="https://gitlab.cs.fau.de/bi40resu/vue-cdbp">https://gitlab.cs.fau.de/bi40resu/vue-cdbp</a></p>
</v-layout>
</v-container>
......
......@@ -13,7 +13,7 @@
<v-card-text>
<ul style="list-style-type:none;">
<li v-for="(value, key) in letter.teiHeader.fileDesc.titleStmt">
<span class="body-2">{{ capitalize(key) }}:</span> {{ value._text }}
<span class="body-2">{{ capitalize(toFrench(key)) }}:</span> {{ value._text }}
</li>
</ul>
</v-card-text>
......@@ -89,7 +89,17 @@ export default {
letter: null,
images: [],
showComments: true,
features: []
features: [],
metadataTranslations: {
title: 'titre',
collection: 'collection',
author: 'auteur(e)',
recipient: 'destinataire',
gender: 'sexe',
date: 'date',
place: 'lieu',
stamp: 'tampon'
}
}
},
methods: {
......@@ -99,11 +109,24 @@ export default {
},
formatText (text) {
// Remove [Stuff] from text
if (text instanceof Array) {
text = text.join(' ')
}
if (!this.showComments) {
text = text.replace(/\[.*\]/, '')
}
return text
},
toFrench (word) {
// Translate some metadata keys to French
if (word in this.metadataTranslations) {
return this.metadataTranslations[word]
} else {
return word
}
},
capitalize (word) {
// Capitalize first letter of a String
return word.charAt(0).toUpperCase() + word.slice(1)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment