diff --git a/local/languages/de.ini b/local/languages/de.ini index 168d3f107d480a49498d82ae5102ffda49e56eed..4c0dcdbf2772990acaa9abf370e3830eafc9923f 100644 --- a/local/languages/de.ini +++ b/local/languages/de.ini @@ -36,8 +36,6 @@ SDCard = "SD Card" USBFlashDrive = "USB Drive" Sheet = Blatt Flipchart = Flipchart -Object = Gegenstand -Card = Karte Roll = Rolle MemoryCard = Speicherkarte ComputerChipCartridge = Computerchip-Cartridge @@ -104,14 +102,12 @@ SpokenWord = "gesprochenes Wort" CartographicThreeDimensionalForm = "kartografische dreidimensionale Form" CartographicDataset = "kartografischer Datensatz" CartographicMovingImage = "kartografisches bewegtes Bild" -CartographicImage = "kartografisches Bild" CartographicTactileImage = "kartografisches taktiles Bild" CartographicTactileThreeDimensionalForm = "kartografische taktile dreidimensionale Form" TactileNotatedMovement = "taktile Bewegungsnotation" TactileThreeDimensionalForm = "taktile dreidimensionale Form" TactileNotatedMusic = "taktile Noten" TactileImage = "taktiles Bild" -StillImage = "unbewegtes Bild" TwoDemensionalMovingImage = Video ExhibitionCatalogue = Ausstellungskatalog Autobiography = Autobiografie @@ -137,26 +133,20 @@ SerialPart = Lieferungswerk CollectorsItem = Sammlungsstück SpecialPrint = Sonderdruck EncyclopediaEntry = Lexikoneintrag -TwoDemensionalMovingImage = Video WorkingManuscripts = Werkmanuskript # specific Unknown = "unbekanntes Format" -DBIS = DBIS LockerKey = Schließfachschlüssel NaxosCD = "Naxos CD" # format_finc facet Article, E-Article = "Artikel, E-Artikel" Audio = Audio -Sheet = Blatt Book, E-Book = "Buch, E-Book" Card = Karte -Database = Datenbank DBIS = DBIS -Flipchart = Flipchart Journal, E-Journal = "Zeitschrift, E-Journal" -Kit = Medienkombination Map = Karte Notated Music = Noten Software = Software @@ -210,7 +200,6 @@ Awards = Auszeichnungen Bag = Korb Barcode = Barcode Be the first to leave a comment = "Schreiben Sie Ihre Meinung zum Titel" -Bibliography = Bibliographie Bookchapter = "Buchkapitel" Bookmark = Lesezeichen Book Suggestion = "Anschaffungsvorschlag" @@ -334,7 +323,7 @@ Import Record = "Daten exportieren" Import to = "Exportieren nach " Information literacy = "Informationskompetenz" In acquisition = Bestellt -In order to establish you account profile, please enter the following information = "Um ein persönliches Konto zu erstellen, geben Sie bitte folgende Angaben ein" +In order to establish your account profile, please enter the following information = "Um ein persönliches Konto zu erstellen, geben Sie bitte folgende Angaben ein" Index of German prints = "VD-Nr." Institution = Institution Instructor = Dozent @@ -402,7 +391,6 @@ New Items = Neuerwerbung New password does not correspond with confirmation password = "Neues Passwort stimmt nicht mit Bestätigungspasswort überein" New publications = "Neuerwerbungen" New search for all parts = "Neue Suche für alle Bände aufrufen" -Next = Nächster No Cover Image = "Kein Bild verfügbar" No Preference = "Keine Vorgabe" No Tags = "Keine Tags" @@ -455,7 +443,6 @@ Please reason briefly the purchase of the title = "Bitte begründen Sie kurz (mi Please select the subject = "Bitte wählen Sie das Fachgebiet aus" Postcode = Postleitzahl Prev = Vorheriger -Print = Drucken Private = Privat Proceed browsing from here = Stöbern hier fortsetzen Provider = Provider @@ -497,7 +484,6 @@ Rvk-Path = "RVK-Pfad" Saturday = Samstag Save = Speichern Save Comment = "Lesermeinung speichern" -Search History = Suchverlauf Search Home = Suche Search Options = Suchoptionen Search Results = Suchergebnisse @@ -554,7 +540,6 @@ Topic = Thema Topics = Themen Tuesday = Dienstag Unavailable = "nicht verfügbar" -Unknown = Unbekannt unknown = unbekannt Unspecified identifier type = Nicht spezifizierter Bezeichner User PINs do not match = "Ihre angegebenen Benutzer PINs stimmen nicht überein" @@ -803,7 +788,6 @@ history_results = Ergebnis history_save = Speichern? history_save_link = Speichern history_saved_searches = "Ihre gespeicherten Suchen" -history_search = Suche history_time = Zeit hold_available = "Abholbereit" hold_cancel = "Bestellung annullieren" @@ -1030,7 +1014,6 @@ DE-L228 = "Staatliche Ethnographische Sammlungen Sachsen, Museum für Völkerkun DE-L242 = "Hochschule für Grafik und Buchkunst Leipzig" DE-L328 = "Halle 14 Kunstbibliothek Leipzig" DE-L330 = "GfZK Leipzig" -DE-Kn38 = "Bibliothek der HfMT Köln" DE-Zi4 = "Hochschule Zittau/Görlitz" DE-Zwi2 = "Westsächsische Hochschule Zwickau" Dresden SLUB = "Sächsische Landesbibliothek & Staats- und Universitätsbibliothek Dresden (SLUB)" @@ -1332,7 +1315,6 @@ Papua New Guinea = Papua-Neuguinea Palau = Palauinseln Solomon Islands = Salomonen Tokelau = Tokelau -Tonga = Tonga Tuvalu = Tuvalu Vanuatu = Vanuatu Wallis and Futuna = Wallis und Futuna @@ -1794,7 +1776,6 @@ Delivery to = "Lieferung an" Delivery service for documents = Dokumentenlieferdienst Details for requested item = "Angaben zum gewünschten Artikel" Division = Fakultät -Email = E-Mail-Adresse Pages = "Seiten (von - bis)" Phone = Telefon Publishing date = Erscheinungsjahr @@ -1807,7 +1788,6 @@ p. = S. APAAI Citation = APA Zitierstil MLAAI Citation = MLA Zitierstil -ISBD Citation = ISBD Zitierstil ; Clear-button in advanced search Clear = "Felder leeren" @@ -1846,7 +1826,7 @@ resolver_link_access_open = "verfügbar" no_resolver_links = "Keine Online Links verfügbar." ; reset password -reset_password_text = "Bitten füllen Sie dieses Formular aus, um Ihr Passwort zurücksetzen zu lassen. Sie erhalten an u.g. Email Adresse eine Benachrichtigung, nachdem wir das Passwort zurückgesetzt haben." +reset_password_text = "Bitten füllen Sie dieses Formular aus, um Ihr Passwort zurücksetzen zu lassen. Sie erhalten an u.g. E-Mail-Adresse eine Benachrichtigung, nachdem wir das Passwort zurückgesetzt haben." Reset Password = "Passwort zurücksetzen" Work Title = "Werktitel" @@ -1959,7 +1939,6 @@ Alternative Corporate Name = "Körperschaftennamenalternative" eds_expander_relatedsubjects = "Auf verwandte Schlagwörter ausweiten" MeSH Terms = "MeSH-Schlagwörter" Related Subjects = "Ähnliche Schlagwörter" -Subjects = "Schlagwörter" ; List of available sources /Sources List of available Sources = "Liste der durchsuchbaren Ressourcen" @@ -2022,7 +2001,7 @@ Go to First Page = "Erste Seite" Go to Last Page = "Letzte Seite" Go to Next Page = "Nächste Seite" Go to Previous Page = "Vorherige Seite" -Next = "Nächste" +Next = "Nächster" Next Search Result = "Nächste" Previous = "Vorherige" Previous Search Result = "Vorherige" @@ -2031,7 +2010,6 @@ Previous Search Result = "Vorherige" record_from_cache = "Dieser Datensatz ist nicht mehr im Katalog vorhanden. Eventuell wurde er durch einen anderen Datensatz ersetzt." search_cached_record = "Nach "%%title_full%%" suchen." search_cached_record_by_isn = "Per %%type%% suchen" -search_cached_record = "Nach "%%title_full%%" suchen." BK = "BK-Notation" @@ -2060,3 +2038,7 @@ DE-Kn38 = "Hochschule für Musik und Tanz Köln" ; #18446 Range-from-to = "Bereich von/bis" + +; #17833 +form-legend = "Bitte füllen Sie alle Felder aus" +form-button-submit = "Ausgefülltes Formular abschicken" diff --git a/local/languages/en.ini b/local/languages/en.ini index d6af5e6fc281bacd54a766b43ae3111107fd5259..1766a3a3b84bc48a72018805cff6101b20762292 100644 --- a/local/languages/en.ini +++ b/local/languages/en.ini @@ -1,7 +1,5 @@ ;------ - ; refs #14912 new format translations due to k10plus translation - ;------ # FormatCalculator Results @@ -42,8 +40,6 @@ SDCard = SD Card USBFlashDrive = USB Drive Sheet = Sheet Flipchart = Flip Chart -Object = Object -Card = Card Roll = Roll MemoryCard = Memory Card ComputerChipCartridge = Computer Chip Cartridge @@ -110,15 +106,12 @@ SpokenWord = Spoken Word CartographicThreeDimensionalForm = Cartographic Three Dimensional Form CartographicDataset = Cartographic Dataset CartographicMovingImage = Cartographic Moving Image -CartographicImage = Cartographic Image CartographicTactileImage = Cartographic Tactile Image CartographicTactileThreeDimensionalForm = Cartographic Tactile Three Dimensional Form TactileNotatedMovement = Tactile Notated Movement TactileThreeDimensionalForm = Tactile Three Dimensional Form TactileNotatedMusic = Tactile Notated Music TactileImage = Tactile Image -StillImage = Still Image -TwoDemensionalMovingImage = Video ExhibitionCatalogue = Exhibition Catalogue Autobiography = Autobiography Bibliography = Bibliography @@ -155,14 +148,10 @@ NaxosCD = Naxos CD # format_finc facet Article, E-Article = Article, E-Article Audio = Audio -Sheet = Sheet Book, E-Book = Book, E-Book Card = Card -Database = Database DBIS = DBIS -Flipchart = Flipchart Journal, E-Journal = Journal, E-Journal -Kit = Kit Map = Map Notated Music = Notated Music Software = Software @@ -441,7 +430,7 @@ ISBN = ISBN ISBN/ISSN = "ISBN / ISSN" ISSN = ISSN Illustrated = Illustrated -In order to establish you account profile, please enter the following information = "In order to establish your account profile, please enter the following information" +In order to establish your account profile, please enter the following information = "In order to establish your account profile, please enter the following information" Institution = Institution Instructor = Instructor Internet = Internet @@ -989,7 +978,6 @@ DE-L228 = "Staatliche Ethnographische Sammlungen Sachsen, Museum für Völkerkun DE-L242 = "Academy of Visual Arts Leipzig" DE-L328 = "Halle 14 Art Library Leipzig" DE-L330 = "GfZK Leipzig" -DE-Kn38 = "Library of HfMT Köln" DE-Zi4 = "Zittau/Görlitz University of Applied Sciences" DE-Zwi2 = "University of Applied Sciences Zwickau" ;Dresden SLUB = "Sächsische Landesbibliothek & Staats- und Universitätsbibliothek Dresden (SLUB)" @@ -1214,7 +1202,6 @@ systemmessage_removed_successful = systemmessage_removed_successful systemmessageid_not_given = systemmessageid_not_given user_dunning_process = user_dunning_process user_access_restricted = user_access_restricted -DE-Mit1 = DE-Mit1 Dresden SLUB = Dresden SLUB According to your search = According to your search been added. = been added. @@ -1903,7 +1890,7 @@ Delivery to = "Delivery to" Delivery service for documents = "Delivery service for documents" Details for requested item = "Details for requested item" Division = Division -Email = E-Mail + Pages = "Pages (from - till)" Phone = Phone Publishing date = "Publishing date" @@ -1916,7 +1903,6 @@ p. = p. APAAI Citation = APA Citation MLAAI Citation = MLA Citation -ISBD Citation = ISBD Citation ;source provider sid_3 = "Nielsen" @@ -2136,3 +2122,7 @@ DE-Kn38 = "Hochschule für Musik und Tanz Köln" ; #18446 Range-from-to = "Range from/to" + +; #17833 +form-legend = "Please fill in all fields to create an account" +form-button-submit = "Submit the completed form" diff --git a/module/finc/src/finc/Controller/MyResearchController.php b/module/finc/src/finc/Controller/MyResearchController.php index cb8dd23b4fceca9119f94d3a422e7b1ebd54690a..9fadc523e76e2765998465baacb5ecaf4a2f8fa0 100644 --- a/module/finc/src/finc/Controller/MyResearchController.php +++ b/module/finc/src/finc/Controller/MyResearchController.php @@ -27,9 +27,10 @@ */ namespace finc\Controller; +use VuFind\Exception\Forbidden as ForbiddenException; +use VuFind\Exception\ListPermission as ListPermissionException; use VuFind\Search\RecommendListener; use Zend\Log\LoggerAwareInterface as LoggerAwareInterface; -use Zend\Mvc\Controller\Plugin\Url; use Zend\Mvc\MvcEvent as MvcEvent; /** diff --git a/module/finc/src/finc/RecordDriver/SolrAI.php b/module/finc/src/finc/RecordDriver/SolrAI.php index 4af5fa770e8e796a0ca20893e4d3f5234777df9c..ddc8790d1517aa070d2d75c12ac3583d0e6e73a0 100644 --- a/module/finc/src/finc/RecordDriver/SolrAI.php +++ b/module/finc/src/finc/RecordDriver/SolrAI.php @@ -267,13 +267,23 @@ class SolrAI extends SolrDefault implements } /** - * Get an array of all ISSNs associated with the record (may be empty). + * Get just the base portion of the first listed ISSN (or false if no ISSNs). + * The major part of this is a copy of the parent method. It only uses rft.issn + * instead of getISSNs * - * @return array of issns + * @return mixed */ public function getCleanISSN() { - return $this->getAIRecord('rft.issn'); + $issns = $this->getAIRecord('rft.issn'); + if (empty($issns)) { + return false; + } + $issn = $issns[0]; + if ($pos = strpos($issn, ' ')) { + $issn = substr($issn, 0, $pos); + } + return $issn; } /** diff --git a/themes/finc/js/lightbox.js b/themes/finc/js/lightbox.js index 17e429708bac72f025bb0a06dad804f9dc0f83e9..1593b4d96b57fd66cdef15ff29fb958605d1dc86 100644 --- a/themes/finc/js/lightbox.js +++ b/themes/finc/js/lightbox.js @@ -1,4 +1,4 @@ -/*global recaptchaOnLoad, resetCaptcha, VuFind, TEMPORARY BARF CK*/ +/*global grecaptcha, recaptchaOnLoad, resetCaptcha, VuFind, TEMPORARY BARF CK */ VuFind.register('lightbox', function Lightbox() { // State var _originalUrl = false; @@ -7,7 +7,7 @@ VuFind.register('lightbox', function Lightbox() { var refreshOnClose = false; var _modalParams = {}; // Elements - var _modal, _modalBody, _modalTitle, _clickedButton = null; + var _modal, _modalBody, _clickedButton = null; // Utilities function _storeClickedStatus() { _clickedButton = this; @@ -15,10 +15,11 @@ VuFind.register('lightbox', function Lightbox() { function _html(content) { _modalBody.html(content); // Set or update title if we have one - if (_lightboxTitle) { - _modalTitle.text(_lightboxTitle); - _lightboxTitle = false; + var $h2 = _modalBody.find("h2:first-of-type"); + if (_lightboxTitle && $h2) { + $h2.text(_lightboxTitle); } + _lightboxTitle = false; _modal.modal('handleUpdate'); } function _emit(msg, _details) { @@ -329,7 +330,7 @@ VuFind.register('lightbox', function Lightbox() { submit.attr('disabled', 'disabled'); } // Store custom title - _lightboxTitle = submit.data('lightboxTitle') || $(form).data('lightboxTitle') || ''; + _lightboxTitle = submit.data('lightbox-title') || $(form).data('lightbox-title') || false; // Get Lightbox content ajax({ url: $(form).attr('action') || _currentUrl, @@ -343,6 +344,86 @@ VuFind.register('lightbox', function Lightbox() { return false; }; + /** + * Keyboard and focus controllers + * Adapted from Micromodal + * - https://github.com/ghosh/Micromodal/blob/master/lib/src/index.js + * FIXME: backported for VuFind 5, remove with Vufind 7 + */ + var FOCUSABLE_ELEMENTS = ['a[href]', 'area[href]', 'input:not([disabled]):not([type="hidden"]):not([aria-hidden])', 'select:not([disabled]):not([aria-hidden])', 'textarea:not([disabled]):not([aria-hidden])', 'button:not([disabled]):not([aria-hidden])', 'iframe', 'object', 'embed', '[contenteditable]', '[tabindex]:not([tabindex^="-"])']; + function getFocusableNodes () { + var nodes = _modal[0].querySelectorAll(FOCUSABLE_ELEMENTS); + return Array.apply(null, nodes); + } + /** + * Tries to set focus on a node which is not a close trigger + * if no other nodes exist then focuses on first close trigger + */ + function setFocusToFirstNode() { + var focusableNodes = getFocusableNodes(); + + // no focusable nodes + if (focusableNodes.length === 0) return; + + // remove nodes on whose click, the modal closes + var nodesWhichAreNotCloseTargets = focusableNodes.filter(function(node) { + return !node.hasAttribute("data-lightbox-close") && ( + !node.hasAttribute("data-dismiss") || + node.getAttribute("data-dismiss") != "modal" + ); + }); + + if (nodesWhichAreNotCloseTargets.length > 0) nodesWhichAreNotCloseTargets[0].focus(); + if (nodesWhichAreNotCloseTargets.length === 0) focusableNodes[0].focus(); + } + + function retainFocus(event) { + var focusableNodes = getFocusableNodes(); + + // no focusable nodes + if (focusableNodes.length === 0) return; + + /** + * Filters nodes which are hidden to prevent + * focus leak outside modal + */ + focusableNodes = focusableNodes.filter(function(node) { + return (node.offsetParent !== null); + }); + + // if disableFocus is true + if (!_modal[0].contains(document.activeElement)) { + focusableNodes[0].focus(); + } else { + var focusedItemIndex = focusableNodes.indexOf(document.activeElement); + + if (event.shiftKey && focusedItemIndex === 0) { + focusableNodes[focusableNodes.length - 1].focus(); + event.preventDefault(); + } + + if (!event.shiftKey && focusableNodes.length > 0 && focusedItemIndex === focusableNodes.length - 1) { + focusableNodes[0].focus(); + event.preventDefault(); + } + } + } + function onKeydown(e) { + if (event.keyCode === 27) { // esc + close(); + } + if (event.keyCode === 9) { // tab + retainFocus(event); + } + } + function bindFocus() { + document.addEventListener('keydown', onKeydown); + setFocusToFirstNode(); + } + function unbindFocus() { + document.removeEventListener('keydown', onKeydown); + } + // Public: Attach listeners to the page function bind(el) { var target = el || document; @@ -389,24 +470,28 @@ VuFind.register('lightbox', function Lightbox() { _html(VuFind.translate('loading') + '...'); _originalUrl = false; _currentUrl = false; - _lightboxTitle = ''; + _lightboxTitle = false; _modalParams = {}; } function init() { _modal = $('#modal'); _modalBody = _modal.find('.modal-body'); - _modalTitle = _modal.find("#modal-title"); _modal.on('hide.bs.modal', function lightboxHide() { if (VuFind.lightbox.refreshOnClose) { VuFind.refreshPage(); + } else { + unbindFocus(); + this.setAttribute('aria-hidden', true); + _emit('VuFind.lightbox.closing'); } - this.setAttribute('aria-hidden', true); - _emit('VuFind.lightbox.closing'); }); _modal.on('hidden.bs.modal', function lightboxHidden() { VuFind.lightbox.reset(); _emit('VuFind.lightbox.closed'); }); + _modal.on("shown.bs.modal", function lightboxShown() { + bindFocus(); + }); VuFind.modal = function modalShortcut(cmd) { if (cmd === 'show') { diff --git a/themes/finc/scss/compiled.scss b/themes/finc/scss/compiled.scss index 34912a74387ab0dbd774ea8ed3cbe1814ea72d3e..0ebc9bc192507806d7329c0e592a0833172ff632 100644 --- a/themes/finc/scss/compiled.scss +++ b/themes/finc/scss/compiled.scss @@ -1886,6 +1886,10 @@ footer { /////// The pager occurs in record/view but also in collection/view .pager { margin-bottom: 0; + + .disabled { + display: none; + } } ////// Pager - END diff --git a/themes/finc/templates/myresearch/account.phtml b/themes/finc/templates/myresearch/account.phtml new file mode 100644 index 0000000000000000000000000000000000000000..b1055a8c55baea6e4f76428bbad1ef93d11cedae --- /dev/null +++ b/themes/finc/templates/myresearch/account.phtml @@ -0,0 +1,22 @@ +<!-- finc: myresearch - account --> + +<?php + // Set up page title: + $this->headTitle($this->translate('User Account')); + + // Set up breadcrumbs: + $this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . '">' . $this->transEsc('Your Account') . '</a></li> <li class="active">' . $this->transEsc('Account') . '</li>'; +?> +<h2><?=$this->transEsc('Create New Account')?></h2> +<?=$this->flashmessages()?> + +<form method="post" name="accountForm" id="accountForm" class="form-user-create" data-toggle="validator" role="form"> + <legend class="sr-only"><?=$this->transEsc('form-legend')?></legend> + <?=$this->auth()->getCreateFields()?> + <?=$this->recaptcha()->html($this->useRecaptcha) ?> + <div class="form-group"> + <a class="back-to-login btn btn-link" href="<?=$this->url('myresearch-userlogin') ?>"><i class="fa fa-chevron-left" aria-hidden="true"></i> <?=$this->transEsc('Back')?></a> + <input class="btn btn-primary" type="submit" name="submit" value="<?=$this->transEsc('form-button-submit')?>" /> + </div> +</form> +<!-- finc: myresearch - account - END --> diff --git a/themes/finc/templates/myresearch/newpassword.phtml b/themes/finc/templates/myresearch/newpassword.phtml index d6c79c657a275ab8d60730f59c6ff693677fbeef..5757cd2a1d2068eaff80450bc60327747648a437 100644 --- a/themes/finc/templates/myresearch/newpassword.phtml +++ b/themes/finc/templates/myresearch/newpassword.phtml @@ -20,6 +20,7 @@ <div class="error"><?=$this->transEsc('recovery_user_not_found') ?></div> <?php else: ?> <form id="newpassword" class="form-new-password" action="<?=$this->url('myresearch-newpassword') ?>" method="post" data-toggle="validator" role="form"> + <legend class="sr-only"><?=$this->transEsc('form-legend')?></legend> <input type="hidden" value="<?=$this->escapeHtmlAttr($this->auth()->getManager()->getCsrfHash())?>" name="csrf"/> <input type="hidden" value="<?=$this->escapeHtmlAttr($this->hash) ?>" name="hash"/> <input type="hidden" value="<?=$this->escapeHtmlAttr($this->username) ?>" name="username"/> @@ -27,7 +28,7 @@ <?=$this->auth()->getNewPasswordForm() ?> <?=$this->recaptcha()->html($this->useRecaptcha) ?> <div class="form-group"> - <input class="btn btn-primary" name="submit" type="submit" value="<?=$this->transEsc('Submit')?>" /> + <input class="btn btn-primary" name="submit" type="submit" value="<?=$this->transEsc('form-button-submit')?>" /> </div> </form> <?php endif; ?>