X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/360d9d37f72b1c6e2edb83c3a0218e55578134f3..971e08cc34959303fbbc8bc50742c9fbe1d66f53:/src/wlxml/views.py diff --git a/src/wlxml/views.py b/src/wlxml/views.py index 281ced5d..3784b777 100644 --- a/src/wlxml/views.py +++ b/src/wlxml/views.py @@ -7,7 +7,7 @@ from librarian.dcparser import BookInfo from librarian.document import WLDocument from librarian.builders import StandaloneHtmlBuilder from librarian.meta.types.wluri import WLURI -from librarian.meta.types.text import LegimiCategory, Epoch, Kind, Genre, Audience +from librarian.meta.types.text import LegimiCategory, Epoch, Kind, Genre, Audience, ThemaCategory, MainThemaCategory from depot.legimi import legimi @@ -48,7 +48,22 @@ class TagView(DetailView): VALUE_TYPES = { LegimiCategory: { 'widget': 'select', - 'options': list(legimi.CATEGORIES.keys()), + 'options': [''] + list(legimi.CATEGORIES.keys()), + }, + Audience: { + 'autocomplete': { + 'source': '/catalogue/terms/audience/', + } + }, + ThemaCategory: { + 'autocomplete': { + 'source': '/catalogue/terms/thema/', + } + }, + MainThemaCategory: { + 'autocomplete': { + 'source': '/catalogue/terms/thema-main/', + } }, Epoch: { 'autocomplete': { @@ -104,6 +119,7 @@ VALUE_TYPES = { "language": { 'widget': 'select', 'options': [ + '', 'pol', 'eng', 'fre', @@ -113,7 +129,7 @@ VALUE_TYPES = { }, "publisher": { "autocomplete": { - "source": ["Fundacja Nowoczesna Polska"] + "source": ["Fundacja Wolne Lektury"] } },