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 # Version 1.1.4
- Make Google Fonts available offline - Make Google Fonts available offline
- Unify project title - 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) { ...@@ -143,30 +143,6 @@ function searchFeaturesInDocument (document, query) {
return document 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) { function featureGlossary (objs) {
/* /*
* Turn list of documents objects into a glossary set * Turn list of documents objects into a glossary set
...@@ -205,9 +181,9 @@ function featureGlossary (objs) { ...@@ -205,9 +181,9 @@ function featureGlossary (objs) {
} }
let ret = { let ret = {
categories: Array.from(new Set(categories)), categories: Array.from(new Set(categories)).sort(),
types: Array.from(new Set(types)), types: Array.from(new Set(types)).sort(),
subtypes: Array.from(new Set(subtypes)) subtypes: Array.from(new Set(subtypes)).sort()
} }
return ret return ret
......
{ {
"name": "cdbp", "name": "cdbp",
"version": "1.1.4", "version": "1.1.6",
"description": "FAU CDBP", "description": "FAU CDBP",
"author": "Markus Opolka <markus@martialblog.de>", "author": "Markus Opolka <markus@martialblog.de>",
"private": true, "private": true,
......
...@@ -31,31 +31,31 @@ ...@@ -31,31 +31,31 @@
<!-- Input Fields for Search --> <!-- Input Fields for Search -->
<v-flex xs12 md3> <v-flex xs12 md3>
<v-autocomplete <v-combobox
v-model="feature_category" v-model="feature_category"
:items="feature_categories_glossary" :items="feature_categories_glossary"
label="Category" label="Category"
@keyup.enter.native="validate" @keyup.enter.native="validate"
> >
</v-autocomplete> </v-combobox>
</v-flex> </v-flex>
<v-flex xs12 md3> <v-flex xs12 md3>
<v-autocomplete <v-combobox
v-model="feature_type" v-model="feature_type"
:items="feature_types_glossary" :items="feature_types_glossary"
label="Types" label="Types"
@keyup.enter.native="validate" @keyup.enter.native="validate"
> >
</v-autocomplete> </v-combobox>
</v-flex> </v-flex>
<v-flex xs12 md3> <v-flex xs12 md3>
<v-autocomplete <v-combobox
v-model="feature_subtype" v-model="feature_subtype"
:items="feature_subtypes_glossary" :items="feature_subtypes_glossary"
label="Subtypes" label="Subtypes"
@keyup.enter.native="validate" @keyup.enter.native="validate"
> >
</v-autocomplete> </v-combobox>
</v-flex> </v-flex>
<!-- Search Buttons --> <!-- Search Buttons -->
......
...@@ -37,6 +37,9 @@ ...@@ -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> <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> </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-layout>
</v-container> </v-container>
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<v-card-text> <v-card-text>
<ul style="list-style-type:none;"> <ul style="list-style-type:none;">
<li v-for="(value, key) in letter.teiHeader.fileDesc.titleStmt"> <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> </li>
</ul> </ul>
</v-card-text> </v-card-text>
...@@ -89,7 +89,17 @@ export default { ...@@ -89,7 +89,17 @@ export default {
letter: null, letter: null,
images: [], images: [],
showComments: true, showComments: true,
features: [] features: [],
metadataTranslations: {
title: 'titre',
collection: 'collection',
author: 'auteur(e)',
recipient: 'destinataire',
gender: 'sexe',
date: 'date',
place: 'lieu',
stamp: 'tampon'
}
} }
}, },
methods: { methods: {
...@@ -99,11 +109,24 @@ export default { ...@@ -99,11 +109,24 @@ export default {
}, },
formatText (text) { formatText (text) {
// Remove [Stuff] from text // Remove [Stuff] from text
if (text instanceof Array) {
text = text.join(' ')
}
if (!this.showComments) { if (!this.showComments) {
text = text.replace(/\[.*\]/, '') text = text.replace(/\[.*\]/, '')
} }
return text 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 (word) {
// Capitalize first letter of a String // Capitalize first letter of a String
return word.charAt(0).toUpperCase() + word.slice(1) 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