diff --git a/fid/config/vufind/searchspecs.yaml b/fid/config/vufind/searchspecs.yaml index 6ca8f0eda0349dadeb49f1998d80d6acab7d5a02..b3837456118d8c5df89560f9cd8edd4705cf4d50 100644 --- a/fid/config/vufind/searchspecs.yaml +++ b/fid/config/vufind/searchspecs.yaml @@ -1,28 +1,2 @@ -'@parent_yaml': ../../../config/vufind/searchspecs.yaml - -# Fixes unsupported "qt=edismax" query parameter setting. -# Cf. https://projekte.ub.uni-leipzig.de/issues/14850#note-1. - -Author: - DismaxHandler: dismax - -ISN: - DismaxHandler: dismax - -Subject: - DismaxHandler: dismax - -Coordinate: - DismaxHandler: dismax - -JournalTitle: - DismaxHandler: dismax - -Title: - DismaxHandler: dismax - -Series: - DismaxHandler: dismax - -AllFields: - DismaxHandler: dismax \ No newline at end of file +--- +"@parent_yaml": "../../../local/config/vufind/searchspecs.yaml" \ No newline at end of file diff --git a/local/languages/de.ini b/local/languages/de.ini index 168d3f107d480a49498d82ae5102ffda49e56eed..ee1c8afe326c209867e7680307e5ba1b1f80c86f 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 @@ -207,10 +197,10 @@ Author = "Person / Institution" Available = Verfügbar Available Stock = Verfügbarer Bestand Awards = Auszeichnungen +Back = Zurück 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 +324,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 +392,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 +444,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 +485,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 +541,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 +789,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 +1015,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 +1316,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 +1777,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 +1789,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 +1827,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 +1940,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" @@ -1995,22 +1975,19 @@ ReliefPrint = Druckgraphik ; Accessibility Modal_description = "Sie befinden sich in einem Dialogfenster, das über dem Hauptinhalt der Seiten liegt. Drücken Sie die Escape-Taste oder die Schaltfläche 'Dialogfenster schließen', um das Fenster zu schließen und auf der Hauptseite weiterzuarbeiten." - -; #17598 +Skip_navigation_links = "Sprunglinks zum Inhalt" Skip to search = "Zum Suchbereich" +Skip to content = "Zum Inhalt" + ; Overwrite, only in de.ini necessary: Search type = "Suchtyp" License = "Lizenz" -; #17717 -Skip to content = "Zum Inhalt" - fine_date_short = "Gebühr fällig" ; #17626 ; only necessary for de.ini: -go_to_page = "Zur Seite " page_first = "Zur ersten Seite" page_last = "Zur letzten Seite" page_next = "Zur nächsten Seite" @@ -2018,11 +1995,7 @@ page_num = "Seite %%page%%" page_no = "Seite %%page%%" page_prev = "Vorherige Seite" pagination_label = "Blätternavigation" -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 +2004,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 +2032,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..411a6507469f36f5406a5736ad0861ff69387f4d 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 @@ -347,6 +336,7 @@ Audience = Audience Author = "Author / Corporation" Available = Available Awards = Awards +Back = Back Backtrace = Backtrace Bag = Bag Balance = Balance @@ -441,7 +431,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 +979,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 +1203,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 +1891,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 +1904,6 @@ p. = p. APAAI Citation = APA Citation MLAAI Citation = MLA Citation -ISBD Citation = ISBD Citation ;source provider sid_3 = "Nielsen" @@ -2092,16 +2079,13 @@ ReliefPrint = "Printmaking" ; Accessibility Modal_description = "This is a dialog window which overlays the main content of the page. Pressing the Escape key or the Close Dialog Window button will close the modal and bring you back to where you were on the page." - -; #17598 +Skip_navigation_links = "Skip navigation links" Skip to search = "Skip to search" - -License = "License" - -; #17717 ; only necessary in en.ini skip-to = "Skip to " +License = "License" + fine_date_short = "Fine Date" ; #9016, #17375 @@ -2136,3 +2120,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/fid/src/Controller/CustomTraits/FidAcquisitionTrait.php b/module/fid/src/Controller/CustomTraits/FidAcquisitionTrait.php index 5fac446cd047102cfb5b59551b79465ae28a1dbd..4848298c75beb158f3545a67d06fc7a6b8ac1f04 100644 --- a/module/fid/src/Controller/CustomTraits/FidAcquisitionTrait.php +++ b/module/fid/src/Controller/CustomTraits/FidAcquisitionTrait.php @@ -34,7 +34,6 @@ use fid\Validator\SubitoPartialCopyPageBounds; use fid\Validator\SubitoPartialCopyPageSelection; use finc\View\Helper\Root\Citation; use Zend\Form\Form; -use Zend\Http\PhpEnvironment\Request; /** * FID Acquisition Trait @@ -51,6 +50,9 @@ trait FidAcquisitionTrait */ protected $client; + protected $type; + protected $formConfig = "fid-acquisition-form"; + /** * @param Client $client */ @@ -59,103 +61,27 @@ trait FidAcquisitionTrait $this->client = $client; } - public function fidPdaAction () + public function fidPdaAction() { - if (!($user = $this->getUser())) { - return $this->forceLogin(); - } - - /** @var User $user */ - $user = $this->client->requestUserDetails(); - - if ($user->hasPermission('limited_access')) { - $type = "pda"; - $driver = $this->loadRecord(); - $recordId = $driver->tryMethod('getUniqueID'); - $messenger = $this->flashMessenger(); - - /** @var Form $form */ - /** @var Request $request */ - $request = $this->getRequest(); - $form = $this->serviceLocator->get('fid-acquisition-form'); - - if ($submitted = $this->formWasSubmitted()) { - $form->setData($request->getPost()); - if ($form->isValid()) { - $url = $this->getRecordUrl($recordId); - $label = $this->getOrderLabel($driver); - $form->getHydrator()->hydrate(compact('driver','user', 'type','url','label'), $order = new Order()); - $response = $this->client->requestOrderCreation($order); - $message = $this->translate('fid::acquisition_success'); - $messenger->addSuccessMessage($message); - return $this->redirect()->toRoute('record',['id' => $recordId]); - } - } - - $action = $this->url()->fromRoute('record-fidpda',['id' => $recordId]); - $form->setAttribute('action', $action); - $form->prepare(); - - $view = $this->createViewModel(); - $view->setVariables(compact('form','driver','user')); - $view->setTemplate('fid/record/acquisition-pda'); - } - else { - $view = $this->getPermissionDeniedView(); - } - - return $view; + $this->type = self::PDA; + return $this->runAcquisition(); } - public function fidSubitoArticleAction () { - - if (!($user = $this->getUser())) { - return $this->forceLogin(); - } - - /** @var User $user */ - $user = $this->client->requestUserDetails(); - - if ($user->hasPermission('limited_access')) { - $type = "subito-article"; - $driver = $this->loadRecord(); - $recordId = $driver->tryMethod('getUniqueID'); - $messenger = $this->flashMessenger(); - - /** @var Form $form */ - /** @var Request $request */ - $request = $this->getRequest(); - $form = $this->serviceLocator->get('fid-acquisition-form'); - - if ($submitted = $this->formWasSubmitted()) { - $form->setData($request->getPost()); - if ($form->isValid()) { - $url = $this->getRecordUrl($recordId); - $label = $this->getOrderLabel($driver); - $form->getHydrator()->hydrate(compact('driver', 'user', 'type', 'url', 'label'), $order = new Order()); - $response = $this->client->requestOrderCreation($order); - $message = $this->translate('fid::acquisition_success'); - $messenger->addSuccessMessage($message); - return $this->redirect()->toRoute('record', ['id' => $recordId]); - } - } - - $action = $this->url()->fromRoute('record-fidsubitoarticle', ['id' => $recordId]); - $form->setAttribute('action', $action); - $form->prepare(); - - $view = $this->createViewModel(); - $view->setVariables(compact('form', 'driver', 'user')); - $view->setTemplate('fid/record/acquisition-subito-article'); - } - else { - $view = $this->getPermissionDeniedView(); - } + public function fidSubitoArticleAction() + { + $this->type = self::SUBITO_ARTICLE; + return $this->runAcquisition(); + } - return $view; + public function fidSubitoPartialCopyAction() + { + $this->type = self::SUBITO_PARTIAL_COPY; + $this->formConfig = ('fid-acquisition-subito-partial-copy-form'); + return $this->runAcquisition(); } - public function fidSubitoPartialCopyAction () { + protected function runAcquisition() + { if (!($user = $this->getUser())) { return $this->forceLogin(); } @@ -164,65 +90,56 @@ trait FidAcquisitionTrait $user = $this->client->requestUserDetails(); if ($user->hasPermission('limited_access')) { - $type = "subito-partial-copy"; $driver = $this->loadRecord(); $recordId = $driver->tryMethod('getUniqueID'); - $messenger = $this->flashMessenger(); /** @var Form $form */ - /** @var Request $request */ - $request = $this->getRequest(); - $form = $this->serviceLocator->get('fid-acquisition-subito-partial-copy-form'); + $form = $this->serviceLocator->get($this->formConfig); - // add number of pages specific validators - $recordPages = $driver->tryMethod('getNumberOfPages'); - if ($recordPages) { - $form->getInputFilter()->get('pages')->getValidatorChain()->attach( - new SubitoPartialCopyPageBounds(['numberPages' => $recordPages]), - true - ); - $form->getInputFilter()->get('pages')->getValidatorChain()->attach( - new SubitoPartialCopyPageSelection(['numberPages' => $recordPages]) - ); - } + $this->addOptinalFormValidators($form); - if ($submitted = $this->formWasSubmitted()) { - $form->setData($request->getPost()); + if ($this->formWasSubmitted()) { + $form->setData($this->getRequest()->getPost()); if ($form->isValid()) { $url = $this->getRecordUrl($recordId); $label = $this->getOrderLabel($driver); - $subitoPartialCopy = [ - 'selection' => $form->getData()['pages'], - 'comment' => $form->getData()['comment'] - ]; - $form->getHydrator()->hydrate(compact('driver', 'user', 'type', 'url', 'label', 'subitoPartialCopy'), $order = new Order()); + $type = $this->type; + $hydratorData = compact('type', 'driver', 'user', 'url', 'label'); + $hydratorData += $this->addTypeSpecificOrderInformation($form); + $form->getHydrator()->hydrate($hydratorData, $order = new Order()); $this->client->requestOrderCreation($order); $message = $this->translate('fid::acquisition_success'); + $messenger = $this->flashMessenger(); $messenger->addSuccessMessage($message); return $this->redirect()->toRoute('record', ['id' => $recordId]); + } else { + $this->handleOptionalErrorMessages($form); } } - $action = $this->url()->fromRoute('record-fidsubitopartialcopy', ['id' => $recordId]); + $typeWithoutHyphens = preg_replace("/[^a-zA-Z]+/", "", $this->type); + $action = $this->url()->fromRoute("record-fid$typeWithoutHyphens", ['id' => $recordId]); $form->setAttribute('action', $action); $form->prepare(); $view = $this->createViewModel(); $view->setVariables(compact('form', 'driver', 'user')); - $view->setTemplate('fid/record/acquisition-subito-partial-copy'); - } - else { + $view->setTemplate("fid/record/acquisition-$this->type"); + } else { $view = $this->getPermissionDeniedView(); } return $view; } - function getRecordUrl($recordId) { - return $this->url()->fromRoute('record',['id' => $recordId], ['force_canonical' => true]); + protected function getRecordUrl($recordId) + { + return $this->url()->fromRoute('record', ['id' => $recordId], ['force_canonical' => true]); } - function getRecordCitation($driver) { + protected function getRecordCitation() + { + $driver = $this->loadRecord(); /** @var Citation $helper */ $helper = $this->getViewRenderer()->plugin('citation'); $helper->__invoke($driver); @@ -231,20 +148,56 @@ trait FidAcquisitionTrait $formats = array_intersect($priorityFormats, $existingFormats); if (!empty($formats)) { return $helper->getCitation($formats[0]); - } - else { + } else { return $driver->tryMethod('getTitle'); } } - function getOrderLabel ($driver) { - return $driver->tryMethod('getTitle'); + protected function getOrderLabel() + { + return $this->loadRecord()->tryMethod('getTitle'); } - function getPermissionDeniedView() { + protected function getPermissionDeniedView() + { $view = $this->createViewModel(); $view->setVariables(['msg' => "fid::acquisition_permission_denied"]); $view->setTemplate('error/permissiondenied.phtml'); return $view; } + + protected function addOptinalFormValidators($form) + { + if ($this->type == self::SUBITO_PARTIAL_COPY) { + // add number of pages specific validators + $recordPages = $this->loadRecord()->tryMethod('getNumberOfPages'); + if ($recordPages) { + $form->getInputFilter()->get('pages')->getValidatorChain()->attach( + new SubitoPartialCopyPageBounds(['numberPages' => $recordPages]), + true + ); + $form->getInputFilter()->get('pages')->getValidatorChain()->attach( + new SubitoPartialCopyPageSelection(['numberPages' => $recordPages]) + ); + } + } + } + + protected function addTypeSpecificOrderInformation($form) + { + $data = []; + if ($this->type == self::SUBITO_PARTIAL_COPY) { + $data += [ + 'subitoPartialCopy' => [ + 'selection' => $form->getData()['pages'], + 'comment' => $form->getData()['comment'] + ] + ]; + } + return $data; + } + + protected function handleOptionalErrorMessages($form) + { + } } diff --git a/module/fid/src/Controller/RecordController.php b/module/fid/src/Controller/RecordController.php index 0bd3d654f768c0658db12d129c4b729ff0829426..76d5d21c62a778bc181676ea991f49976e8a70ab 100644 --- a/module/fid/src/Controller/RecordController.php +++ b/module/fid/src/Controller/RecordController.php @@ -31,4 +31,8 @@ class RecordController extends \finc\Controller\RecordController use CustomTraits\FidAcquisitionTrait; const PAGE_RANGE_PATTERN = '/^(0|[1-9]\d*)-([1-9]\d*)$/'; + + const PDA = "pda"; + const SUBITO_ARTICLE = "subito-article"; + const SUBITO_PARTIAL_COPY = "subito-partial-copy"; } 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/module/finc/src/finc/View/Helper/Root/Flashmessages.php b/module/finc/src/finc/View/Helper/Root/Flashmessages.php new file mode 100644 index 0000000000000000000000000000000000000000..1b099d258b2ac6056d4c5f7c0706a8efb742528f --- /dev/null +++ b/module/finc/src/finc/View/Helper/Root/Flashmessages.php @@ -0,0 +1,93 @@ +<?php +/** + * Flash message view helper + * + * PHP version 7 + * + * Copyright (C) Leipzig University Library 2020. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * @category VuFind + * @package View_Helpers + * @author Heike Reinken <reinken@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development Wiki + */ +namespace finc\View\Helper\Root; + +/** + * Flash message view helper + * + * @category VuFind + * @package View_Helpers + * @author Heike Reinken <reinken@ub.uni-leipzig.de> + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development Wiki + */ +class Flashmessages extends \VuFind\View\Helper\Bootstrap3\Flashmessages +{ + /** + * Generate flash message <p>'s with appropriate classes based on message type. + * This is basically a copy of the parent method but uses p-Tags instead of divs + * + * @return string $html + */ + public function __invoke() + { + $html = ''; + $namespaces = ['error', 'info', 'success']; + foreach ($namespaces as $ns) { + $messages = array_merge( + $this->fm->getMessages($ns), $this->fm->getCurrentMessages($ns) + ); + foreach (array_unique($messages, SORT_REGULAR) as $msg) { + $html .= '<p class="' . $this->getClassForNamespace($ns) . '"'; + if (isset($msg['dataset'])) { + foreach ($msg['dataset'] as $attr => $value) { + $html .= ' data-' . $attr . '="' + . htmlspecialchars($value) . '"'; + } + } + $html .= '>'; + // Advanced form: + if (is_array($msg)) { + // Use a different translate helper depending on whether + // or not we're in HTML mode. + if (!isset($msg['translate']) || $msg['translate']) { + $helper = (isset($msg['html']) && $msg['html']) + ? 'translate' : 'transEsc'; + } else { + $helper = (isset($msg['html']) && $msg['html']) + ? false : 'escapeHtml'; + } + $helper = $helper + ? $this->getView()->plugin($helper) : false; + $tokens = $msg['tokens'] ?? []; + $default = $msg['default'] ?? null; + $html .= $helper + ? $helper($msg['msg'], $tokens, $default) : $msg['msg']; + } else { + // Basic default string: + $transEsc = $this->getView()->plugin('transEsc'); + $html .= $transEsc($msg); + } + $html .= '</p>'; + } + $this->fm->clearMessages($ns); + $this->fm->clearCurrentMessages($ns); + } + return $html; + } +} diff --git a/themes/fid/templates/Helpers/openurl.phtml b/themes/fid/templates/Helpers/openurl.phtml index 23ac7943111a89c34a40f0d6ee5af4ef685d304d..2590123aa5532dd219ea846c26f2854294e57188 100644 --- a/themes/fid/templates/Helpers/openurl.phtml +++ b/themes/fid/templates/Helpers/openurl.phtml @@ -1,6 +1,6 @@ <!-- fid: helpers - openurl --> <?php - //echo $this->inlineScript(\Zend\View\Helper\HeadScript::FILE, 'openurl.js', 'SET'); + echo $this->inlineScript(\Zend\View\Helper\HeadScript::FILE, 'openurl.js', 'SET'); $classes = ''; if ($this->openUrlEmbed) { $classes = "fulltext"; diff --git a/themes/fid/templates/ajax/resolverLinks.phtml b/themes/fid/templates/ajax/resolverLinks.phtml index f0218fb8074dd2a2c260abc198f355f076b98303..4b19b271ad482b1eee1fc5b5f97ea86420d6b977 100644 --- a/themes/fid/templates/ajax/resolverLinks.phtml +++ b/themes/fid/templates/ajax/resolverLinks.phtml @@ -8,17 +8,19 @@ <div class="openurls"> <ul> <?php foreach ($this->electronic as $link): ?> - <li> - <?php if (!empty($link['href'])): ?> - <?php /* fid: #16136 remove traffic light - GG */?> - <a href="<?=$this->escapeHtmlAttr($link['href'])?>" target="_blank" title="<?=isset($link['service_type'])?$this->escapeHtmlAttr($link['service_type']):''?>"<?=!empty($link['access'])?' class="access-'.$link['access'].'"':''?>> - <i class="icon icon-external-link" aria-hidden="true"></i><?=isset($link['title'])?$this->escapeHtml($this->transEsc($link['title'])):''?> - </a> <br /> - <?php /* fid: #16136 remove coverage - GG */?> - <?php else: ?> - <?=isset($link['title'])?$this->escapeHtml($this->transEsc($link['title'])):''?> - <?php endif; ?> - </li> + <?php if (!empty($link['href'])): ?> + <li> + <?php if (!empty($link['href'])): ?> + <?php /* fid: #16136 remove traffic light - GG */?> + <a href="<?=$this->escapeHtmlAttr($link['href'])?>" target="_blank" title="<?=isset($link['service_type'])?$this->escapeHtmlAttr($link['service_type']):''?>"<?=!empty($link['access'])?' class="access-'.$link['access'].'"':''?>> + <i class="icon icon-external-link" aria-hidden="true"></i><?=isset($link['title'])?$this->escapeHtml($this->transEsc($link['title'])):''?> + </a> <br /> + <?php /* fid: #16136 remove coverage - GG */?> + <?php else: ?> + <?=isset($link['title'])?$this->escapeHtml($this->transEsc($link['title'])):''?> + <?php endif; ?> + </li> + <?php endif; ?> <?php endforeach; ?> </ul> </div> diff --git a/themes/fid/theme.config.php b/themes/fid/theme.config.php index 82fb7b589c9c0f81176c9faa29d09b28060cecd1..a372ae4df9d95c085acc32dbf9559be60ed25b83 100644 --- a/themes/fid/theme.config.php +++ b/themes/fid/theme.config.php @@ -23,9 +23,6 @@ return [ 'extends' => 'finc', - 'js' => [ - 'openurl.js', - ], 'helpers' => array( 'factories' => array( 'fid\View\Helper\Root\UserGroups' => diff --git a/themes/finc-accessibility/css/.gitignore b/themes/finc-accessibility/css/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..ecd34d2f94d3375699b58fb65ea6fa5b0aba96d1 --- /dev/null +++ b/themes/finc-accessibility/css/.gitignore @@ -0,0 +1 @@ +compiled.css \ No newline at end of file diff --git a/themes/finc-accessibility/templates/Recommend/AlphaBrowseLink.phtml b/themes/finc-accessibility/templates/Recommend/AlphaBrowseLink.phtml new file mode 100644 index 0000000000000000000000000000000000000000..6c3f63c4b61fab76fef821b2b1b8d4f9fbcb35a4 --- /dev/null +++ b/themes/finc-accessibility/templates/Recommend/AlphaBrowseLink.phtml @@ -0,0 +1,18 @@ +<!-- finc-accessibility: Recommend - AlphaBrowseLink --> +<?php /* #17950 - use <p> for alerts - HR */ ?> + +<?php + $index = $this->recommend->getIndex(); + $from = $this->recommend->getQuery(); + $link = $this->translate( + 'alphabrowselink_html', + [ + '%%index%%' => $this->transEsc('browse_' . $index), + '%%from%%' => $this->escapeHtml($from), + '%%url%%' => $this->url('alphabrowse-home') + . '?from=' . urlencode($from) . '&source=' . urlencode($index) + ] + ); +?> +<p class="alert alert-info"><?=$link?></p> +<!-- finc-accessibility: Recommend - AlphaBrowseLink - END --> diff --git a/themes/finc-accessibility/templates/Recommend/Channels.phtml b/themes/finc-accessibility/templates/Recommend/Channels.phtml new file mode 100644 index 0000000000000000000000000000000000000000..10710cbd4018d93ad48304cd973dca02d7bcf16a --- /dev/null +++ b/themes/finc-accessibility/templates/Recommend/Channels.phtml @@ -0,0 +1,13 @@ +<!-- finc-accessibility: Recommend - Channels --> +<?php /* #17950 - use <p> for alerts - HR */ ?> + +<?php + $results = $this->recommend->getResults(); + $link = $this->url('channels-search') + . $results->getUrlQuery()->getParams(false) + . '&source=' . urlencode($results->getParams()->getSearchClassId()); +?> +<p class="channels-alert alert alert-info"> + <a href="<?=$this->escapeHtmlAttr($link)?>"><?=$this->transEsc('channel_expand')?></a> +</p> +<!-- finc-accessibility: Recommend - Channels - END --> diff --git a/themes/finc-accessibility/templates/Recommend/DOI.phtml b/themes/finc-accessibility/templates/Recommend/DOI.phtml new file mode 100644 index 0000000000000000000000000000000000000000..0a20a62a35e08cb2eaf590fb0199514e022c1384 --- /dev/null +++ b/themes/finc-accessibility/templates/Recommend/DOI.phtml @@ -0,0 +1,14 @@ +<!-- finc-accessibility: Recommend - DOI --> +<?php /* #17950 - use <p> for alerts - HR */ ?> + +<?php $doi = $this->recommend->getDOI(); if (!empty($doi)): ?> + <?php $url = $this->recommend->getURL(); ?> + <p class="alert alert-info"> + <?=$this->translate('doi_detected_html', ['%%url%%' => $url, '%%doi%%' => $doi])?> + </p> + <?php if ($this->recommend->isFullMatch()): ?> + <?php $redirect = 'document.location.href = "' . $this->escapeJs($url) . '";'; ?> + <?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, $redirect, 'SET')?> + <?php endif; ?> +<?php endif; ?> +<!-- finc-accessibility: Recommend - DOI - END --> diff --git a/themes/finc-accessibility/templates/Recommend/RemoveFilters.phtml b/themes/finc-accessibility/templates/Recommend/RemoveFilters.phtml new file mode 100644 index 0000000000000000000000000000000000000000..c79a65f63ca767b0ff7333209e7ac8624dbe71b9 --- /dev/null +++ b/themes/finc-accessibility/templates/Recommend/RemoveFilters.phtml @@ -0,0 +1,10 @@ +<!-- finc-accessibility: Recommend - RemoveFilters --> +<?php /* #17950 - use <p> for alerts - HR */ ?> + +<?php if ($this->recommend->hasFilters()): ?> + <p class="alert alert-info"> + <?=$this->transEsc('nohit_active_filters')?> + <a href="<?=$this->recommend->getFilterlessUrl()?>"><?=$this->transEsc('nohit_query_without_filters')?></a> + </p> +<?php endif; ?> +<!-- finc-accessibility: Recommend - RemoveFilters - END --> diff --git a/themes/finc-accessibility/templates/Recommend/SwitchType.phtml b/themes/finc-accessibility/templates/Recommend/SwitchType.phtml new file mode 100644 index 0000000000000000000000000000000000000000..c44dc55b6b04da6d8e3fd71da4d8501f47b8fadf --- /dev/null +++ b/themes/finc-accessibility/templates/Recommend/SwitchType.phtml @@ -0,0 +1,10 @@ +<!-- finc-accessibility: Recommend - SwitchType --> +<?php /* #17950 - use <p> for alerts - HR */ ?> + +<?php if ($handler = $this->recommend->getNewHandler()): ?> + <p class="alert alert-info"> + <?=$this->transEsc('widen_prefix')?> + <a href="<?=$this->recommend->getResults()->getUrlQuery()->setHandler($handler)?>"><?=$this->transEsc($this->recommend->getNewHandlerName())?></a>. + </p> +<?php endif; ?> +<!-- finc-accessibility: Recommend - SwitchType - END --> diff --git a/themes/finc-accessibility/templates/RecordDriver/EDS/result-list.phtml b/themes/finc-accessibility/templates/RecordDriver/EDS/result-list.phtml new file mode 100644 index 0000000000000000000000000000000000000000..d65ddb57d0e14cf38e6911fafdc8e393755d7fb3 --- /dev/null +++ b/themes/finc-accessibility/templates/RecordDriver/EDS/result-list.phtml @@ -0,0 +1,144 @@ +<!-- finc-accessibility: RecordDriver - EDS - result-list --> +<?php /* #17950 - use <p> for alerts - HR */ ?> + +<?php + $this->headLink()->appendStylesheet('EDS.css'); + $accessLevel = $this->driver->getAccessLevel(); + $restrictedView = empty($accessLevel) ? false : true; + $coverDetails = $this->record($this->driver)->getCoverDetails('result-list', 'medium', $this->recordLink()->getUrl($this->driver)); +?> +<?php + $thumbnail = false; + $thumbnailAlignment = $this->record($this->driver)->getThumbnailAlignment('result'); + ob_start(); ?> + <div class="media-<?=$thumbnailAlignment ?> <?=$this->escapeHtml($coverDetails['size'])?>"> + <?php if ($coverDetails['cover']): ?> + <a href="<?=$this->recordLink()->getUrl($this->driver)?>" class="_record_link"> + <img src="<?=$this->escapeHtmlAttr($coverDetails['cover'])?>" class="recordcover" alt="<?=$this->transEsc('Cover Image')?>"/> + </a> + <?php else: ?> + <span class="recordcover pt-icon pt-<?=$this->driver->getPubTypeId()?>"></span> + <div><?=$this->driver->getPubType()?></div> + <?php endif; ?> + </div> +<?php $thumbnail = ob_get_contents(); ?> +<?php ob_end_clean(); ?> +<input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getUniqueID())?>" class="hiddenId" /> +<input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getSourceIdentifier())?>" class="hiddenSource" /> +<div class="media<?=$this->driver->supportsAjaxStatus()?' ajaxItem':''?>"> + <?php if ($thumbnail && $thumbnailAlignment == 'left'): ?> + <?=$thumbnail ?> + <?php endif; ?> + <div class="media-body"> + <div class="result-body"> + <?php $items = $this->driver->getItems(); + if (isset($items) && !empty($items)): + foreach ($items as $item): + if (!empty($item)): ?> + <div class="resultItemLine1"> + <?php if('Ti' == $item['Group']): ?> + <a href="<?=$this->recordLink()->getUrl($this->driver)?>" class="title getFull _record_link" data-view="<?=$this->params->getOptions()->getListViewOption()?>"> + <?=$item['Data']?> </a> + <?php else:?> + <p> + <b><?=$this->transEsc($item['Label'])?>:</b> + <?=$this->driver->linkUrls($item['Data'])?> + </p> + <?php endif;?> + </div> + <?php endif; + endforeach; + elseif ($restrictedView): ?> + <div class="resultItemLine1"> + <p> + <?=$this->transEsc('This result is not displayed to guests')?> + <br /> + <a class="login" href="<?=$this->url('myresearch-home')?>"> + <strong><?=$this->transEsc('Login for full access')?></strong> + </a> + </p> + </div> + <?php endif; ?> + + <div class="resultItemLine4 custom-links"> + <?php $customLinks = array_merge($this->driver->getFTCustomLinks(), $this->driver->getCustomLinks()); + if (!empty($customLinks)): ?> + <?php foreach ($customLinks as $customLink): ?> + <?php + $url = $customLink['Url'] ?? ''; + $mot = $customLink['MouseOverText'] ?? ''; + $icon = $customLink['Icon'] ?? ''; + $name = $customLink['Text'] ?? ''; + ?> + <span> + <a href="<?=$this->escapeHtmlAttr($url)?>" target="_blank" title="<?=$this->escapeHtmlAttr($mot)?>" class="custom-link"> + <?php if ($icon): ?><img src="<?=$this->escapeHtmlAttr($icon)?>" /> <?php endif; ?><?=$this->escapeHtml($name)?> + </a> + </span> + <?php endforeach; ?> + <?php endif; ?> + </div> + + <?php if ($this->driver->hasHTMLFullTextAvailable()): ?> + <a href="<?= $this->recordLink()->getUrl($this->driver, 'fulltext') ?>#html" class="icon html fulltext _record_link" target="_blank"> + <?=$this->transEsc('HTML Full Text')?> + </a> + + <?php endif; ?> + + <?php if ($this->driver->hasPdfAvailable()): ?> + <a href="<?= $this->recordLink()->getUrl($this->driver) . '/PDF'; ?>" class="icon pdf fulltext" target="_blank"> + <?=$this->transEsc('PDF Full Text')?> + </a> + <?php endif; ?> + </div> + <div class="result-links hidden-print"> + <?php /* Display qrcode if appropriate: */ ?> + <?php if ($QRCode = $this->record($this->driver)->getQRCode("results")): ?> + <?php + // Add JS Variables for QrCode + $this->jsTranslations()->addStrings(['qrcode_hide' => 'qrcode_hide', 'qrcode_show' => 'qrcode_show']); + ?> + <span class="hidden-xs"> + <i class="fa fa-fw fa-qrcode" aria-hidden="true"></i> <a href="<?=$this->escapeHtmlAttr($QRCode);?>" class="qrcodeLink"><?=$this->transEsc('qrcode_show')?></a> + <div class="qrcode hidden"> + <script type="text/template" class="qrCodeImgTag"> + <img alt="<?=$this->transEsc('QR Code')?>" src="<?=$this->escapeHtmlAttr($QRCode);?>"/> + </script> + </div><br/> + </span> + <?php endif; ?> + + <?php if ($this->cart()->isActiveInSearch() && $this->params->getOptions()->supportsCart() && $this->cart()->isActive()): ?> + <?=$this->render('record/cart-buttons.phtml', ['id' => $this->driver->getUniqueId(), 'source' => $this->driver->getSourceIdentifier()]); ?><br/> + <?php endif; ?> + + <?php if ($this->userlist()->getMode() !== 'disabled'): ?> + <?php /* Add to favorites */ ?> + <i class="fa fa-fw fa-star" aria-hidden="true"></i> <a href="<?=$this->recordLink()->getActionUrl($this->driver, 'Save')?>" class="save-record" data-lightbox id="<?=$this->driver->getUniqueId() ?>" title="<?=$this->transEsc('Add to favorites')?>"><?=$this->transEsc('Add to favorites')?></a><br/> + + <?php /* Saved lists */ ?> + <p class="savedLists alert alert-info hidden"> + <strong><?=$this->transEsc("Saved in")?>:</strong> + </p> + <?php endif; ?> + + <?php /* Hierarchy tree link */ ?> + <?php $trees = $this->driver->tryMethod('getHierarchyTrees'); if (!empty($trees)): ?> + <?php foreach ($trees as $hierarchyID => $hierarchyTitle): ?> + <div class="hierarchyTreeLink"> + <input type="hidden" value="<?=$this->escapeHtmlAttr($hierarchyID)?>" class="hiddenHierarchyId" /> + <i class="fa fa-fw fa-sitemap" aria-hidden="true"></i> + <a class="hierarchyTreeLinkText" data-lightbox href="<?=$this->recordLink()->getTabUrl($this->driver, 'HierarchyTree')?>?hierarchy=<?=urlencode($hierarchyID)?>#tabnav" title="<?=$this->transEsc('hierarchy_tree')?>"> + <?=$this->transEsc('hierarchy_view_context')?><?php if (count($trees) > 1): ?>: <?=$this->escapeHtml($hierarchyTitle)?><?php endif; ?> + </a> + </div> + <?php endforeach; ?> + <?php endif; ?> + </div> + </div> + <?php if ($thumbnail && $thumbnailAlignment == 'right'): ?> + <?=$thumbnail ?> + <?php endif; ?> +</div> +<!-- finc-accessibility: RecordDriver - EDS - result-list - END --> diff --git a/themes/finc-accessibility/templates/Related/Channels.phtml b/themes/finc-accessibility/templates/Related/Channels.phtml new file mode 100644 index 0000000000000000000000000000000000000000..04f65247244c0ea79f6b2872dbfe1a73ec3368f9 --- /dev/null +++ b/themes/finc-accessibility/templates/Related/Channels.phtml @@ -0,0 +1,13 @@ +<!-- finc-accessibility: Related - Channels --> +<?php /* #17950 - use <p> for alerts - HR */ ?> + +<?php + $driver = $this->related->getDriver(); + $link = $this->url('channels-record') + . '?id=' . urlencode($driver->getUniqueId()) + . '&source=' . urlencode($driver->getSourceIdentifier()); +?> +<p class="channels-alert alert alert-info"> + <a href="<?=$this->escapeHtmlAttr($link)?>"><?=$this->transEsc('channel_expand')?></a> +</p> +<!-- finc-accessibility: Related - Channels - END --> diff --git a/themes/finc-accessibility/templates/myresearch/delete.phtml b/themes/finc-accessibility/templates/myresearch/delete.phtml new file mode 100644 index 0000000000000000000000000000000000000000..b991a73aa630b5cad9b9b7d4ded39deb8a41cdcb --- /dev/null +++ b/themes/finc-accessibility/templates/myresearch/delete.phtml @@ -0,0 +1,26 @@ +<!-- finc-accessibility: myresearch - delete --> +<?php /* #17950 - use <p> for alerts - HR */ ?> + +<h2><?=$this->transEsc('delete_selected_favorites')?></h2> + <form action="<?=$this->url('myresearch-delete')?>" method="post" name="bulkDelete" data-lightbox-onclose="VuFind.refreshPage"> + <div id="popupMessages"><?=$this->flashmessages()?></div> + <div id="popupDetails"> + <?php if (!$this->list): ?> + <p class="alert alert-info"><?=$this->transEsc("fav_delete_warn") ?></p> + <?php else: ?> + <h3><?=$this->transEsc("List") ?>: <?=$this->escapeHtml($this->list->title) ?></h3> + <?php endif; ?> + + <?php foreach ($this->records as $favorite): ?> + <strong><?=$this->transEsc('Title') ?>:</strong> + <?=$this->escapeHtml($favorite->getBreadcrumb())?><br /> + <?php endforeach; ?> + <br /> + <input class="btn btn-primary" type="submit" name="submit" value="<?=$this->transEsc('Delete')?>"/> + <?php foreach ($this->deleteIDS as $deleteID): ?> + <input type="hidden" name="ids[]" value="<?=$this->escapeHtmlAttr($deleteID)?>" /> + <?php endforeach; ?> + <input type="hidden" name="listID" value="<?=$this->list?$this->escapeHtmlAttr($this->list->id):''?>" /> + </div> +</form> +<!-- finc-accessibility: myresearch - delete - END --> diff --git a/themes/finc-accessibility/templates/myresearch/login.phtml b/themes/finc-accessibility/templates/myresearch/login.phtml new file mode 100644 index 0000000000000000000000000000000000000000..5bf1facad28941ca265940bc867cf9cd8d4841c9 --- /dev/null +++ b/themes/finc-accessibility/templates/myresearch/login.phtml @@ -0,0 +1,29 @@ +<!-- finc-accessibility: myresearch - login --> +<?php /* #17950 - use <p> for alerts - HR */ ?> + +<?php + // Set up page title: + $this->headTitle($this->translate('Login')); + + // Set up breadcrumbs: + $this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . '">' . $this->transEsc('Your Account') . '</a></li> <li class="active">' . $this->transEsc('Login') . '</li>'; + + // Convenience variables: + $account = $this->auth()->getManager(); + $hideLogin = !(is_object($account) && $account->loginEnabled()); + $offlineMode = $this->ils()->getOfflineMode(); +?> + +<?php if ($offlineMode == "ils-offline"): ?> + <?=$this->render('Helpers/ils-offline.phtml', ['offlineModeMsg' => 'ils_offline_login_message'])?> +<?php endif; ?> + +<h2 class="lightbox-header"><?=$this->transEsc('Login')?></h2> +<?=$this->flashmessages()?> + +<?php if ($hideLogin): ?> + <p class="alert alert-danger"><?=$this->transEsc('login_disabled')?></p> +<?php else: ?> + <?=$this->auth()->getLogin()?> +<?php endif; ?> +<!-- finc-accessibility: myresearch - login - END --> diff --git a/themes/finc-accessibility/templates/record/comments-list.phtml b/themes/finc-accessibility/templates/record/comments-list.phtml new file mode 100644 index 0000000000000000000000000000000000000000..66b90c54bb8dfd790243408f195f0f0c04471309 --- /dev/null +++ b/themes/finc-accessibility/templates/record/comments-list.phtml @@ -0,0 +1,23 @@ +<!-- finc-accessibility: record - comments-list --> +<?php $comments = $this->driver->getComments(); ?> +<?php if (empty($comments) || count($comments) == 0): ?> + <p class="alert alert-info"><?=$this->transEsc('Be the first to leave a comment')?>!</p> +<?php else: ?> + <?php foreach ($comments as $comment): ?> + <div class="comment"> + <div class="comment-name"> + <strong><?=null === $comment->user_id ? $this->transEsc('comment_anonymous_user') : $this->escapeHtml(trim($comment->firstname . ' ' . $comment->lastname))?></strong><br/> + <small> + <?=$this->escapeHtml($comment->created)?> + <?php if (($user = $this->auth()->isLoggedIn()) && $comment->user_id == $user->id): ?> + <a href="<?=$this->recordLink()->getActionUrl($this->driver, 'DeleteComment')?>?delete=<?=urlencode($comment->id)?>" id="recordComment<?=$this->escapeHtml($comment->id)?>" class="delete"><?=$this->transEsc('Delete')?></a> + <?php endif; ?> + </small> + </div> + <div class="comment-text"> + <?=$this->escapeHtml($comment->comment)?> + </div> + </div> + <?php endforeach; ?> +<?php endif; ?> +<!-- finc-accessibility: record - comments-list - END --> diff --git a/themes/finc-accessibility/theme.config.php b/themes/finc-accessibility/theme.config.php new file mode 100644 index 0000000000000000000000000000000000000000..fd9f6a15d37cbed600bdcb3df0db6b0b6b1e996d --- /dev/null +++ b/themes/finc-accessibility/theme.config.php @@ -0,0 +1,9 @@ +<?php +/** + * @deprecated this theme only exists to keep track of intermediate accessibility + * fixes which woul normally belong to the bootstrap3 theme but will not be + * backported from VuFind 7 to our current version (VF 5.1.1) + */ +return [ + 'extends' => 'bootstrap3' +]; diff --git a/themes/finc/js/lightbox.js b/themes/finc/js/lightbox.js index 17e429708bac72f025bb0a06dad804f9dc0f83e9..50e34faa90b8204e93fa5c5085a02bde4186a5bb 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) { @@ -41,7 +42,7 @@ VuFind.register('lightbox', function Lightbox() { // Public: Present an alert function showAlert(message, _type) { var type = _type || 'info'; - _html('<div class="flash-message alert alert-' + type + '">' + message + '</div>' + _html('<p class="flash-message alert alert-' + type + '">' + message + '</p>' + '<button class="btn btn-default" data-dismiss="modal">' + VuFind.translate('close') + '</button>'); _modal.modal('show'); } @@ -49,7 +50,7 @@ VuFind.register('lightbox', function Lightbox() { var type = _type || 'info'; _modalBody.find('.flash-message,.fa.fa-spinner').remove(); _modalBody.find('h2:first-of-type') - .after('<div class="flash-message alert alert-' + type + '">' + message + '</div>'); + .after('<p class="flash-message alert alert-' + type + '">' + message + '</p>'); } function close() { _modal.modal('hide'); @@ -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/_customVariables.scss b/themes/finc/scss/_customVariables.scss index 910a1a292dee5957b904b4037004ccc342eaee7b..25604076d843fc1ae658eaeeffe5f8fcd6da2718 100644 --- a/themes/finc/scss/_customVariables.scss +++ b/themes/finc/scss/_customVariables.scss @@ -151,6 +151,8 @@ $badge-link-hover-color: saturate($brand-danger, 50%) !default; ////// Sidebar Badge/fa Colors $sidebar-badge-fa-color: darken($brand-secondary, 40%) !default; +//// Navbar toggler +$navbar-default-toggle-hover-bg: $white !default; //// Accordion/Collapse Toggler $toggler: $snow !default; diff --git a/themes/finc/scss/compiled.scss b/themes/finc/scss/compiled.scss index 34912a74387ab0dbd774ea8ed3cbe1814ea72d3e..9e652f3cd80a983775ce812608c8311739755623 100644 --- a/themes/finc/scss/compiled.scss +++ b/themes/finc/scss/compiled.scss @@ -354,6 +354,7 @@ legend { .text-success { background-color: $brand-success; + margin-bottom: 0; } .text-danger { @@ -586,11 +587,13 @@ select { a.toggle { color: inherit; text-decoration: inherit; + &:active, &:focus, &:hover { text-decoration: inherit; } + &::after { font-family: 'FontAwesome'; content: $fa-var-angle-down; @@ -603,9 +606,11 @@ span.notation ul { @media (max-width: $screen-md-min) { padding-inline-start: 0; } + li { list-style-type: none; } + li:before { margin-right: 0.5em; font-family: 'FontAwesome'; @@ -1384,6 +1389,12 @@ header, .fa { font-size: 150%; } + + &:hover, + &:focus { + background-color: $navbar-default-toggle-hover-bg; + + } } //// navbar-right - add negative right margin to align last button in row to content in sidebar below (right padding) @@ -1401,6 +1412,7 @@ header, &:focus { background-color: $component-active-bg; // Same hover-color must be applied to 'Advanced Search' button below color: $white; + outline: 1px $white dotted; } } @@ -1713,6 +1725,12 @@ footer { width: 100%; } +.offcanvas-toggler { + @media print { + display: none; + } +} + // push record view icon to right (Desktop) on left-aligned sidebars -- pls NOTE: required offcanvas = true .offcanvas-left .media-left { @media (min-width: $screen-sm-min) { @@ -1774,6 +1792,13 @@ footer { } } +//// Harmonize behaviour to the edit button +.result-links .dropdown-toggle { + &:focus { + outline: 1px $black dotted; + } +} + //// Saved in .savedLists { @@ -1879,6 +1904,14 @@ footer { ////// Pagination & Searchtools - END +////// [List] view=tabs + +.template-dir-search.template-name-results .tab-content .offcanvas-toggler { + display: none; +} + +////// [List] view=tabs - END + //// Search results - END //// Record View (Detail view) @@ -1886,6 +1919,10 @@ footer { /////// The pager occurs in record/view but also in collection/view .pager { margin-bottom: 0; + + .disabled { + display: none; + } } ////// Pager - END @@ -2490,6 +2527,28 @@ footer ul { // Bookbag - END +// Result List + +.result-links { + // Favorites list in MyAccount + .edit.tool, + .del-button { + a { + margin-top: 1em; + + @media (max-width: $screen-sm-max) { + margin-top: 0; + } + } + + li a { + margin-top: 0; + } + } +} + +// Result List - END + // Translate feature (Admin panel) #set-translation-form { margin-top: 2em; @@ -2722,6 +2781,15 @@ input { } } +// Delete dropdown in favorites list +.open > .dropdown-menu { + .template-dir-myresearch.template-name-mylist .result-links & { + float: none; + position: relative; + } +} + + // AMSL .template-dir-amsl.template-name-sources-list { diff --git a/themes/finc/templates/Helpers/branchinfo.phtml b/themes/finc/templates/Helpers/branchinfo.phtml index e3a481f15d01d838e954e73eb045662b2eb246af..dc51222d8ab84606b916b3b016e9fcacc401df40 100644 --- a/themes/finc/templates/Helpers/branchinfo.phtml +++ b/themes/finc/templates/Helpers/branchinfo.phtml @@ -67,7 +67,7 @@ </div> <div class="row"> <?php if (isset($info['note'])): ?> - <div class="branch-note alert alert-info"> + <p class="branch-note alert alert-info"> <?php if (is_array($info['note'])): ?> <?php foreach ($info['note'] as $notes): ?> <?= $notes ?> @@ -75,7 +75,7 @@ <?php else: ?> <?= $info['note'] ?> <?php endif; ?> - </div> + </p> <?php endif; ?> </div> </td> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/collection-info.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/collection-info.phtml index d5ce34fdcc0f727148dc9688b9d1a34aab2d1813..fcd4bba892f0c6b2d12ea9b1414a3ad4f49a056b 100644 --- a/themes/finc/templates/RecordDriver/DefaultRecord/collection-info.phtml +++ b/themes/finc/templates/RecordDriver/DefaultRecord/collection-info.phtml @@ -34,9 +34,9 @@ <?php endif; ?> <?php /* Display the lists that this record is saved to */ ?> - <div class="savedLists hidden alert alert-info" id="savedLists"> + <p class="savedLists hidden alert alert-info" id="savedLists"> <strong><?=$this->transEsc("Saved in")?>:</strong> - </div> + </p> <?php /* finc-specific snippet - Begin - CK */ /* Do not set to 'hidden', make table below collapse in; adapt collection_record.js to keep accordion open - CK */ ?> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/core.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/core.phtml index d8bbee094b3bd606b4478de9d5196d638418a7c9..c254fb694053657433ec03fbd7cdecf0852a6cdd 100644 --- a/themes/finc/templates/RecordDriver/DefaultRecord/core.phtml +++ b/themes/finc/templates/RecordDriver/DefaultRecord/core.phtml @@ -53,9 +53,9 @@ <?php if ($this->userlist()->getMode() !== 'disabled'): ?> <?php /* Display the lists that this record is saved to */ ?> - <div class="savedLists hidden alert alert-info"> + <p class="savedLists hidden alert alert-info"> <strong><?= $this->transEsc("Saved in") ?>:</strong> - </div> + </p> <?php endif; ?> <?php /* Display Main Details */ ?> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/list-entry.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/list-entry.phtml index 9980b4f57099b2500c19e7fad5cef79f2cc8a3fb..991ba371499a349bff31bede9361361cf666133e 100644 --- a/themes/finc/templates/RecordDriver/DefaultRecord/list-entry.phtml +++ b/themes/finc/templates/RecordDriver/DefaultRecord/list-entry.phtml @@ -39,12 +39,12 @@ if ($cover): <?php $missing = $this->driver instanceof \VuFind\RecordDriver\Missing; ?> <?php if ($missing && $this->driver->isCachedRecord()): ?> <span class="title"><?=$this->record($this->driver)->getTitleHtml()?></span> - <div class="alert alert-info"> + <p class="alert alert-info"> <?= $this->translate('record_from_cache')?> <?php if ($queryParams = $this->record($this->driver)->getAdvancedSearchQueryParams()): ?> <br/><a href="<?=$this->url('search-results', [], ['query'=>$queryParams])?>"><?=$this->transEsc('search_cached_record', ['%%title_full%%' => $this->driver->getTitle()])?></a> <?php endif; ?> - </div> + </p> <?php elseif (!$missing): ?> <a href="<?=$this->recordLink()->getUrl($this->driver)?>" class="getFull" data-view="<?=$this->params->getOptions()->getListViewOption() ?>"> <span class="title"><?=$this->record($this->driver)->getTitleHtml()?></span> @@ -213,7 +213,7 @@ if ($cover): ?> <div class="dropdown"> <i class="fa fa-fw fa-trash-o" aria-hidden="true"></i> - <a class="dropdown-toggle" id="<?= $dLabel ?>" + <a class="dropdown-toggle del-button" id="<?= $dLabel ?>" role="button" data-toggle="dropdown" href="<?= $deleteUrlGet ?>"> <?= $this->transEsc('Delete') ?> @@ -260,4 +260,4 @@ if ($cover): <?php endif; ?> </div> </div> -<!-- finc: RecordDriver - DefaultRecord - list-entry - END --> \ No newline at end of file +<!-- finc: RecordDriver - DefaultRecord - list-entry - END --> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/result-list.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/result-list.phtml index 0a278226b22553f57def57ca00dcd66948fb8808..6baef95748b7f8840d8e78a07a38a48c5a700c41 100644 --- a/themes/finc/templates/RecordDriver/DefaultRecord/result-list.phtml +++ b/themes/finc/templates/RecordDriver/DefaultRecord/result-list.phtml @@ -215,9 +215,9 @@ $i = 0; <?=$block?> <?php endif; ?> <?php /* Saved lists */ ?> - <div class="savedLists alert alert-info hidden"> + <p class="savedLists alert alert-info hidden"> <strong><?=$this->transEsc("Saved in")?>:</strong> - </div> + </p> <?php endif; ?> <?php /* Hierarchy tree link; finc: keep Icon inside link - CK */ ?> diff --git a/themes/finc/templates/RecordDriver/FincMissing/result-list.phtml b/themes/finc/templates/RecordDriver/FincMissing/result-list.phtml index c527c275c5fe2c5ec3d541562d4e395013f82f45..ac12afe218d6bbb6d573191c4570de887a9b20cd 100644 --- a/themes/finc/templates/RecordDriver/FincMissing/result-list.phtml +++ b/themes/finc/templates/RecordDriver/FincMissing/result-list.phtml @@ -112,9 +112,9 @@ if ($cover): <?=$block?> <?php endif; ?> <?php /* Saved lists */ ?> - <div class="savedLists alert alert-info hidden"> + <p class="savedLists alert alert-info hidden"> <strong><?=$this->transEsc("Saved in")?>:</strong> - </div> + </p> <?php endif; ?> <?=$this->driver->supportsCoinsOpenUrl() ? '<span class="Z3988" title="' . $this->escapeHtmlAttr($this->driver->getCoinsOpenUrl()) . '"></span>' : ''?> diff --git a/themes/finc/templates/RecordDriver/SolrAI/core.phtml b/themes/finc/templates/RecordDriver/SolrAI/core.phtml index 8b89cbb631e37671072928111c28eaddab996eeb..85550c63194e1c7b09e2e18ef66db7aeda4e3d63 100644 --- a/themes/finc/templates/RecordDriver/SolrAI/core.phtml +++ b/themes/finc/templates/RecordDriver/SolrAI/core.phtml @@ -53,9 +53,9 @@ <?php if ($this->userlist()->getMode() !== 'disabled'): ?> <?php /* Display the lists that this record is saved to */ ?> - <div class="savedLists hidden alert alert-info"> + <p class="savedLists hidden alert alert-info"> <strong><?= $this->transEsc("Saved in") ?>:</strong> - </div> + </p> <?php endif; ?> <?php /* Display Main Details */ ?> diff --git a/themes/finc/templates/RecordDriver/SolrAI/result-list.phtml b/themes/finc/templates/RecordDriver/SolrAI/result-list.phtml index 29d6247448ab5853ccc82ef11c49f8e271a2a680..37b59c796055be28f670027ccd96cb3bf20a8d86 100644 --- a/themes/finc/templates/RecordDriver/SolrAI/result-list.phtml +++ b/themes/finc/templates/RecordDriver/SolrAI/result-list.phtml @@ -232,9 +232,9 @@ if ($cover): <?=$block?> <?php endif; ?> <?php /* Saved lists */ ?> - <div class="savedLists alert alert-info hidden"> + <p class="savedLists alert alert-info hidden"> <strong><?=$this->transEsc("Saved in")?>:</strong> - </div> + </p> <?php /* endif; */ ?> <?php /* Hierarchy tree link; finc: keep Icon inside link - CK */ ?> diff --git a/themes/finc/templates/RecordDriver/SolrLido/core.phtml b/themes/finc/templates/RecordDriver/SolrLido/core.phtml index 5ab8df4ee074515029f2f788bf0f97cbcf128812..7ff89c40e2447efb65cc2f80f18a041b505449a5 100644 --- a/themes/finc/templates/RecordDriver/SolrLido/core.phtml +++ b/themes/finc/templates/RecordDriver/SolrLido/core.phtml @@ -77,9 +77,9 @@ <?php if ($this->userlist()->getMode() !== 'disabled'): ?> <?php /* Display the lists that this record is saved to */ ?> - <div class="savedLists hidden alert alert-info"> + <p class="savedLists hidden alert alert-info"> <strong><?=$this->transEsc("Saved in")?>:</strong> - </div> + </p> <?php endif; ?> <?php /* Display Main Details */ ?> @@ -106,4 +106,4 @@ <?php /* End Main Details */ ?> </div> </div> -<!-- finc: RecordDriver - solrLido - core - END --> \ No newline at end of file +<!-- finc: RecordDriver - solrLido - core - END --> diff --git a/themes/finc/templates/RecordDriver/SolrMarc/core.phtml b/themes/finc/templates/RecordDriver/SolrMarc/core.phtml index 674a194a3693b705d2bc7c1e7750de9f84e33f3b..62ca005ec177d49d5bd7eaf67169c92bc4495bb0 100644 --- a/themes/finc/templates/RecordDriver/SolrMarc/core.phtml +++ b/themes/finc/templates/RecordDriver/SolrMarc/core.phtml @@ -53,9 +53,9 @@ <?php if ($this->userlist()->getMode() !== 'disabled'): ?> <?php /* Display the lists that this record is saved to */ ?> - <div class="savedLists hidden alert alert-info"> + <p class="savedLists hidden alert alert-info"> <strong><?= $this->transEsc("Saved in") ?>:</strong> - </div> + </p> <?php endif; ?> <?php /* Display Main Details */ ?> diff --git a/themes/finc/templates/RecordTab/hierarchytree.phtml b/themes/finc/templates/RecordTab/hierarchytree.phtml index abb953965e0e15919745af3b3a2bc1257105e5fd..0c5f7f1879a63203bbb26f691421c32928f8dad5 100644 --- a/themes/finc/templates/RecordTab/hierarchytree.phtml +++ b/themes/finc/templates/RecordTab/hierarchytree.phtml @@ -46,8 +46,8 @@ <input type="submit" class="btn btn-transparent" value="<?=$this->transEsc('Search') ?>"/> <i id="treeSearchLoadingImg" class="fa fa-spinner fa-spin hidden" aria-hidden="true"></i> </div> - <div id="treeSearchNoResults" class="alert alert-danger hidden"><?=$this->translate('nohit_heading')?></div> - <div id="treeSearchLimitReached" class="alert alert-danger hidden"><?=$this->translate('tree_search_limit_reached_html', ['%%url%%' => $this->url('search-results'), '%%limit%%' => $this->tab->getSearchLimit()])?></div> + <p id="treeSearchNoResults" class="alert alert-danger hidden"><?=$this->translate('nohit_heading')?></p> + <p id="treeSearchLimitReached" class="alert alert-danger hidden"><?=$this->translate('tree_search_limit_reached_html', ['%%url%%' => $this->url('search-results'), '%%limit%%' => $this->tab->getSearchLimit()])?></p> <?php endif; ?> <div id="hierarchyLoading" class="hide"><i class="fa fa-spinner fa-spin" aria-hidden="true"></i> <?=$this->transEsc("Loading")?>...</div> <div id="hierarchyTree" class="hierarchy-tree"> diff --git a/themes/finc/templates/RecordTab/holdingsils.phtml b/themes/finc/templates/RecordTab/holdingsils.phtml index 0d631f88d4fdcc04b4d869b7d208cf1fe9e8bd83..90f4cd7d4eb475ccf493af3f106b895297376861 100644 --- a/themes/finc/templates/RecordTab/holdingsils.phtml +++ b/themes/finc/templates/RecordTab/holdingsils.phtml @@ -35,22 +35,22 @@ <?=$this->context($this)->renderInContext('librarycards/selectcard.phtml', ['user' => $this->auth()->isLoggedIn()]);?> <?php if (!empty($holdings['blocks'])): ?> - <div id="account-block-msg" class="alert alert-danger"> + <p id="account-block-msg" class="alert alert-danger"> <?=$this->transEsc('account_block_options_missing', ['%%details%%' => implode('; ', $holdings['blocks'])])?> - </div> + </p> <?php endif; ?> <?=($offlineMode == "ils-offline") ? $this->render('Helpers/ils-offline.phtml', ['offlineModeMsg' => 'ils_offline_holdings_message']) : ''?> <?php if (($this->ils()->getHoldsMode() == 'driver' && !empty($holdings['holdings'])) || $this->ils()->getTitleHoldsMode() == 'driver'): ?> <?php if ($account->loginEnabled() && $offlineMode != 'ils-offline'): ?> <?php if (!$user): ?> - <div class="alert alert-info"> + <p class="alert alert-info"> <a href="<?=$this->recordLink()->getTabUrl($this->driver, 'Holdings')?>?login=true&catalogLogin=true" data-lightbox><?=$this->transEsc("hold_login")?></a> - </div> + </p> <?php elseif (!$user->cat_username): ?> - <div class="alert alert-info"> + <p class="alert alert-info"> <?=$this->translate("hold_profile_html", ['%%url%%' => $this->recordLink()->getTabUrl($this->driver, 'Holdings') . '?catalogLogin=true'])?> - </div> + </p> <?php endif; ?> <?php endif; ?> <?php endif; ?> diff --git a/themes/finc/templates/admin/home.phtml b/themes/finc/templates/admin/home.phtml new file mode 100644 index 0000000000000000000000000000000000000000..5e8aa62a4df836ff1d9e1273b9cc352803b0394d --- /dev/null +++ b/themes/finc/templates/admin/home.phtml @@ -0,0 +1,52 @@ +<!-- finc: admin/home --> +<?php + /** @deprecated since v6.1 + * #18044 template needed to FIX bootstrap casting error in uptime display with '(int)' instead of '(string)' + */ + + // Set page title. + $this->headTitle($this->translate('VuFind Administration - Home')); + + // Set up map of core name => label + $coreLabels = [ + 'biblio' => $this->translate('Bibliographic Index'), + 'authority' => $this->translate('Authority Index'), + ]; +?> +<div class="<?=$this->layoutClass('mainbody')?>"> + <h2><?=$this->transEsc('VuFind Administration')?></h2> + <?php $cores = is_object($this->xml) ? $this->xml->xpath('/response/lst[@name="status"]/lst') : []; ?> + <?php foreach ($cores as $core): ?> + <?php $coreName = (string)$core['name']; ?> + <?php $coreLabel = $coreLabels[$coreName] ?? ucwords($coreName) . ' Index'; ?> + <h3><?=$this->transEsc($coreLabel)?></h3> + <table class="table table-striped"> + <tr> + <th><?=$this->transEsc('Record Count')?>: </th> + <?php $recordCount = $core->xpath('//lst[@name="' . $coreName . '"]/lst/int[@name="numDocs"]') ?> + <td><?=$this->escapeHtml((string)array_pop($recordCount))?></td> + </tr> + <tr> + <th><?=$this->transEsc('Start Time')?>: </th> + <?php $startTime = $core->xpath('//lst[@name="' . $coreName . '"]/date[@name="startTime"]') ?> + <td><?=$this->escapeHtml(strftime("%b %d, %Y %l:%M:%S%p", strtotime((string)array_pop($startTime))))?></td> + </tr> + <tr> + <th><?=$this->transEsc('Last Modified')?>: </th> + <?php $lastModified = $core->xpath('//lst[@name="' . $coreName . '"]/lst/date[@name="lastModified"]') ?> + <td><?=$this->escapeHtml(strftime("%b %d, %Y %l:%M:%S%p", strtotime((string)array_pop($lastModified))))?></td> + </tr> + <tr> + <th><?=$this->transEsc('Uptime')?>: </th> + <?php $uptime = $core->xpath('//lst[@name="' . $coreName . '"]/long[@name="uptime"]') ?> + <?php /* #18044 fix casting error in uptime display - solved in Vufind 6 */ ?> + <td><?=$this->printms((int)array_pop($uptime))?></td> + </tr> + </table> + <?php endforeach; ?> +</div> + +<div class="<?=$this->layoutClass('sidebar')?>"> + <?=$this->render("admin/menu.phtml")?> +</div> +<!-- finc: admin/home - END --> diff --git a/themes/finc/templates/layout/layout.phtml b/themes/finc/templates/layout/layout.phtml index 2db1002ed24142e7b60fbe138a54d0219c5a8090..66144aaff1cb2644c48bd0a9519d4cb30329063d 100644 --- a/themes/finc/templates/layout/layout.phtml +++ b/themes/finc/templates/layout/layout.phtml @@ -157,19 +157,21 @@ if (!isset($this->layout()->searchbox)) { <span class="sr-only" role="heading" aria-level="1"><?=$this->layout()->srmessage?></span> <?php endif; ?> -<?php /* Show skip to search link only when page is not "advanced" search, CK */ ?> -<?php if (strtolower($this->layout()->templateName) !== 'advanced'): ?> - <a class="sr-only" href="#searchForm_lookfor"><?=$this->transEsc('Skip to search')?></a> -<?php endif; ?> -<a class="sr-only" href="#content"><?=$this->transEsc('Skip to content')?></a> -<?php if (substr_count(strtolower($this->layout()->templateName), 'results') > 0): ?> - <?php if (strcmp($this->layout()->userLang, 'de') == 0): ?> - <a class="sr-only hidden-xs" href="#myresearch-sidebar"><?=$this->transEsc(isset($this->overrideSideFacetCaption) ? $this->overrideSideFacetCaption : 'Narrow Search')?></a> - <?php else: ?> - <a class="sr-only hidden-xs" href="#myresearch-sidebar"><?=$this->transEsc('skip-to')?><?=strtolower($this->transEsc(isset($this->overrideSideFacetCaption) ? $this->overrideSideFacetCaption : 'Narrow Search'))?></a> +<?php /* Add landmark role to avoid 'all content must be inside landmarks error', CK */ ?> +<div role="navigation" aria-label="Skip_navigation_links"> + <?php /* Show skip to search link only when page is not "advanced" search, CK */ ?> + <?php if (strtolower($this->layout()->templateName) !== 'advanced'): ?> + <a class="sr-only" href="#searchForm_lookfor"><?=$this->transEsc('Skip to search')?></a> <?php endif; ?> -<?php endif; ?> - + <a class="sr-only" href="#content"><?=$this->transEsc('Skip to content')?></a> + <?php if (substr_count(strtolower($this->layout()->templateName), 'results') > 0): ?> + <?php if (strcmp($this->layout()->userLang, 'de') == 0): ?> + <a class="sr-only hidden-xs" href="#myresearch-sidebar"><?=$this->transEsc(isset($this->overrideSideFacetCaption) ? $this->overrideSideFacetCaption : 'Narrow Search')?></a> + <?php else: ?> + <a class="sr-only hidden-xs" href="#myresearch-sidebar"><?=$this->transEsc('skip-to')?><?=strtolower($this->transEsc(isset($this->overrideSideFacetCaption) ? $this->overrideSideFacetCaption : 'Narrow Search'))?></a> + <?php endif; ?> + <?php endif; ?> +</div> <?php /* Start header here, not above, custom finc, CK */ ?> <header class="hidden-print"> 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/checkedout.phtml b/themes/finc/templates/myresearch/checkedout.phtml index 8c9fb4c8fa7860bf35165a68700a6e7001451a2e..8f19100634f8ce669f73c8eb302b6b34e8655702 100644 --- a/themes/finc/templates/myresearch/checkedout.phtml +++ b/themes/finc/templates/myresearch/checkedout.phtml @@ -64,9 +64,9 @@ <?php $renewDetails = $this->renewResult[$ilsDetails['item_id']]; ?> <?php $prefix = $ilsDetails['title'] ?? $ilsDetails['item_id']; ?> <?php if (isset($renewDetails['success']) && $renewDetails['success']): ?> - <div class="alert alert-success"><?=$this->escapeHtml($prefix . ': ') . $this->transEsc('renew_success')?></div> + <p class="alert alert-success"><?=$this->escapeHtml($prefix . ': ') . $this->transEsc('renew_success')?></p> <?php else: ?> - <div class="alert alert-danger"><?=$this->escapeHtml($prefix . ': ') . $this->transEsc('renew_fail')?><?php if (isset($renewDetails['sysMessage'])): ?>: <?=$this->escapeHtml($renewDetails['sysMessage'])?><?php endif; ?></div> + <p class="alert alert-danger"><?=$this->escapeHtml($prefix . ': ') . $this->transEsc('renew_fail')?><?php if (isset($renewDetails['sysMessage'])): ?>: <?=$this->escapeHtml($renewDetails['sysMessage'])?><?php endif; ?></p> <?php endif; ?> <?php endif; ?> <?php if (isset($ilsDetails['renewable']) && $ilsDetails['renewable'] && isset($ilsDetails['renew_details'])): ?> @@ -173,24 +173,24 @@ <?php if (isset($renewDetails['success']) && $renewDetails['success']): ?> <?php $showStatus = false; ?> <strong><?=$this->transEsc('Due Date')?>: <?=$this->escapeHtml($renewDetails['new_date'])?> <?php if (isset($renewDetails['new_time'])): ?><?=$this->escapeHtml($renewDetails['new_time'])?><?php endif; ?></strong> - <div class="alert alert-success"><?=$this->transEsc('renew_success')?></div> + <p class="alert alert-success"><?=$this->transEsc('renew_success')?></p> <?php else: ?> <strong><?=$this->transEsc('Due Date')?>: <?=$this->escapeHtml($ilsDetails['duedate'])?><?php if (isset($ilsDetails['dueTime'])): ?> <?=$this->escapeHtml($ilsDetails['dueTime'])?><?php endif; ?></strong> - <div class="alert alert-danger"><?=$this->transEsc('renew_fail')?><?php if (isset($renewDetails['sysMessage'])): ?>: <?=$this->escapeHtml($renewDetails['sysMessage'])?><?php endif; ?></div> + <p class="alert alert-danger"><?=$this->transEsc('renew_fail')?><?php if (isset($renewDetails['sysMessage'])): ?>: <?=$this->escapeHtml($renewDetails['sysMessage'])?><?php endif; ?></p> <?php endif; ?> <?php else: ?> <strong><?=$this->transEsc('Due Date')?>: <?=$this->escapeHtml($ilsDetails['duedate'])?><?php if (isset($ilsDetails['dueTime'])): ?> <?=$this->escapeHtml($ilsDetails['dueTime'])?><?php endif; ?></strong> <?php if ($showStatus): ?> <?php if (isset($ilsDetails['dueStatus']) && $ilsDetails['dueStatus'] == "overdue"): ?> - <div class="alert alert-danger"><?=$this->transEsc("renew_item_overdue")?></div> + <p class="alert alert-danger"><?=$this->transEsc("renew_item_overdue")?></p> <?php elseif (isset($ilsDetails['dueStatus']) && $ilsDetails['dueStatus'] == "due"): ?> - <div class="alert alert-info"><?=$this->transEsc("renew_item_due")?></div> + <p class="alert alert-info"><?=$this->transEsc("renew_item_due")?></p> <?php endif; ?> <?php endif; ?> <?php endif; ?> <?php if ($showStatus && isset($ilsDetails['message']) && !empty($ilsDetails['message'])): ?> - <div class="alert alert-info"><?=$this->transEsc($ilsDetails['message'])?></div> + <p class="alert alert-info"><?=$this->transEsc($ilsDetails['message'])?></p> <?php endif; ?> <?php if (isset($ilsDetails['renewable']) && $ilsDetails['renewable'] && isset($ilsDetails['renew_link'])): ?> <a href="<?=$this->escapeHtmlAttr($ilsDetails['renew_link'])?>"><?=$this->transEsc('renew_item')?></a> diff --git a/themes/finc/templates/myresearch/historicloans.phtml b/themes/finc/templates/myresearch/historicloans.phtml index 8b713395b0d48a0edae5c227f39fec74ddea76af..12466e0632ff5324631e42a678d22c7ee839cbce 100644 --- a/themes/finc/templates/myresearch/historicloans.phtml +++ b/themes/finc/templates/myresearch/historicloans.phtml @@ -115,7 +115,7 @@ <?php endif; ?> <?php if (isset($ilsDetails['message']) && !empty($ilsDetails['message'])): ?> - <div class="alert alert-info"><?=$this->transEsc($ilsDetails['message'])?></div> + <p class="alert alert-info"><?=$this->transEsc($ilsDetails['message'])?></p> <?php endif; ?> </div> <?php if ($thumbnail && $thumbnailAlignment == 'right'): ?> diff --git a/themes/finc/templates/myresearch/holds.phtml b/themes/finc/templates/myresearch/holds.phtml index e837c575c5a9b1e3ce0e52645546dc1421746302..3411313aa62811d8999cebf9d09b93192a7b48d5 100644 --- a/themes/finc/templates/myresearch/holds.phtml +++ b/themes/finc/templates/myresearch/holds.phtml @@ -148,21 +148,21 @@ <?php if (isset($this->cancelResults['items'])): ?> <?php foreach ($this->cancelResults['items'] as $itemId => $cancelResult): ?> <?php if ($itemId == $ilsDetails['item_id'] && $cancelResult['success'] == false): ?> - <div class="alert alert-danger"><?=$this->transEsc($cancelResult['status']) ?><?php if ($cancelResult['sysMessage']) echo ' : ' . $this->transEsc($cancelResult['sysMessage']); ?></div> + <p class="alert alert-danger"><?=$this->transEsc($cancelResult['status']) ?><?php if ($cancelResult['sysMessage']) echo ' : ' . $this->transEsc($cancelResult['sysMessage']); ?></p> <?php endif; ?> <?php endforeach; ?> <?php endif; ?> <?php if (isset($ilsDetails['available']) && $ilsDetails['available'] == true): ?> - <div class="text-success"> + <p class="text-success"> <?php if (!empty($ilsDetails['last_pickup_date'])): ?> <?=$this->transEsc('hold_available_until', ['%%date%%' => $ilsDetails['last_pickup_date']]) ?> <?php else: ?> <?=$this->transEsc('hold_available') ?> <?php endif; ?> - </div> + </p> <?php elseif (isset($ilsDetails['in_transit']) && $ilsDetails['in_transit']): ?> - <div class="text-success"><?=$this->transEsc('request_in_transit') . (is_string($ilsDetails['in_transit']) ? ': ' . $this->transEsc('institution_' . $ilsDetails['in_transit'], [], $ilsDetails['in_transit']) : '') ?></div> + <p class="text-success"><?=$this->transEsc('request_in_transit') . (is_string($ilsDetails['in_transit']) ? ': ' . $this->transEsc('institution_' . $ilsDetails['in_transit'], [], $ilsDetails['in_transit']) : '') ?></p> <?php elseif (isset($ilsDetails['position'])): ?> <p><strong><?=$this->transEsc("hold_queue_position") ?>:</strong> <?=$this->escapeHtml($ilsDetails['position']) ?></p> <?php endif; ?> diff --git a/themes/finc/templates/myresearch/illrequests.phtml b/themes/finc/templates/myresearch/illrequests.phtml index 26691d254987144ba5104d9d1885b726e72318f2..eab38c18839cd61ac5fd6f9436fe4916aa234760 100644 --- a/themes/finc/templates/myresearch/illrequests.phtml +++ b/themes/finc/templates/myresearch/illrequests.phtml @@ -144,22 +144,22 @@ <?php if (isset($this->cancelResults['items'])): ?> <?php foreach ($this->cancelResults['items'] as $itemId => $cancelResult): ?> <?php if ($itemId == $ilsDetails['item_id'] && $cancelResult['success'] == false): ?> - <div class="alert alert-danger"><?=$this->transEsc($cancelResult['status']) ?><?php if ($cancelResult['sysMessage']) echo ' : ' . $this->transEsc($cancelResult['sysMessage']); ?></div> + <p class="alert alert-danger"><?=$this->transEsc($cancelResult['status']) ?><?php if ($cancelResult['sysMessage']) echo ' : ' . $this->transEsc($cancelResult['sysMessage']); ?></p> <?php endif; ?> <?php endforeach; ?> <?php endif; ?> <?php if (isset($ilsDetails['in_transit']) && $ilsDetails['in_transit']): ?> - <div class="text-success"><?=$this->transEsc("request_in_transit") . (is_string($ilsDetails['in_transit']) ? ': ' . $this->transEsc('institution_' . $ilsDetails['in_transit'], [], $ilsDetails['in_transit']) : '') ?></div> + <p class="text-success"><?=$this->transEsc("request_in_transit") . (is_string($ilsDetails['in_transit']) ? ': ' . $this->transEsc('institution_' . $ilsDetails['in_transit'], [], $ilsDetails['in_transit']) : '') ?></p> <?php endif; ?> <?php if (isset($ilsDetails['processed']) && $ilsDetails['processed']): ?> - <div class="text-success"><?=$this->transEsc("ill_request_processed") . (is_string($ilsDetails['processed']) ? ': ' . $ilsDetails['processed'] : '') ?></div> + <p class="text-success"><?=$this->transEsc("ill_request_processed") . (is_string($ilsDetails['processed']) ? ': ' . $ilsDetails['processed'] : '') ?></p> <?php endif; ?> <?php if (isset($ilsDetails['available']) && $ilsDetails['available']): ?> - <div class="text-success"><?=$this->transEsc("ill_request_available") ?></div> + <p class="text-success"><?=$this->transEsc("ill_request_available") ?></p> <?php endif; ?> <?php if (isset($ilsDetails['canceled']) && $ilsDetails['canceled']): ?> - <div class="text-success"><?=$this->transEsc("ill_request_canceled") . (is_string($ilsDetails['canceled']) ? ': ' . $ilsDetails['canceled'] : '') ?></div> + <p class="text-success"><?=$this->transEsc("ill_request_canceled") . (is_string($ilsDetails['canceled']) ? ': ' . $ilsDetails['canceled'] : '') ?></p> <?php endif; ?> <?php if (isset($ilsDetails['cancel_link'])): ?> <p><a href="<?=$this->escapeHtmlAttr($ilsDetails['cancel_link']) ?>"><?=$this->transEsc("ill_request_cancel") ?></a></p> 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; ?> diff --git a/themes/finc/templates/myresearch/storageretrievalrequests.phtml b/themes/finc/templates/myresearch/storageretrievalrequests.phtml index 6e8920b2ae8a2299ec4942f8809c38fb9d69ee3a..e01f8e1d7d2243e8d0170c9b08fe5a9d159b3cb9 100644 --- a/themes/finc/templates/myresearch/storageretrievalrequests.phtml +++ b/themes/finc/templates/myresearch/storageretrievalrequests.phtml @@ -143,19 +143,19 @@ <?php if (isset($this->cancelResults['items'])): ?> <?php foreach ($this->cancelResults['items'] as $itemId => $cancelResult): ?> <?php if ($itemId == $ilsDetails['item_id'] && $cancelResult['success'] == false): ?> - <div class="alert alert-danger"><?=$this->transEsc($cancelResult['status']) ?><?php if ($cancelResult['sysMessage']) echo ' : ' . $this->transEsc($cancelResult['sysMessage']); ?></div> + <p class="alert alert-danger"><?=$this->transEsc($cancelResult['status']) ?><?php if ($cancelResult['sysMessage']) echo ' : ' . $this->transEsc($cancelResult['sysMessage']); ?></p> <?php endif; ?> <?php endforeach; ?> <?php endif; ?> <?php if (isset($ilsDetails['processed']) && $ilsDetails['processed']): ?> - <div class="text-success"><?=$this->transEsc("storage_retrieval_request_processed") . (is_string($ilsDetails['processed']) ? ': ' . $ilsDetails['processed'] : '') ?></div> + <p class="text-success"><?=$this->transEsc("storage_retrieval_request_processed") . (is_string($ilsDetails['processed']) ? ': ' . $ilsDetails['processed'] : '') ?></p> <?php endif; ?> <?php if (isset($ilsDetails['available']) && $ilsDetails['available']): ?> - <div class="text-success"><?=$this->transEsc("storage_retrieval_request_available") ?></div> + <p class="text-success"><?=$this->transEsc("storage_retrieval_request_available") ?></p> <?php endif; ?> <?php if (isset($ilsDetails['canceled']) && $ilsDetails['canceled']): ?> - <div class="text-success"><?=$this->transEsc("storage_retrieval_request_canceled") . (is_string($ilsDetails['canceled']) ? ': ' . $ilsDetails['canceled'] : '') ?></div> + <p class="text-success"><?=$this->transEsc("storage_retrieval_request_canceled") . (is_string($ilsDetails['canceled']) ? ': ' . $ilsDetails['canceled'] : '') ?></p> <?php endif; ?> <?php if (isset($ilsDetails['cancel_link'])): ?> <p><a href="<?=$this->escapeHtmlAttr($ilsDetails['cancel_link']) ?>"><?=$this->transEsc("storage_retrieval_request_cancel") ?></a></p> diff --git a/themes/finc/templates/search/history.phtml b/themes/finc/templates/search/history.phtml index f66a1c5c7df4e8c7d313814c226c911174780e58..c02bed89bc87cb8b513a8f680693f0a4a70e7e34 100644 --- a/themes/finc/templates/search/history.phtml +++ b/themes/finc/templates/search/history.phtml @@ -3,16 +3,20 @@ // Set page title. $this->headTitle($this->translate('Search History')); + $loginEnabled = is_object($account = $this->auth()->getManager()) && $account->loginEnabled(); + // Set up breadcrumbs: - $this->layout()->breadcrumbs = '<li><a href="' . $this->url('myresearch-home') . '">' . $this->transEsc('Your Account') . '</a></li>' - . '<li class="active">' . $this->transEsc('History') . '</li>'; + $this->layout()->breadcrumbs = ($loginEnabled ? '<li><a href="' . $this->url('myresearch-home') . '">' . $this->transEsc('Your Account') . '</a></li>' + : '') . '<li class="active">' . $this->transEsc('History') . '</li>'; $saveSupported = $this->accountCapabilities()->getSavedSearchSetting() === 'enabled'; ?> -<a class="search-filter-toggle visible-xs" href="#myresearch-sidebar" data-toggle="offcanvas" title="Expand Sidebar"> - <?=$this->transEsc('Your Account') ?> -</a> +<?php if ($saveSupported): ?> + <a class="search-filter-toggle visible-xs" href="#myresearch-sidebar" data-toggle="offcanvas" title="Expand Sidebar"> + <?=$this->transEsc('Your Account') ?> + </a> +<?php endif; ?> <div class="<?=$this->layoutClass('mainbody')?>"> <?=$this->flashmessages()?> diff --git a/themes/finc/theme.config.php b/themes/finc/theme.config.php index 06d4ee532cace75b842d66ea554d8d5427d80d17..bf5726986a17fb9ec87eebcbed702bc10d8a40bb 100644 --- a/themes/finc/theme.config.php +++ b/themes/finc/theme.config.php @@ -1,6 +1,6 @@ <?php return [ - 'extends' => 'bootstrap3', + 'extends' => 'finc-accessibility', 'js' => [ 'check_item_statuses.js', 'lightbox_form_cache.js', @@ -15,6 +15,7 @@ return [ 'resultfeed' => 'finc\View\Helper\Root\ResultFeed', 'recordLink' => 'finc\View\Helper\Root\RecordLink', 'record' => 'finc\View\Helper\Root\Record', + 'flashmessages' => 'finc\View\Helper\Root\Flashmessages', ], 'factories' => [ 'finc\View\Helper\Root\BranchInfo' => @@ -36,7 +37,9 @@ return [ 'VuFind\View\Helper\Root\RecordDataFormatter' => 'finc\View\Helper\Root\RecordDataFormatterFactory', 'finc\View\Helper\Root\ResultFeed' => - 'VuFind\View\Helper\Root\ResultFeedFactory' + 'VuFind\View\Helper\Root\ResultFeedFactory', + 'finc\View\Helper\Root\Flashmessages' => + 'VuFind\View\Helper\Root\FlashmessagesFactory', ] ] ];