Copyright (C) 2017 The Open Library Foundation
This software is distributed under the terms of the Apache License, Version 2.0. See the file "LICENSE" for more information.
Ui-Elf is the user interface for mod-elf. Mod-Elf is an Okapi module that provides the webservices for an electronic loanable form, abbreviated ELF.
The default favicon can be replaced with an alternative 16 x 16
favicon.
- Move the favicon to your desktop and name it
favicon.png
. - Replace the default ELF favicon with your favicon.
mv ~/Desktop/favicon.png ~/Desktop/folio/ui/ui-elf/src/main/resources/static/favicon.png
ELF requires some FOLIO specific information in order to be able to interact with FOLIO web services.
- Open settings.js
code ~/Desktop/folio/ui/ui-elf/src/main/resources/static/assets/js/settings.js
- Enter your FOLIO specific information.
// FOLIO settings const USERNAME = 'diku_admin'; const PASSWORD = 'admin'; const TENANT = 'diku'; const HOST = 'http://localhost:9130';
The settings.js
file also allows the user to customize the technology loan agreement.
- Open settings.js
code ~/Desktop/folio/ui/ui-elf/src/main/resources/static/assets/js/settings.js
- Change the library specific information under the
agreement settings
section.// agreement settings const PENALTY = "12,25 €/day"; const FILE_DURATION = "6 months"; const LEGAL_NOTICE = "<p>Notice: <i>Warning of Copyright Restrictions. The copyright law of the United States (title 17, United States Code) governs the reproduction, distribution, adaptation, public performance, and public display of copyrighted material. A person who uses technology to make an unauthorized copy of copyrighted material may be liable for copyright infringement unless they have a valid justification for making the copy, such as fair use.</i></p>"; const RETURN_LOCATION = "Datalogisk Institut Loanable Technology Desk";
mvn clean install
- Ensure that Okapi and all relevant modules have been started. See
mod-elf
'sREADME.md
before proceeding to the next step. - Run the executable jar file.
java -jar ~/Desktop/folio/ui/ui-elf/target/folio-elf-vertx-fat.jar
- Visit http://localhost:8080/static/index.html in a web browser.
- Click
Checkout
. - User
339583595735124
should returnBotsford, Larue
. - Item
765475420716
should returnAsus Tablet
.
Ui-Elf is a purely static website. All of the files necessary to run Ui-Elf can be found in the static
directory:
cd ~/Desktop/folio/ui/ui-elf/src/main/resources/static
ls -l
For convenience, the static files are bundled into a lightweight Vert.x server (i.e. folio-elf-vertx-fat.jar
); however, the files can be served using any other static webserver as well (e.g. nginx, apache, etc.).
Since Ui-Elf depends on FOLIO credentials being entered into settings.js
, Ui-Elf will need to be secured behind a different authentication system. For example, a single sign-on solution, such as shibboleth
, would work well.