library: one address - Add books inside the staff site, plus Find a book

- Apache in the Koha container serves Quick Add at /add/ on the staff site
  (KOHA_QUICKADD_URL); koha now starts after quickadd so the name resolves
- Quick Add: relative API paths so it works at / and /add/; Add books / Find a
  book tabs; search by title, author or ISBN showing each copy's shelf and status
  (/api/search); Manage and Public catalogue links
- staff home gets a 'Library tools' block (HTML customizations, how Koha 26.05
  stores it) linking to Add books
- installer, kiosk add-on and READMEs advertise one main address; the public
  catalogue stays on its own port (Koha gives public and staff sites the same URL
  shapes, so they cannot share one address)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013wi3ZSot4XbUViwRFgLpRf
This commit is contained in:
Claude
2026-11-06 21:38:09 +00:00
parent 5fc7450af7
commit 522a33b127
9 changed files with 165 additions and 24 deletions
+13
View File
@@ -153,6 +153,19 @@ Koha::CirculationRules->set_rules({
},
});
# ---- Staff home page: a "Library tools" block with a link to the Add books page ----
# (Koha 26.05 stores these in the HTML customizations tool, not in a preference.)
{
my $html = '<div class="main-heading"><h3>Library tools</h3></div><ul class="list-unstyled">'
. '<li><a class="btn btn-primary" href="/add/">Add books (scan an ISBN)</a></li>'
. '<li><a href="/add/#find">Find a book</a></li></ul>';
$dbh->do(q{INSERT INTO additional_contents (category, code, location, branchcode, published_on, number)
VALUES ('html_customizations', 'library_tools', 'IntranetmainUserblock', NULL, CURDATE(), 1)});
my $id = $dbh->last_insert_id( undef, undef, 'additional_contents', 'id' );
$dbh->do( q{INSERT INTO additional_contents_localizations (additional_content_id, title, content, lang)
VALUES (?, 'Library tools', ?, 'default')}, undef, $id, $html );
}
# ---- Preferences ----------------------------------------------------------
my %prefs = (
autoBarcode => 'OFF', # barcodes are assigned by Quick Add (zero-padded, or none/scanned on request)