Bug 38718: Main container - Catalogue

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Jonathan Druart 2025-01-06 13:36:16 +01:00 committed by Katrin Fischer
parent e8a52b1c8a
commit a288742564
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
18 changed files with 52 additions and 221 deletions

View File

@ -68,25 +68,30 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
my $biblio = Koha::Biblios->find( $biblionumber );
unless ( $biblionumber && $biblio ) {
# biblionumber invalid -> report and exit
$template->param( unknownbiblionumber => 1,
biblionumber => $biblionumber
);
output_html_with_http_headers $query, $cookie, $template->output;
exit;
# biblionumber invalid -> report and exit
$template->param(
blocking_error => 'unknown_biblionumber',
biblionumber => $biblionumber
);
output_html_with_http_headers $query, $cookie, $template->output;
exit;
}
my $record =
$biblio->metadata_record( { embed_items => 1, interface => 'intranet' } );
if ( not defined $record ) {
# biblionumber invalid -> report and exit
$template->param( unknownbiblionumber => 1,
biblionumber => $biblionumber
);
output_html_with_http_headers $query, $cookie, $template->output;
exit;
# biblionumber invalid -> report and exit
$template->param(
blocking_error => 'unknown_biblionumber',
biblionumber => $biblionumber
);
output_html_with_http_headers $query, $cookie, $template->output;
exit;
}
my $framework = $biblio->frameworkcode;
my $res = GetISBDView({
'record' => $record,

View File

@ -93,14 +93,17 @@ my $biblio_object = Koha::Biblios->find( $biblionumber ); # FIXME Should replace
my $record = $biblio_object ? $biblio_object->metadata_record( { embed_items => 1 } ) : undef;
if ( !$record ) {
# biblionumber invalid -> report and exit
$template->param( unknownbiblionumber => 1,
biblionumber => $biblionumber
$template->param(
blocking_error => 'unknown_biblionumber',
biblionumber => $biblionumber
);
output_html_with_http_headers $query, $cookie, $template->output;
exit;
}
my $tagslib = &GetMarcStructure(1,$frameworkcode);
my $biblio = GetBiblioData($biblionumber);

View File

@ -98,7 +98,7 @@ $template->param(
unless ( $biblio ) {
# biblionumber invalid -> report and exit
$template->param( unknownbiblionumber => 1,
$template->param( blocking_error => 'unknown_biblionumber',
biblionumber => $biblionumber );
output_html_with_http_headers $query, $cookie, $template->output;
exit;

View File

@ -57,9 +57,11 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
my $biblio_object = Koha::Biblios->find( $biblionumber ); # FIXME Should replace $biblio
unless ($biblio_object) {
# biblionumber invalid -> report and exit
$template->param( unknownbiblionumber => 1,
biblionumber => $biblionumber
$template->param(
blocking_error => 'unknown_biblionumber',
biblionumber => $biblionumber
);
output_html_with_http_headers $query, $cookie, $template->output;
exit;

View File

@ -5,6 +5,8 @@
[% CASE 'cannot_see_patron_infos' %]This account cannot view requested patron information.
[% CASE 'unknown_biblio' %]
<div class="alert alert-info">Bibliographic record not found.</div>
[% CASE 'unknown_biblionumber' %]
<div class="alert alert-info">The record you requested does not exist ([% biblionumber | html %]).</div>
[% CASE 'unknown_item' %]
<div class="alert alert-info">Item not found.</div>
[% CASE 'unknown_subscription' %]

View File

@ -18,6 +18,7 @@
[% CASE 'acquisitions-menu' %][% INCLUDE 'acquisitions-menu.inc' %]
[% CASE 'admin-menu' %][% INCLUDE 'admin-menu.inc' %]
[% CASE 'biblio-view-menu' %][% INCLUDE 'biblio-view-menu.inc' %]
[% CASE 'facets' %][% INCLUDE 'facets.inc' %]
[% CASE 'vendor-menu' %][% INCLUDE 'vendor-menu.inc' %]
[% CASE 'subscriptions-search' %][% INCLUDE 'subscriptions-search.inc' %]
[% END %]

View File

@ -43,11 +43,7 @@
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
<div class="main container-fluid">
<div class="row">
<div class="col-md-10 order-md-2 order-sm-1">
<main>
[% INCLUDE 'messages.inc' %]
[% WRAPPER 'main-container.inc' aside='biblio-view-menu' %]
[% INCLUDE 'cat-toolbar.inc' %]
<h1>
[% IF ( unknownbiblionumber ) %]
@ -70,16 +66,7 @@
[% ISBD | $raw %]
</div>
[% END %]
</main>
</div> <!-- /.col-md-10.order-md-2 -->
<div class="col-md-2 order-sm-2 order-md-1">
<aside>
[% INCLUDE 'biblio-view-menu.inc' %]
</aside>
</div> <!-- /.col-md-2.order-md-1 -->
</div> <!-- /.row -->
</div> <!-- /.main.container-fluid -->
[% END %]
[% IF ( Koha.Preference('CatalogConcerns') ) %]
[% INCLUDE 'modals/add_catalog_concern.inc' %]

View File

@ -44,24 +44,7 @@
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
<div class="main container-fluid">
[% IF ( unknownbiblionumber ) %]
<main>
<div class="row">
<div class="col">
[% INCLUDE 'messages.inc' %]
<h1>Unknown record</h1>
<div class="alert alert-info">The record you requested does not exist ([% biblionumber | html %]).</div>
</div> <!-- /.col -->
</div> <!-- /.row -->
</main>
[% ELSE %]
<div class="row">
<div class="col-md-10 order-md-2 order-sm-1">
<main>
[% INCLUDE 'messages.inc' %]
[% WRAPPER 'main-container.inc' aside='biblio-view-menu' %]
[% INCLUDE 'cat-toolbar.inc' %]
@ -200,21 +183,8 @@
[% END # /tab_panels %]
[% END # /WRAPPER tabs %]
</main>
</div> <!-- /.col-md-10.order-md-2 -->
<div class="col-md-2 order-sm-2 order-md-1">
<aside>
[% INCLUDE 'biblio-view-menu.inc' %]
</aside>
</div> <!-- /.col-md-2.order-md-1 -->
</div> <!-- /.row -->
</div> <!-- /.main.container-fluid -->
[% END %]
</div> <!-- /.main.container-fluid -->
[% IF ( Koha.Preference('CatalogConcerns') ) %]
[% INCLUDE 'modals/add_catalog_concern.inc' %]
[% END %]

View File

@ -43,11 +43,7 @@
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
<div class="main container-fluid">
<div class="row">
<div class="col-md-10 offset-md-1 col-lg-8 offset-lg-2">
[% INCLUDE 'messages.inc' %]
[% WRAPPER 'main-container.inc' %]
<form action="search.pl" method="get">
<div id="advanced-search">
[% IF edit_filter %]
@ -373,9 +369,7 @@
<!-- /RANK LIMITS -->
</div> <!-- /#advanced-search -->
</form>
</div>
</div>
</div> <!-- /.main.container-fluid -->
[% END %]
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/browser.js") | $raw %]

View File

@ -76,25 +76,9 @@
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
<div class="main container-fluid">
[% IF ( unknownbiblionumber ) %]
<main>
<div class="row">
<div class="col">
[% INCLUDE 'messages.inc' %]
<div class="alert alert-info">The record you requested does not exist ([% biblionumber | html %]).</div>
</div> <!-- /.col -->
</div> <!-- /.row -->
</main>
[% ELSE %]
<div class="row">
<div class="col-md-10 order-md-2 order-sm-1">
<main>
[% WRAPPER 'main-container.inc' aside='biblio-view-menu' %]
<div class="row">
<div class="col">
[% INCLUDE 'messages.inc' %]
[% IntranetCoce = Koha.Preference('IntranetCoce') %]
[% CoceProviders = Koha.Preference('CoceProviders') %]
[% CoceHost = Koha.Preference('CoceHost') %]
@ -1002,15 +986,6 @@
</div>
</div>
</div> <!-- /#elasticPreview.modal -->
</main>
</div> <!-- /.col-sm-10.col-sm-push-2 -->
<div class="col-md-2 order-sm-2 order-md-1">
<aside>
[% INCLUDE 'biblio-view-menu.inc' %]
</aside>
</div> <!-- /.col-sm-2.col-sm-pull-10 -->
</div> <!-- /.row -->
[% END %]
<div class="modal" id="modal-item-group-create" tabindex="-1" role="dialog" aria-labelledby="modal-item-group-create-label">
@ -1214,7 +1189,6 @@
[% IF ( ( Koha.Preference('CatalogConcerns') || Koha.Preference('OpacCatalogConcerns') ) && CAN_user_editcatalogue_edit_catalogue ) %]
[% INCLUDE 'modals/display_ticket.inc' %]
[% END %]
</div> <!-- /.main.container-fluid -->
[% MACRO jsinclude BLOCK %]
[% INCLUDE 'calendar.inc' %]

View File

@ -49,12 +49,7 @@
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
<div class="main container-fluid">
<div class="row">
<div class="col-md-10 order-md-2 order-sm-1">
<main>
[% INCLUDE 'messages.inc' %]
[% WRAPPER 'main-container.inc' aside='biblio-view-menu' %]
[% INCLUDE 'cat-toolbar.inc' %]
<h1>Images for <em>[% INCLUDE 'biblio-title.inc' %]</em></h1>
@ -126,16 +121,7 @@
<div class="alert alert-info">Local images have not been enabled by your system administrator.</div>
[% END %]
</main>
</div> <!-- /.col-md-10.order-md-2 -->
<div class="col-md-2 order-sm-2 order-md-1">
<aside>
[% INCLUDE 'biblio-view-menu.inc' %]
</aside>
</div> <!-- /.col-md-2.order-md-1 -->
</div> <!-- /.row -->
</div> <!-- /.main.container-fluid -->
[% END %]
[% IF ( Koha.Preference('CatalogConcerns') ) %]
[% INCLUDE 'modals/add_catalog_concern.inc' %]

View File

@ -36,12 +36,7 @@
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
<div class="main container-fluid">
<div class="row">
<div class="col-md-10 order-md-2 order-sm-1">
<main>
[% INCLUDE 'messages.inc' %]
[% WRAPPER 'main-container.inc' aside='biblio-view-menu' %]
<h1>Checkout history for [% INCLUDE 'biblio-title.inc' %]</h1>
[% IF biblio.author %]<h3>by [% biblio.author | html %]</h3>[% END %]
@ -123,17 +118,7 @@
[% END %]
</div>
</main>
</div> <!-- /.col-md-10.order-md-2 -->
<div class="col-md-2 order-sm-2 order-md-1">
<aside>
[% INCLUDE 'biblio-view-menu.inc' %]
</aside>
</div> <!-- /.col-md-2.order-md-1 -->
</div> <!-- /.row -->
</div> <!-- /.main.container-fluid -->
[% END %]
[% MACRO jsinclude BLOCK %]
[% INCLUDE 'datatables.inc' %]

View File

@ -194,10 +194,7 @@
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
<div class="main container-fluid">
<div class="row">
<div class="col-md-10 offset-md-1 col-lg-8 offset-lg-2">
[% INCLUDE 'messages.inc' %]
[% WRAPPER 'main-container.inc' %]
<div id="item-search-block">
<h1>Item search</h1>
@ -340,17 +337,14 @@
</div>
</fieldset>
</form>
</div>
</div>
</div>
[% END %]
<div class="row">
<div class="col-md-12">
<div id="results-wrapper">
</div>
</div>
</div>
</div> <!-- /.main.container-fluid -->
</div>
<form method="POST" action="/cgi-bin/koha/tools/batchMod.pl" id="batch_item_operations">
<!-- dummy values which will be replaced by JavaScript -->

View File

@ -38,23 +38,7 @@
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
<div class="main container-fluid">
[% IF ( unknownbiblionumber ) %]
<main>
<div class="row">
<div class="col">
[% INCLUDE 'messages.inc' %]
<div class="alert alert-info">The record you requested does not exist ([% biblionumber | html %]).</div>
</div> <!-- /.col -->
</div> <!-- /.row -->
</main>
[% ELSE %]
<div class="row">
<div class="col-md-10 order-md-2 order-sm-1">
<main>
[% INCLUDE 'messages.inc' %]
[% WRAPPER 'main-container.inc' aside='biblio-view-menu' %]
[% INCLUDE 'cat-toolbar.inc' %]
<h1>
@ -91,18 +75,7 @@
</table>
</div>
</div>
</main>
</div> <!-- /.col-md-10.order-md-2 -->
<div class="col-md-2 order-sm-2 order-md-1">
<aside>
[% INCLUDE 'biblio-view-menu.inc' %]
</aside>
</div> <!-- /.col-md-2.order-md-1 -->
</div> <!-- /.row -->
</div> <!-- /.main.container-fluid -->
[% END %]
</div> <!-- /.main.container-fluid -->
[% IF ( Koha.Preference('CatalogConcerns') ) %]
[% INCLUDE 'modals/add_catalog_concern.inc' %]

View File

@ -36,11 +36,7 @@
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
<div class="main container-fluid">
<div class="row">
<div class="col-md-10 order-md-2 order-sm-1">
<main>
[% INCLUDE 'messages.inc' %]
[% WRAPPER 'main-container.inc' aside='biblio-view-menu' %]
[% INCLUDE 'cat-toolbar.inc' %]
<h1>Item details for [% INCLUDE 'biblio-title-head.inc' %]</h1>
@ -504,16 +500,7 @@
</div> <!-- /.page-section -->
[% END # /FOREACH ITEM_DAT %]
</div> <!-- /#catalogue_detail_biblio -->
</main>
</div> <!-- /.col-md-10.order-md-2 -->
<div class="col-md-2 order-sm-2 order-md-1">
<aside>
[% INCLUDE 'biblio-view-menu.inc' %]
</aside>
</div> <!-- /.col-md-2.order-md-1 -->
</div> <!-- /.row -->
</div> <!-- /.main.container-fluid -->
[% END %]
[% IF ( Koha.Preference('CatalogConcerns') ) %]
[% INCLUDE 'modals/add_catalog_concern.inc' %]

View File

@ -65,11 +65,7 @@
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
<div class="main container-fluid">
<div class="row">
<div class="col-md-10 order-md-2 order-sm-1">
<main>
[% INCLUDE 'messages.inc' %]
[% WRAPPER 'main-container.inc' aside='facets' %]
<h1>Search results</h1>
@ -766,16 +762,7 @@
<input type="hidden" name="multi_listadd" value="1"/>
</form>
</main>
</div> <!-- /.col-md-10.order-md-2 -->
<div class="col-md-2 order-sm-2 order-md-1">
<aside>
[% INCLUDE 'facets.inc' %]
</aside>
</div> <!-- /.col-md-2.order-md-1 -->
</div> <!-- /.row -->
</div> <!-- /.main.container-fluid -->
[% END %]
<input type="hidden" id="query_json" value="[% query_json | html %]">
<input type="hidden" id="limit_json" value="[% limit_json | html %]">

View File

@ -30,10 +30,7 @@
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
<div class="main container-fluid">
<div class="row">
<div class="col-md-12 col-lg-8 offset-lg-2">
[% INCLUDE 'messages.inc' %]
[% WRAPPER 'main-container.inc' %]
<h1>Search history</h1>
@ -217,10 +214,7 @@
[% END # /tab_panel#authority_tab %]
[% END # /WRAPPER tab_panels %]
[% END # /WRAPPER tabs %]
</div> [%# /div.col-md-8 %]
</div> [%# /div.row %]
</div> <!-- /.main.container-fluid -->
[% END %]
[% MACRO jsinclude BLOCK %]
[% INCLUDE 'datatables.inc' %]

View File

@ -33,11 +33,7 @@
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
<div class="main container-fluid">
<div class="row">
<div class="col-md-10 order-md-2 order-sm-1">
<main>
[% INCLUDE 'messages.inc' %]
[% WRAPPER 'main-container.inc' aside='biblio-view-menu' %]
<div id="catalogue_detail_biblio">
@ -193,16 +189,7 @@
</div>
</main>
</div> <!-- /.col-md-10.order-md-2 -->
<div class="col-md-2 order-sm-2 order-md-1">
<aside>
[% INCLUDE 'biblio-view-menu.inc' %]
</aside>
</div> <!-- /.col-md-2.order-md-1 -->
</div> <!-- /.row -->
</div> <!-- /.main.container-fluid -->
[% END %]
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/browser.js") | $raw %]